[Libreoffice-commits] core.git: Branch 'feature/vclref' - editeng/source filter/source sc/source sd/source svx/source vcl/source
Michael Meeks
michael.meeks at collabora.com
Fri Mar 20 03:27:19 PDT 2015
editeng/source/editeng/impedit3.cxx | 2 +-
filter/source/graphicfilter/eps/eps.cxx | 2 +-
sc/source/ui/view/gridwin4.cxx | 2 +-
sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx | 2 +-
svx/source/unodraw/UnoGraphicExporter.cxx | 2 +-
vcl/source/filter/wmf/emfwr.hxx | 3 ++-
vcl/source/gdi/print.cxx | 1 +
vcl/source/outdev/outdev.cxx | 4 ++++
8 files changed, 12 insertions(+), 6 deletions(-)
New commits:
commit 3cae6f5f0c411abc1ec7ae4bbba026cc238a9106
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Mar 20 10:31:48 2015 +0000
vclptr: various mistakes fixed, and more ptr types converted.
Change-Id: Iba04ec828f7ce37fc6ede28a64f1c286d81ff705
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 39db002..9c27a87 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2817,7 +2817,7 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics
if ( ( nIntLeading == 0 ) && ( pRefDev->GetOutDevType() == OUTDEV_PRINTER ) )
{
// Lets see what Leading one gets on the screen
- VirtualDevice* pVDev = GetVirtualDevice( pRefDev->GetMapMode(), pRefDev->GetDrawMode() );
+ VclPtr<VirtualDevice> pVDev = GetVirtualDevice( pRefDev->GetMapMode(), pRefDev->GetDrawMode() );
rFont.SetPhysFont( pVDev );
aMetric = pVDev->GetFontMetric();
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 8832ca6..62ea5e1 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -2141,7 +2141,7 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const lo
vcl::Font aNotRotatedFont( maFont );
aNotRotatedFont.SetOrientation( 0 );
- ScopedVclPtr<VirtualDevice> pVirDev( new VirtualDevice() );
+ ScopedVclPtr<VirtualDevice> pVirDev( new VirtualDevice( 1 ) );
pVirDev->SetMapMode( rVDev.GetMapMode() );
pVirDev->SetFont( aNotRotatedFont );
pVirDev->SetTextAlign( eTextAlign );
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 545e071..027dfb6 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -479,7 +479,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
aOutputData.SetMirrorWidth( nMirrorWidth ); // needed for RTL
aOutputData.SetSpellCheckContext(mpSpellCheckCxt.get());
- boost::scoped_ptr< VirtualDevice > xFmtVirtDev;
+ ScopedVclPtr< VirtualDevice > xFmtVirtDev;
bool bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode?
if ( bTextWysiwyg )
diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
index 9b992ee..327cadd 100644
--- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
@@ -121,7 +121,7 @@ public:
void Dispose (void);
private:
- ::boost::shared_ptr<VirtualDevice> mpLayerDevice;
+ ScopedVclPtr<VirtualDevice> mpLayerDevice;
::std::vector<SharedILayerPainter> maPainters;
vcl::Region maInvalidationRegion;
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 60eb00f..c0636f3 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -907,7 +907,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
if( !bSingleGraphic )
{
// create a metafile for all shapes
- ScopedVclPtr<VirtualDevice> aOut;
+ ScopedVclPtr<VirtualDevice> aOut(new VirtualDevice());
// calculate bound rect for all shapes
Rectangle aBound;
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index dd34bbc..d4925c1 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -33,7 +33,7 @@ class EMFWriter
{
private:
- ScopedVclPtr<VirtualDevice> maVDev;
+ ScopedVclPtr<VirtualDevice> maVDev;
MapMode maDestMapMode;
SvStream& m_rStm;
bool* mpHandlesUsed;
@@ -91,6 +91,7 @@ public:
EMFWriter(SvStream &rStream)
: m_rStm(rStream)
+ , maVDev( new VirtualDevice() )
, mpHandlesUsed(NULL)
, mnHandleCount(0)
, mnRecordCount(0)
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 68589340..0ecc001 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1024,6 +1024,7 @@ void Printer::dispose()
DBG_ASSERT( !IsJobActive(), "Printer::~Printer() - Job is active" );
delete mpPrinterOptions;
+ mpPrinterOptions = NULL;
ReleaseGraphics();
if ( mpInfoPrinter )
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 81fd46d..2118450 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -219,6 +219,7 @@ void OutputDevice::dispose()
ImplInvalidateViewTransform();
delete mpOutDevData;
+ mpOutDevData = NULL;
// for some reason, we haven't removed state from the stack properly
if ( !mpOutDevStateStack->empty() )
@@ -230,6 +231,7 @@ void OutputDevice::dispose()
}
}
delete mpOutDevStateStack;
+ mpOutDevStateStack = NULL;
// release the active font instance
if( mpFontEntry )
@@ -238,8 +240,10 @@ void OutputDevice::dispose()
// remove cached results of GetDevFontList/GetDevSizeList
// TODO: use smart pointers for them
delete mpGetDevFontList;
+ mpGetDevFontList = NULL;
delete mpGetDevSizeList;
+ mpGetDevSizeList = NULL;
// release ImplFontCache specific to this OutputDevice
// TODO: refcount ImplFontCache
More information about the Libreoffice-commits
mailing list