merge the formfield patch from ooo-build
[ooovba.git] / svx / inc / tbunocontroller.hxx
blobee24ca190b4c33408c03287820e9de096c4fda2c
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: tbunocontroller.hxx,v $
10 * $Revision: 1.3 $
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 __TBUNOCONTROLLER_HXX_
32 #define __TBUNOCONTROLLER_HXX_
34 #include <svtools/toolboxcontroller.hxx>
35 #include <com/sun/star/awt/FontDescriptor.hpp>
36 #include <com/sun/star/lang/XServiceInfo.hpp>
38 namespace svx
41 class SvxFontSizeBox_Impl;
42 class FontHeightToolBoxControl : public svt::ToolboxController,
43 public ::com::sun::star::lang::XServiceInfo
45 public:
46 FontHeightToolBoxControl(
47 const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
48 ~FontHeightToolBoxControl();
50 // XInterface
51 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
52 virtual void SAL_CALL acquire() throw ();
53 virtual void SAL_CALL release() throw ();
55 // XServiceInfo
56 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
57 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
58 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
60 static ::rtl::OUString getImplementationName_Static() throw()
62 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.FontHeightToolBoxController" ));
65 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();
67 // XComponent
68 virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
70 // XStatusListener
71 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
73 // XToolbarController
74 virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
75 virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException);
76 virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException);
77 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
78 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);
80 void dispatchCommand( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
82 private:
83 SvxFontSizeBox_Impl* m_pBox;
84 ::com::sun::star::awt::FontDescriptor m_aCurrentFont;
87 ::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 );
91 #endif // __TBUNOCONTROLLER_HXX_