diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-19 16:40:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-25 22:10:21 +0200 |
commit | b047ae6e5bde45555a20a9ad8b7d570d93496187 (patch) | |
tree | f8c13e7cb38b93f0cf2a86b2bde0519423fb628c /svtools/source/control | |
parent | 86d02e1fde746988adc17c9e8480ae9967c5a299 (diff) |
weld SwWatermarkDialog
Change-Id: Iff3ddfb4dd75088e39ea7675b085f1bbde2c2045
Reviewed-on: https://gerrit.libreoffice.org/56247
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source/control')
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 30 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 2 |
2 files changed, 23 insertions, 9 deletions
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index dd94ed5fd8f3..b64c0b788442 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -1393,18 +1393,18 @@ class ToolbarPopupStatusListener : public svt::FrameStatusListener { public: ToolbarPopupStatusListener( const css::uno::Reference< css::frame::XFrame >& xFrame, - ToolbarPopup& rToolbarPopup ); + ToolbarPopupBase& rToolbarPopup ); virtual void SAL_CALL dispose() override; virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) override; - VclPtr<ToolbarPopup> mpPopup; + ToolbarPopupBase* mpPopup; }; ToolbarPopupStatusListener::ToolbarPopupStatusListener( const css::uno::Reference< css::frame::XFrame >& xFrame, - ToolbarPopup& rToolbarPopup ) + ToolbarPopupBase& rToolbarPopup ) : svt::FrameStatusListener( ::comphelper::getProcessComponentContext(), xFrame ) , mpPopup( &rToolbarPopup ) { @@ -1413,7 +1413,7 @@ ToolbarPopupStatusListener::ToolbarPopupStatusListener( void SAL_CALL ToolbarPopupStatusListener::dispose() { - mpPopup.clear(); + mpPopup = nullptr; svt::FrameStatusListener::dispose(); } @@ -1424,9 +1424,23 @@ void SAL_CALL ToolbarPopupStatusListener::statusChanged( const css::frame::Featu mpPopup->statusChanged( Event ); } +ToolbarPopupBase::ToolbarPopupBase(const css::uno::Reference<css::frame::XFrame>& rFrame) + : mxFrame(rFrame) +{ +} + +ToolbarPopupBase::~ToolbarPopupBase() +{ + if (mxStatusListener.is()) + { + mxStatusListener->dispose(); + mxStatusListener.clear(); + } +} + ToolbarPopup::ToolbarPopup( const css::uno::Reference<css::frame::XFrame>& rFrame, vcl::Window* pParentWindow, WinBits nBits ) : DockingWindow(pParentWindow, nBits) - , mxFrame( rFrame ) + , ToolbarPopupBase(rFrame) { init(); } @@ -1434,7 +1448,7 @@ ToolbarPopup::ToolbarPopup( const css::uno::Reference<css::frame::XFrame>& rFram ToolbarPopup::ToolbarPopup( const css::uno::Reference<css::frame::XFrame>& rFrame, vcl::Window* pParentWindow, const OString& rID, const OUString& rUIXMLDescription ) : DockingWindow(pParentWindow, rID, rUIXMLDescription, rFrame) - , mxFrame( rFrame ) + , ToolbarPopupBase(rFrame) { init(); } @@ -1467,7 +1481,7 @@ void ToolbarPopup::dispose() DockingWindow::dispose(); } -void ToolbarPopup::AddStatusListener( const OUString& rCommandURL ) +void ToolbarPopupBase::AddStatusListener( const OUString& rCommandURL ) { if( !mxStatusListener.is() ) mxStatusListener.set( new ToolbarPopupStatusListener( mxFrame, *this ) ); @@ -1475,7 +1489,7 @@ void ToolbarPopup::AddStatusListener( const OUString& rCommandURL ) mxStatusListener->addStatusListener( rCommandURL ); } -void ToolbarPopup::statusChanged( const css::frame::FeatureStateEvent& /*Event*/ ) +void ToolbarPopupBase::statusChanged( const css::frame::FeatureStateEvent& /*Event*/ ) { } diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 281bbe5b8a19..ef76d4bd2f60 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -2925,7 +2925,7 @@ void SvtValueSet::SetStyle(WinBits nStyle) if (nStyle != mnStyle) { mnStyle = nStyle; - mbFormat = false; + mbFormat = true; Invalidate(); } } |