xref: /aoo41x/main/svx/inc/tbunocontroller.hxx (revision cdf0e10c)
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 __TBUNOCONTROLLER_HXX_
29 #define __TBUNOCONTROLLER_HXX_
30 
31 #include <svtools/toolboxcontroller.hxx>
32 #include <com/sun/star/awt/FontDescriptor.hpp>
33 #include <com/sun/star/lang/XServiceInfo.hpp>
34 
35 namespace svx
36 {
37 
38 class SvxFontSizeBox_Impl;
39 class FontHeightToolBoxControl : public svt::ToolboxController,
40                                  public ::com::sun::star::lang::XServiceInfo
41 {
42     public:
43 	    FontHeightToolBoxControl(
44             const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
45 	    ~FontHeightToolBoxControl();
46 
47         // XInterface
48 		virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
49 		virtual void SAL_CALL acquire() throw ();
50 		virtual void SAL_CALL release() throw ();
51 
52         // XServiceInfo
53         virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
54         virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
55         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
56 
57         static ::rtl::OUString getImplementationName_Static() throw()
58 	    {
59             return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.FontHeightToolBoxController" ));
60 	    }
61 
62         static ::com::sun::star::uno::Sequence< ::rtl::OUString >  getSupportedServiceNames_Static() throw();
63 
64         // XComponent
65         virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
66 
67         // XStatusListener
68 	    virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
69 
70         // XToolbarController
71         virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
72         virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException);
73         virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException);
74         virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
75         virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException);
76 
77         void dispatchCommand( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
78 		using svt::ToolboxController::dispatchCommand;
79 
80     private:
81         SvxFontSizeBox_Impl*                  m_pBox;
82 	    ::com::sun::star::awt::FontDescriptor m_aCurrentFont;
83 };
84 
85 ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL FontHeightToolBoxControl_createInstance( const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr );
86 
87 }
88 
89 #endif // __TBUNOCONTROLLER_HXX_
90