LibreOffice Module vcl (master) 1
|
Copies objects from one PDF file into another one. More...
#include <objectcopier.hxx>
Public Member Functions | |
PDFObjectCopier (PDFObjectContainer &rContainer) | |
OString | copyExternalResources (filter::PDFObjectElement &rPage, const OString &rKind, std::map< sal_Int32, sal_Int32 > &rCopiedResources) |
Copies resources of a given kind from an external page to the output, returning what has to be included in the new resource dictionary. More... | |
sal_Int32 | copyExternalResource (SvMemoryStream &rDocBuffer, filter::PDFObjectElement &rObject, std::map< sal_Int32, sal_Int32 > &rCopiedResources) |
Copies a single resource from an external document, returns the new object ID in our document. More... | |
void | copyPageResources (filter::PDFObjectElement *pPage, OStringBuffer &rLine) |
Copies resources of pPage into rLine. More... | |
void | copyPageResources (filter::PDFObjectElement *pPage, OStringBuffer &rLine, std::map< sal_Int32, sal_Int32 > &rCopiedResources) |
Static Public Member Functions | |
static sal_Int32 | copyPageStreams (std::vector< filter::PDFObjectElement * > &rContentStreams, SvMemoryStream &rStream, bool &rCompressed) |
Copies page one or more page streams from rContentStreams into rStream. More... | |
Private Member Functions | |
void | copyRecursively (OStringBuffer &rLine, filter::PDFElement &rInputElement, SvMemoryStream &rDocBuffer, std::map< sal_Int32, sal_Int32 > &rCopiedResources) |
Private Attributes | |
PDFObjectContainer & | m_rContainer |
Copies objects from one PDF file into another one.
Definition at line 32 of file objectcopier.hxx.
vcl::PDFObjectCopier::PDFObjectCopier | ( | PDFObjectContainer & | rContainer | ) |
Definition at line 24 of file pdfobjectcopier.cxx.
sal_Int32 vcl::PDFObjectCopier::copyExternalResource | ( | SvMemoryStream & | rDocBuffer, |
filter::PDFObjectElement & | rObject, | ||
std::map< sal_Int32, sal_Int32 > & | rCopiedResources | ||
) |
Copies a single resource from an external document, returns the new object ID in our document.
Definition at line 75 of file pdfobjectcopier.cxx.
References vcl::PDFObjectContainer::checkAndEnableStreamEncryption(), copyRecursively(), vcl::PDFObjectContainer::createObject(), vcl::PDFObjectContainer::disableStreamEncryption(), vcl::filter::PDFObjectElement::GetArray(), SvMemoryStream::GetData(), vcl::filter::PDFObjectElement::GetDictionary(), vcl::filter::PDFObjectElement::GetDictionaryItems(), vcl::filter::PDFStreamElement::GetMemory(), vcl::filter::PDFObjectElement::GetNumberElement(), vcl::filter::PDFObjectElement::GetObjectValue(), SvMemoryStream::GetSize(), vcl::filter::PDFObjectElement::GetStream(), m_rContainer, SAL_INFO, vcl::PDFObjectContainer::updateObject(), and vcl::PDFObjectContainer::writeBuffer().
Referenced by copyExternalResources(), copyRecursively(), and vcl::PDFWriterImpl::writeReferenceXObject().
OString vcl::PDFObjectCopier::copyExternalResources | ( | filter::PDFObjectElement & | rPage, |
const OString & | rKind, | ||
std::map< sal_Int32, sal_Int32 > & | rCopiedResources | ||
) |
Copies resources of a given kind from an external page to the output, returning what has to be included in the new resource dictionary.
Definition at line 173 of file pdfobjectcopier.cxx.
References copyExternalResource(), vcl::filter::PDFObjectElement::GetDictionaryItems(), vcl::filter::PDFObjectElement::GetDocument(), vcl::filter::PDFDocument::GetEditBuffer(), vcl::filter::PDFObjectElement::Lookup(), vcl::filter::PDFObjectElement::LookupObject(), and pObject.
Referenced by copyPageResources().
void vcl::PDFObjectCopier::copyPageResources | ( | filter::PDFObjectElement * | pPage, |
OStringBuffer & | rLine | ||
) |
Copies resources of pPage into rLine.
Definition at line 269 of file pdfobjectcopier.cxx.
References copyPageResources().
Referenced by copyPageResources(), vcl::filter::PDFDocument::WriteAppearanceObject(), and vcl::PDFWriterImpl::writeReferenceXObject().
void vcl::PDFObjectCopier::copyPageResources | ( | filter::PDFObjectElement * | pPage, |
OStringBuffer & | rLine, | ||
std::map< sal_Int32, sal_Int32 > & | rCopiedResources | ||
) |
Definition at line 276 of file pdfobjectcopier.cxx.
References copyExternalResources().
|
static |
Copies page one or more page streams from rContentStreams into rStream.
Definition at line 289 of file pdfobjectcopier.cxx.
References ZCodec::BeginCompression(), vcl::PDFWriterImpl::compressStream(), ZCodec::Decompress(), ZCodec::EndCompression(), SvMemoryStream::GetData(), vcl::filter::PDFArrayElement::GetElements(), vcl::filter::PDFStreamElement::GetMemory(), SvMemoryStream::GetSize(), SAL_WARN, SvStream::Seek(), SvStream::Tell(), and SvStream::WriteBytes().
Referenced by vcl::filter::PDFDocument::WriteAppearanceObject(), and vcl::PDFWriterImpl::writeReferenceXObject().
|
private |
Definition at line 29 of file pdfobjectcopier.cxx.
References copyExternalResource(), copyRecursively(), vcl::filter::PDFObjectElement::LookupObject(), nRef, and vcl::filter::PDFElement::writeString().
Referenced by copyExternalResource(), and copyRecursively().
|
private |
Definition at line 34 of file objectcopier.hxx.
Referenced by copyExternalResource().