summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-06-19 16:40:38 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-07-03 17:46:55 +0200
commitbf1e097c16f9dd672ea43234cbe0eb64c82fd37e (patch)
treeb2d0cd211bc13e7225f8769e3c1fc3a28b7aa441 /svtools
parentdd645e70108f31aab611634e77c120e5efe52d05 (diff)
weld SwWatermarkDialog
Change-Id: Iff3ddfb4dd75088e39ea7675b085f1bbde2c2045 Reviewed-on: https://gerrit.libreoffice.org/56414 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/toolbarmenu.cxx30
-rw-r--r--svtools/source/control/valueset.cxx2
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 23f8c82eb9c7..18fc943df835 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -2936,7 +2936,7 @@ void SvtValueSet::SetStyle(WinBits nStyle)
if (nStyle != mnStyle)
{
mnStyle = nStyle;
- mbFormat = false;
+ mbFormat = true;
Invalidate();
}
}