summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-03 14:32:24 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-03 14:32:24 +0100
commitf82cd9c786933a641ab131758a9fc1bd291824cc (patch)
tree5d76fed083ddfa5b7657a550846582de4d8b51d2 /include/sfx2
parent36cdf3c35459df63ce137e550a6840a61865c0ca (diff)
Hold SfxInfoBarWindow by VclPtr
In SfxInfoBarContainerWindow::removeInfoBar, disposeAndClear is already called on the removed member (once found), so the ScopedVclPtr (also calling disposeAndClear when going out of scope) should not be necessary. Change-Id: Ibf4d19ebd5f1a6217e1d18ef0458c9b865667898
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/infobar.hxx6
-rw-r--r--include/sfx2/viewfrm.hxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index 2d732bdb7526..8cd6d6cb2804 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -84,14 +84,14 @@ class SfxInfoBarContainerWindow : public vcl::Window
virtual ~SfxInfoBarContainerWindow( ) override;
virtual void dispose() override;
- SfxInfoBarWindow* appendInfoBar(const OUString& sId,
+ VclPtr<SfxInfoBarWindow> appendInfoBar(const OUString& sId,
const OUString& sMessage,
const basegfx::BColor* pBackgroundColor,
const basegfx::BColor* pForegroundColor,
const basegfx::BColor* pMessageColor,
WinBits nMessageStyle);
- SfxInfoBarWindow* getInfoBar(const OUString& sId);
- void removeInfoBar(SfxInfoBarWindow* pInfoBar);
+ VclPtr<SfxInfoBarWindow> getInfoBar(const OUString& sId);
+ void removeInfoBar(VclPtr<SfxInfoBarWindow> const & pInfoBar);
virtual void Resize() override;
};
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index d25095483772..ed8a994bc741 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -170,7 +170,7 @@ public:
The buttons will be added from Right to Left at the right of the info bar. The parent, size
and position of each button will be changed: only the width will remain unchanged.
*/
- SfxInfoBarWindow* AppendInfoBar(const OUString& sId,
+ VclPtr<SfxInfoBarWindow> AppendInfoBar(const OUString& sId,
const OUString& sMessage,
const basegfx::BColor* pBackgroundColor = nullptr,
const basegfx::BColor* pForegroundColor = nullptr,