summaryrefslogtreecommitdiff
path: root/sd/source/ui/annotations
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-19 15:39:43 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:17:54 +0100
commit8fa63f31ab84131fc1551563ae5d9bf86208c906 (patch)
tree7cecdf6f9e4bce0f68779628152676ec21ff762b /sd/source/ui/annotations
parente1b8e36a2693102664b8afe16ec321ef63e234aa (diff)
Fix OutputDevice members / stack allocation: slideshow, starmath, sd, sc.
Change-Id: I6d6d41b8a6501ce7d35c78e5b730ea45143d6b73
Diffstat (limited to 'sd/source/ui/annotations')
-rw-r--r--sd/source/ui/annotations/annotationtag.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 610ed613588f..62ee8dace947 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -515,19 +515,19 @@ void AnnotationTag::deselect()
BitmapEx AnnotationTag::CreateAnnotationBitmap( bool bSelected )
{
- VirtualDevice aVDev;
+ ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
OUString sAuthor( getInitials( mxAnnotation->getAuthor() ) );
sAuthor += OUString( ' ' );
sAuthor += OUString::number( mnIndex );
- aVDev.SetFont( mrFont );
+ pVDev->SetFont( mrFont );
const int BORDER_X = 4; // pixels
const int BORDER_Y = 4; // pixels
- maSize = Size( aVDev.GetTextWidth( sAuthor ) + 2*BORDER_X, aVDev.GetTextHeight() + 2*BORDER_Y );
- aVDev.SetOutputSizePixel( maSize, false );
+ maSize = Size( pVDev->GetTextWidth( sAuthor ) + 2*BORDER_X, pVDev->GetTextHeight() + 2*BORDER_Y );
+ pVDev->SetOutputSizePixel( maSize, false );
Color aBorderColor( maColor );
@@ -549,14 +549,14 @@ BitmapEx AnnotationTag::CreateAnnotationBitmap( bool bSelected )
Point aPos;
Rectangle aBorderRect( aPos, maSize );
- aVDev.SetLineColor(aBorderColor);
- aVDev.SetFillColor(maColor);
- aVDev.DrawRect( aBorderRect );
+ pVDev->SetLineColor(aBorderColor);
+ pVDev->SetFillColor(maColor);
+ pVDev->DrawRect( aBorderRect );
- aVDev.SetTextColor( maColor.IsDark() ? COL_WHITE : COL_BLACK );
- aVDev.DrawText( Point( BORDER_X, BORDER_Y ), sAuthor );
+ pVDev->SetTextColor( maColor.IsDark() ? COL_WHITE : COL_BLACK );
+ pVDev->DrawText( Point( BORDER_X, BORDER_Y ), sAuthor );
- return aVDev.GetBitmapEx( aPos, maSize );
+ return pVDev->GetBitmapEx( aPos, maSize );
}
void AnnotationTag::OpenPopup( bool bEdit )