From d5dcbd6cb2cd1f8d11428bed88730f7f513784a7 Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Mon, 15 Sep 2014 22:52:40 +0300 Subject: fdo#83619 Retain dropdown part after customization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 99ace739828f9d79a2f9b04ef066b90d77f77bc4) Conflicts: sd/source/ui/controller/slidelayoutcontroller.cxx Change-Id: I84c33e5b646ba43b9cad1d9ed106e7ead911e5c0 Reviewed-on: https://gerrit.libreoffice.org/11466 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sd/source/ui/controller/slidelayoutcontroller.cxx | 16 ++++++++++++++++ sd/source/ui/controller/slidelayoutcontroller.hxx | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 34a5e2b69412..59868ffb5aa9 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -370,6 +370,22 @@ SlideLayoutController::SlideLayoutController( const Reference< uno::XComponentCo +void SAL_CALL SlideLayoutController::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 ) ) + { + if ( mbInsertPage ) + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | TIB_DROPDOWN ); + else + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | TIB_DROPDOWNONLY ); + } +} + ::Window* SlideLayoutController::createPopupWindow( ::Window* pParent ) { return new sd::LayoutToolbarMenu( *this, m_xFrame, pParent, mbInsertPage ); diff --git a/sd/source/ui/controller/slidelayoutcontroller.hxx b/sd/source/ui/controller/slidelayoutcontroller.hxx index 71e2bb3df1ff..3c6e91be113b 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.hxx +++ b/sd/source/ui/controller/slidelayoutcontroller.hxx @@ -34,6 +34,10 @@ public: virtual ::Window* createPopupWindow( ::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; -- cgit v1.2.3