vcl/source/outdev/outdev.cxx | 328 ------------------------------------- vcl/source/outdev/outdevstate.cxx | 333 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 333 insertions(+), 328 deletions(-)
New commits: commit 0f83b6379af62a9a0556371ee82a152c7d4e93b3 Author: Chris Sherlock <[email protected]> Date: Mon Apr 28 19:25:55 2014 +1000 VCL: Move SetFont up the include file Change-Id: I6721e78f8a10d95a54ff09c1f25f0ae3ece71cfa diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index d149542..908abc3 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -371,29 +371,6 @@ void OutputDevice::SetBackground( const Wallpaper& rBackground ) mpAlphaVDev->SetBackground( rBackground ); } - -void OutputDevice::InitFillColor() -{ - DBG_TESTSOLARMUTEX(); - - if( mbFillColor ) - { - if( ROP_0 == meRasterOp ) - mpGraphics->SetROPFillColor( SAL_ROP_0 ); - else if( ROP_1 == meRasterOp ) - mpGraphics->SetROPFillColor( SAL_ROP_1 ); - else if( ROP_INVERT == meRasterOp ) - mpGraphics->SetROPFillColor( SAL_ROP_INVERT ); - else - mpGraphics->SetFillColor( ImplColorToSal( maFillColor ) ); - } - else - mpGraphics->SetFillColor(); - - mbInitFillColor = false; -} - - void OutputDevice::SetFont( const Font& rNewFont ) { @@ -501,4 +478,25 @@ void OutputDevice::SetFont( const Font& rNewFont ) } } +void OutputDevice::InitFillColor() +{ + DBG_TESTSOLARMUTEX(); + + if( mbFillColor ) + { + if( ROP_0 == meRasterOp ) + mpGraphics->SetROPFillColor( SAL_ROP_0 ); + else if( ROP_1 == meRasterOp ) + mpGraphics->SetROPFillColor( SAL_ROP_1 ); + else if( ROP_INVERT == meRasterOp ) + mpGraphics->SetROPFillColor( SAL_ROP_INVERT ); + else + mpGraphics->SetFillColor( ImplColorToSal( maFillColor ) ); + } + else + mpGraphics->SetFillColor(); + + mbInitFillColor = false; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 0ada64dfd99fdaa1b182f88d32e4f4c6fbd2b5f6 Author: Chris Sherlock <[email protected]> Date: Mon Apr 28 19:24:08 2014 +1000 VCL: Move SetBackground from outdev.cxx to outdevstate.cxx Change-Id: I04bf1470e43ed08ef5759fcbd6f96d4896f7690b diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 31c5774..c0dd42a 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -821,30 +821,6 @@ Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) const return aColor; } -void OutputDevice::SetBackground() -{ - - maBackground = Wallpaper(); - mbBackground = false; - - if( mpAlphaVDev ) - mpAlphaVDev->SetBackground(); -} - -void OutputDevice::SetBackground( const Wallpaper& rBackground ) -{ - - maBackground = rBackground; - - if( rBackground.GetStyle() == WALLPAPER_NULL ) - mbBackground = false; - else - mbBackground = true; - - if( mpAlphaVDev ) - mpAlphaVDev->SetBackground( rBackground ); -} - void OutputDevice::SetRefPoint() { diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 2fada5e..d149542 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -347,6 +347,30 @@ void OutputDevice::SetFillColor( const Color& rColor ) mpAlphaVDev->SetFillColor( COL_BLACK ); } +void OutputDevice::SetBackground() +{ + + maBackground = Wallpaper(); + mbBackground = false; + + if( mpAlphaVDev ) + mpAlphaVDev->SetBackground(); +} + +void OutputDevice::SetBackground( const Wallpaper& rBackground ) +{ + + maBackground = rBackground; + + if( rBackground.GetStyle() == WALLPAPER_NULL ) + mbBackground = false; + else + mbBackground = true; + + if( mpAlphaVDev ) + mpAlphaVDev->SetBackground( rBackground ); +} + void OutputDevice::InitFillColor() { commit d0d21235cd653d66aa877161086c474e988277b6 Author: Chris Sherlock <[email protected]> Date: Mon Apr 28 19:23:09 2014 +1000 VCL: Move SetFillColor from outdev.cxx to outdevstate.cxx Change-Id: Ia817fbe4aa2927ac5568fd842e8f313608bed320 diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index cec9f14..31c5774 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -821,91 +821,6 @@ Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) const return aColor; } -void OutputDevice::SetFillColor() -{ - - if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaFillColorAction( Color(), false ) ); - - if ( mbFillColor ) - { - mbInitFillColor = true; - mbFillColor = false; - maFillColor = Color( COL_TRANSPARENT ); - } - - if( mpAlphaVDev ) - mpAlphaVDev->SetFillColor(); -} - -void OutputDevice::SetFillColor( const Color& rColor ) -{ - - Color aColor( rColor ); - - if( mnDrawMode & ( DRAWMODE_BLACKFILL | DRAWMODE_WHITEFILL | - DRAWMODE_GRAYFILL | DRAWMODE_NOFILL | - DRAWMODE_GHOSTEDFILL | DRAWMODE_SETTINGSFILL ) ) - { - if( !ImplIsColorTransparent( aColor ) ) - { - if( mnDrawMode & DRAWMODE_BLACKFILL ) - { - aColor = Color( COL_BLACK ); - } - else if( mnDrawMode & DRAWMODE_WHITEFILL ) - { - aColor = Color( COL_WHITE ); - } - else if( mnDrawMode & DRAWMODE_GRAYFILL ) - { - const sal_uInt8 cLum = aColor.GetLuminance(); - aColor = Color( cLum, cLum, cLum ); - } - else if( mnDrawMode & DRAWMODE_NOFILL ) - { - aColor = Color( COL_TRANSPARENT ); - } - else if( mnDrawMode & DRAWMODE_SETTINGSFILL ) - { - aColor = GetSettings().GetStyleSettings().GetWindowColor(); - } - - if( mnDrawMode & DRAWMODE_GHOSTEDFILL ) - { - aColor = Color( (aColor.GetRed() >> 1) | 0x80, - (aColor.GetGreen() >> 1) | 0x80, - (aColor.GetBlue() >> 1) | 0x80); - } - } - } - - if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaFillColorAction( aColor, true ) ); - - if ( ImplIsColorTransparent( aColor ) ) - { - if ( mbFillColor ) - { - mbInitFillColor = true; - mbFillColor = false; - maFillColor = Color( COL_TRANSPARENT ); - } - } - else - { - if ( maFillColor != aColor ) - { - mbInitFillColor = true; - mbFillColor = true; - maFillColor = aColor; - } - } - - if( mpAlphaVDev ) - mpAlphaVDev->SetFillColor( COL_BLACK ); -} - void OutputDevice::SetBackground() { diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 2825669..2fada5e 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -262,6 +262,91 @@ void OutputDevice::EnableOutput( bool bEnable ) mpAlphaVDev->EnableOutput( bEnable ); } +void OutputDevice::SetFillColor() +{ + + if ( mpMetaFile ) + mpMetaFile->AddAction( new MetaFillColorAction( Color(), false ) ); + + if ( mbFillColor ) + { + mbInitFillColor = true; + mbFillColor = false; + maFillColor = Color( COL_TRANSPARENT ); + } + + if( mpAlphaVDev ) + mpAlphaVDev->SetFillColor(); +} + +void OutputDevice::SetFillColor( const Color& rColor ) +{ + + Color aColor( rColor ); + + if( mnDrawMode & ( DRAWMODE_BLACKFILL | DRAWMODE_WHITEFILL | + DRAWMODE_GRAYFILL | DRAWMODE_NOFILL | + DRAWMODE_GHOSTEDFILL | DRAWMODE_SETTINGSFILL ) ) + { + if( !ImplIsColorTransparent( aColor ) ) + { + if( mnDrawMode & DRAWMODE_BLACKFILL ) + { + aColor = Color( COL_BLACK ); + } + else if( mnDrawMode & DRAWMODE_WHITEFILL ) + { + aColor = Color( COL_WHITE ); + } + else if( mnDrawMode & DRAWMODE_GRAYFILL ) + { + const sal_uInt8 cLum = aColor.GetLuminance(); + aColor = Color( cLum, cLum, cLum ); + } + else if( mnDrawMode & DRAWMODE_NOFILL ) + { + aColor = Color( COL_TRANSPARENT ); + } + else if( mnDrawMode & DRAWMODE_SETTINGSFILL ) + { + aColor = GetSettings().GetStyleSettings().GetWindowColor(); + } + + if( mnDrawMode & DRAWMODE_GHOSTEDFILL ) + { + aColor = Color( (aColor.GetRed() >> 1) | 0x80, + (aColor.GetGreen() >> 1) | 0x80, + (aColor.GetBlue() >> 1) | 0x80); + } + } + } + + if ( mpMetaFile ) + mpMetaFile->AddAction( new MetaFillColorAction( aColor, true ) ); + + if ( ImplIsColorTransparent( aColor ) ) + { + if ( mbFillColor ) + { + mbInitFillColor = true; + mbFillColor = false; + maFillColor = Color( COL_TRANSPARENT ); + } + } + else + { + if ( maFillColor != aColor ) + { + mbInitFillColor = true; + mbFillColor = true; + maFillColor = aColor; + } + } + + if( mpAlphaVDev ) + mpAlphaVDev->SetFillColor( COL_BLACK ); +} + void OutputDevice::InitFillColor() { commit 6caf6680488b00a3ba75eca22640ffadbfb97a64 Author: Chris Sherlock <[email protected]> Date: Mon Apr 28 19:22:00 2014 +1000 VCL: Move EnableOutput from outdev.cxx to outdevstate.cxx Change-Id: I3b1f63d280549ca0dc3ec59733fa6e9ca2672a1c diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index d6bb307..cec9f14 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -961,14 +961,6 @@ void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf ) mpMetaFile = pMtf; } -void OutputDevice::EnableOutput( bool bEnable ) -{ - mbOutput = bEnable; - - if( mpAlphaVDev ) - mpAlphaVDev->EnableOutput( bEnable ); -} - void OutputDevice::SetSettings( const AllSettings& rSettings ) { *mxSettings = rSettings; diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 257370e..2825669 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -254,6 +254,15 @@ sal_uInt32 OutputDevice::GetGCStackDepth() const return mpOutDevStateStack->size(); } +void OutputDevice::EnableOutput( bool bEnable ) +{ + mbOutput = bEnable; + + if( mpAlphaVDev ) + mpAlphaVDev->EnableOutput( bEnable ); +} + + void OutputDevice::InitFillColor() { DBG_TESTSOLARMUTEX(); commit 537ed2782104c467cd4ab30b57f62fe34777db5c Author: Chris Sherlock <[email protected]> Date: Mon Apr 28 19:20:30 2014 +1000 VCL: Move GetGCStackDepth from outdev.cxx to outdevstate.cxx Change-Id: I61a366f4dd005cb19794b48c857760a3b2a8a267 diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index cb1af85..d6bb307 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -956,11 +956,6 @@ void OutputDevice::SetRefPoint( const Point& rRefPoint ) mpAlphaVDev->SetRefPoint( rRefPoint ); } -sal_uInt32 OutputDevice::GetGCStackDepth() const -{ - return mpOutDevStateStack->size(); -} - void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf ) { mpMetaFile = pMtf; diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 23683e7..257370e 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -249,6 +249,10 @@ void OutputDevice::Pop() mpMetaFile = pOldMetaFile; } +sal_uInt32 OutputDevice::GetGCStackDepth() const +{ + return mpOutDevStateStack->size(); +} void OutputDevice::InitFillColor() { commit db5be2d4ca6867c61cb9fe117d7b76281240d739 Author: Chris Sherlock <[email protected]> Date: Mon Apr 28 19:18:25 2014 +1000 VCL: Move Push and Pop from outdev.cxx to outdevstate.cxx Change-Id: I98076c6e23b69b2e59dcca9fbc35a3a9755e564c diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 92fe33d..cb1af85 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -243,191 +243,6 @@ OutputDevice::~OutputDevice() delete mpAlphaVDev; } -void OutputDevice::Push( sal_uInt16 nFlags ) -{ - - if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaPushAction( nFlags ) ); - - OutDevState* pState = new OutDevState; - - pState->mnFlags = nFlags; - - if ( nFlags & PUSH_LINECOLOR ) - { - if ( mbLineColor ) - pState->mpLineColor = new Color( maLineColor ); - else - pState->mpLineColor = NULL; - } - if ( nFlags & PUSH_FILLCOLOR ) - { - if ( mbFillColor ) - pState->mpFillColor = new Color( maFillColor ); - else - pState->mpFillColor = NULL; - } - if ( nFlags & PUSH_FONT ) - pState->mpFont = new Font( maFont ); - if ( nFlags & PUSH_TEXTCOLOR ) - pState->mpTextColor = new Color( GetTextColor() ); - if ( nFlags & PUSH_TEXTFILLCOLOR ) - { - if ( IsTextFillColor() ) - pState->mpTextFillColor = new Color( GetTextFillColor() ); - else - pState->mpTextFillColor = NULL; - } - if ( nFlags & PUSH_TEXTLINECOLOR ) - { - if ( IsTextLineColor() ) - pState->mpTextLineColor = new Color( GetTextLineColor() ); - else - pState->mpTextLineColor = NULL; - } - if ( nFlags & PUSH_OVERLINECOLOR ) - { - if ( IsOverlineColor() ) - pState->mpOverlineColor = new Color( GetOverlineColor() ); - else - pState->mpOverlineColor = NULL; - } - if ( nFlags & PUSH_TEXTALIGN ) - pState->meTextAlign = GetTextAlign(); - if( nFlags & PUSH_TEXTLAYOUTMODE ) - pState->mnTextLayoutMode = GetLayoutMode(); - if( nFlags & PUSH_TEXTLANGUAGE ) - pState->meTextLanguage = GetDigitLanguage(); - if ( nFlags & PUSH_RASTEROP ) - pState->meRasterOp = GetRasterOp(); - if ( nFlags & PUSH_MAPMODE ) - { - pState->mpMapMode = new MapMode( maMapMode ); - pState->mbMapActive = mbMap; - } - if ( nFlags & PUSH_CLIPREGION ) - { - if ( mbClipRegion ) - pState->mpClipRegion = new Region( maRegion ); - else - pState->mpClipRegion = NULL; - } - if ( nFlags & PUSH_REFPOINT ) - { - if ( mbRefPoint ) - pState->mpRefPoint = new Point( maRefPoint ); - else - pState->mpRefPoint = NULL; - } - - mpOutDevStateStack->push_back( pState ); - - if( mpAlphaVDev ) - mpAlphaVDev->Push(); -} - -void OutputDevice::Pop() -{ - - if( mpMetaFile ) - mpMetaFile->AddAction( new MetaPopAction() ); - - GDIMetaFile* pOldMetaFile = mpMetaFile; - mpMetaFile = NULL; - - if ( mpOutDevStateStack->empty() ) - { - SAL_WARN( "vcl.gdi", "OutputDevice::Pop() without OutputDevice::Push()" ); - return; - } - const OutDevState& rState = mpOutDevStateStack->back(); - - if( mpAlphaVDev ) - mpAlphaVDev->Pop(); - - if ( rState.mnFlags & PUSH_LINECOLOR ) - { - if ( rState.mpLineColor ) - SetLineColor( *rState.mpLineColor ); - else - SetLineColor(); - } - - if ( rState.mnFlags & PUSH_FILLCOLOR ) - { - if ( rState.mpFillColor ) - SetFillColor( *rState.mpFillColor ); - else - SetFillColor(); - } - - if ( rState.mnFlags & PUSH_FONT ) - SetFont( *rState.mpFont ); - - if ( rState.mnFlags & PUSH_TEXTCOLOR ) - SetTextColor( *rState.mpTextColor ); - - if ( rState.mnFlags & PUSH_TEXTFILLCOLOR ) - { - if ( rState.mpTextFillColor ) - SetTextFillColor( *rState.mpTextFillColor ); - else - SetTextFillColor(); - } - - if ( rState.mnFlags & PUSH_TEXTLINECOLOR ) - { - if ( rState.mpTextLineColor ) - SetTextLineColor( *rState.mpTextLineColor ); - else - SetTextLineColor(); - } - - if ( rState.mnFlags & PUSH_OVERLINECOLOR ) - { - if ( rState.mpOverlineColor ) - SetOverlineColor( *rState.mpOverlineColor ); - else - SetOverlineColor(); - } - - if ( rState.mnFlags & PUSH_TEXTALIGN ) - SetTextAlign( rState.meTextAlign ); - - if( rState.mnFlags & PUSH_TEXTLAYOUTMODE ) - SetLayoutMode( rState.mnTextLayoutMode ); - - if( rState.mnFlags & PUSH_TEXTLANGUAGE ) - SetDigitLanguage( rState.meTextLanguage ); - - if ( rState.mnFlags & PUSH_RASTEROP ) - SetRasterOp( rState.meRasterOp ); - - if ( rState.mnFlags & PUSH_MAPMODE ) - { - if ( rState.mpMapMode ) - SetMapMode( *rState.mpMapMode ); - else - SetMapMode(); - mbMap = rState.mbMapActive; - } - - if ( rState.mnFlags & PUSH_CLIPREGION ) - SetDeviceClipRegion( rState.mpClipRegion ); - - if ( rState.mnFlags & PUSH_REFPOINT ) - { - if ( rState.mpRefPoint ) - SetRefPoint( *rState.mpRefPoint ); - else - SetRefPoint(); - } - - mpOutDevStateStack->pop_back(); - - mpMetaFile = pOldMetaFile; -} - bool OutputDevice::SupportsOperation( OutDevSupportType eType ) const { if( !mpGraphics ) diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 64cb97b..23683e7 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -63,6 +63,193 @@ OutDevState::~OutDevState() delete mpRefPoint; } + +void OutputDevice::Push( sal_uInt16 nFlags ) +{ + + if ( mpMetaFile ) + mpMetaFile->AddAction( new MetaPushAction( nFlags ) ); + + OutDevState* pState = new OutDevState; + + pState->mnFlags = nFlags; + + if ( nFlags & PUSH_LINECOLOR ) + { + if ( mbLineColor ) + pState->mpLineColor = new Color( maLineColor ); + else + pState->mpLineColor = NULL; + } + if ( nFlags & PUSH_FILLCOLOR ) + { + if ( mbFillColor ) + pState->mpFillColor = new Color( maFillColor ); + else + pState->mpFillColor = NULL; + } + if ( nFlags & PUSH_FONT ) + pState->mpFont = new Font( maFont ); + if ( nFlags & PUSH_TEXTCOLOR ) + pState->mpTextColor = new Color( GetTextColor() ); + if ( nFlags & PUSH_TEXTFILLCOLOR ) + { + if ( IsTextFillColor() ) + pState->mpTextFillColor = new Color( GetTextFillColor() ); + else + pState->mpTextFillColor = NULL; + } + if ( nFlags & PUSH_TEXTLINECOLOR ) + { + if ( IsTextLineColor() ) + pState->mpTextLineColor = new Color( GetTextLineColor() ); + else + pState->mpTextLineColor = NULL; + } + if ( nFlags & PUSH_OVERLINECOLOR ) + { + if ( IsOverlineColor() ) + pState->mpOverlineColor = new Color( GetOverlineColor() ); + else + pState->mpOverlineColor = NULL; + } + if ( nFlags & PUSH_TEXTALIGN ) + pState->meTextAlign = GetTextAlign(); + if( nFlags & PUSH_TEXTLAYOUTMODE ) + pState->mnTextLayoutMode = GetLayoutMode(); + if( nFlags & PUSH_TEXTLANGUAGE ) + pState->meTextLanguage = GetDigitLanguage(); + if ( nFlags & PUSH_RASTEROP ) + pState->meRasterOp = GetRasterOp(); + if ( nFlags & PUSH_MAPMODE ) + { + pState->mpMapMode = new MapMode( maMapMode ); + pState->mbMapActive = mbMap; + } + if ( nFlags & PUSH_CLIPREGION ) + { + if ( mbClipRegion ) + pState->mpClipRegion = new Region( maRegion ); + else + pState->mpClipRegion = NULL; + } + if ( nFlags & PUSH_REFPOINT ) + { + if ( mbRefPoint ) + pState->mpRefPoint = new Point( maRefPoint ); + else + pState->mpRefPoint = NULL; + } + + mpOutDevStateStack->push_back( pState ); + + if( mpAlphaVDev ) + mpAlphaVDev->Push(); +} + +void OutputDevice::Pop() +{ + + if( mpMetaFile ) + mpMetaFile->AddAction( new MetaPopAction() ); + + GDIMetaFile* pOldMetaFile = mpMetaFile; + mpMetaFile = NULL; + + if ( mpOutDevStateStack->empty() ) + { + SAL_WARN( "vcl.gdi", "OutputDevice::Pop() without OutputDevice::Push()" ); + return; + } + const OutDevState& rState = mpOutDevStateStack->back(); + + if( mpAlphaVDev ) + mpAlphaVDev->Pop(); + + if ( rState.mnFlags & PUSH_LINECOLOR ) + { + if ( rState.mpLineColor ) + SetLineColor( *rState.mpLineColor ); + else + SetLineColor(); + } + + if ( rState.mnFlags & PUSH_FILLCOLOR ) + { + if ( rState.mpFillColor ) + SetFillColor( *rState.mpFillColor ); + else + SetFillColor(); + } + + if ( rState.mnFlags & PUSH_FONT ) + SetFont( *rState.mpFont ); + + if ( rState.mnFlags & PUSH_TEXTCOLOR ) + SetTextColor( *rState.mpTextColor ); + + if ( rState.mnFlags & PUSH_TEXTFILLCOLOR ) + { + if ( rState.mpTextFillColor ) + SetTextFillColor( *rState.mpTextFillColor ); + else + SetTextFillColor(); + } + + if ( rState.mnFlags & PUSH_TEXTLINECOLOR ) + { + if ( rState.mpTextLineColor ) + SetTextLineColor( *rState.mpTextLineColor ); + else + SetTextLineColor(); + } + + if ( rState.mnFlags & PUSH_OVERLINECOLOR ) + { + if ( rState.mpOverlineColor ) + SetOverlineColor( *rState.mpOverlineColor ); + else + SetOverlineColor(); + } + + if ( rState.mnFlags & PUSH_TEXTALIGN ) + SetTextAlign( rState.meTextAlign ); + + if( rState.mnFlags & PUSH_TEXTLAYOUTMODE ) + SetLayoutMode( rState.mnTextLayoutMode ); + + if( rState.mnFlags & PUSH_TEXTLANGUAGE ) + SetDigitLanguage( rState.meTextLanguage ); + + if ( rState.mnFlags & PUSH_RASTEROP ) + SetRasterOp( rState.meRasterOp ); + + if ( rState.mnFlags & PUSH_MAPMODE ) + { + if ( rState.mpMapMode ) + SetMapMode( *rState.mpMapMode ); + else + SetMapMode(); + mbMap = rState.mbMapActive; + } + + if ( rState.mnFlags & PUSH_CLIPREGION ) + SetDeviceClipRegion( rState.mpClipRegion ); + + if ( rState.mnFlags & PUSH_REFPOINT ) + { + if ( rState.mpRefPoint ) + SetRefPoint( *rState.mpRefPoint ); + else + SetRefPoint(); + } + + mpOutDevStateStack->pop_back(); + + mpMetaFile = pOldMetaFile; +} + + void OutputDevice::InitFillColor() { DBG_TESTSOLARMUTEX(); commit c91554fbca5b2e7977a8ae12e64725f31eca87d1 Author: Chris Sherlock <[email protected]> Date: Mon Apr 28 19:14:17 2014 +1000 VCL: Move InitFillColor from outdev.cxx to outdevstate.cxx Change-Id: Ia6752c8ab95fc5dc9846c939d1f8767f17f6ced6 diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index ecf8cd4..92fe33d 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -938,27 +938,6 @@ void OutputDevice::ImplGetFrameDev( const Point& rPt, const Point& rDevPt, const } -void OutputDevice::InitFillColor() -{ - DBG_TESTSOLARMUTEX(); - - if( mbFillColor ) - { - if( ROP_0 == meRasterOp ) - mpGraphics->SetROPFillColor( SAL_ROP_0 ); - else if( ROP_1 == meRasterOp ) - mpGraphics->SetROPFillColor( SAL_ROP_1 ); - else if( ROP_INVERT == meRasterOp ) - mpGraphics->SetROPFillColor( SAL_ROP_INVERT ); - else - mpGraphics->SetFillColor( ImplColorToSal( maFillColor ) ); - } - else - mpGraphics->SetFillColor(); - - mbInitFillColor = false; -} - void OutputDevice::SetDrawMode( sal_uLong nDrawMode ) { diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 4363699..64cb97b 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -21,6 +21,7 @@ #include <vcl/outdev.hxx> #include <vcl/virdev.hxx> + #include <vcl/settings.hxx> #include <vcl/mapmod.hxx> @@ -33,6 +34,9 @@ #include <tools/fontenum.hxx> #include <vcl/outdevstate.hxx> + +#include "outdata.hxx" +#include "salgdi.hxx" #include "sallayout.hxx" OutDevState::~OutDevState() @@ -59,6 +63,28 @@ OutDevState::~OutDevState() delete mpRefPoint; } +void OutputDevice::InitFillColor() +{ + DBG_TESTSOLARMUTEX(); + + if( mbFillColor ) + { + if( ROP_0 == meRasterOp ) + mpGraphics->SetROPFillColor( SAL_ROP_0 ); + else if( ROP_1 == meRasterOp ) + mpGraphics->SetROPFillColor( SAL_ROP_1 ); + else if( ROP_INVERT == meRasterOp ) + mpGraphics->SetROPFillColor( SAL_ROP_INVERT ); + else + mpGraphics->SetFillColor( ImplColorToSal( maFillColor ) ); + } + else + mpGraphics->SetFillColor(); + + mbInitFillColor = false; +} + + void OutputDevice::SetFont( const Font& rNewFont ) { _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
