summaryrefslogtreecommitdiff
path: root/canvas/source/opengl/ogl_canvashelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source/opengl/ogl_canvashelper.cxx')
-rw-r--r--canvas/source/opengl/ogl_canvashelper.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index f6d641f8bb2b..501e7f83fe6b 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -725,8 +725,8 @@ namespace oglcanvas
if( mpDevice )
{
- VirtualDevice aVDev;
- aVDev.EnableOutput(false);
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
+ pVDev->EnableOutput(false);
CanvasFont* pFont=dynamic_cast<CanvasFont*>(xLayoutetText->getFont().get());
const rendering::StringContext& rTxt=xLayoutetText->getText();
@@ -749,7 +749,7 @@ namespace oglcanvas
// adjust to stretched font
if(!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11))
{
- const Size aSize = aVDev.GetFontMetric( aFont ).GetSize();
+ const Size aSize = pVDev->GetFontMetric( aFont ).GetSize();
const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
@@ -762,7 +762,7 @@ namespace oglcanvas
}
// set font
- aVDev.SetFont(aFont);
+ pVDev->SetFont(aFont);
mpRecordedActions->push_back( Action() );
Action& rAct=mpRecordedActions->back();
@@ -780,7 +780,7 @@ namespace oglcanvas
pDXArray[i] = basegfx::fround( aLogicalAdvancements[i] );
// get the glyphs
- aVDev.GetTextOutlines(rAct.maPolyPolys,
+ pVDev->GetTextOutlines(rAct.maPolyPolys,
rTxt.Text,
0,
rTxt.StartPosition,
@@ -792,7 +792,7 @@ namespace oglcanvas
else
{
// get the glyphs
- aVDev.GetTextOutlines(rAct.maPolyPolys,
+ pVDev->GetTextOutlines(rAct.maPolyPolys,
rTxt.Text,
0,
rTxt.StartPosition,