1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef IMPOPTIMIZER_HXX
25 #define IMPOPTIMIZER_HXX
26 
27 #include "pppoptimizertoken.hxx"
28 #include "optimizationstats.hxx"
29 #include <com/sun/star/uno/Sequence.h>
30 #include <com/sun/star/frame/XDispatch.hpp>
31 #include <com/sun/star/frame/XModel.hpp>
32 #include <com/sun/star/task/XStatusIndicator.hpp>
33 #include <com/sun/star/beans/PropertyValue.hpp>
34 #ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_
35 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
36 #endif
37 #include <com/sun/star/uno/XComponentContext.hpp>
38 
39 class Point;
40 class Size;
41 
42 // -------------
43 // - PDFExport -
44 // -------------
45 
46 class ImpOptimizer : public OptimizationStats
47 {
48 private:
49 
50 	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >	mxMSF;
51 	com::sun::star::uno::Reference< com::sun::star::frame::XModel >				mxModel;
52 	com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >			mxStatusDispatcher;
53 
54 	sal_Bool		mbJPEGCompression;
55 	sal_Int32		mnJPEGQuality;
56 	sal_Bool		mbRemoveCropArea;
57 	sal_Int32		mnImageResolution;
58 	sal_Bool		mbEmbedLinkedGraphics;
59 	sal_Bool		mbOLEOptimization;
60 	sal_Int32		mnOLEOptimizationType;
61 	rtl::OUString	maCustomShowName;
62 	sal_Bool		mbDeleteUnusedMasterPages;
63 	sal_Bool		mbDeleteHiddenSlides;
64 	sal_Bool		mbDeleteNotesPages;
65 	rtl::OUString	maSaveAsURL;
66 	rtl::OUString	maFilterName;
67 	sal_Bool		mbOpenNewDocument;
68 
69 	com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxInformationDialog;
70 
71 	sal_Bool Optimize();
72 
73 public:
74 
75 		ImpOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rXFactory,
76 			const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel );
77         ~ImpOptimizer();
78 
79 		sal_Bool Optimize( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rArguments );
80 		void	 DispatchStatus();
81 };
82 
83 #endif
84