diff options
Diffstat (limited to 'sd/source/ui/annotations')
-rw-r--r-- | sd/source/ui/annotations/annotationtag.cxx | 20 |
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 ) |