update dev300-m58
[ooovba.git] / sdext / source / minimizer / informationdialog.hxx
bloba848019d085acf88c3aa5a621d7533f51314fb9f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: informationdialog.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INFORMATIONDIALOG_HXX
32 #define INFORMATIONDIALOG_HXX
33 #include <vector>
34 #include "unodialog.hxx"
35 #include "configurationaccess.hxx"
36 #include "pppoptimizertoken.hxx"
37 #include <com/sun/star/lang/XServiceInfo.hpp>
38 #include <com/sun/star/awt/XItemListener.hpp>
39 #include <com/sun/star/beans/XPropertySet.hpp>
40 #include <com/sun/star/uno/Sequence.h>
41 #include <com/sun/star/text/XTextRange.hpp>
42 #include <com/sun/star/drawing/XShapes.hpp>
43 #include <com/sun/star/container/XIndexAccess.hpp>
44 #include <com/sun/star/frame/XController.hpp>
45 #include <com/sun/star/view/XSelectionSupplier.hpp>
46 #include <com/sun/star/uno/XComponentContext.hpp>
47 #include <com/sun/star/awt/XItemEventBroadcaster.hpp>
48 #include <com/sun/star/frame/XStorable.hpp>
49 #include <com/sun/star/frame/XDispatch.hpp>
50 #include <com/sun/star/awt/PushButtonType.hpp>
51 #include <com/sun/star/io/XStream.hpp>
53 // ---------------------
54 // - InformationDialog -
55 // ---------------------
56 class InformationDialog : public UnoDialog, public ConfigurationAccess
58 public :
60 InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF,
61 com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame, const rtl::OUString& rSaveAsURL,
62 sal_Bool& bOpenNewDocument, const sal_Int64& nSourceSize, const sal_Int64& nDestSize, const sal_Int64& nApproxDest );
63 ~InformationDialog();
65 sal_Bool execute();
67 private :
69 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
70 com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
71 com::sun::star::uno::Reference< com::sun::star::io::XStream > mxTempFile;
73 com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > mxActionListener;
75 rtl::OUString ImpGetStandardImage( const rtl::OUString& rPrivateURL );
76 void InitDialog();
78 sal_Int64 mnSourceSize;
79 sal_Int64 mnDestSize;
80 sal_Int64 mnApproxSize;
81 sal_Bool& mrbOpenNewDocument;
82 const rtl::OUString& maSaveAsURL;
84 public :
86 com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
87 const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
90 class OKActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
92 public:
93 OKActionListener( InformationDialog& rInformationDialog ) : mrInformationDialog( rInformationDialog ){};
95 virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
96 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
97 private:
99 InformationDialog& mrInformationDialog;
102 #endif