summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx38
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx24
-rw-r--r--svx/source/xoutdev/xtabdash.cxx16
-rw-r--r--svx/source/xoutdev/xtabgrdt.cxx10
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx16
-rw-r--r--svx/source/xoutdev/xtablend.cxx16
6 files changed, 60 insertions, 60 deletions
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 1f39734d3dff..d03b43b19af3 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -250,27 +250,27 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
{
if( pMtfSize_100TH_MM && ( rGraphic.GetType() != GRAPHIC_BITMAP ) )
{
- VirtualDevice aVDev;
- const Size aSize( aVDev.LogicToPixel( *pMtfSize_100TH_MM, MAP_100TH_MM ) );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
+ const Size aSize( pVDev->LogicToPixel( *pMtfSize_100TH_MM, MAP_100TH_MM ) );
- if( aVDev.SetOutputSizePixel( aSize ) )
+ if( pVDev->SetOutputSizePixel( aSize ) )
{
- const Wallpaper aWallpaper( aVDev.GetBackground() );
+ const Wallpaper aWallpaper( pVDev->GetBackground() );
const Point aPt;
- aVDev.SetBackground( Wallpaper( Color( COL_BLACK ) ) );
- aVDev.Erase();
- rGraphic.Draw( &aVDev, aPt, aSize );
+ pVDev->SetBackground( Wallpaper( Color( COL_BLACK ) ) );
+ pVDev->Erase();
+ rGraphic.Draw( pVDev.get(), aPt, aSize );
- const Bitmap aBitmap( aVDev.GetBitmap( aPt, aSize ) );
+ const Bitmap aBitmap( pVDev->GetBitmap( aPt, aSize ) );
- aVDev.SetBackground( aWallpaper );
- aVDev.Erase();
- rGraphic.Draw( &aVDev, aPt, aSize );
+ pVDev->SetBackground( aWallpaper );
+ pVDev->Erase();
+ rGraphic.Draw( pVDev.get(), aPt, aSize );
- aVDev.SetRasterOp( ROP_XOR );
- aVDev.DrawBitmap( aPt, aSize, aBitmap );
- aGraphic = BitmapEx( aBitmap, aVDev.GetBitmap( aPt, aSize ) );
+ pVDev->SetRasterOp( ROP_XOR );
+ pVDev->DrawBitmap( aPt, aSize, aBitmap );
+ aGraphic = BitmapEx( aBitmap, pVDev->GetBitmap( aPt, aSize ) );
}
else
aGraphic = rGraphic.GetBitmapEx();
@@ -283,13 +283,13 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
{
if( pMtfSize_100TH_MM && ( rGraphic.GetType() != GRAPHIC_BITMAP ) )
{
- VirtualDevice aVDev;
- const Size aSize( aVDev.LogicToPixel( *pMtfSize_100TH_MM, MAP_100TH_MM ) );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
+ const Size aSize( pVDev->LogicToPixel( *pMtfSize_100TH_MM, MAP_100TH_MM ) );
- if( aVDev.SetOutputSizePixel( aSize ) )
+ if( pVDev->SetOutputSizePixel( aSize ) )
{
- rGraphic.Draw( &aVDev, Point(), aSize );
- aGraphic = aVDev.GetBitmap( Point(), aSize );
+ rGraphic.Draw( pVDev.get(), Point(), aSize );
+ aGraphic = pVDev->GetBitmap( Point(), aSize );
}
else
aGraphic = rGraphic.GetBitmap();
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index a016e03581c3..acbb94fff80d 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -140,7 +140,7 @@ const GraphicObject& XOBitmap::GetGraphicObject() const
void XOBitmap::Bitmap2Array()
{
- VirtualDevice aVD;
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
bool bPixelColor = false;
const Bitmap aBitmap( GetBitmap() );
const sal_uInt16 nLines = 8; // type dependent
@@ -148,23 +148,23 @@ void XOBitmap::Bitmap2Array()
if( !pPixelArray )
pPixelArray = new sal_uInt16[ nLines * nLines ];
- aVD.SetOutputSizePixel( aBitmap.GetSizePixel() );
- aVD.DrawBitmap( Point(), aBitmap );
- aPixelColor = aBckgrColor = aVD.GetPixel( Point() );
+ pVDev->SetOutputSizePixel( aBitmap.GetSizePixel() );
+ pVDev->DrawBitmap( Point(), aBitmap );
+ aPixelColor = aBckgrColor = pVDev->GetPixel( Point() );
// create array and determine foreground and background color
for( sal_uInt16 i = 0; i < nLines; i++ )
{
for( sal_uInt16 j = 0; j < nLines; j++ )
{
- if ( aVD.GetPixel( Point( j, i ) ) == aBckgrColor )
+ if ( pVDev->GetPixel( Point( j, i ) ) == aBckgrColor )
*( pPixelArray + j + i * nLines ) = 0;
else
{
*( pPixelArray + j + i * nLines ) = 1;
if( !bPixelColor )
{
- aPixelColor = aVD.GetPixel( Point( j, i ) );
+ aPixelColor = pVDev->GetPixel( Point( j, i ) );
bPixelColor = true;
}
}
@@ -175,13 +175,13 @@ void XOBitmap::Bitmap2Array()
/// convert array, fore- and background color into a bitmap
void XOBitmap::Array2Bitmap()
{
- VirtualDevice aVD;
- sal_uInt16 nLines = 8; // type dependent
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
+ sal_uInt16 nLines = 8; // type dependent
if( !pPixelArray )
return;
- aVD.SetOutputSizePixel( Size( nLines, nLines ) );
+ pVDev->SetOutputSizePixel( Size( nLines, nLines ) );
// create bitmap
for( sal_uInt16 i = 0; i < nLines; i++ )
@@ -189,13 +189,13 @@ void XOBitmap::Array2Bitmap()
for( sal_uInt16 j = 0; j < nLines; j++ )
{
if( *( pPixelArray + j + i * nLines ) == 0 )
- aVD.DrawPixel( Point( j, i ), aBckgrColor );
+ pVDev->DrawPixel( Point( j, i ), aBckgrColor );
else
- aVD.DrawPixel( Point( j, i ), aPixelColor );
+ pVDev->DrawPixel( Point( j, i ), aPixelColor );
}
}
- aGraphicObject = GraphicObject( aVD.GetBitmap( Point(), Size( nLines, nLines ) ) );
+ aGraphicObject = GraphicObject( pVDev->GetBitmap( Point(), Size( nLines, nLines ) ) );
bGraphicDirty = false;
}
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 6d4ec14fec5c..4bfe888cca34 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -135,11 +135,11 @@ Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
aStrokeAttribute));
// prepare VirtualDevice
- VirtualDevice aVirtualDevice;
+ ScopedVclPtrInstance< VirtualDevice > pVirtualDevice;
const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D;
- aVirtualDevice.SetOutputSizePixel(aSize);
- aVirtualDevice.SetDrawMode(rStyleSettings.GetHighContrastMode()
+ pVirtualDevice->SetOutputSizePixel(aSize);
+ pVirtualDevice->SetDrawMode(rStyleSettings.GetHighContrastMode()
? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
: DRAWMODE_DEFAULT);
@@ -150,17 +150,17 @@ Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
static const Color aW(COL_WHITE);
static const Color aG(0xef, 0xef, 0xef);
- aVirtualDevice.DrawCheckered(aNull, aSize, nLen, aW, aG);
+ pVirtualDevice->DrawCheckered(aNull, aSize, nLen, aW, aG);
}
else
{
- aVirtualDevice.SetBackground(rStyleSettings.GetFieldColor());
- aVirtualDevice.Erase();
+ pVirtualDevice->SetBackground(rStyleSettings.GetFieldColor());
+ pVirtualDevice->Erase();
}
// create processor and draw primitives
boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice(
- aVirtualDevice,
+ *pVirtualDevice.get(),
aNewViewInformation2D));
if(pProcessor2D)
@@ -172,7 +172,7 @@ Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
}
// get result bitmap and scale
- Bitmap aRetval(aVirtualDevice.GetBitmap(Point(0, 0), aVirtualDevice.GetOutputSizePixel()));
+ Bitmap aRetval(pVirtualDevice->GetBitmap(Point(0, 0), pVirtualDevice->GetOutputSizePixel()));
if(1 != nFactor)
{
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index f25a215fd29f..16983e5c9882 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -181,17 +181,17 @@ Bitmap XGradientList::CreateBitmapForUI( long nIndex )
aBlack));
// prepare VirtualDevice
- VirtualDevice aVirtualDevice;
+ ScopedVclPtrInstance< VirtualDevice > pVirtualDevice;
const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D;
- aVirtualDevice.SetOutputSizePixel(rSize);
- aVirtualDevice.SetDrawMode(rStyleSettings.GetHighContrastMode()
+ pVirtualDevice->SetOutputSizePixel(rSize);
+ pVirtualDevice->SetDrawMode(rStyleSettings.GetHighContrastMode()
? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
: DRAWMODE_DEFAULT);
// create processor and draw primitives
boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice(
- aVirtualDevice,
+ *pVirtualDevice.get(),
aNewViewInformation2D));
if(pProcessor2D)
@@ -206,7 +206,7 @@ Bitmap XGradientList::CreateBitmapForUI( long nIndex )
}
// get result bitmap and scale
- aRetval = aVirtualDevice.GetBitmap(Point(0, 0), aVirtualDevice.GetOutputSizePixel());
+ aRetval = pVirtualDevice->GetBitmap(Point(0, 0), pVirtualDevice->GetOutputSizePixel());
}
return aRetval;
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index ba73c5c7c8b4..30c05a273c70 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -142,11 +142,11 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex )
aBlack));
// prepare VirtualDevice
- VirtualDevice aVirtualDevice;
+ ScopedVclPtrInstance< VirtualDevice > pVirtualDevice;
const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D;
- aVirtualDevice.SetOutputSizePixel(rSize);
- aVirtualDevice.SetDrawMode(rStyleSettings.GetHighContrastMode()
+ pVirtualDevice->SetOutputSizePixel(rSize);
+ pVirtualDevice->SetDrawMode(rStyleSettings.GetHighContrastMode()
? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
: DRAWMODE_DEFAULT);
@@ -156,17 +156,17 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex )
static const sal_uInt32 nLen(8);
static const Color aW(COL_WHITE);
static const Color aG(0xef, 0xef, 0xef);
- aVirtualDevice.DrawCheckered(aNull, rSize, nLen, aW, aG);
+ pVirtualDevice->DrawCheckered(aNull, rSize, nLen, aW, aG);
}
else
{
- aVirtualDevice.SetBackground(rStyleSettings.GetFieldColor());
- aVirtualDevice.Erase();
+ pVirtualDevice->SetBackground(rStyleSettings.GetFieldColor());
+ pVirtualDevice->Erase();
}
// create processor and draw primitives
boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice(
- aVirtualDevice,
+ *pVirtualDevice.get(),
aNewViewInformation2D));
if(pProcessor2D)
@@ -180,7 +180,7 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex )
}
// get result bitmap and scale
- aRetval = aVirtualDevice.GetBitmap(Point(0, 0), aVirtualDevice.GetOutputSizePixel());
+ aRetval = pVirtualDevice->GetBitmap(Point(0, 0), pVirtualDevice->GetOutputSizePixel());
}
return aRetval;
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index cd4dae3f091b..70bfe2ffb513 100644
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -125,11 +125,11 @@ Bitmap XLineEndList::CreateBitmapForUI( long nIndex )
aLineStartEndAttribute));
// prepare VirtualDevice
- VirtualDevice aVirtualDevice;
+ ScopedVclPtrInstance< VirtualDevice > pVirtualDevice;
const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D;
- aVirtualDevice.SetOutputSizePixel(aSize);
- aVirtualDevice.SetDrawMode(rStyleSettings.GetHighContrastMode()
+ pVirtualDevice->SetOutputSizePixel(aSize);
+ pVirtualDevice->SetDrawMode(rStyleSettings.GetHighContrastMode()
? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
: DRAWMODE_DEFAULT);
@@ -139,17 +139,17 @@ Bitmap XLineEndList::CreateBitmapForUI( long nIndex )
static const sal_uInt32 nLen(8);
static const Color aW(COL_WHITE);
static const Color aG(0xef, 0xef, 0xef);
- aVirtualDevice.DrawCheckered(aNull, aSize, nLen, aW, aG);
+ pVirtualDevice->DrawCheckered(aNull, aSize, nLen, aW, aG);
}
else
{
- aVirtualDevice.SetBackground(rStyleSettings.GetFieldColor());
- aVirtualDevice.Erase();
+ pVirtualDevice->SetBackground(rStyleSettings.GetFieldColor());
+ pVirtualDevice->Erase();
}
// create processor and draw primitives
boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice(
- aVirtualDevice,
+ *pVirtualDevice.get(),
aNewViewInformation2D));
if(pProcessor2D)
@@ -161,7 +161,7 @@ Bitmap XLineEndList::CreateBitmapForUI( long nIndex )
}
// get result bitmap and scale
- aRetval = aVirtualDevice.GetBitmap(Point(0, 0), aVirtualDevice.GetOutputSizePixel());
+ aRetval = pVirtualDevice->GetBitmap(Point(0, 0), pVirtualDevice->GetOutputSizePixel());
}
return aRetval;