svx/source/tbxctrls/extrusioncontrols.cxx | 43 ++++++++++++++++++++++++++++++ svx/source/tbxctrls/extrusioncontrols.hxx | 16 +++++++++++ svx/source/tbxctrls/fontworkgallery.cxx | 30 ++++++++++++++++++++ 3 files changed, 89 insertions(+)
New commits: commit 966daa8e278bd0aef180b2d87b264e10c3a82afd Author: Maxim Monastirsky <momonas...@gmail.com> Date: Tue Nov 4 13:36:50 2014 +0200 Set ToolBoxItemBits inside the controller Don't rely on the toolbar:style attribute of the toolbar xml, because it's not available after toolbar customization, or when placing the button on a different toolbar. See 99ace739828f9d79a2f9b04ef066b90d77f77bc4 for a similar fix. Change-Id: Ia9485cafe111ba609fe802c984be1aa9db3a2ca9 diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index ce53af1..6e50dda 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -243,6 +243,17 @@ vcl::Window* ExtrusionDirectionControl::createPopupWindow( vcl::Window* pParent return new ExtrusionDirectionWindow( *this, m_xFrame, pParent ); } +// XInitialization +void SAL_CALL ExtrusionDirectionControl::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) +{ + svt::PopupWindowController::initialize( aArguments ); + + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWNONLY ); +} // XServiceInfo @@ -493,7 +504,17 @@ vcl::Window* ExtrusionDepthController::createPopupWindow( vcl::Window* pParent ) return new ExtrusionDepthWindow( *this, m_xFrame, pParent ); } +// XInitialization +void SAL_CALL ExtrusionDepthController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) +{ + svt::PopupWindowController::initialize( aArguments ); + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWNONLY ); +} // XServiceInfo @@ -750,6 +771,17 @@ vcl::Window* ExtrusionLightingControl::createPopupWindow( vcl::Window* pParent ) return new ExtrusionLightingWindow( *this, m_xFrame, pParent ); } +// XInitialization +void SAL_CALL ExtrusionLightingControl::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) +{ + svt::PopupWindowController::initialize( aArguments ); + + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWNONLY ); +} // XServiceInfo @@ -893,6 +925,17 @@ vcl::Window* ExtrusionSurfaceControl::createPopupWindow( vcl::Window* pParent ) return new ExtrusionSurfaceWindow( *this, m_xFrame, pParent ); } +// XInitialization +void SAL_CALL ExtrusionSurfaceControl::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) +{ + svt::PopupWindowController::initialize( aArguments ); + + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWNONLY ); +} // XServiceInfo diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx index 6559985..e3b4bfa 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hxx +++ b/svx/source/tbxctrls/extrusioncontrols.hxx @@ -73,6 +73,10 @@ public: virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE; + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + // XServiceInfo virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; @@ -121,6 +125,10 @@ public: virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE; + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + // XServiceInfo virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; @@ -172,6 +180,10 @@ public: virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE; + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + // XServiceInfo virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; @@ -212,6 +224,10 @@ public: virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE; + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + // XServiceInfo virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index c433963..9debe62 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -419,6 +419,10 @@ public: virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE; + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + // XServiceInfo virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; @@ -441,6 +445,17 @@ vcl::Window* FontworkAlignmentControl::createPopupWindow( vcl::Window* pParent ) return new FontworkAlignmentWindow( *this, m_xFrame, pParent ); } +// XInitialization +void SAL_CALL FontworkAlignmentControl::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) +{ + svt::PopupWindowController::initialize( aArguments ); + + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWNONLY ); +} // XServiceInfo @@ -650,6 +665,10 @@ public: virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE; + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + // XServiceInfo virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; @@ -670,6 +689,17 @@ vcl::Window* FontworkCharacterSpacingControl::createPopupWindow( vcl::Window* pP return new FontworkCharacterSpacingWindow( *this, m_xFrame, pParent ); } +// XInitialization +void SAL_CALL FontworkCharacterSpacingControl::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) +{ + svt::PopupWindowController::initialize( aArguments ); + + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWNONLY ); +} // XServiceInfo _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits