#include <ut_bytebuf.h>
Public Member Functions | |
| UT_ByteBuf (UT_uint32 iChunk=0) | |
| ~UT_ByteBuf () | |
| bool | append (const UT_Byte *pValue, UT_uint32 length) |
| bool | ins (UT_uint32 position, const UT_Byte *pValue, UT_uint32 length) |
| bool | ins (UT_uint32 position, UT_uint32 length) |
| bool | del (UT_uint32 position, UT_uint32 amount) |
| bool | overwrite (UT_uint32 position, const UT_Byte *pValue, UT_uint32 length) |
| void | truncate (UT_uint32 position) |
| UT_uint32 | getLength (void) const |
| const UT_Byte * | getPointer (UT_uint32 position) const |
| bool | writeToFile (const char *pszFileName) const |
| bool | writeToURI (const char *pszURI) const |
| bool | insertFromFile (UT_uint32 iPosition, const char *pszFilename) |
| bool | insertFromURI (UT_uint32 iPosition, const char *pszURI) |
| bool | insertFromInput (UT_uint32 iPosition, GsfInput *fp) |
| bool | insertFromFile (UT_uint32 iPosition, FILE *fp) |
Private Member Functions | |
| bool | _byteBuf (UT_uint32 spaceNeeded) |
Private Attributes | |
| UT_Byte * | m_pBuf |
| UT_uint32 | m_iSize |
| UT_uint32 | m_iSpace |
| UT_uint32 | m_iChunk |
| bool UT_ByteBuf::_byteBuf | ( | UT_uint32 | spaceNeeded | ) | [private] |
References m_iChunk, m_iSize, m_iSpace, m_pBuf, and UT_calloc().
Referenced by ins(), and overwrite().
References ins(), and m_iSize.
Referenced by IE_Imp_Applix::_applixGetLine(), IE_ImpGraphic_Cocoa::_convertGraphic(), AP_Win32App::_copyFmtToClipboard(), XAP_UnixClipboard::_getDataFromServer(), s_AbiWord_1_Listener::_handleDataItems(), IE_Imp_MsWord_97::_handleImage(), IE_Imp_MsWord_97::_handlePositionedImage(), ABI_Collab_Import::_import(), ODi_Abi_Data::_loadStream(), Text_Listener::_outputData(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), IE_Imp_Object::_parseStream(), _write_png(), abi_CairoWrite(), AbiWord_WMF_function(), UT_Multipart::append(), UT_Multipart::append_Base64(), UT_Multipart::append_Quoted(), changed_cb(), UT_svg::charData(), OXMLi_ListenerState_Math::charData(), ODi_Frame_ListenerState::charData(), IE_Imp_XML::charData(), IE_Imp_XHTML::charData(), convCallback(), IE_Imp_MathML_EntityTable::convert(), GR_VectorImage::convertFromBuffer(), GR_RSVGVectorImage::convertFromBuffer(), IE_ImpGraphic_WMF::convertGraphicToSVG(), GR_VectorImage::convertToBuffer(), GR_RSVGVectorImage::convertToBuffer(), convertToPng(), IE_Exp_OpenDocument::copyToBuffer(), IE_Exp_HTML::copyToBuffer(), CreateBMP(), CreateBMPFile(), IE_Imp_RTF::CreateDataItemfromStream(), OXMLi_ListenerState_Math::endElement(), ODi_Frame_ListenerState::endElement(), IE_Imp_XHTML::endElement(), abiword_document::garble_jpeg(), GDIconvertGraphic(), GOComponentView::getSnapShot(), IE_Imp_RTF::HandleField(), IE_Imp_RTF::HandlePCData(), IE_Imp_RTF::LoadPictData(), loadStream(), IE_MailMerge_Delimiter_Listener::mergeFile(), IE_Imp_MSWrite::parse_file(), IE_Imp_XHTML::pasteFromBuffer(), AP_UnixApp::pasteFromClipboard(), AP_CocoaApp::pasteFromClipboard(), XAP_UnixDialog_FileOpenSaveAs::previewPicture(), IE_Imp_MSWrite::read_pic(), IE_Imp_RTF::ReadFontTable(), s_dndDropEvent(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), OXMLi_ListenerState_Math::startElement(), ODi_Frame_ListenerState::startElement(), IE_Imp_XHTML::startElement(), IE_Imp_RTF::StuffCurrentGroup(), StyleListener::tagRaw(), TextboxPage::TextboxPage(), TFTEST_MAIN(), GOComponentView::update(), IE_Exp::write(), and write_png_data().
References m_iChunk, m_iSize, m_iSpace, m_pBuf, and UT_ASSERT.
Referenced by IE_Imp_AbiWord_1::endElement(), and IE_Exp::rewindChar().
| UT_uint32 UT_ByteBuf::getLength | ( | void | ) | const |
References m_iSize.
Referenced by IE_Imp_RTF::_appendHdrFtr(), ABI_Collab_Export::_buildPacket(), IE_ImpGraphic_Win32Native::_convertGraphic(), IE_ImpGraphic_Cocoa::_convertGraphic(), AP_Win32App::_copyFmtToClipboard(), s_XSL_FO_Listener::_handleDataItems(), s_WML_Listener::_handleDataItems(), s_KWord_1_Listener::_handleDataItems(), s_DocBook_Listener::_handleDataItems(), s_AbiWord_1_Listener::_handleDataItems(), IE_RSVGBitmapGraphic::_importGraphic(), _jpegFillInputBuffer(), XAP_UnixDialog_FileOpenSaveAs::_loadXPM(), IE_ImpGraphic_GdkPixbuf::_loadXPM(), s_RTF_ListenerWriteDoc::_openFrame(), s_RTF_ListenerWriteDoc::_openTag(), Text_Listener::_outputData(), IE_Imp_RTF::_parseFldinstBlock(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), FV_View::_pasteFromLocalTo(), _png_write(), _UT_ByteBuf_PNG_read(), s_RTF_ListenerWriteDoc::_writeEmbedData(), IE_Exp_S5::_writeHeader(), s_RTF_ListenerWriteDoc::_writeImageInRTF(), abi_widget_get_selection(), IE_Exp_OpenXML_Listener::addImages(), ODi_Abi_Data::addObjectDataItem(), UT_UTF8String::appendBuf(), IE_Imp_XML::charData(), FV_View::cmdInsertEmbed(), IE_ImpGraphic::constructImporter(), GR_VectorImage::convertFromBuffer(), GR_UnixImage::convertFromBuffer(), GR_CocoaImage::convertFromBuffer(), GR_RSVGVectorImage::convertFromBuffer(), IE_ImpGraphic_WMF::convertGraphic(), IE_ImpGraphic_WMF::convertGraphicToSVG(), GR_VectorImage::convertToBuffer(), GR_RSVGVectorImage::convertToBuffer(), AP_UnixApp::copyToClipboard(), AP_CocoaApp::copyToClipboard(), PD_Document::createDataItem(), IE_MailMerge_Delimiter_Listener::defineItem(), IE_Exp_HTML_DataExporter::encodeDataBase64(), IE_Imp_AbiWord_1::endElement(), GDIconvertGraphic(), GR_Image::getBufferType(), AP_UnixApp::getCurrentSelection(), AP_CocoaApp::getCurrentSelection(), GR_UnixCairoImage::getPixbuf(), GR_EmbedView::getSnapShots(), IE_Imp_XML::importFile(), IE_ImpGraphic::importGraphic(), IE_Imp_MHT::importHTML4(), IE_Imp_MHT::importImage(), IE_Imp_MHT::importXHTML(), GOComponentView::loadBuffer(), IE_ImpGraphic::loadGraphic(), FL_DocLayout::loadPendingObjects(), IE_MailMerge_Delimiter_Listener::mergeFile(), FV_UnixVisualDrag::mouseDrag(), FV_UnixVisualInlineImage::mouseDrag(), FV_UnixFrameEdit::mouseDrag(), UT_XML::parse(), UT_svg::parse(), FV_Selection::pasteRowOrCol(), XAP_UnixDialog_FileOpenSaveAs::pixbufForByteBuf(), IE_ImpGraphic_GdkPixbuf::pixbufForByteBuf(), s_RTF_ListenerWriteDoc::populate(), IE_Imp_MSWrite::read_pic(), IE_Imp_MSWrite::read_txt(), IE_ImpGraphic_Win32Native::ReadBytes(), FL_DocLayout::relocateFrame(), PD_Document::replaceDataItem(), IE_Exp::rewindChar(), s_drag_data_get_cb(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), UT_XML::sniff(), TextboxPage::TextboxPage(), TFTEST_MAIN(), UT_Base64Decode(), UT_Base64Encode(), UT_SVG_getDimensions(), IE_Exp::writeBufferToFile(), IE_Exp_OpenXML::writeImage(), ODe_PicturesWriter::writePictures(), OO_PicturesWriter::writePictures(), and ODe_ThumbnailsWriter::writeThumbnails().
References m_iSize, m_pBuf, and UT_ASSERT.
Referenced by IE_Imp_RTF::_appendHdrFtr(), ABI_Collab_Export::_buildPacket(), IE_ImpGraphic_Win32Native::_convertGraphic(), IE_ImpGraphic_Cocoa::_convertGraphic(), AP_Win32App::_copyFmtToClipboard(), XAP_UnixClipboard::_getDataFromServer(), s_XSL_FO_Listener::_handleDataItems(), s_WML_Listener::_handleDataItems(), s_KWord_1_Listener::_handleDataItems(), s_DocBook_Listener::_handleDataItems(), s_AbiWord_1_Listener::_handleDataItems(), IE_Imp_MsWord_97::_handleImage(), IE_Imp_MsWord_97::_handlePositionedImage(), IE_RSVGBitmapGraphic::_importGraphic(), _jpegFillInputBuffer(), XAP_UnixDialog_FileOpenSaveAs::_loadXPM(), IE_ImpGraphic_GdkPixbuf::_loadXPM(), IE_Exp_HTML_Listener::_makeStylesheet(), s_RTF_ListenerWriteDoc::_openFrame(), s_RTF_ListenerWriteDoc::_openTag(), Text_Listener::_outputData(), IE_Imp_Applix::_parseFile(), IE_Imp_RTF::_parseFldinstBlock(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), FV_View::_pasteFromLocalTo(), _png_read(), _UT_ByteBuf_PNG_read(), s_RTF_ListenerWriteDoc::_writeEmbedData(), IE_Exp_S5::_writeHeader(), s_RTF_ListenerWriteDoc::_writeImageInRTF(), IE_Exp_S5::_writeSlide(), abi_widget_get_selection(), AbiWord_WMF_read(), ODi_Abi_Data::addObjectDataItem(), UT_UTF8String::appendBuf(), FV_View::cmdInsertEmbed(), IE_ImpGraphic::constructImporter(), IE_ImpGraphic_Win32Native::Convert_BMP(), IE_ImpGraphic_BMP::Convert_BMP(), GR_VectorImage::convertFromBuffer(), GR_UnixImage::convertFromBuffer(), GR_CocoaImage::convertFromBuffer(), GR_RSVGVectorImage::convertFromBuffer(), GR_VectorImage::convertToBuffer(), GR_RSVGVectorImage::convertToBuffer(), IE_Exp::copyToBuffer(), AP_UnixApp::copyToClipboard(), AP_CocoaApp::copyToClipboard(), PD_Document::createDataItem(), IE_MailMerge_Delimiter_Listener::defineItem(), IE_Exp_HTML_DataExporter::encodeDataBase64(), OXMLi_ListenerState_Math::endElement(), ODi_Frame_ListenerState::endElement(), IE_Imp_AbiWord_1::endElement(), GDIconvertGraphic(), GR_Image::getBufferType(), AP_UnixApp::getCurrentSelection(), AP_CocoaApp::getCurrentSelection(), GR_UnixCairoImage::getPixbuf(), GR_EmbedView::getSnapShots(), IE_Imp_XML::importFile(), IE_ImpGraphic::importGraphic(), IE_Imp_MHT::importHTML4(), IE_Imp_MHT::importXHTML(), GOComponentView::loadBuffer(), IE_ImpGraphic::loadGraphic(), FL_DocLayout::loadPendingObjects(), FV_UnixVisualDrag::mouseDrag(), FV_UnixVisualInlineImage::mouseDrag(), FV_UnixFrameEdit::mouseDrag(), UT_XML::parse(), UT_svg::parse(), FV_Selection::pasteRowOrCol(), XAP_UnixDialog_FileOpenSaveAs::pixbufForByteBuf(), IE_ImpGraphic_GdkPixbuf::pixbufForByteBuf(), s_RTF_ListenerWriteDoc::populate(), IE_Exp_OpenXML_Listener::populate(), IE_Imp_MSWrite::read_pic(), read_png_data(), IE_Imp_MSWrite::read_txt(), IE_ImpGraphic_Win32Native::ReadBytes(), IE_ImpGraphic_BMP::ReadBytes(), FL_DocLayout::relocateFrame(), PD_Document::replaceDataItem(), IE_Exp::rewindChar(), s_drag_data_get_cb(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), UT_XML::sniff(), TextboxPage::TextboxPage(), TFTEST_MAIN(), UT_Base64Decode(), UT_Base64Encode(), UT_SVG_getDimensions(), IE_Exp::writeBufferToFile(), IE_Exp_OpenXML::writeImage(), ODe_PicturesWriter::writePictures(), OO_PicturesWriter::writePictures(), and ODe_ThumbnailsWriter::writeThumbnails().
References _byteBuf(), m_iSize, m_iSpace, m_pBuf, and UT_ASSERT.
Referenced by _png_write(), ODi_Abi_Data::addObjectDataItem(), OXML_Element_Math::addToPT(), append(), IE_Imp_XML::charData(), FV_View::cmdInsertLatexMath(), AP_Dialog_Latex::convertLatexToMathML(), PD_Document::createDataItem(), ODi_Frame_ListenerState::endElement(), AP_UnixApp::getCurrentSelection(), GR_EmbedView::getSnapShots(), IE_Imp_XHTML::importDataURLImage(), insertFromFile(), insertFromInput(), PD_Document::replaceDataItem(), XAP_Win32Dialog_About::runModal(), TFTEST_MAIN(), UT_Base64Decode(), and UT_Base64Encode().
References _byteBuf(), m_iSize, m_iSpace, and m_pBuf.
| bool UT_ByteBuf::insertFromFile | ( | UT_uint32 | iPosition, | |
| const char * | pszFilename | |||
| ) |
References UT_ASSERT.
| bool UT_ByteBuf::insertFromInput | ( | UT_uint32 | iPosition, | |
| GsfInput * | fp | |||
| ) |
References ins(), m_pBuf, and UT_return_val_if_fail.
Referenced by IE_ImpGraphic::importGraphic(), insertFromURI(), and OXMLi_PackageManager::parseImageStream().
| bool UT_ByteBuf::insertFromURI | ( | UT_uint32 | iPosition, | |
| const char * | pszURI | |||
| ) |
References insertFromInput(), and UT_go_file_open().
References _byteBuf(), m_iSpace, m_pBuf, and UT_ASSERT.
Referenced by IE_Imp_XML::charData(), UT_Base64Decode(), and UT_Base64Encode().
| void UT_ByteBuf::truncate | ( | UT_uint32 | position | ) |
References m_iChunk, m_iSize, m_iSpace, and m_pBuf.
Referenced by IE_Imp_Applix::_applixGetLine(), XAP_UnixClipboard::_getDataFromServer(), s_AbiWord_1_Listener::_handleDataItems(), ODi_Abi_Data::_loadStream(), IE_Imp_XML::charData(), UT_Multipart::clear(), CreateBMP(), CreateBMPFile(), IE_Imp_AbiWord_1::endElement(), AP_UnixApp::getCurrentSelection(), AP_CocoaApp::getCurrentSelection(), IE_Imp_RTF::HandlePCData(), loadStream(), IE_MailMerge_Delimiter_Listener::mergeFile(), IE_Imp_MSWrite::parse_file(), IE_Imp_RTF::ReadFontTable(), PD_Document::replaceDataItem(), GR_RSVGVectorImage::reset(), IE_Imp_AbiWord_1::startElement(), UT_Base64Decode(), and UT_Base64Encode().
| bool UT_ByteBuf::writeToFile | ( | const char * | pszFileName | ) | const |
| bool UT_ByteBuf::writeToURI | ( | const char * | pszURI | ) | const |
References m_iSize, m_pBuf, UT_ASSERT, and UT_go_file_create().
Referenced by Defun1(), IE_Exp_HTML_FileExporter::saveData(), and FV_View::saveSelectedImage().
UT_uint32 UT_ByteBuf::m_iChunk [private] |
Referenced by _byteBuf(), del(), truncate(), and UT_ByteBuf().
UT_uint32 UT_ByteBuf::m_iSize [private] |
Referenced by _byteBuf(), append(), del(), getLength(), getPointer(), ins(), truncate(), writeToFile(), and writeToURI().
UT_uint32 UT_ByteBuf::m_iSpace [private] |
Referenced by _byteBuf(), del(), ins(), overwrite(), and truncate().
UT_Byte* UT_ByteBuf::m_pBuf [private] |
Referenced by _byteBuf(), del(), getPointer(), ins(), insertFromFile(), insertFromInput(), overwrite(), truncate(), writeToFile(), writeToURI(), and ~UT_ByteBuf().
1.7.1