Kaydet (Commit) da80f6e8 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

PopupWindowController: Small cleanup

Change-Id: Iedbc8ddaf97f515fecc012322f0c1621317de076
üst a7331e24
...@@ -50,9 +50,6 @@ public: ...@@ -50,9 +50,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException, std::exception ) override; 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; 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 // XComponent
virtual void SAL_CALL dispose() throw (css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL dispose() throw (css::uno::RuntimeException, std::exception) override;
...@@ -60,9 +57,8 @@ public: ...@@ -60,9 +57,8 @@ public:
virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException, std::exception ) override;
// XToolbarController // 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 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: private:
std::unique_ptr< PopupWindowControllerImpl > mxImpl; std::unique_ptr< PopupWindowControllerImpl > mxImpl;
}; };
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <svtools/popupwindowcontroller.hxx> #include <svtools/popupwindowcontroller.hxx>
#include <svtools/toolbarmenu.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace css::uno; using namespace css::uno;
...@@ -92,10 +91,6 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclWindowEvent&, rWin ...@@ -92,10 +91,6 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclWindowEvent&, rWin
if( mpToolBox ) if( mpToolBox )
mpToolBox->CallEventListeners( VCLEVENT_DROPDOWN_OPEN, static_cast<void*>(mpPopupWindow) ); mpToolBox->CallEventListeners( VCLEVENT_DROPDOWN_OPEN, static_cast<void*>(mpPopupWindow) );
mpPopupWindow->CallEventListeners( VCLEVENT_WINDOW_GETFOCUS ); mpPopupWindow->CallEventListeners( VCLEVENT_WINDOW_GETFOCUS );
svtools::ToolbarMenu* pToolbarMenu = dynamic_cast< svtools::ToolbarMenu* >( mpPopupWindow.get() );
if( pToolbarMenu )
pToolbarMenu->highlightFirstEntry();
break; break;
} }
break; break;
...@@ -135,24 +130,12 @@ sal_Bool SAL_CALL PopupWindowController::supportsService( const OUString& Servic ...@@ -135,24 +130,12 @@ sal_Bool SAL_CALL PopupWindowController::supportsService( const OUString& Servic
return cppu::supportsService(this, ServiceName); 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 // XComponent
void SAL_CALL PopupWindowController::dispose() throw (RuntimeException, std::exception) void SAL_CALL PopupWindowController::dispose() throw (RuntimeException, std::exception)
{ {
if( !m_aCommandURL.isEmpty() )
removeStatusListener( m_aCommandURL );
svt::ToolboxController::dispose(); svt::ToolboxController::dispose();
} }
// XStatusListener // XStatusListener
void SAL_CALL PopupWindowController::statusChanged( const frame::FeatureStateEvent& rEvent ) throw ( RuntimeException, std::exception ) 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 ...@@ -161,11 +144,6 @@ void SAL_CALL PopupWindowController::statusChanged( const frame::FeatureStateEve
} }
// XToolbarController // 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) Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow() throw (RuntimeException, std::exception)
{ {
VclPtr< ToolBox > pToolBox = dynamic_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ).get() ); VclPtr< ToolBox > pToolBox = dynamic_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ).get() );
...@@ -186,12 +164,6 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow() th ...@@ -186,12 +164,6 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow() th
return Reference< awt::XWindow >(); 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment