diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-02 14:45:32 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-01-06 16:44:21 +0100 |
commit | 40fe5b93bc0838e04b46bfc7942d1ee6a2482ce0 (patch) | |
tree | 151814d0863c9912d18722732beb13b1e22e0ff1 /svtools | |
parent | d1133d71a6109d1999121fd6a91573d12dc4852b (diff) |
weld AreaPropertyPanel
Change-Id: I5f4c4b43067b99cd57f8ea941002481ef5977e09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86144
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/uno/popupwindowcontroller.cxx | 8 | ||||
-rw-r--r-- | svtools/source/uno/toolboxcontroller.cxx | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx index 0ffb2f5871cd..cc283adbdf42 100644 --- a/svtools/source/uno/popupwindowcontroller.cxx +++ b/svtools/source/uno/popupwindowcontroller.cxx @@ -24,7 +24,9 @@ #include <vcl/toolbox.hxx> #include <vcl/weldutils.hxx> +#include <svtools/framestatuslistener.hxx> #include <svtools/popupwindowcontroller.hxx> +#include <svtools/toolbarmenu.hxx> using namespace ::com::sun::star; using namespace css::uno; @@ -174,6 +176,7 @@ sal_Bool SAL_CALL PopupWindowController::supportsService( const OUString& Servic // XComponent void SAL_CALL PopupWindowController::dispose() { + mxPopover.reset(); mxImpl.reset(); svt::ToolboxController::dispose(); } @@ -233,6 +236,11 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow() return Reference< awt::XWindow >(); } +void PopupWindowController::EndPopupMode() +{ + m_pToolbar->set_menu_item_active(m_aCommandURL.toUtf8(), false); +} + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 8bd9d94f2366..3ff118f31bb5 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -29,6 +29,7 @@ #include <vcl/svapp.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/toolbox.hxx> +#include <vcl/weldutils.hxx> #include <comphelper/processfactory.hxx> const int TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIBLE = 1; @@ -54,11 +55,13 @@ ToolboxController::ToolboxController( , m_bSupportVisible( false ) , m_bInitialized( false ) , m_bDisposed( false ) + , m_bSidebar( false ) , m_nToolBoxId( SAL_MAX_UINT16 ) , m_xFrame( xFrame ) , m_xContext( rxContext ) , m_aCommandURL( aCommandURL ) , m_aListenerContainer( m_aMutex ) + , m_pToolbar(nullptr) { OSL_ASSERT( m_xContext.is() ); registerProperty( TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIBLE, @@ -80,8 +83,10 @@ ToolboxController::ToolboxController() : , m_bSupportVisible(false) , m_bInitialized( false ) , m_bDisposed( false ) + , m_bSidebar( false ) , m_nToolBoxId( SAL_MAX_UINT16 ) , m_aListenerContainer( m_aMutex ) + , m_pToolbar(nullptr) { registerProperty( TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIBLE, TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIBLE, @@ -191,6 +196,8 @@ void SAL_CALL ToolboxController::initialize( const Sequence< Any >& aArguments ) aPropValue.Value >>= m_sModuleName; else if ( aPropValue.Name == "Identifier" ) aPropValue.Value >>= m_nToolBoxId; + else if ( aPropValue.Name == "IsSidebar" ) + aPropValue.Value >>= m_bSidebar; } } @@ -205,6 +212,12 @@ void SAL_CALL ToolboxController::initialize( const Sequence< Any >& aArguments ) if ( !m_aCommandURL.isEmpty() ) m_aListenerMap.emplace( m_aCommandURL, Reference< XDispatch >() ); + + if (weld::TransportAsXWindow* pTunnel = dynamic_cast<weld::TransportAsXWindow*>(getParent().get())) + { + m_pToolbar = dynamic_cast<weld::Toolbar*>(pTunnel->getWidget()); + assert(m_pToolbar && "must be a toolbar"); + } } void SAL_CALL ToolboxController::update() |