merged tag ooo/DEV300_m102
[LibreOffice.git] / filter / source / pdf / pdfexport.hxx
blob5b07a50765b188071055d1d8ce723bb2c30ecf3b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef PDFEXPORT_HXX
29 #define PDFEXPORT_HXX
31 #include "pdffilter.hxx"
32 #include <tools/multisel.hxx>
33 #include <vcl/pdfwriter.hxx>
34 #include <vcl/pdfextoutdevdata.hxx>
35 #include <com/sun/star/view/XRenderable.hpp>
37 class SvEmbeddedObject;
38 class GDIMetaFile;
39 class VirtualDevice;
40 class PolyPolygon;
41 class Gradient;
42 class BitmapEx;
43 class Point;
44 class Size;
46 namespace vcl { class PDFWriter; }
48 // -------------
49 // - PDFExport -
50 // -------------
52 class PDFExport
54 private:
56 Reference< XComponent > mxSrcDoc;
57 Reference< lang::XMultiServiceFactory > mxMSF;
58 Reference< task::XStatusIndicator > mxStatusIndicator;
59 Reference< task::XInteractionHandler > mxIH;
61 sal_Bool mbUseTaggedPDF;
62 sal_Int32 mnPDFTypeSelection;
63 sal_Bool mbExportNotes;
64 sal_Bool mbExportNotesPages;
65 sal_Bool mbEmbedStandardFonts;
66 sal_Bool mbUseTransitionEffects;
67 sal_Bool mbExportBookmarks;
68 sal_Int32 mnOpenBookmarkLevels;
70 sal_Bool mbUseLosslessCompression;
71 sal_Bool mbReduceImageResolution;
72 sal_Bool mbSkipEmptyPages;
73 sal_Bool mbAddStream;
74 sal_Int32 mnMaxImageResolution;
75 sal_Int32 mnQuality;
76 sal_Int32 mnFormsFormat;
77 sal_Bool mbExportFormFields;
78 sal_Bool mbAllowDuplicateFieldNames;
79 sal_Int32 mnProgressValue;
80 sal_Bool mbRemoveTransparencies;
82 sal_Bool mbWatermark;
83 uno::Any maWatermark;
85 //these variable are here only to have a location in filter/pdf to set the default
86 //to be used by the macro (when the FilterData are set by the macro itself)
87 sal_Bool mbHideViewerToolbar;
88 sal_Bool mbHideViewerMenubar;
89 sal_Bool mbHideViewerWindowControls;
90 sal_Bool mbFitWindow;
91 sal_Bool mbCenterWindow;
92 sal_Bool mbOpenInFullScreenMode;
93 sal_Bool mbDisplayPDFDocumentTitle;
94 sal_Int32 mnPDFDocumentMode;
95 sal_Int32 mnPDFDocumentAction;
96 sal_Int32 mnZoom;
97 sal_Int32 mnInitialPage;
98 sal_Int32 mnPDFPageLayout;
99 sal_Bool mbFirstPageLeft;
101 sal_Bool mbEncrypt;
102 sal_Bool mbRestrictPermissions;
103 sal_Int32 mnPrintAllowed;
104 sal_Int32 mnChangesAllowed;
105 sal_Bool mbCanCopyOrExtract;
106 sal_Bool mbCanExtractForAccessibility;
108 SvtGraphicFill maCacheFill;
109 sal_Int32 mnCachePatternId;
111 //--->i56629
112 sal_Bool mbExportRelativeFsysLinks;
113 sal_Int32 mnDefaultLinkAction;
114 sal_Bool mbConvertOOoTargetToPDFTarget;
115 sal_Bool mbExportBmkToDest;
116 //<---
117 sal_Bool ImplExportPage( ::vcl::PDFWriter& rWriter, ::vcl::PDFExtOutDevData& rPDFExtOutDevData,
118 const GDIMetaFile& rMtf );
119 void ImplWriteWatermark( ::vcl::PDFWriter& rWriter, const Size& rPageSize );
120 public:
122 PDFExport( const Reference< XComponent >& rxSrcDoc,
123 const Reference< task::XStatusIndicator >& xStatusIndicator,
124 const Reference< task::XInteractionHandler >& xIH,
125 const Reference< lang::XMultiServiceFactory >& xFact );
126 ~PDFExport();
128 sal_Bool ExportSelection( vcl::PDFWriter& rPDFWriter, Reference< com::sun::star::view::XRenderable >& rRenderable, Any& rSelection,
129 MultiSelection aMultiSelection, Sequence< PropertyValue >& rRenderOptions, sal_Int32 nPageCount );
131 sal_Bool Export( const OUString& rFile, const Sequence< PropertyValue >& rFilterData );
133 void showErrors( const std::set<vcl::PDFWriter::ErrorCode>& );
136 #endif