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