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 .
21 #ifndef _EXPORTDIALOG_HXX_
22 #define _EXPORTDIALOG_HXX_
24 #include <vcl/fltcall.hxx>
25 #include <vcl/dialog.hxx>
26 #include <vcl/button.hxx>
27 #include <vcl/fixed.hxx>
28 #include <vcl/field.hxx>
29 #include <vcl/layout.hxx>
30 #include <vcl/lstbox.hxx>
31 #include <vcl/msgbox.hxx>
32 #include <vcl/scrbar.hxx>
33 #include <com/sun/star/document/XExporter.hpp>
34 #include <com/sun/star/drawing/XShape.hpp>
35 #include <com/sun/star/drawing/XShapes.hpp>
36 #include <com/sun/star/drawing/XDrawPage.hpp>
38 /*************************************************************************
40 |* Dialog zum Einstellen von Filteroptionen bei Pixelformaten
42 \************************************************************************/
44 class FilterConfigItem
;
45 class ExportDialog
: public ModalDialog
49 FltCallDialogParameter
& mrFltCallPara
;
51 const com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
>
53 const com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>&
56 NumericField
* mpMfSizeX
;
58 NumericField
* mpMfSizeY
;
59 FixedText
* mpFtResolution
;
60 NumericField
* mpNfResolution
;
61 ListBox
* mpLbResolution
;
63 VclContainer
* mpColorDepth
;
64 ListBox
* mpLbColorDepth
;
66 VclContainer
* mpJPGQuality
;
67 VclContainer
* mpPNGCompression
;
69 ScrollBar
* mpSbCompression
;
70 NumericField
* mpNfCompression
;
73 CheckBox
* mpCbInterlaced
;
75 VclContainer
* mpBMPCompression
;
76 CheckBox
* mpCbRLEEncoding
;
78 VclContainer
* mpDrawingObjects
;
79 CheckBox
* mpCbSaveTransparency
;
81 VclContainer
* mpEncoding
;
82 RadioButton
* mpRbBinary
;
83 RadioButton
* mpRbText
;
85 VclContainer
* mpEPSGrid
;
86 CheckBox
* mpCbEPSPreviewTIFF
;
87 CheckBox
* mpCbEPSPreviewEPSI
;
88 RadioButton
* mpRbEPSLevel1
;
89 RadioButton
* mpRbEPSLevel2
;
90 RadioButton
* mpRbEPSColorFormat1
;
91 RadioButton
* mpRbEPSColorFormat2
;
92 RadioButton
* mpRbEPSCompressionLZW
;
93 RadioButton
* mpRbEPSCompressionNone
;
96 FixedText
* mpFtEstimatedSize
;
100 String msEstimatedSizePix1
;
101 String msEstimatedSizePix2
;
102 String msEstimatedSizeVec
;
104 String ms1BitTreshold
;
105 String ms1BitDithered
;
106 String ms4BitGrayscale
;
107 String ms4BitColorPalette
;
108 String ms8BitGrayscale
;
109 String ms8BitColorPalette
;
114 FilterConfigItem
* mpOptionsItem
;
115 FilterConfigItem
* mpFilterOptionsItem
;
118 String maEstimatedSizeText
;
120 sal_Int32 mnMaxFilesizeForRealtimePreview
;
122 SvStream
* mpTempStream
;
125 com::sun::star::awt::Size
126 maOriginalSize
; // the original graphic size in 1/100mm
127 com::sun::star::awt::Size
128 maSize
; // for vector graphics it always contains the logical size in 1/100mm
130 sal_Bool mbIsPixelFormat
;
131 sal_Bool mbExportSelection
;
132 sal_Bool mbPreserveAspectRatio
;
134 sal_Int32 mnInitialResolutionUnit
;
136 // for pixel graphics it always contains the pixel count
137 com::sun::star::awt::Size
138 maResolution
; // it always contains the number of pixels per meter
140 com::sun::star::uno::Reference
< com::sun::star::drawing::XShape
>
142 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>
144 com::sun::star::uno::Reference
< com::sun::star::drawing::XDrawPage
>
148 DECL_LINK( UpdateHdl
,void* p
);
149 DECL_LINK( UpdateHdlMtfSizeX
,void* p
);
150 DECL_LINK( UpdateHdlMtfSizeY
,void* p
);
151 DECL_LINK( UpdateHdlNfResolution
,void* p
);
152 DECL_LINK( SbCompressionUpdateHdl
,void* p
);
153 DECL_LINK( NfCompressionUpdateHdlX
,void* p
);
155 DECL_LINK( OK
, void* p
);
157 void setupSizeControls();
158 void createFilterOptions();
159 void setupControls();
160 void updateControls();
162 void GetGraphicSource();
163 sal_Bool
GetGraphicStream();
164 Bitmap
GetGraphicBitmap( SvStream
& rStream
);
165 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>
166 GetFilterData( sal_Bool bUpdateConfig
);
168 sal_uInt32
GetRawFileSize() const;
169 sal_Bool
IsTempExportAvailable() const;
171 com::sun::star::awt::Size
174 sal_Int32
GetDefaultUnit();
177 ExportDialog( FltCallDialogParameter
& rPara
,
178 const com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
>& rxContext
,
179 const com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& rxSourceDocument
,
180 sal_Bool bExportSelection
, sal_Bool bIsExportVectorFormat
);
186 #endif // _EXPORTDIALOG_HXX_
188 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */