summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-13 22:20:21 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 11:02:29 +0100
commit00ebfa7b1f3086e729b7a088d690cb5eda2a820e (patch)
tree61874cd1355c1e95a7706ee0846992a19d666359 /sfx2
parent6443d75965a34b0b11f176d887015997b4eadc5f (diff)
convert a problematic array to VclPtr.
Change-Id: Ia8b6984a8a9bdf6f32cf5ebfc971a6921796eece
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/workwin.cxx11
-rw-r--r--sfx2/source/inc/workwin.hxx2
2 files changed, 6 insertions, 7 deletions
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 1591113ab7ee..2298469fb5b5 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -606,7 +606,6 @@ SfxWorkWindow::SfxWorkWindow( vcl::Window *pWin, SfxBindings& rB, SfxWorkWindow*
m_aTbxTypeName( "private:resource/toolbar/" ),
m_aProgressBarResName( "private:resource/progressbar/progressbar" )
{
- memset(pSplit, 0, sizeof(pSplit));
DBG_ASSERT (pBindings, "No Bindings!");
pBindings->SetWorkWindow_Impl( this );
@@ -633,10 +632,10 @@ SfxWorkWindow::~SfxWorkWindow()
// Delete SplitWindows
for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
- SfxSplitWindow *p = pSplit[n];
+ VclPtr<SfxSplitWindow> p = pSplit[n];
if (p->GetWindowCount())
ReleaseChild_Impl(*p);
- delete p;
+ pSplit[n].disposeAndClear();
}
// Delete help structure for Child-Windows
@@ -677,8 +676,8 @@ void SfxWorkWindow::DeleteControllers_Impl()
for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
- if (p->GetWindowCount())
- p->Lock();
+ if (p->GetWindowCount())
+ p->Lock();
}
// Delete Child-Windows
@@ -2534,7 +2533,7 @@ bool SfxWorkWindow::IsAutoHideMode( const SfxSplitWindow *pSplitWin )
{
for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
- if ( pSplit[n] != pSplitWin && pSplit[n]->IsAutoHide( true ) )
+ if ( pSplit[n].get() != pSplitWin && pSplit[n]->IsAutoHide( true ) )
return true;
}
return false;
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 911fd8570a7e..74ae7fb0c4dd 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -222,7 +222,7 @@ protected:
Rectangle aClientArea;
Rectangle aUpperClientArea;
SfxWorkWindow* pParent;
- SfxSplitWindow* pSplit[SFX_SPLITWINDOWS_MAX];
+ VclPtr<SfxSplitWindow> pSplit[SFX_SPLITWINDOWS_MAX];
SfxChildList_Impl aChildren;
SfxChildWindows_Impl aChildWins;
SfxBindings* pBindings;