xref: /aoo41x/main/svx/inc/tbunocontroller.hxx (revision 3334a7e6)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef __TBUNOCONTROLLER_HXX_
25 #define __TBUNOCONTROLLER_HXX_
26 
27 #include <svtools/toolboxcontroller.hxx>
28 #include <com/sun/star/awt/FontDescriptor.hpp>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 
31 namespace svx
32 {
33 
34 class SvxFontSizeBox_Impl;
35 class FontHeightToolBoxControl : public svt::ToolboxController,
36                                  public ::com::sun::star::lang::XServiceInfo
37 {
38     public:
39 	    FontHeightToolBoxControl(
40             const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
41 	    ~FontHeightToolBoxControl();
42 
43         // XInterface
44 		virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
45 		virtual void SAL_CALL acquire() throw ();
46 		virtual void SAL_CALL release() throw ();
47 
48         // XServiceInfo
49         virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
50         virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
51         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
52 
getImplementationName_Static()53         static ::rtl::OUString getImplementationName_Static() throw()
54 	    {
55             return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.FontHeightToolBoxController" ));
56 	    }
57 
58         static ::com::sun::star::uno::Sequence< ::rtl::OUString >  getSupportedServiceNames_Static() throw();
59 
60         // XComponent
61         virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
62 
63         // XStatusListener
64 	    virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
65 
66         // XToolbarController
67         virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
68         virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException);
69         virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException);
70         virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
71         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);
72 
73         void dispatchCommand( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
74 		using svt::ToolboxController::dispatchCommand;
75 
76     private:
77         SvxFontSizeBox_Impl*                  m_pBox;
78 	    ::com::sun::star::awt::FontDescriptor m_aCurrentFont;
79 };
80 
81 ::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 );
82 
83 }
84 
85 #endif // __TBUNOCONTROLLER_HXX_
86