LibreOffice Module vcl (master)  1
objectcopier.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #pragma once
11 
12 #include <map>
13 #include <vector>
14 
15 #include <rtl/strbuf.hxx>
16 #include <rtl/string.hxx>
17 #include <sal/types.h>
18 #include <vcl/dllapi.h>
19 
20 class SvMemoryStream;
21 
22 namespace vcl
23 {
24 class PDFObjectContainer;
25 namespace filter
26 {
27 class PDFObjectElement;
28 class PDFElement;
29 }
30 
33 {
35 
36  void copyRecursively(OStringBuffer& rLine, filter::PDFElement* pInputElement,
37  SvMemoryStream& rDocBuffer,
38  std::map<sal_Int32, sal_Int32>& rCopiedResources);
39 
40 public:
42 
45  OString copyExternalResources(filter::PDFObjectElement& rPage, const OString& rKind,
46  std::map<sal_Int32, sal_Int32>& rCopiedResources);
47 
50  sal_Int32 copyExternalResource(SvMemoryStream& rDocBuffer, filter::PDFObjectElement& rObject,
51  std::map<sal_Int32, sal_Int32>& rCopiedResources);
52 
54  void copyPageResources(filter::PDFObjectElement* pPage, OStringBuffer& rLine);
55 
56  void copyPageResources(filter::PDFObjectElement* pPage, OStringBuffer& rLine,
57  std::map<sal_Int32, sal_Int32>& rCopiedResources);
58 
60  static sal_Int32 copyPageStreams(std::vector<filter::PDFObjectElement*>& rContentStreams,
61  SvMemoryStream& rStream, bool& rCompressed);
62 };
63 }
64 
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void copyRecursively(OStringBuffer &rLine, filter::PDFElement *pInputElement, SvMemoryStream &rDocBuffer, std::map< sal_Int32, sal_Int32 > &rCopiedResources)
A byte range in a PDF file.
Definition: pdfdocument.hxx:50
void copyPageResources(filter::PDFObjectElement *pPage, OStringBuffer &rLine)
Copies resources of pPage into rLine.
Copies objects from one PDF file into another one.
PDFObjectContainer & m_rContainer
Indirect object: something with a unique ID.
Definition: pdfdocument.hxx:68
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 includ...
static sal_Int32 copyPageStreams(std::vector< filter::PDFObjectElement * > &rContentStreams, SvMemoryStream &rStream, bool &rCompressed)
Copies page one or more page streams from rContentStreams into rStream.
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...
PDFObjectCopier(PDFObjectContainer &rContainer)
Allows creating, updating and writing PDF objects in a container.