1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
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.
14  *
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).
20  *
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.
25  *
26  ************************************************************************/
27 
28 #ifndef IMPOPTIMIZER_HXX
29 #define IMPOPTIMIZER_HXX
30 
31 #include "pppoptimizertoken.hxx"
32 #include "optimizationstats.hxx"
33 #include <com/sun/star/uno/Sequence.h>
34 #include <com/sun/star/frame/XDispatch.hpp>
35 #include <com/sun/star/frame/XModel.hpp>
36 #include <com/sun/star/task/XStatusIndicator.hpp>
37 #include <com/sun/star/beans/PropertyValue.hpp>
38 #ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_
39 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
40 #endif
41 #include <com/sun/star/uno/XComponentContext.hpp>
42 
43 class Point;
44 class Size;
45 
46 // -------------
47 // - PDFExport -
48 // -------------
49 
50 class ImpOptimizer : public OptimizationStats
51 {
52 private:
53 
54 	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >	mxMSF;
55 	com::sun::star::uno::Reference< com::sun::star::frame::XModel >				mxModel;
56 	com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >			mxStatusDispatcher;
57 
58 	sal_Bool		mbJPEGCompression;
59 	sal_Int32		mnJPEGQuality;
60 	sal_Bool		mbRemoveCropArea;
61 	sal_Int32		mnImageResolution;
62 	sal_Bool		mbEmbedLinkedGraphics;
63 	sal_Bool		mbOLEOptimization;
64 	sal_Int32		mnOLEOptimizationType;
65 	rtl::OUString	maCustomShowName;
66 	sal_Bool		mbDeleteUnusedMasterPages;
67 	sal_Bool		mbDeleteHiddenSlides;
68 	sal_Bool		mbDeleteNotesPages;
69 	rtl::OUString	maSaveAsURL;
70 	rtl::OUString	maFilterName;
71 	sal_Bool		mbOpenNewDocument;
72 
73 	com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxInformationDialog;
74 
75 	sal_Bool Optimize();
76 
77 public:
78 
79 		ImpOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rXFactory,
80 			const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel );
81         ~ImpOptimizer();
82 
83 		sal_Bool Optimize( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rArguments );
84 		void	 DispatchStatus();
85 };
86 
87 #endif
88