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 ************************************************************************/
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
;
46 namespace vcl
{ class PDFWriter
; }
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
;
74 sal_Int32 mnMaxImageResolution
;
76 sal_Int32 mnFormsFormat
;
77 sal_Bool mbExportFormFields
;
78 sal_Bool mbAllowDuplicateFieldNames
;
79 sal_Int32 mnProgressValue
;
80 sal_Bool mbRemoveTransparencies
;
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
;
91 sal_Bool mbCenterWindow
;
92 sal_Bool mbOpenInFullScreenMode
;
93 sal_Bool mbDisplayPDFDocumentTitle
;
94 sal_Int32 mnPDFDocumentMode
;
95 sal_Int32 mnPDFDocumentAction
;
97 sal_Int32 mnInitialPage
;
98 sal_Int32 mnPDFPageLayout
;
99 sal_Bool mbFirstPageLeft
;
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
;
112 sal_Bool mbExportRelativeFsysLinks
;
113 sal_Int32 mnDefaultLinkAction
;
114 sal_Bool mbConvertOOoTargetToPDFTarget
;
115 sal_Bool mbExportBmkToDest
;
117 sal_Bool
ImplExportPage( ::vcl::PDFWriter
& rWriter
, ::vcl::PDFExtOutDevData
& rPDFExtOutDevData
,
118 const GDIMetaFile
& rMtf
);
119 void ImplWriteWatermark( ::vcl::PDFWriter
& rWriter
, const Size
& rPageSize
);
122 PDFExport( const Reference
< XComponent
>& rxSrcDoc
,
123 const Reference
< task::XStatusIndicator
>& xStatusIndicator
,
124 const Reference
< task::XInteractionHandler
>& xIH
,
125 const Reference
< lang::XMultiServiceFactory
>& xFact
);
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
>& );