1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pdfexport.hxx,v $
10 * $Revision: 1.14.80.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #include "pdffilter.hxx"
35 #include <tools/multisel.hxx>
36 #include <vcl/pdfwriter.hxx>
37 #include <vcl/pdfextoutdevdata.hxx>
38 #include <com/sun/star/view/XRenderable.hpp>
40 class SvEmbeddedObject
;
49 namespace vcl
{ class PDFWriter
; }
59 Reference
< XComponent
> mxSrcDoc
;
60 Reference
< lang::XMultiServiceFactory
> mxMSF
;
61 Reference
< task::XStatusIndicator
> mxStatusIndicator
;
63 sal_Bool mbUseTaggedPDF
;
64 sal_Int32 mnPDFTypeSelection
;
65 sal_Bool mbExportNotes
;
66 sal_Bool mbExportNotesPages
;
67 sal_Bool mbEmbedStandardFonts
;
68 sal_Bool mbUseTransitionEffects
;
69 sal_Bool mbExportBookmarks
;
70 sal_Int32 mnOpenBookmarkLevels
;
72 sal_Bool mbUseLosslessCompression
;
73 sal_Bool mbReduceImageResolution
;
74 sal_Bool mbSkipEmptyPages
;
76 sal_Int32 mnMaxImageResolution
;
78 sal_Int32 mnFormsFormat
;
79 sal_Bool mbExportFormFields
;
80 sal_Int32 mnProgressValue
;
81 sal_Bool mbRemoveTransparencies
;
86 //these variable are here only to have a location in filter/pdf to set the default
87 //to be used by the macro (when the FilterData are set by the macro itself)
88 sal_Bool mbHideViewerToolbar
;
89 sal_Bool mbHideViewerMenubar
;
90 sal_Bool mbHideViewerWindowControls
;
92 sal_Bool mbCenterWindow
;
93 sal_Bool mbOpenInFullScreenMode
;
94 sal_Bool mbDisplayPDFDocumentTitle
;
95 sal_Int32 mnPDFDocumentMode
;
96 sal_Int32 mnPDFDocumentAction
;
98 sal_Int32 mnInitialPage
;
99 sal_Int32 mnPDFPageLayout
;
100 sal_Bool mbFirstPageLeft
;
103 rtl::OUString msOpenPassword
;
104 sal_Bool mbRestrictPermissions
;
105 rtl::OUString msPermissionPassword
;
106 sal_Int32 mnPrintAllowed
;
107 sal_Int32 mnChangesAllowed
;
108 sal_Bool mbCanCopyOrExtract
;
109 sal_Bool mbCanExtractForAccessibility
;
111 SvtGraphicFill maCacheFill
;
112 sal_Int32 mnCachePatternId
;
115 sal_Bool mbExportRelativeFsysLinks
;
116 sal_Int32 mnDefaultLinkAction
;
117 sal_Bool mbConvertOOoTargetToPDFTarget
;
118 sal_Bool mbExportBmkToDest
;
120 sal_Bool
ImplExportPage( ::vcl::PDFWriter
& rWriter
, ::vcl::PDFExtOutDevData
& rPDFExtOutDevData
,
121 const GDIMetaFile
& rMtf
);
122 sal_Bool
ImplWriteActions( ::vcl::PDFWriter
& rWriter
, ::vcl::PDFExtOutDevData
* pPDFExtOutDevData
,
123 const GDIMetaFile
& rMtf
, VirtualDevice
& rDummyVDev
);
124 void ImplWriteGradient( ::vcl::PDFWriter
& rWriter
, const PolyPolygon
& rPolyPoly
,
125 const Gradient
& rGradient
, VirtualDevice
& rDummyVDev
);
126 void ImplWriteBitmapEx( ::vcl::PDFWriter
& rWriter
, VirtualDevice
& rDummyVDev
,
127 const Point
& rPoint
, const Size
& rSize
, const BitmapEx
& rBitmap
);
129 void ImplWriteWatermark( ::vcl::PDFWriter
& rWriter
, const Size
& rPageSize
);
132 PDFExport( const Reference
< XComponent
>& rxSrcDoc
, Reference
< task::XStatusIndicator
>& xStatusIndicator
, const Reference
< lang::XMultiServiceFactory
>& xFact
);
135 sal_Bool
ExportSelection( vcl::PDFWriter
& rPDFWriter
, Reference
< com::sun::star::view::XRenderable
>& rRenderable
, Any
& rSelection
,
136 MultiSelection aMultiSelection
, Sequence
< PropertyValue
>& rRenderOptions
, sal_Int32 nPageCount
);
138 sal_Bool
Export( const OUString
& rFile
, const Sequence
< PropertyValue
>& rFilterData
);
140 void showErrors( const std::set
<vcl::PDFWriter::ErrorCode
>& );