summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/print3.cxx
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2009-11-24 17:40:41 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2009-11-24 17:40:41 +0100
commit739473cd061d8fbf91ae232d0e3a4ec68a10f174 (patch)
tree7840a7ae59cee45092ea3708b5979f2b79dbf974 /vcl/source/gdi/print3.cxx
parent5d7cea9f0f556b7e88921b206683f9c968261a50 (diff)
printerpullpages: #i107065# ensure correct mapmode for borders on subpages
Diffstat (limited to 'vcl/source/gdi/print3.cxx')
-rw-r--r--vcl/source/gdi/print3.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index d5d8392b2f45..2b16d2c611fd 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -776,7 +776,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
io_rSubPage.Clip( i_rClipRect );
// save gstate
- o_rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_CLIPREGION | PUSH_MAPMODE ) );
+ o_rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
// clip to page rect
o_rMtf.AddAction( new MetaClipRegionAction( Region( i_rClipRect ), TRUE ) );
@@ -785,17 +785,24 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
io_rSubPage.WindStart();
io_rSubPage.Play( o_rMtf );
+ // restore gstate
+ o_rMtf.AddAction( new MetaPopAction() );
+
// draw a border
if( i_bDrawBorder )
{
+ // save gstate
+ o_rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_CLIPREGION | PUSH_MAPMODE ) );
+ o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) );
+
Rectangle aBorderRect( i_rClipRect );
o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), TRUE ) );
o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), FALSE ) );
o_rMtf.AddAction( new MetaRectAction( aBorderRect ) );
- }
- // restore gstate
- o_rMtf.AddAction( new MetaPopAction() );
+ // restore gstate
+ o_rMtf.AddAction( new MetaPopAction() );
+ }
}
PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache )