diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-01 22:15:53 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-05 15:35:40 +0300 |
commit | da80f6e8499c9b0cf7711a30eb895f71719639cb (patch) | |
tree | 2dd43068aeeb213d04ee91203ae2f644989111d4 | |
parent | a7331e2485a92492ad88893e029c3d895abb7a8a (diff) |
PopupWindowController: Small cleanup
Change-Id: Iedbc8ddaf97f515fecc012322f0c1621317de076
-rw-r--r-- | include/svtools/popupwindowcontroller.hxx | 6 | ||||
-rw-r--r-- | svtools/source/uno/popupwindowcontroller.cxx | 28 |
2 files changed, 1 insertions, 33 deletions
diff --git a/include/svtools/popupwindowcontroller.hxx b/include/svtools/popupwindowcontroller.hxx index f2fa65fcdcea..44794fa26691 100644 --- a/include/svtools/popupwindowcontroller.hxx +++ b/include/svtools/popupwindowcontroller.hxx @@ -50,9 +50,6 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException, std::exception ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override = 0; - // XInitialization - virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw (css::uno::Exception, css::uno::RuntimeException, std::exception) override; - // XComponent virtual void SAL_CALL dispose() throw (css::uno::RuntimeException, std::exception) override; @@ -60,9 +57,8 @@ public: virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException, std::exception ) override; // XToolbarController - virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (css::uno::RuntimeException, std::exception) override; virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createPopupWindow() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) throw (css::uno::RuntimeException, std::exception) override; + private: std::unique_ptr< PopupWindowControllerImpl > mxImpl; }; diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx index 62ccb5609d9f..d299416707ef 100644 --- a/svtools/source/uno/popupwindowcontroller.cxx +++ b/svtools/source/uno/popupwindowcontroller.cxx @@ -24,7 +24,6 @@ #include <vcl/svapp.hxx> #include <svtools/popupwindowcontroller.hxx> -#include <svtools/toolbarmenu.hxx> using namespace ::com::sun::star; using namespace css::uno; @@ -92,10 +91,6 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclWindowEvent&, rWin if( mpToolBox ) mpToolBox->CallEventListeners( VCLEVENT_DROPDOWN_OPEN, static_cast<void*>(mpPopupWindow) ); mpPopupWindow->CallEventListeners( VCLEVENT_WINDOW_GETFOCUS ); - - svtools::ToolbarMenu* pToolbarMenu = dynamic_cast< svtools::ToolbarMenu* >( mpPopupWindow.get() ); - if( pToolbarMenu ) - pToolbarMenu->highlightFirstEntry(); break; } break; @@ -135,24 +130,12 @@ sal_Bool SAL_CALL PopupWindowController::supportsService( const OUString& Servic return cppu::supportsService(this, ServiceName); } -// XInitialization -void SAL_CALL PopupWindowController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw (css::uno::Exception, css::uno::RuntimeException, std::exception) -{ - svt::ToolboxController::initialize( aArguments ); - if( !m_aCommandURL.isEmpty() ) - addStatusListener( m_aCommandURL ); -} - // XComponent void SAL_CALL PopupWindowController::dispose() throw (RuntimeException, std::exception) { - if( !m_aCommandURL.isEmpty() ) - removeStatusListener( m_aCommandURL ); - svt::ToolboxController::dispose(); } - // XStatusListener void SAL_CALL PopupWindowController::statusChanged( const frame::FeatureStateEvent& rEvent ) throw ( RuntimeException, std::exception ) { @@ -161,11 +144,6 @@ void SAL_CALL PopupWindowController::statusChanged( const frame::FeatureStateEve } // XToolbarController -void SAL_CALL PopupWindowController::execute( sal_Int16 KeyModifier ) throw (RuntimeException, std::exception) -{ - svt::ToolboxController::execute( KeyModifier ); -} - Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow() throw (RuntimeException, std::exception) { VclPtr< ToolBox > pToolBox = dynamic_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ).get() ); @@ -186,12 +164,6 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow() th return Reference< awt::XWindow >(); } -Reference< awt::XWindow > SAL_CALL PopupWindowController::createItemWindow( const Reference< awt::XWindow >& /*Parent*/ ) - throw (RuntimeException, std::exception) -{ - return Reference< awt::XWindow >(); -} - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |