1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_FILTER_SOURCE_PDF_PDFEXPORT_HXX
21 #define INCLUDED_FILTER_SOURCE_PDF_PDFEXPORT_HXX
23 #include "pdffilter.hxx"
24 #include <tools/multisel.hxx>
25 #include <vcl/pdfwriter.hxx>
26 #include <vcl/pdfextoutdevdata.hxx>
27 #include <com/sun/star/view/XRenderable.hpp>
32 namespace vcl
{ class PDFWriter
; }
39 Reference
< XComponent
> mxSrcDoc
;
40 Reference
< uno::XComponentContext
> mxContext
;
41 Reference
< task::XStatusIndicator
> mxStatusIndicator
;
42 Reference
< task::XInteractionHandler
> mxIH
;
45 sal_Int32 mnPDFTypeSelection
;
47 bool mbExportPlaceholders
;
48 bool mbUseReferenceXObject
;
49 bool mbExportNotesPages
;
50 bool mbExportOnlyNotesPages
;
51 bool mbUseTransitionEffects
;
52 bool mbExportBookmarks
;
53 bool mbExportHiddenSlides
;
54 bool mbSinglePageSheets
;
55 sal_Int32 mnOpenBookmarkLevels
;
57 bool mbUseLosslessCompression
;
58 bool mbReduceImageResolution
;
59 bool mbSkipEmptyPages
;
61 sal_Int32 mnMaxImageResolution
;
63 sal_Int32 mnFormsFormat
;
64 bool mbExportFormFields
;
65 bool mbAllowDuplicateFieldNames
;
66 sal_Int32 mnProgressValue
;
67 bool mbRemoveTransparencies
;
72 OUString msTiledWatermark
;
74 // these variable are here only to have a location in filter/pdf to set the default
75 // to be used by the macro (when the FilterData are set by the macro itself)
76 bool mbHideViewerToolbar
;
77 bool mbHideViewerMenubar
;
78 bool mbHideViewerWindowControls
;
81 bool mbOpenInFullScreenMode
;
82 bool mbDisplayPDFDocumentTitle
;
83 sal_Int32 mnPDFDocumentMode
;
84 sal_Int32 mnPDFDocumentAction
;
86 sal_Int32 mnInitialPage
;
87 sal_Int32 mnPDFPageLayout
;
90 bool mbRestrictPermissions
;
91 sal_Int32 mnPrintAllowed
;
92 sal_Int32 mnChangesAllowed
;
93 bool mbCanCopyOrExtract
;
94 bool mbCanExtractForAccessibility
;
97 bool mbExportRelativeFsysLinks
;
98 sal_Int32 mnDefaultLinkAction
;
99 bool mbConvertOOoTargetToPDFTarget
;
100 bool mbExportBmkToDest
;
101 void ImplExportPage( vcl::PDFWriter
& rWriter
, vcl::PDFExtOutDevData
& rPDFExtOutDevData
,
102 const GDIMetaFile
& rMtf
);
105 OUString msSignLocation
;
106 OUString msSignContact
;
107 OUString msSignReason
;
108 OUString msSignPassword
;
109 Reference
< security::XCertificate
> maSignCertificate
;
112 void ImplWriteWatermark( vcl::PDFWriter
& rWriter
, const Size
& rPageSize
);
113 void ImplWriteTiledWatermark( vcl::PDFWriter
& rWriter
, const Size
& rPageSize
);
118 PDFExport( const Reference
< XComponent
>& rxSrcDoc
,
119 const Reference
< task::XStatusIndicator
>& xStatusIndicator
,
120 const Reference
< task::XInteractionHandler
>& xIH
,
121 const Reference
< uno::XComponentContext
>& xFact
);
124 bool ExportSelection( vcl::PDFWriter
& rPDFWriter
,
125 Reference
< css::view::XRenderable
> const & rRenderable
,
126 const Any
& rSelection
,
127 const StringRangeEnumerator
& rRangeEnum
,
128 Sequence
< PropertyValue
>& rRenderOptions
,
129 sal_Int32 nPageCount
);
131 bool Export( const OUString
& rFile
, const Sequence
< PropertyValue
>& rFilterData
);
133 void showErrors( const std::set
<vcl::PDFWriter::ErrorCode
>& );
136 #endif // INCLUDED_FILTER_SOURCE_PDF_PDFEXPORT_HXX
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */