[Libreoffice-commits] core.git: Branch 'feature/vclref' - filter/source reportdesign/source uui/source
Michael Meeks
michael.meeks at collabora.com
Thu Mar 19 10:12:10 PDT 2015
filter/source/flash/swfwriter.cxx | 2 +-
filter/source/flash/swfwriter.hxx | 2 +-
filter/source/graphicfilter/eos2met/eos2met.cxx | 2 +-
filter/source/graphicfilter/eps/eps.cxx | 10 +++++-----
filter/source/graphicfilter/icgm/cgm.cxx | 2 +-
filter/source/graphicfilter/icgm/cgm.hxx | 2 +-
filter/source/graphicfilter/idxf/dxf2mtf.cxx | 2 +-
filter/source/graphicfilter/idxf/dxf2mtf.hxx | 2 +-
filter/source/graphicfilter/ios2met/ios2met.cxx | 4 ++--
filter/source/graphicfilter/ipict/ipict.cxx | 4 ++--
filter/source/svg/svgwriter.cxx | 2 +-
filter/source/svg/svgwriter.hxx | 4 ++--
reportdesign/source/ui/inc/ColorChanger.hxx | 2 +-
uui/source/fltdlg.cxx | 4 ++--
14 files changed, 22 insertions(+), 22 deletions(-)
New commits:
commit 6a1532d89a2e50bc7775f5b21e0881925bce66d4
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Mar 19 17:16:37 2015 +0000
Move OutputDevice members to VclPtr: filter, reportdesign, uui.
Change-Id: Iafac8812714a0be68f5608f657c76c159f2912a0
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index ded932b..4d1ad68 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -100,7 +100,7 @@ Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int
Writer::~Writer()
{
- delete mpVDev;
+ mpVDev.disposeAndClear();
delete mpSprite;
delete mpTag;
}
diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx
index efa2247..8355bc4 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -395,7 +395,7 @@ private:
sal_uInt16 mnWhiteBackgroundShapeId;
sal_uInt16 mnPageButtonId;
- VirtualDevice* mpVDev;
+ VclPtr<VirtualDevice> mpVDev;
const tools::PolyPolygon* mpClipPolyPolygon;
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 0fd0114..66a2773 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -157,7 +157,7 @@ private:
sal_uInt32 nActBitmapPercent; // percentage of the next bitmap that's already written
ScopedVclPtr<VirtualDevice> apDummyVDev;
- OutputDevice* pCompDev;
+ VclPtr<OutputDevice> pCompDev;
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 06acb9a..8832ca6 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -257,7 +257,7 @@ PSWriter::PSWriter()
, mpPS(NULL)
, pMTF(NULL)
, pAMTF(NULL)
- , aVDev()
+ , pVDev()
, nBoundingX1(0)
, nBoundingY1(0)
, nBoundingX2(0)
@@ -419,13 +419,13 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
Bitmap aBmp( rGraphic.GetBitmap() );
pAMTF = new GDIMetaFile();
ScopedVclPtr<VirtualDevice> pTmpVDev(new VirtualDevice());
- pAMTF->Record( &aTmpVDev );
+ pAMTF->Record( pTmpVDev );
pTmpVDev->DrawBitmap( Point(), aBmp );
pAMTF->Stop();
pAMTF->SetPrefSize( aBmp.GetSizePixel() );
pMTF = pAMTF;
}
- aVDev.SetMapMode( pMTF->GetPrefMapMode() );
+ pVDev->SetMapMode( pMTF->GetPrefMapMode() );
nBoundingX1 = nBoundingY1 = 0;
nBoundingX2 = pMTF->GetPrefSize().Width();
nBoundingY2 = pMTF->GetPrefSize().Height();
@@ -454,7 +454,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
{
ImplWriteProlog( ( mnPreview & EPS_PREVIEW_EPSI ) ? &rGraphic : NULL );
mnCursorPos = 0;
- ImplWriteActions( *pMTF, aVDev );
+ ImplWriteActions( *pMTF, *pVDev.get() );
ImplWriteEpilog();
if ( mnPreview & EPS_PREVIEW_TIFF )
{
@@ -1608,7 +1608,7 @@ void PSWriter::ImplIntersect( const tools::PolyPolygon& rPolyPoly )
void PSWriter::ImplWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice& rVDev )
{
- ScopedVclPtr<VirtualDevice> l_pVirDev( new VirtualDevice() );
+ ScopedVclPtr<VirtualDevice> l_pVDev( new VirtualDevice() );
GDIMetaFile aTmpMtf;
l_pVDev->SetMapMode( rVDev.GetMapMode() );
l_pVDev->AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf );
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index fdf2582..7abfe96 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -80,7 +80,7 @@ CGM::~CGM()
mpGDIMetaFile->Stop();
mpGDIMetaFile->SetPrefMapMode( MapMode() );
mpGDIMetaFile->SetPrefSize( Size( static_cast< long >( mnOutdx ), static_cast< long >( mnOutdy ) ) );
- delete mpVirDev;
+ mpVirDev.disposeAndClear();
*mpGraphic = Graphic( *mpGDIMetaFile );
}
for( size_t i = 0, n = maDefRepList.size(); i < n; ++i )
diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx
index c03b891..c6c0fa6 100644
--- a/filter/source/graphicfilter/icgm/cgm.hxx
+++ b/filter/source/graphicfilter/icgm/cgm.hxx
@@ -138,7 +138,7 @@ class CGM
~CGM();
CGM( sal_uInt32 nMode, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > const & rModel );
- VirtualDevice* mpVirDev;
+ VclPtr<VirtualDevice> mpVirDev;
GDIMetaFile* mpGDIMetaFile;
sal_uInt32 GetBackGroundColor();
bool IsValid() const { return mbStatus; };
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 8429940..2d2b86b 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -885,7 +885,7 @@ bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
rMTF.SetPrefMapMode( MapMode( MAP_100TH_MM ) );
}
- delete pVirDev;
+ pVirDev.disposeAndClear();
return bStatus;
}
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx b/filter/source/graphicfilter/idxf/dxf2mtf.hxx
index 354cd09..a9eab71 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.hxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.hxx
@@ -34,7 +34,7 @@ enum BrushStyle { BRUSH_NULL, BRUSH_SOLID, BRUSH_HORZ, BRUSH_VERT,
class DXF2GDIMetaFile {
private:
- VirtualDevice * pVirDev;
+ VclPtr<VirtualDevice> pVirDev;
const DXFRepresentation * pDXF;
bool bStatus;
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 317adee..e8a857c 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -345,7 +345,7 @@ private:
long ErrorCode;
SvStream * pOS2MET; // the OS2MET file to be read
- VirtualDevice * pVirDev; // here the drawing methods are being called
+ VclPtr<VirtualDevice> pVirDev; // here the drawing methods are being called
// While doing this a recording in the GDIMetaFile
// will take place.
sal_uLong nOrigPos; // initial position in pOS2MET
@@ -2676,7 +2676,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
}
rGDIMetaFile.Stop();
- delete pVirDev;
+ pVirDev.disposeAndClear();
rGDIMetaFile.SetPrefMapMode( aGlobMapMode );
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 38e7cde..0885a24 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -145,7 +145,7 @@ class PictReader {
private:
SvStream * pPict; // The Pict file to read.
- VirtualDevice * pVirDev; // Here the drawing methos will be called.
+ VclPtr<VirtualDevice> pVirDev; // Here the drawing methos will be called.
// A recording into the GDIMetaFile will take place.
sal_uLong nOrigPos; // Initial position in pPict.
@@ -1951,7 +1951,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
pVirDev->SetClipRegion();
rGDIMetaFile.Stop();
- delete pVirDev;
+ pVirDev.disposeAndClear();
rGDIMetaFile.SetPrefMapMode( MapMode( MAP_INCH, Point(), aHRes, aVRes ) );
rGDIMetaFile.SetPrefSize( aBoundingRect.GetSize() );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 1ca787a..65b8b8b 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1657,7 +1657,7 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport
SVGActionWriter::~SVGActionWriter()
{
DBG_ASSERT( !mpContext, "Not all contexts are closed" );
- delete mpVDev;
+ mpVDev.disposeAndClear();
}
long SVGActionWriter::ImplMap( sal_Int32 nVal ) const
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index 459978c..6bf117a 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -180,7 +180,7 @@ class SVGTextWriter
private:
SVGExport& mrExport;
SVGAttributeWriter* mpContext;
- VirtualDevice* mpVDev;
+ VclPtr<VirtualDevice> mpVDev;
bool mbIsTextShapeStarted;
Reference<XText> mrTextShape;
OUString msShapeId;
@@ -305,7 +305,7 @@ private:
SVGFontExport& mrFontExport;
SVGAttributeWriter* mpContext;
SVGTextWriter maTextWriter;
- VirtualDevice* mpVDev;
+ VclPtr<VirtualDevice> mpVDev;
MapMode maTargetMapMode;
sal_uInt32 mnInnerMtfCount;
bool mbClipAttrChanged;
diff --git a/reportdesign/source/ui/inc/ColorChanger.hxx b/reportdesign/source/ui/inc/ColorChanger.hxx
index 7a26c60..247863a 100644
--- a/reportdesign/source/ui/inc/ColorChanger.hxx
+++ b/reportdesign/source/ui/inc/ColorChanger.hxx
@@ -27,7 +27,7 @@ namespace rptui
class ColorChanger
{
protected:
- OutputDevice* m_pDev;
+ VclPtr<OutputDevice> m_pDev;
public:
ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor)
diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx
index be4ee22..eb68fa6 100644
--- a/uui/source/fltdlg.cxx
+++ b/uui/source/fltdlg.cxx
@@ -170,7 +170,7 @@ class StringCalculator : public ::cppu::WeakImplHelper1< ::com::sun::star::util:
{
public:
StringCalculator( const OutputDevice* pDevice )
- : m_pDevice( pDevice )
+ : m_pDevice( const_cast< OutputDevice * >( pDevice ) )
{
}
@@ -180,7 +180,7 @@ class StringCalculator : public ::cppu::WeakImplHelper1< ::com::sun::star::util:
}
private:
- const OutputDevice* m_pDevice;
+ VclPtr<OutputDevice> m_pDevice;
};
/*-************************************************************************************************************
More information about the Libreoffice-commits
mailing list