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
20class SvMemoryStream;
21
22namespace vcl
23{
24class PDFObjectContainer;
25namespace filter
26{
27class PDFObjectElement;
28class PDFElement;
29}
30
33{
35
36 void copyRecursively(OStringBuffer& rLine, filter::PDFElement& rInputElement,
37 SvMemoryStream& rDocBuffer,
38 std::map<sal_Int32, sal_Int32>& rCopiedResources);
39
40public:
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: */
Allows creating, updating and writing PDF objects in a container.
Copies objects from one PDF file into another one.
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...
PDFObjectCopier(PDFObjectContainer &rContainer)
void copyRecursively(OStringBuffer &rLine, filter::PDFElement &rInputElement, SvMemoryStream &rDocBuffer, std::map< sal_Int32, sal_Int32 > &rCopiedResources)
static sal_Int32 copyPageStreams(std::vector< filter::PDFObjectElement * > &rContentStreams, SvMemoryStream &rStream, bool &rCompressed)
Copies page one or more page streams from rContentStreams into rStream.
void copyPageResources(filter::PDFObjectElement *pPage, OStringBuffer &rLine)
Copies resources of pPage into rLine.
PDFObjectContainer & m_rContainer
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.
A byte range in a PDF file.
Definition: pdfdocument.hxx:51
Indirect object: something with a unique ID.
Definition: pdfdocument.hxx:69