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 #include <com/sun/star/awt/XWindowPeer.hpp>
39 
40 class Point;
41 class Size;
42 
43 // -------------
44 // - PDFExport -
45 // -------------
46 
47 class ImpOptimizer : public OptimizationStats
48 {
49 private:
50 
51 	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >	mxContext;
52 	com::sun::star::uno::Reference< com::sun::star::frame::XModel >				mxModel;
53 	com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >	mxStatusListener;
54 
55 	sal_Bool		mbJPEGCompression;
56 	sal_Int32		mnJPEGQuality;
57 	sal_Bool		mbRemoveCropArea;
58 	sal_Int32		mnImageResolution;
59 	sal_Bool		mbEmbedLinkedGraphics;
60 	sal_Bool		mbOLEOptimization;
61 	sal_Int32		mnOLEOptimizationType;
62 	rtl::OUString	maCustomShowName;
63 	sal_Bool		mbDeleteUnusedMasterPages;
64 	sal_Bool		mbDeleteHiddenSlides;
65 	sal_Bool		mbDeleteNotesPages;
66 	rtl::OUString	maSaveAsURL;
67 	rtl::OUString	maFilterName;
68 	sal_Bool		mbOpenNewDocument;
69 
70 	com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
71 
72 	sal_Bool ImplOptimize();
73 
74 public:
75 
76 		ImpOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rXFactory,
77 			const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel );
78         ~ImpOptimizer();
79 
80 		sal_Bool Optimize( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rArguments );
81 		void	 DispatchStatus();
82 };
83 
84 #endif
85