summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-19 14:58:31 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:17:38 +0100
commite1b8e36a2693102664b8afe16ec321ef63e234aa (patch)
tree921b7518b6dcae8de90311f5242a328fda6193f6 /desktop
parenteac22a0630bcf3780142f64a022fa432e13bb7e1 (diff)
Fix OutputDevice members / stack allocation: desktop, sfx2, lwp.
Change-Id: I5563cfa35142f088533ae998d087dec669a13287
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx10
-rw-r--r--desktop/source/splash/splash.cxx26
2 files changed, 18 insertions, 18 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 186f60bf29f3..b7587d178209 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -606,21 +606,21 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
#ifndef IOS
InitSvpForLibreOfficeKit();
- VirtualDevice aDevice(0, Size(1, 1), (sal_uInt16)32);
+ ScopedVclPtr<VirtualDevice> pDevice( new VirtualDevice(0, Size(1, 1), (sal_uInt16)32)) ;
boost::shared_array< sal_uInt8 > aBuffer( pBuffer, NoDelete< sal_uInt8 >() );
- aDevice.SetOutputSizePixelScaleOffsetAndBuffer(
+ pDevice->SetOutputSizePixelScaleOffsetAndBuffer(
Size(nCanvasWidth, nCanvasHeight), Fraction(1.0), Point(),
aBuffer, true );
- pDoc->paintTile(aDevice, nCanvasWidth, nCanvasHeight,
+ pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
#else
SystemGraphicsData aData;
aData.rCGContext = reinterpret_cast<CGContextRef>(pBuffer);
// the Size argument is irrelevant, I hope
- VirtualDevice aDevice(&aData, Size(1, 1), (sal_uInt16)0);
+ ScopedVclPtrInstance<VirtualDevice> pDevice(&aData, Size(1, 1), (sal_uInt16)0);
- pDoc->paintTile(aDevice, nCanvasWidth, nCanvasHeight,
+ pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
#endif
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index fd55c1d77e17..cb1ed36fe063 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -150,7 +150,7 @@ SplashScreen::SplashScreen()
, _yoffset(18)
{
loadConfig();
- _vdev.EnableRTL(IsRTLEnabled());
+ _vdev->EnableRTL(IsRTLEnabled());
}
SplashScreen::~SplashScreen()
@@ -258,7 +258,7 @@ SplashScreen::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::sta
SetScreenBitmap (_aIntroBmp);
Size aSize = _aIntroBmp.GetSizePixel();
SetOutputSizePixel( aSize );
- _vdev.SetOutputSizePixel( aSize );
+ _vdev->SetOutputSizePixel( aSize );
_height = aSize.Height();
_width = aSize.Width();
if (_width > 500)
@@ -615,7 +615,7 @@ void SplashScreen::Paint( const Rectangle&)
//non native drawing
// draw bitmap
if (_bPaintBitmap)
- _vdev.DrawBitmapEx( Point(), _aIntroBmp );
+ _vdev->DrawBitmapEx( Point(), _aIntroBmp );
if (_bPaintProgress) {
// draw progress...
@@ -623,20 +623,20 @@ void SplashScreen::Paint( const Rectangle&)
if (length < 0) length = 0;
// border
- _vdev.SetFillColor();
- _vdev.SetLineColor( _cProgressFrameColor );
- _vdev.DrawRect(Rectangle(_tlx, _tly, _tlx+_barwidth, _tly+_barheight));
- _vdev.SetFillColor( _cProgressBarColor );
- _vdev.SetLineColor();
- _vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace));
+ _vdev->SetFillColor();
+ _vdev->SetLineColor( _cProgressFrameColor );
+ _vdev->DrawRect(Rectangle(_tlx, _tly, _tlx+_barwidth, _tly+_barheight));
+ _vdev->SetFillColor( _cProgressBarColor );
+ _vdev->SetLineColor();
+ _vdev->DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace));
vcl::Font aFont;
aFont.SetSize(Size(0, 12));
aFont.SetAlign(ALIGN_BASELINE);
- _vdev.SetFont(aFont);
- _vdev.SetTextColor(_cProgressTextColor);
- _vdev.DrawText(Point(_tlx, _textBaseline), _sProgressText);
+ _vdev->SetFont(aFont);
+ _vdev->SetTextColor(_cProgressTextColor);
+ _vdev->DrawText(Point(_tlx, _textBaseline), _sProgressText);
}
- DrawOutDev(Point(), GetOutputSizePixel(), Point(), _vdev.GetOutputSizePixel(), _vdev );
+ DrawOutDev(Point(), GetOutputSizePixel(), Point(), _vdev->GetOutputSizePixel(), *_vdev.get() );
}