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 #ifndef RPTUI_STATUSBARCONTROLLER_HXX 28 #define RPTUI_STATUSBARCONTROLLER_HXX 29 30 #include <svtools/statusbarcontroller.hxx> 31 #include <comphelper/uno3.hxx> 32 #include <com/sun/star/lang/XServiceInfo.hpp> 33 #include <cppuhelper/implbase1.hxx> 34 #include <comphelper/implementationreference.hxx> 35 36 class SfxStatusBarControl; 37 namespace rptui 38 { 39 typedef ::comphelper::ImplementationReference<SfxStatusBarControl,::com::sun::star::frame::XStatusbarController> TStatusbarHelper; 40 41 typedef ::cppu::ImplHelper1 < ::com::sun::star::lang::XServiceInfo> OStatusbarController_BASE; 42 class OStatusbarController : public ::svt::StatusbarController, 43 public OStatusbarController_BASE 44 { 45 TStatusbarHelper m_pController; 46 sal_uInt16 m_nSlotId; 47 sal_uInt16 m_nId; 48 public: 49 OStatusbarController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); 50 51 static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException ); 52 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException ); 53 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL 54 create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext); 55 56 private: 57 void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); 58 // XInterface 59 DECLARE_XINTERFACE( ) 60 // XServiceInfo 61 virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); 62 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); 63 // need by registration 64 65 virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); 66 67 // XInitialization 68 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); 69 70 // XUpdatable 71 virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); 72 73 // XStatusListener 74 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); 75 76 // XStatusbarController 77 virtual ::sal_Bool SAL_CALL mouseButtonDown( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException); 78 virtual ::sal_Bool SAL_CALL mouseMove( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException); 79 virtual ::sal_Bool SAL_CALL mouseButtonUp( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException); 80 virtual void SAL_CALL command( const ::com::sun::star::awt::Point& aPos, 81 ::sal_Int32 nCommand, 82 ::sal_Bool bMouseEvent, 83 const ::com::sun::star::uno::Any& aData ) throw (::com::sun::star::uno::RuntimeException); 84 virtual void SAL_CALL paint( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics, 85 const ::com::sun::star::awt::Rectangle& rOutputRectangle, 86 ::sal_Int32 nItemId, ::sal_Int32 nStyle ) throw (::com::sun::star::uno::RuntimeException); 87 virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException); 88 virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException); 89 }; 90 } 91 #endif // DBAUI_STATUSBARCONTROLLER_HXX 92 93