summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/filter/html/buttonset.cxx12
-rw-r--r--sd/source/ui/annotations/annotationtag.cxx20
-rw-r--r--sd/source/ui/dlg/animobjs.cxx18
-rw-r--r--sd/source/ui/dlg/docprev.cxx18
-rw-r--r--sd/source/ui/docshell/docshel2.cxx20
-rw-r--r--sd/source/ui/slideshow/showwin.cxx16
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx16
7 files changed, 60 insertions, 60 deletions
diff --git a/sd/source/filter/html/buttonset.cxx b/sd/source/filter/html/buttonset.cxx
index fbc76de77900..40464ca2cc51 100644
--- a/sd/source/filter/html/buttonset.cxx
+++ b/sd/source/filter/html/buttonset.cxx
@@ -197,8 +197,8 @@ bool ButtonSetImpl::getPreview( int nSet, const std::vector< OUString >& rButton
std::vector< Graphic > aGraphics;
- VirtualDevice aDev;
- aDev.SetMapMode(MapMode(MAP_PIXEL));
+ ScopedVclPtr<VirtualDevice> pDev( new VirtualDevice() );
+ pDev->SetMapMode(MapMode(MAP_PIXEL));
Size aSize;
std::vector< OUString >::const_iterator aIter( rButtons.begin() );
@@ -210,7 +210,7 @@ bool ButtonSetImpl::getPreview( int nSet, const std::vector< OUString >& rButton
aGraphics.push_back(aGraphic);
- Size aGraphicSize( aGraphic.GetSizePixel( &aDev ) );
+ Size aGraphicSize( aGraphic.GetSizePixel( pDev ) );
aSize.Width() += aGraphicSize.Width();
if( aSize.Height() < aGraphicSize.Height() )
@@ -220,7 +220,7 @@ bool ButtonSetImpl::getPreview( int nSet, const std::vector< OUString >& rButton
aSize.Width() += 3;
}
- aDev.SetOutputSizePixel( aSize );
+ pDev->SetOutputSizePixel( aSize );
Point aPos;
@@ -229,12 +229,12 @@ bool ButtonSetImpl::getPreview( int nSet, const std::vector< OUString >& rButton
{
Graphic aGraphic( (*aGraphIter++) );
- aGraphic.Draw( &aDev, aPos );
+ aGraphic.Draw( pDev, aPos );
aPos.X() += aGraphic.GetSizePixel().Width() + 3;
}
- rImage = Image( aDev.GetBitmapEx( Point(), aSize ) );
+ rImage = Image( pDev->GetBitmapEx( Point(), aSize ) );
return true;
}
return false;
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 )
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index a5d0109c5887..6b79455d35ff 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -548,23 +548,23 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
static_cast<SdrObject*>(pPage->GetObj(m_nCurrentFrame));
if( pObject )
{
- VirtualDevice aVD;
+ ScopedVclPtr<VirtualDevice> pVD(new VirtualDevice());
Rectangle aObjRect( pObject->GetCurrentBoundRect() );
Size aObjSize( aObjRect.GetSize() );
Point aOrigin( Point( -aObjRect.Left(), -aObjRect.Top() ) );
- MapMode aMap( aVD.GetMapMode() );
+ MapMode aMap( pVD->GetMapMode() );
aMap.SetMapUnit( MAP_100TH_MM );
aMap.SetOrigin( aOrigin );
- aVD.SetMapMode( aMap );
- aVD.SetOutputSize( aObjSize );
+ pVD->SetMapMode( aMap );
+ pVD->SetOutputSize( aObjSize );
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
- aVD.SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
- aVD.SetDrawMode( rStyles.GetHighContrastMode()
+ pVD->SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
+ pVD->SetDrawMode( rStyles.GetHighContrastMode()
? ViewShell::OUTPUT_DRAWMODE_CONTRAST
: ViewShell::OUTPUT_DRAWMODE_COLOR );
- aVD.Erase();
- pObject->SingleObjectPainter( aVD );
- aBmp = BitmapEx( aVD.GetBitmap( aObjRect.TopLeft(), aObjSize ) );
+ pVD->Erase();
+ pObject->SingleObjectPainter( *pVD.get() );
+ aBmp = BitmapEx( pVD->GetBitmap( aObjRect.TopLeft(), aObjSize ) );
}
m_pCtlDisplay->SetBitmapEx(&aBmp);
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 9669499d1172..f772bb97c22e 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -241,17 +241,17 @@ void SdDocPreviewWin::updateViewSettings()
pMtf = new GDIMetaFile;
- VirtualDevice aVDev;
+ ScopedVclPtr<VirtualDevice> pVDev(new VirtualDevice());
const Fraction aFrac( pDoc->GetScaleFraction() );
const MapMode aMap( pDoc->GetScaleUnit(), Point(), aFrac, aFrac );
- aVDev.SetMapMode( aMap );
+ pVDev->SetMapMode( aMap );
// Disable output, as we only want to record a metafile
- aVDev.EnableOutput( false );
+ pVDev->EnableOutput( false );
- pMtf->Record( &aVDev );
+ pMtf->Record( pVDev );
::sd::DrawView* pView = new ::sd::DrawView(pDocShell, this, NULL);
@@ -267,18 +267,18 @@ void SdDocPreviewWin::updateViewSettings()
const Rectangle aClipRect( aNewOrg, aNewSize );
MapMode aVMap( aMap );
- aVDev.Push();
+ pVDev->Push();
aVMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) );
- aVDev.SetRelativeMapMode( aVMap );
- aVDev.IntersectClipRegion( aClipRect );
+ pVDev->SetRelativeMapMode( aVMap );
+ pVDev->IntersectClipRegion( aClipRect );
// Use new StandardCheckVisisbilityRedirector
StandardCheckVisisbilityRedirector aRedirector;
const Rectangle aRedrawRectangle = Rectangle( Point(), aNewSize );
vcl::Region aRedrawRegion(aRedrawRectangle);
- pView->SdrPaintView::CompleteRedraw(&aVDev,aRedrawRegion,&aRedirector);
+ pView->SdrPaintView::CompleteRedraw(pVDev,aRedrawRegion,&aRedirector);
- aVDev.Pop();
+ pVDev->Pop();
pMtf->Stop();
pMtf->WindStart();
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index 1646ed348244..769d015b5de3 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -193,26 +193,26 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe
MapMode aMapMode( MAP_100TH_MM );
const Size aSize( pPage->GetSize() );
const Point aNullPt;
- VirtualDevice aVDev( *Application::GetDefaultDevice() );
+ ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice( *Application::GetDefaultDevice() ) );
- aVDev.SetMapMode( aMapMode );
+ pVDev->SetMapMode( aMapMode );
- const Size aPixSize( aVDev.LogicToPixel( aSize ) );
+ const Size aPixSize( pVDev->LogicToPixel( aSize ) );
const sal_uLong nMaxEdgePix = std::max( aPixSize.Width(), aPixSize.Height() );
Fraction aFrac( nMaxEdgePixel, nMaxEdgePix );
aMapMode.SetScaleX( aFrac );
aMapMode.SetScaleY( aFrac );
- aVDev.SetMapMode( aMapMode );
- aVDev.SetOutputSize( aSize );
+ pVDev->SetMapMode( aMapMode );
+ pVDev->SetOutputSize( aSize );
// that we also get the dark lines at the right and bottom page margin
aFrac = Fraction( nMaxEdgePixel - 1, nMaxEdgePix );
aMapMode.SetScaleX( aFrac );
aMapMode.SetScaleY( aFrac );
- aVDev.SetMapMode( aMapMode );
+ pVDev->SetMapMode( aMapMode );
- ClientView* pView = new ClientView( this, &aVDev, NULL );
+ ClientView* pView = new ClientView( this, pVDev, NULL );
FrameView* pFrameView = GetFrameView();
pView->ShowSdrPage( pPage );
@@ -263,14 +263,14 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe
pView->SetActiveLayer( pFrameView->GetActiveLayer() );
}
- pView->CompleteRedraw( &aVDev, vcl::Region(Rectangle(aNullPt, aSize)) );
+ pView->CompleteRedraw( pVDev, vcl::Region(Rectangle(aNullPt, aSize)) );
// IsRedrawReady() always gives sal_True while ( !pView->IsRedrawReady() ) {}
delete pView;
- aVDev.SetMapMode( MapMode() );
+ pVDev->SetMapMode( MapMode() );
- Bitmap aPreview( aVDev.GetBitmap( aNullPt, aVDev.GetOutputSizePixel() ) );
+ Bitmap aPreview( pVDev->GetBitmap( aNullPt, pVDev->GetOutputSizePixel() ) );
DBG_ASSERT(!!aPreview, "Preview-Bitmap could not be generated");
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index 2dacb9c54dc6..6d67c9ac14ae 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -504,18 +504,18 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
if( SLIDE_NO_TIMEOUT != mnPauseTimeout )
{
MapMode aVMap( rMap );
- VirtualDevice aVDev( *this );
+ ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice( *this ) );
aVMap.SetOrigin( Point() );
- aVDev.SetMapMode( aVMap );
- aVDev.SetBackground( Wallpaper( Color( COL_BLACK ) ) );
+ pVDev->SetMapMode( aVMap );
+ pVDev->SetBackground( Wallpaper( Color( COL_BLACK ) ) );
// set font first, to determine real output height
- aVDev.SetFont( aFont );
+ pVDev->SetFont( aFont );
- const Size aVDevSize( aOutSize.Width(), aVDev.GetTextHeight() );
+ const Size aVDevSize( aOutSize.Width(), pVDev->GetTextHeight() );
- if( aVDev.SetOutputSize( aVDevSize ) )
+ if( pVDev->SetOutputSize( aVDevSize ) )
{
// Note: if performance gets an issue here, we can use NumberFormatter directly
SvtSysLocale aSysLocale;
@@ -524,8 +524,8 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
aText += " ( ";
aText += aLocaleData.getDuration( ::tools::Time( 0, 0, mnPauseTimeout ) );
aText += " )";
- aVDev.DrawText( Point( aOffset.Width(), 0 ), aText );
- DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, aVDev );
+ pVDev->DrawText( Point( aOffset.Width(), 0 ), aText );
+ DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, *pVDev.get() );
bDrawn = true;
}
}
diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
index 6862a69dccd1..ea82e2a3804a 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
@@ -134,19 +134,19 @@ void InsertionIndicatorOverlay::Create (
// Create virtual devices for bitmap and mask whose bitmaps later be
// combined to form the BitmapEx of the icon.
- VirtualDevice aContent (
+ ScopedVclPtr<VirtualDevice> pContent( new VirtualDevice (
*mrSlideSorter.GetContentWindow(),
0,
- 0);
- aContent.SetOutputSizePixel(aIconSize);
+ 0) );
+ pContent->SetOutputSizePixel(aIconSize);
- aContent.SetFillColor();
- aContent.SetLineColor(pTheme->GetColor(Theme::Color_PreviewBorder));
- const Point aOffset = PaintRepresentatives(aContent, aPreviewSize, nOffset, rRepresentatives);
+ pContent->SetFillColor();
+ pContent->SetLineColor(pTheme->GetColor(Theme::Color_PreviewBorder));
+ const Point aOffset = PaintRepresentatives(*pContent.get(), aPreviewSize, nOffset, rRepresentatives);
- PaintPageCount(aContent, nSelectionCount, aPreviewSize, aOffset);
+ PaintPageCount(*pContent.get(), nSelectionCount, aPreviewSize, aOffset);
- maIcon = aContent.GetBitmapEx(Point(0,0), aIconSize);
+ maIcon = pContent->GetBitmapEx(Point(0,0), aIconSize);
maIcon.Scale(aIconSize);
}