#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 |
| UT_ByteBuf::UT_ByteBuf | ( | UT_uint32 | iChunk = 0 |
) |
References DEFAULT_CHUNK, m_iChunk, and MIN_CHUNK.
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(), ODi_Abi_Data::_loadStream(), Text_Listener::_outputData(), IE_Imp_MSWrite::_parseFile(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), IE_Imp_Object::_parseStream(), _write_png(), AbiWord_WMF_function(), UT_Multipart::append(), UT_Multipart::append_Base64(), UT_Multipart::append_Quoted(), changed_cb(), UT_svg::charData(), ODi_Frame_ListenerState::charData(), IE_Imp_XML::charData(), IE_Imp_XHTML::charData(), convCallback(), IE_Imp_MathML_EntityTable::convert(), GR_VectorImage::convertFromBuffer(), GR_VectorImage::convertToBuffer(), convertToPng(), CreateBMP(), CreateBMPFile(), ODi_Frame_ListenerState::endElement(), IE_Imp_XHTML::endElement(), GOComponentView::exportToSVG(), GDIconvertGraphic(), IE_Imp_RTF::HandleField(), IE_Imp_RTF::HandlePCData(), IE_Imp_RTF::LoadPictData(), loadStream(), IE_MailMerge_Delimiter_Listener::mergeFile(), IE_Imp_XHTML::pasteFromBuffer(), AP_UnixApp::pasteFromClipboard(), AP_CocoaApp::pasteFromClipboard(), XAP_UnixDialog_FileOpenSaveAs::previewPicture(), IE_Imp_RTF::ReadFontTable(), s_dndDropEvent(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), ODi_Frame_ListenerState::startElement(), IE_Imp_XHTML::startElement(), IE_Imp_RTF::StuffCurrentGroup(), TFTEST_MAIN(), GOComponentView::update(), IE_Exp::write(), write_png_data(), and write_to_png().
References _byteBuf(), m_iSize, m_iSpace, m_pBuf, and UT_ASSERT.
Referenced by _png_write(), append(), IE_Imp_XML::charData(), FV_View::cmdInsertLatexMath(), IE_ImpGraphic::convertGraphic(), AP_Dialog_Latex::convertLatexToMathML(), PD_Document::createDataItem(), 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.
References m_iChunk, m_iSize, m_iSpace, m_pBuf, and UT_ASSERT.
Referenced by IE_Imp_AbiWord_1::endElement(), and IE_Exp::rewindChar().
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_MSWrite::_parseFile(), 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_RTF::ReadFontTable(), PD_Document::replaceDataItem(), IE_Imp_AbiWord_1::startElement(), UT_Base64Decode(), and UT_Base64Encode().
| 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_RSVGGraphic::_importGraphic(), IE_ImpGraphic_JPEG::_jpegFillInputBuffer(), XAP_UnixDialog_FileOpenSaveAs::_loadXPM(), IE_ImpGraphic_GdkPixbuf::_loadXPM(), s_RTF_ListenerWriteDoc::_openFrame(), Text_Listener::_outputData(), IE_Imp_RTF::_parseFldinstBlock(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), FV_View::_pasteFromLocalTo(), _png_write(), IE_Exp_S5::_writeHeader(), s_LaTeX_Listener::_writeImage(), s_HTML_Listener::_writeImage(), s_HTML_Listener::_writeImageBase64(), 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(), IE_ImpGraphic_WMF::convertGraphic(), IE_ImpGraphic::convertGraphic(), GR_VectorImage::convertToBuffer(), AP_UnixApp::copyToClipboard(), AP_CocoaApp::copyToClipboard(), PD_Document::createDataItem(), IE_MailMerge_Delimiter_Listener::defineItem(), 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(), 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_char(), read_from_png(), IE_ImpGraphic_Win32Native::ReadBytes(), PD_Document::replaceDataItem(), IE_Exp::rewindChar(), s_drag_data_get_cb(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), UT_XML::sniff(), TFTEST_MAIN(), UT_Base64Decode(), UT_Base64Encode(), UT_SVG_getDimensions(), IE_Exp_OpenXML::writeImage(), ODe_PicturesWriter::writePictures(), and OO_PicturesWriter::writePictures().
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_RSVGGraphic::_importGraphic(), IE_ImpGraphic_JPEG::_jpegFillInputBuffer(), XAP_UnixDialog_FileOpenSaveAs::_loadXPM(), IE_ImpGraphic_GdkPixbuf::_loadXPM(), s_RTF_ListenerWriteDoc::_openFrame(), Text_Listener::_outputData(), IE_Imp_Applix::_parseFile(), IE_Imp_RTF::_parseFldinstBlock(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), FV_View::_pasteFromLocalTo(), _png_read(), XAP_Win32Dialog_FileOpenSaveAs::_previewPicture(), IE_Exp_S5::_writeHeader(), s_LaTeX_Listener::_writeImage(), s_HTML_Listener::_writeImage(), s_HTML_Listener::_writeImageBase64(), 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(), IE_ImpGraphic::convertGraphic(), GR_VectorImage::convertToBuffer(), IE_Exp::copyToBuffer(), AP_UnixApp::copyToClipboard(), AP_CocoaApp::copyToClipboard(), PD_Document::createDataItem(), IE_MailMerge_Delimiter_Listener::defineItem(), 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(), 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_char(), read_from_png(), read_png_data(), IE_ImpGraphic_Win32Native::ReadBytes(), IE_ImpGraphic_BMP::ReadBytes(), PD_Document::replaceDataItem(), IE_Exp::rewindChar(), s_drag_data_get_cb(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), UT_XML::sniff(), TFTEST_MAIN(), UT_Base64Decode(), UT_Base64Encode(), UT_SVG_getDimensions(), IE_Exp_OpenXML::writeImage(), ODe_PicturesWriter::writePictures(), and OO_PicturesWriter::writePictures().
| 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(), FV_View::saveSelectedImage(), and GR_CairoImage::saveToPNG().
| bool UT_ByteBuf::insertFromFile | ( | UT_uint32 | iPosition, | |
| const char * | pszFilename | |||
| ) |
References UT_ASSERT.
Referenced by XAP_Win32Dialog_FileOpenSaveAs::_previewPicture(), and XAP_CocoaDialog_FileOpenSaveAs::_updatePreview.
| bool UT_ByteBuf::insertFromURI | ( | UT_uint32 | iPosition, | |
| const char * | pszURI | |||
| ) |
References insertFromInput(), and UT_go_file_open().
| bool UT_ByteBuf::insertFromInput | ( | UT_uint32 | iPosition, | |
| GsfInput * | fp | |||
| ) |
References ins(), m_pBuf, and UT_return_val_if_fail.
Referenced by IE_ImpGraphic::importGraphic(), and insertFromURI().
| 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().
UT_Byte* UT_ByteBuf::m_pBuf [private] |
Referenced by _byteBuf(), del(), getPointer(), ins(), insertFromFile(), insertFromInput(), overwrite(), truncate(), writeToFile(), writeToURI(), 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_uint32 UT_ByteBuf::m_iChunk [private] |
Referenced by _byteBuf(), del(), truncate(), and UT_ByteBuf().
1.5.5