update dev300-m58
[ooovba.git] / sdext / source / minimizer / aboutdialog.hxx
blob23077f4a9604e17eb57cc4945a468d8170b82f18
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: aboutdialog.hxx,v $
10 * $Revision: 1.2 $
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 ABOUTDIALOG_HXX
32 #define ABOUTDIALOG_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>
52 #define DIALOG_WIDTH 310
53 #define DIALOG_HEIGHT 210
54 #define BUTTON_WIDTH 50
55 #define BUTTON_HEIGHT 14
57 // -------------------
58 // - OPTIMIZERDIALOG -
59 // -------------------
60 class AboutDialog : public UnoDialog, public ConfigurationAccess
62 public :
64 AboutDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame );
65 ~AboutDialog();
67 sal_Bool execute();
69 private :
70 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
71 com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
72 com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > mxActionListener;
74 void InitDialog();
76 public :
78 com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
79 const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
82 class AboutActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
84 public:
85 AboutActionListener( AboutDialog& rAboutDialog ) : mrAboutDialog( rAboutDialog ){};
87 virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
88 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
89 private:
91 AboutDialog& mrAboutDialog;
94 #endif // ABOUTDIALOG_HXX