summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-25 16:23:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-29 06:45:42 +0000
commite6ffb539ee232ea0c679928ff456c1cf97429f63 (patch)
treee4b71a9bd49edba1a0f1c95f60f6da81433d1983 /sfx2/source/appl
parentbbc7ed9c379019f31dc7ac234cf83ea151601465 (diff)
loplugin:vclwidgets check for assigning from VclPt<T> to T*
Inspired by a recent bug report where we were assigning the result of VclPtr<T>::Create to a raw pointer. As a consequence, we also need to change various methods that were returning newly created Window subclasses via raw pointer, to instead return those via VclPtr Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b Reviewed-on: https://gerrit.libreoffice.org/31318 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/workwin.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index a8ad4dbf45a2..1c15d90bffe9 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -581,7 +581,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
// DockingWindows)
for (size_t n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
- SfxSplitWindow *p = pSplit[n];
+ VclPtr<SfxSplitWindow> const &p = pSplit[n];
if (p->GetWindowCount())
p->Lock();
}
@@ -1162,7 +1162,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2()
sal_uInt16 n;
for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
- SfxSplitWindow *p = pSplit[n];
+ VclPtr<SfxSplitWindow> const & p = pSplit[n];
if (p->GetWindowCount())
p->Lock();
}
@@ -1246,7 +1246,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2()
// Unlock the SplitWindows again
for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
- SfxSplitWindow *p = pSplit[n];
+ VclPtr<SfxSplitWindow> const & p = pSplit[n];
if (p->GetWindowCount())
p->Lock(false);
}
@@ -2383,7 +2383,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
// (not pinned, FadeIn).
// Only the abandoned window may be invisible, because perhaps its
// size is just being calculated before it is displayed.
- SfxSplitWindow* pSplitWin = pSplit[n];
+ VclPtr<SfxSplitWindow> const & pSplitWin = pSplit[n];
bool bDummyWindow = !pSplitWin->IsFadeIn();
vcl::Window *pDummy = pSplitWin->GetSplitWindow();
vcl::Window *pWin = bDummyWindow ? pDummy : pSplitWin;