LibreOffice Module vcl (master) 1
pdfextoutdevdata.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_VCL_PDFEXTOUTDEVDATA_HXX
21#define INCLUDED_VCL_PDFEXTOUTDEVDATA_HXX
22
23#include <vcl/dllapi.h>
24
25#include <vcl/pdfwriter.hxx>
26#include <vcl/extoutdevdata.hxx>
27#include <vector>
28#include <memory>
29
30class Graphic;
31class GDIMetaFile;
32
33namespace vcl
34{
35
36/*
37 A PDFExtOutDevBookmarkEntry is being created by the EditEngine if
38 a bookmark URL has been parsed. The Application is requested to take
39 care of each bookmark entry by emptying out the bookmark vector.
40*/
42{
45 sal_Int32 nLinkId;
46
49 sal_Int32 nDestId;
50
53 OUString aBookmark;
54
56 :nLinkId( -1 )
57 ,nDestId( -1 )
58 {
59 }
60};
61
62/*
63 Class that is being set at the OutputDevice allowing the
64 application to send enhanced PDF commands like CreateLink
65*/
66struct PageSyncData;
67struct GlobalSyncData;
69{
70
72
83 bool mbExportNDests; //i56629
84 sal_Int32 mnPage;
86 css::lang::Locale maDocLocale;
87
88 std::unique_ptr<PageSyncData> mpPageSyncData;
89 std::unique_ptr<GlobalSyncData> mpGlobalSyncData;
90
91 std::vector< PDFExtOutDevBookmarkEntry > maBookmarks;
92 std::vector<OUString> maChapterNames;
93
94public:
95
96 PDFExtOutDevData( const OutputDevice& rOutDev );
97 virtual ~PDFExtOutDevData() override;
98
99 bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const GDIMetaFile& rMtf );
100 void ResetSyncData();
101
102 void PlayGlobalActions( PDFWriter& rWriter );
103
104 bool GetIsExportNotes() const { return mbExportNotes;}
105 void SetIsExportNotes( const bool bExportNotes );
106
107 bool GetIsExportNotesPages() const { return mbExportNotesPages;}
108 void SetIsExportNotesPages( const bool bExportNotesPages );
109
110 bool GetIsExportTaggedPDF() const { return mbTaggedPDF;}
111 void SetIsExportTaggedPDF( const bool bTaggedPDF );
112
113 bool GetIsExportTransitionEffects() const { return mbTransitionEffects;}
114 void SetIsExportTransitionEffects( const bool bTransitionalEffects );
115
116 bool GetIsExportFormFields() const { return mbExportFormFields;}
117 void SetIsExportFormFields( const bool bExportFormFields );
118
119 bool GetIsExportBookmarks() const { return mbExportBookmarks;}
120 void SetIsExportBookmarks( const bool bExportBookmarks );
121
122 bool GetIsExportHiddenSlides() const { return mbExportHiddenSlides;}
123 void SetIsExportHiddenSlides( const bool bExportHiddenSlides );
124
125 void SetIsSinglePageSheets( const bool bSinglePageSheets );
126
127 bool GetIsExportNamedDestinations() const { return mbExportNDests;} //i56629
128 void SetIsExportNamedDestinations( const bool bExportNDests ); //i56629
129
130 // PageNumber, Compression is being set by the PDFExport
131 sal_Int32 GetCurrentPageNumber() const { return mnPage;}
132 void SetCurrentPageNumber( const sal_Int32 nPage );
133
134 bool GetIsLosslessCompression() const { return mbUseLosslessCompression;}
135 void SetIsLosslessCompression( const bool bLosslessCompression );
136
137 void SetCompressionQuality( const sal_Int32 nQuality );
138
139 bool GetIsReduceImageResolution() const { return mbReduceImageResolution;}
140 void SetIsReduceImageResolution( const bool bReduceImageResolution );
141
142 const css::lang::Locale& GetDocumentLocale() const { return maDocLocale;}
143 void SetDocumentLocale( const css::lang::Locale& rLoc );
144
145 std::vector< PDFExtOutDevBookmarkEntry >& GetBookmarks() { return maBookmarks;}
146 const std::vector<OUString>& GetChapterNames() const { return maChapterNames; }
147
148 const Graphic& GetCurrentGraphic() const;
149
154 void BeginGroup();
155
179 void EndGroup( const Graphic& rGraphic,
180 sal_uInt8 nTransparency,
181 const tools::Rectangle& rOutputRect,
182 const tools::Rectangle& rVisibleOutputRect );
183
185 bool HasAdequateCompression( const Graphic &rGraphic,
186 const tools::Rectangle &rOutputRect,
187 const tools::Rectangle &rVisibleOutputRect ) const;
188
189//--->i56629
207 sal_Int32 CreateNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr = -1 );
208
220 sal_Int32 RegisterDest();
221
224 void DescribeRegisteredDest( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType = PDFWriter::DestAreaType::XYZ );
225
226//<---i56629
227
244 sal_Int32 CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::DestAreaType::XYZ );
259 sal_Int32 CreateLink( const tools::Rectangle& rRect, sal_Int32 nPageNr = -1 );
260
262 sal_Int32 CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr);
263
273 void SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
286 void SetLinkURL( sal_Int32 nLinkId, const OUString& rURL );
287
289 void SetScreenURL(sal_Int32 nScreenId, const OUString& rURL);
291 void SetScreenStream(sal_Int32 nScreenId, const OUString& rURL);
292
309 sal_Int32 CreateOutlineItem( sal_Int32 nParent, const OUString& rText, sal_Int32 nDestID );
310
324 void CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr = -1 );
325
361 sal_Int32 BeginStructureElement( PDFWriter::StructElement eType, const OUString& rAlias = OUString() );
366 void EndStructureElement();
386 bool SetCurrentStructureElement( sal_Int32 nElement );
392 sal_Int32 GetCurrentStructureElement() const;
393
407 void SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal );
421 void SetStructureAttributeNumerical( PDFWriter::StructAttribute eAttr, sal_Int32 nValue );
432 void SetStructureBoundingBox( const tools::Rectangle& rRect );
433
444 void SetActualText( const OUString& rText );
445
455 void SetAlternateText( const OUString& rText );
456
467 void SetPageTransition( PDFWriter::PageTransition eType, sal_uInt32 nMilliSec );
468
478 void CreateControl( const PDFWriter::AnyWidget& rControlType );
479};
480
481}
482
483#endif
484
485/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
std::unique_ptr< GlobalSyncData > mpGlobalSyncData
bool GetIsLosslessCompression() const
std::unique_ptr< PageSyncData > mpPageSyncData
std::vector< PDFExtOutDevBookmarkEntry > & GetBookmarks()
bool GetIsExportTaggedPDF() const
bool GetIsExportHiddenSlides() const
bool GetIsReduceImageResolution() const
css::lang::Locale maDocLocale
bool GetIsExportFormFields() const
std::vector< PDFExtOutDevBookmarkEntry > maBookmarks
bool GetIsExportBookmarks() const
bool GetIsExportNotesPages() const
std::vector< OUString > maChapterNames
bool GetIsExportNamedDestinations() const
const std::vector< OUString > & GetChapterNames() const
bool GetIsExportTransitionEffects() const
const css::lang::Locale & GetDocumentLocale() const
const OutputDevice & mrOutDev
sal_Int32 GetCurrentPageNumber() const
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
sal_Int32 nLinkId
ID of the link pointing to the bookmark, or -1 if the entry denotes a destination instead of a link.
OUString aBookmark
link target name, respectively destination name
sal_Int32 nDestId
ID of the named destination denoted by the bookmark, or -1 if the entry denotes a link instead of a n...
unsigned char sal_uInt8