xref: /trunk/main/sdext/source/minimizer/informationdialog.hxx (revision 06bcd5d2ad5bea957b02aca5287e5203820c7f8c)
1*06bcd5d2SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*06bcd5d2SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*06bcd5d2SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*06bcd5d2SAndrew Rist  * distributed with this work for additional information
6*06bcd5d2SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*06bcd5d2SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*06bcd5d2SAndrew Rist  * "License"); you may not use this file except in compliance
9*06bcd5d2SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*06bcd5d2SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*06bcd5d2SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*06bcd5d2SAndrew Rist  * software distributed under the License is distributed on an
15*06bcd5d2SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*06bcd5d2SAndrew Rist  * KIND, either express or implied.  See the License for the
17*06bcd5d2SAndrew Rist  * specific language governing permissions and limitations
18*06bcd5d2SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*06bcd5d2SAndrew Rist  *************************************************************/
21*06bcd5d2SAndrew Rist 
22*06bcd5d2SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef INFORMATIONDIALOG_HXX
25cdf0e10cSrcweir #define INFORMATIONDIALOG_HXX
26cdf0e10cSrcweir #include <vector>
27cdf0e10cSrcweir #include "unodialog.hxx"
28cdf0e10cSrcweir #include "configurationaccess.hxx"
29cdf0e10cSrcweir #include "pppoptimizertoken.hxx"
30cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
31cdf0e10cSrcweir #include <com/sun/star/awt/XItemListener.hpp>
32cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
33cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.h>
34cdf0e10cSrcweir #include <com/sun/star/text/XTextRange.hpp>
35cdf0e10cSrcweir #include <com/sun/star/drawing/XShapes.hpp>
36cdf0e10cSrcweir #include <com/sun/star/container/XIndexAccess.hpp>
37cdf0e10cSrcweir #include <com/sun/star/frame/XController.hpp>
38cdf0e10cSrcweir #include <com/sun/star/view/XSelectionSupplier.hpp>
39cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
40cdf0e10cSrcweir #include <com/sun/star/awt/XItemEventBroadcaster.hpp>
41cdf0e10cSrcweir #include <com/sun/star/frame/XStorable.hpp>
42cdf0e10cSrcweir #include <com/sun/star/frame/XDispatch.hpp>
43cdf0e10cSrcweir #include <com/sun/star/awt/PushButtonType.hpp>
44cdf0e10cSrcweir #include <com/sun/star/io/XStream.hpp>
45cdf0e10cSrcweir 
46cdf0e10cSrcweir // ---------------------
47cdf0e10cSrcweir // - InformationDialog -
48cdf0e10cSrcweir // ---------------------
49cdf0e10cSrcweir class InformationDialog : public UnoDialog, public ConfigurationAccess
50cdf0e10cSrcweir {
51cdf0e10cSrcweir public :
52cdf0e10cSrcweir 
53cdf0e10cSrcweir     InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF,
54cdf0e10cSrcweir             com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame, const rtl::OUString& rSaveAsURL,
55cdf0e10cSrcweir                 sal_Bool& bOpenNewDocument, const sal_Int64& nSourceSize, const sal_Int64& nDestSize, const sal_Int64& nApproxDest );
56cdf0e10cSrcweir     ~InformationDialog();
57cdf0e10cSrcweir 
58cdf0e10cSrcweir     sal_Bool                execute();
59cdf0e10cSrcweir 
60cdf0e10cSrcweir private :
61cdf0e10cSrcweir 
62cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
63cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::frame::XFrame >         mxFrame;
64cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::io::XStream >           mxTempFile;
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::awt::XActionListener >  mxActionListener;
67cdf0e10cSrcweir 
68cdf0e10cSrcweir     rtl::OUString ImpGetStandardImage( const rtl::OUString& rPrivateURL );
69cdf0e10cSrcweir     void InitDialog();
70cdf0e10cSrcweir 
71cdf0e10cSrcweir     sal_Int64 mnSourceSize;
72cdf0e10cSrcweir     sal_Int64 mnDestSize;
73cdf0e10cSrcweir     sal_Int64 mnApproxSize;
74cdf0e10cSrcweir     sal_Bool& mrbOpenNewDocument;
75cdf0e10cSrcweir     const rtl::OUString& maSaveAsURL;
76cdf0e10cSrcweir 
77cdf0e10cSrcweir public :
78cdf0e10cSrcweir 
79cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
80cdf0e10cSrcweir     const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
81cdf0e10cSrcweir };
82cdf0e10cSrcweir 
83cdf0e10cSrcweir class OKActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
84cdf0e10cSrcweir {
85cdf0e10cSrcweir public:
86cdf0e10cSrcweir     OKActionListener( InformationDialog& rInformationDialog ) : mrInformationDialog( rInformationDialog ){};
87cdf0e10cSrcweir 
88cdf0e10cSrcweir     virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
89cdf0e10cSrcweir     virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
90cdf0e10cSrcweir private:
91cdf0e10cSrcweir 
92cdf0e10cSrcweir     InformationDialog& mrInformationDialog;
93cdf0e10cSrcweir };
94cdf0e10cSrcweir 
95cdf0e10cSrcweir #endif
96