LibreOffice Module vcl (master) 1
|
Indirect object: something with a unique ID. More...
#include <pdfdocument.hxx>
Public Member Functions | |
PDFObjectElement (PDFDocument &rDoc, double fObjectValue, double fGenerationValue) | |
bool | Read (SvStream &rStream) override |
PDFElement * | Lookup (const OString &rDictionaryKey) |
PDFObjectElement * | LookupObject (const OString &rDictionaryKey) |
double | GetObjectValue () const |
void | SetDictionaryOffset (sal_uInt64 nDictionaryOffset) |
sal_uInt64 | GetDictionaryOffset () |
void | SetDictionaryLength (sal_uInt64 nDictionaryLength) |
sal_uInt64 | GetDictionaryLength () |
PDFDictionaryElement * | GetDictionary () |
void | SetDictionary (PDFDictionaryElement *pDictionaryElement) |
void | SetNumberElement (PDFNumberElement *pNumberElement) |
PDFNumberElement * | GetNumberElement () const |
const std::map< OString, PDFElement * > & | GetDictionaryItems () |
Get access to the parsed key-value items from the object dictionary. More... | |
const std::vector< PDFReferenceElement * > & | GetDictionaryReferences () const |
void | AddDictionaryReference (PDFReferenceElement *pReference) |
void | SetArray (PDFArrayElement *pArrayElement) |
void | SetStream (PDFStreamElement *pStreamElement) |
PDFStreamElement * | GetStream () const |
Access to the stream of the object, if it has any. More... | |
void | SetArrayOffset (sal_uInt64 nArrayOffset) |
sal_uInt64 | GetArrayOffset () const |
void | SetArrayLength (sal_uInt64 nArrayLength) |
sal_uInt64 | GetArrayLength () const |
PDFArrayElement * | GetArray () |
void | ParseStoredObjects () |
Parse objects stored in this object stream. More... | |
std::vector< std::unique_ptr< PDFElement > > & | GetStoredElements () |
SvMemoryStream * | GetStreamBuffer () const |
void | SetStreamBuffer (std::unique_ptr< SvMemoryStream > &pStreamBuffer) |
PDFDocument & | GetDocument () |
void | writeString (OStringBuffer &) override |
Public Member Functions inherited from vcl::filter::PDFElement | |
PDFElement ()=default | |
virtual bool | Read (SvStream &rStream)=0 |
virtual | ~PDFElement ()=default |
void | setVisiting (bool bVisiting) |
bool | alreadyVisiting () const |
void | setParsing (bool bParsing) |
bool | alreadyParsing () const |
virtual void | writeString (OStringBuffer &rBuffer)=0 |
Private Member Functions | |
void | parseIfNecessary () |
Private Attributes | |
PDFDocument & | m_rDoc |
The document owning this element. More... | |
double | m_fObjectValue |
double | m_fGenerationValue |
PDFNumberElement * | m_pNumberElement |
If set, the object contains this number element (outside any dictionary/array). More... | |
sal_uInt64 | m_nDictionaryOffset |
Position after the '<<' token. More... | |
sal_uInt64 | m_nDictionaryLength |
Length of the dictionary buffer till (before) the '>>' token. More... | |
PDFDictionaryElement * | m_pDictionaryElement |
sal_uInt64 | m_nArrayOffset |
Position after the '[' token, if m_pArrayElement is set. More... | |
sal_uInt64 | m_nArrayLength |
Length of the array buffer till (before) the ']' token. More... | |
PDFArrayElement * | m_pArrayElement |
The contained direct array, if any. More... | |
PDFStreamElement * | m_pStreamElement |
The stream of this object, used when this is an object stream. More... | |
std::vector< std::unique_ptr< PDFObjectElement > > | m_aStoredElements |
Objects of an object stream. More... | |
std::vector< std::unique_ptr< PDFElement > > | m_aElements |
Elements of an object in an object stream. More... | |
std::unique_ptr< SvMemoryStream > | m_pStreamBuffer |
Uncompressed buffer of an object in an object stream. More... | |
std::vector< PDFReferenceElement * > | m_aDictionaryReferences |
List of all reference elements inside this object's dictionary and nested dictionaries. More... | |
bool | m_bParsed |
Indirect object: something with a unique ID.
Definition at line 68 of file pdfdocument.hxx.
vcl::filter::PDFObjectElement::PDFObjectElement | ( | PDFDocument & | rDoc, |
double | fObjectValue, | ||
double | fGenerationValue | ||
) |
Definition at line 2287 of file pdfdocument.cxx.
References m_rDoc.
void vcl::filter::PDFObjectElement::AddDictionaryReference | ( | PDFReferenceElement * | pReference | ) |
Definition at line 2468 of file pdfdocument.cxx.
References m_aDictionaryReferences.
PDFArrayElement * vcl::filter::PDFObjectElement::GetArray | ( | ) |
Definition at line 2488 of file pdfdocument.cxx.
References m_pArrayElement, and parseIfNecessary().
Referenced by vcl::PDFObjectCopier::copyExternalResource(), and vcl::filter::PDFDocument::WritePageObject().
sal_uInt64 vcl::filter::PDFObjectElement::GetArrayLength | ( | ) | const |
Definition at line 2443 of file pdfdocument.cxx.
References m_nArrayLength.
sal_uInt64 vcl::filter::PDFObjectElement::GetArrayOffset | ( | ) | const |
Definition at line 2398 of file pdfdocument.cxx.
References m_nArrayOffset.
PDFDictionaryElement * vcl::filter::PDFObjectElement::GetDictionary | ( | ) |
Definition at line 2445 of file pdfdocument.cxx.
References m_pDictionaryElement, and parseIfNecessary().
Referenced by vcl::PDFObjectCopier::copyExternalResource(), vcl::filter::PDFDocument::WriteCatalogObject(), and vcl::filter::PDFDocument::WritePageObject().
const std::map< OString, PDFElement * > & vcl::filter::PDFObjectElement::GetDictionaryItems | ( | ) |
Get access to the parsed key-value items from the object dictionary.
Definition at line 2473 of file pdfdocument.cxx.
References vcl::filter::PDFDictionaryElement::GetItems(), m_pDictionaryElement, and parseIfNecessary().
Referenced by vcl::PDFObjectCopier::copyExternalResource(), vcl::PDFObjectCopier::copyExternalResources(), and Lookup().
sal_uInt64 vcl::filter::PDFObjectElement::GetDictionaryLength | ( | ) |
Definition at line 2435 of file pdfdocument.cxx.
References m_nDictionaryLength, and parseIfNecessary().
Referenced by vcl::filter::PDFDocument::WriteCatalogObject(), and vcl::filter::PDFDocument::WritePageObject().
sal_uInt64 vcl::filter::PDFObjectElement::GetDictionaryOffset | ( | ) |
Definition at line 2390 of file pdfdocument.cxx.
References m_nDictionaryOffset, and parseIfNecessary().
Referenced by vcl::filter::PDFDocument::WriteCatalogObject(), and vcl::filter::PDFDocument::WritePageObject().
const std::vector< PDFReferenceElement * > & vcl::filter::PDFObjectElement::GetDictionaryReferences | ( | ) | const |
Definition at line 2463 of file pdfdocument.cxx.
References m_aDictionaryReferences.
PDFDocument & vcl::filter::PDFObjectElement::GetDocument | ( | ) |
Definition at line 2640 of file pdfdocument.cxx.
References m_rDoc.
Referenced by vcl::PDFObjectCopier::copyExternalResources(), and vcl::PDFWriterImpl::writeReferenceXObject().
PDFNumberElement * vcl::filter::PDFObjectElement::GetNumberElement | ( | ) | const |
Definition at line 2461 of file pdfdocument.cxx.
References m_pNumberElement.
Referenced by vcl::PDFObjectCopier::copyExternalResource().
double vcl::filter::PDFObjectElement::GetObjectValue | ( | ) | const |
Definition at line 2383 of file pdfdocument.cxx.
References m_fObjectValue.
Referenced by vcl::PDFObjectCopier::copyExternalResource(), vcl::filter::PDFDocument::GetPages(), vcl::filter::PDFArrayElement::PushBack(), vcl::filter::PDFDocument::WriteAnnotObject(), vcl::filter::PDFDocument::WriteCatalogObject(), and vcl::filter::PDFDocument::WritePageObject().
std::vector< std::unique_ptr< PDFElement > > & vcl::filter::PDFObjectElement::GetStoredElements | ( | ) |
Definition at line 2628 of file pdfdocument.cxx.
References m_aElements.
Referenced by ParseStoredObjects().
PDFStreamElement * vcl::filter::PDFObjectElement::GetStream | ( | ) | const |
Access to the stream of the object, if it has any.
Definition at line 2486 of file pdfdocument.cxx.
References m_pStreamElement.
Referenced by vcl::PDFObjectCopier::copyExternalResource().
SvMemoryStream * vcl::filter::PDFObjectElement::GetStreamBuffer | ( | ) | const |
Definition at line 2633 of file pdfdocument.cxx.
References m_pStreamBuffer.
Referenced by vcl::filter::PDFDocument::WriteCatalogObject().
PDFElement * vcl::filter::PDFObjectElement::Lookup | ( | const OString & | rDictionaryKey | ) |
Definition at line 2362 of file pdfdocument.cxx.
References GetDictionaryItems(), vcl::filter::PDFDictionaryElement::Lookup(), m_pDictionaryElement, and parseIfNecessary().
Referenced by vcl::PDFObjectCopier::copyExternalResources(), vcl::filter::PDFDocument::GetCatalog(), vcl::filter::PDFDocument::GetSignatureWidgets(), LookupObject(), ParseStoredObjects(), vcl::filter::PDFDocument::Read(), vcl::filter::visitPages(), vcl::filter::PDFDocument::WriteAppearanceObject(), vcl::filter::PDFDocument::WriteCatalogObject(), vcl::filter::PDFDocument::WritePageObject(), vcl::PDFWriterImpl::writeReferenceXObject(), and vcl::filter::PDFDocument::WriteXRef().
PDFObjectElement * vcl::filter::PDFObjectElement::LookupObject | ( | const OString & | rDictionaryKey | ) |
Definition at line 2370 of file pdfdocument.cxx.
References Lookup(), and SAL_WARN.
Referenced by vcl::PDFObjectCopier::copyExternalResources(), vcl::PDFObjectCopier::copyRecursively(), vcl::filter::PDFDocument::GetPages(), vcl::filter::PDFDocument::GetSignatureWidgets(), vcl::filter::visitPages(), vcl::filter::PDFDocument::WriteAppearanceObject(), vcl::filter::PDFDocument::WriteCatalogObject(), vcl::filter::PDFDocument::WritePageObject(), and vcl::PDFWriterImpl::writeReferenceXObject().
|
private |
Definition at line 2342 of file pdfdocument.cxx.
References vcl::filter::PDFDocument::GetElements(), m_aElements, m_bParsed, m_rDoc, and vcl::filter::PDFObjectParser::parse().
Referenced by GetArray(), GetDictionary(), GetDictionaryItems(), GetDictionaryLength(), GetDictionaryOffset(), and Lookup().
void vcl::filter::PDFObjectElement::ParseStoredObjects | ( | ) |
Parse objects stored in this object stream.
Definition at line 2494 of file pdfdocument.cxx.
References aBuf, ZCodec::BeginCompression(), ZCodec::Decompress(), ZCodec::EndCompression(), vcl::filter::PDFDocument::GetEditBuffer(), vcl::filter::PDFStreamElement::GetOffset(), GetStoredElements(), vcl::filter::PDFNumberElement::GetValue(), Lookup(), m_aStoredElements, m_pStreamElement, m_rDoc, nLength, vcl::filter::PDFNumberElement::Read(), SvStream::ReadBytes(), SAL_WARN, SvStream::Seek(), vcl::filter::PDFDocument::SetIDObject(), SetStreamBuffer(), vcl::filter::PDFDocument::SkipWhitespace(), vcl::filter::STORED_OBJECT, SvMemoryStream::TellEnd(), and vcl::filter::PDFDocument::Tokenize().
Referenced by vcl::filter::PDFDocument::Tokenize().
|
overridevirtual |
Implements vcl::filter::PDFElement.
Definition at line 2303 of file pdfdocument.cxx.
References m_fGenerationValue, m_fObjectValue, and SAL_INFO.
void vcl::filter::PDFObjectElement::SetArray | ( | PDFArrayElement * | pArrayElement | ) |
Definition at line 2479 of file pdfdocument.cxx.
References m_pArrayElement.
void vcl::filter::PDFObjectElement::SetArrayLength | ( | sal_uInt64 | nArrayLength | ) |
Definition at line 2441 of file pdfdocument.cxx.
References m_nArrayLength.
void vcl::filter::PDFObjectElement::SetArrayOffset | ( | sal_uInt64 | nArrayOffset | ) |
Definition at line 2396 of file pdfdocument.cxx.
References m_nArrayOffset.
void vcl::filter::PDFObjectElement::SetDictionary | ( | PDFDictionaryElement * | pDictionaryElement | ) |
Definition at line 2451 of file pdfdocument.cxx.
References m_pDictionaryElement.
void vcl::filter::PDFObjectElement::SetDictionaryLength | ( | sal_uInt64 | nDictionaryLength | ) |
Definition at line 2430 of file pdfdocument.cxx.
References m_nDictionaryLength.
void vcl::filter::PDFObjectElement::SetDictionaryOffset | ( | sal_uInt64 | nDictionaryOffset | ) |
Definition at line 2385 of file pdfdocument.cxx.
References m_nDictionaryOffset.
void vcl::filter::PDFObjectElement::SetNumberElement | ( | PDFNumberElement * | pNumberElement | ) |
Definition at line 2456 of file pdfdocument.cxx.
References m_pNumberElement.
void vcl::filter::PDFObjectElement::SetStream | ( | PDFStreamElement * | pStreamElement | ) |
Definition at line 2481 of file pdfdocument.cxx.
References m_pStreamElement.
void vcl::filter::PDFObjectElement::SetStreamBuffer | ( | std::unique_ptr< SvMemoryStream > & | pStreamBuffer | ) |
Definition at line 2635 of file pdfdocument.cxx.
References m_pStreamBuffer.
Referenced by ParseStoredObjects().
|
inlineoverridevirtual |
Implements vcl::filter::PDFElement.
Definition at line 137 of file pdfdocument.hxx.
|
private |
List of all reference elements inside this object's dictionary and nested dictionaries.
Definition at line 97 of file pdfdocument.hxx.
Referenced by AddDictionaryReference(), and GetDictionaryReferences().
|
private |
Elements of an object in an object stream.
Definition at line 92 of file pdfdocument.hxx.
Referenced by GetStoredElements(), and parseIfNecessary().
|
private |
Objects of an object stream.
Definition at line 90 of file pdfdocument.hxx.
Referenced by ParseStoredObjects().
|
private |
Definition at line 99 of file pdfdocument.hxx.
Referenced by parseIfNecessary().
|
private |
Definition at line 73 of file pdfdocument.hxx.
Referenced by Read().
|
private |
Definition at line 72 of file pdfdocument.hxx.
Referenced by GetObjectValue(), and Read().
|
private |
Length of the array buffer till (before) the ']' token.
Definition at line 84 of file pdfdocument.hxx.
Referenced by GetArrayLength(), and SetArrayLength().
|
private |
Position after the '[' token, if m_pArrayElement is set.
Definition at line 82 of file pdfdocument.hxx.
Referenced by GetArrayOffset(), and SetArrayOffset().
|
private |
Length of the dictionary buffer till (before) the '>>' token.
Definition at line 79 of file pdfdocument.hxx.
Referenced by GetDictionaryLength(), and SetDictionaryLength().
|
private |
Position after the '<<' token.
Definition at line 77 of file pdfdocument.hxx.
Referenced by GetDictionaryOffset(), and SetDictionaryOffset().
|
private |
The contained direct array, if any.
Definition at line 86 of file pdfdocument.hxx.
Referenced by GetArray(), and SetArray().
|
private |
Definition at line 80 of file pdfdocument.hxx.
Referenced by GetDictionary(), GetDictionaryItems(), Lookup(), and SetDictionary().
|
private |
If set, the object contains this number element (outside any dictionary/array).
Definition at line 75 of file pdfdocument.hxx.
Referenced by GetNumberElement(), and SetNumberElement().
|
private |
Uncompressed buffer of an object in an object stream.
Definition at line 94 of file pdfdocument.hxx.
Referenced by GetStreamBuffer(), and SetStreamBuffer().
|
private |
The stream of this object, used when this is an object stream.
Definition at line 88 of file pdfdocument.hxx.
Referenced by GetStream(), ParseStoredObjects(), and SetStream().
|
private |
The document owning this element.
Definition at line 71 of file pdfdocument.hxx.
Referenced by GetDocument(), parseIfNecessary(), and ParseStoredObjects().