/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// this is an abstract base class for identifying // entries that can contain sub elements besides comments
PDFContainer() : PDFEntry(), m_nOffset( 0 ) {} virtual ~PDFContainer() override; bool emitSubElements( EmitContext& rWriteContext ) const; void cloneSubElements( std::vector<std::unique_ptr<PDFEntry>>& rNewSubElements ) const;
// inserting a value of NULL will remove rName and the previous value // from the dictionary void insertValue( const OString& rName, std::unique_ptr<PDFEntry> pValue ); // removes a name/value pair from the dict void eraseValue( std::string_view rName ); // builds new map as of sub elements // returns NULL if successful, else the first offending element
PDFEntry* buildMap();
};
struct PDFStream final : public PDFEntry
{ unsignedint m_nBeginOffset; unsignedint m_nEndOffset; // offset of the byte after the stream
PDFDict* m_pDict;
struct PDFFileImplData; struct PDFFile final : public PDFContainer
{ private: mutable std::unique_ptr<PDFFileImplData> m_pData;
PDFFileImplData* impl_getData() const; public: unsignedint m_nMajor; // PDF major unsignedint m_nMinor; // PDF minor
// this method checks whether rPwd is compatible with // either user or owner password and sets up decrypt data in that case // returns true if decryption can be done bool setupDecryptionData( const OString& rPwd ) const;
// writes only the contained stream, deflated if necessary void writeStream( EmitContext& rContext, const PDFFile* pPDFFile ) const;
private: // returns true if stream is deflated // fills *ppStream and *pBytes with start of stream and count of bytes // memory returned in *ppStream must be freed with std::free afterwards // fills in NULL and 0 in case of error bool getDeflatedStream( std::unique_ptr<char[]>& rpStream, unsignedint* pBytes, const PDFContainer* pObjectContainer, EmitContext& rContext ) const;
};
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.33Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.