summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-20 14:27:53 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 13:01:47 +0100
commit52789497db9f97beb8c95177fd2293287c5dc1e6 (patch)
tree48e5c0ca0c7c433be7c0fd7bd638a50b52f945a9 /sw/source
parent98586079c3961f32d9eaee9731ee053bc8bf1887 (diff)
wrap more stuff in VclPtr
Change-Id: Ia742c47399231bc5914b6586132ad3daf694fdb0
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/attr/hints.cxx2
-rw-r--r--sw/source/core/draw/dflyobj.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx4
-rw-r--r--sw/source/core/layout/virtoutp.cxx3
-rw-r--r--sw/source/core/layout/virtoutp.hxx2
-rw-r--r--sw/source/core/text/itratr.cxx4
6 files changed, 8 insertions, 9 deletions
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index 2aed42659232..129e9555ce15 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -49,7 +49,7 @@ SwUpdateAttr::SwUpdateAttr( sal_Int32 nS, sal_Int32 nE, sal_uInt16 nW )
{
}
-SwRefMarkFldUpdate::SwRefMarkFldUpdate( const OutputDevice* pOutput )
+SwRefMarkFldUpdate::SwRefMarkFldUpdate( OutputDevice* pOutput )
: SwMsgPoolItem( RES_REFMARKFLD_UPDATE ),
pOut( pOutput )
{
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 4d1557ebb1f1..9ae2b1952228 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -438,7 +438,7 @@ namespace
private:
bool mbMapModeRestored;
- OutputDevice* mpOutDev;
+ VclPtr<OutputDevice> mpOutDev;
};
}
// <--
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 6ad6d8350762..c22ab509338a 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -240,7 +240,7 @@ struct SwPaintProperties {
// Only repaint the Fly content as well as the background of the Fly content if
// a metafile is taken of the Fly.
bool bSFlyMetafile;
- OutputDevice *pSFlyMetafileOut;
+ VclPtr<OutputDevice> pSFlyMetafileOut;
SwViewShell *pSGlobalShell;
// Retouch for transparent Flys is done by the background of the Flys.
@@ -1247,7 +1247,7 @@ void SwAlignRect( SwRect &rRect, const SwViewShell *pSh )
}
const OutputDevice *pOut = gProp.bSFlyMetafile ?
- gProp.pSFlyMetafileOut : pSh->GetOut();
+ gProp.pSFlyMetafileOut.get() : pSh->GetOut();
// Hold original rectangle in pixel
const Rectangle aOrgPxRect = pOut->LogicToPixel( rRect.SVRect() );
diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index 78e5cfef4b23..dceabf01408d 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -133,8 +133,7 @@ bool SwLayVout::DoesFit( const Size &rNew )
aSize.Width() = rNew.Width();
if( !pVirDev->SetOutputSizePixel( aSize ) )
{
- delete pVirDev;
- pVirDev = NULL;
+ pVirDev.disposeAndClear();
aSize.Width() = 0;
return false;
}
diff --git a/sw/source/core/layout/virtoutp.hxx b/sw/source/core/layout/virtoutp.hxx
index 287cfaf10355..ea44b5be2b9f 100644
--- a/sw/source/core/layout/virtoutp.hxx
+++ b/sw/source/core/layout/virtoutp.hxx
@@ -43,7 +43,7 @@ private:
public:
SwLayVout() : pSh(0), pOut(0), pVirDev(0), aSize(0, VIRTUALHEIGHT), nCount(0) {}
- ~SwLayVout() { delete pVirDev; }
+ ~SwLayVout() { pVirDev.disposeAndClear(); }
/// OD 27.09.2002 #103636# - change 2nd parameter <rRect> - no longer <const>
void Enter( SwViewShell *pShell, SwRect &rRect, bool bOn );
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 38dc69ed5887..42cd02ac84f2 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -109,7 +109,7 @@ SwTxtAttr *SwAttrIter::GetAttr( const sal_Int32 nPosition ) const
bool SwAttrIter::SeekAndChgAttrIter( const sal_Int32 nNewPos, OutputDevice* pOut )
{
bool bChg = nStartIndex && nNewPos == nPos ? pFnt->IsFntChg() : Seek( nNewPos );
- if ( pLastOut != pOut )
+ if ( pLastOut.get() != pOut )
{
pLastOut = pOut;
pFnt->SetFntChg( true );
@@ -174,7 +174,7 @@ bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFo
}
bool bChg = pFnt->IsFntChg();
- if ( pLastOut != pOut )
+ if ( pLastOut.get() != pOut )
{
pLastOut = pOut;
pFnt->SetFntChg( true );