diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2006-12-01 15:56:07 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2006-12-01 15:56:07 +0000 |
commit | eced0c27f95dcab415ebbbcba7f3317d010a8597 (patch) | |
tree | a27acee941888e3afb663787cbd670e8c7bfa0dd /forms | |
parent | 1fa7c8fad392f9722cf19ae0bd924632854f52d4 (diff) |
INTEGRATION: CWS dba22a (1.6.16); FILE MERGED
2006/10/25 19:36:54 fs 1.6.16.1: #i65695# when printing, respect the BackgroundColor
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/richtext/richtextimplcontrol.cxx | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 8946e5762..24563698d 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -4,9 +4,9 @@ * * $RCSfile: richtextimplcontrol.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: obo $ $Date: 2006-09-17 00:00:34 $ + * last change: $Author: rt $ $Date: 2006-12-01 16:56:07 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -631,7 +631,7 @@ namespace frm { // need to normalize the map mode of the device - every paint operation on any device needs // to use the same map mode - _pDev->Push( PUSH_MAPMODE ); + _pDev->Push( PUSH_MAPMODE | PUSH_LINECOLOR | PUSH_FILLCOLOR ); // enforce our "normalize map mode" on the device MapMode aRefMapMode( m_pEngine->GetRefDevice()->GetMapMode() ); @@ -646,13 +646,23 @@ namespace frm Rectangle aPlayground( aPos, aSize ); Size aOnePixel( _pDev->PixelToLogic( Size( 1, 1 ) ) ); - if ( m_pAntiImpl->GetStyle() & WB_BORDER ) - { + // background + _pDev->SetLineColor(); + _pDev->DrawRect( Rectangle( aPlayground.TopLeft(), m_pEngine->GetPaperSize()) ); + + // possibly with border + bool bBorder = ( m_pAntiImpl->GetStyle() & WB_BORDER ); + if ( bBorder ) // let's draw a border _pDev->SetLineColor( COL_BLACK ); - _pDev->DrawRect( aPlayground ); + else + _pDev->SetLineColor(); + _pDev->SetFillColor( m_pAntiImpl->GetBackground().GetColor() ); + _pDev->DrawRect( aPlayground ); + + if ( bBorder ) + // don't draw the text over the border lcl_inflate( aPlayground, -aOnePixel.Width(), -aOnePixel.Height() ); - } // leave a space of one pixel between the "surroundings" of the control // and the content @@ -660,11 +670,6 @@ namespace frm m_pEngine->Draw( _pDev, aPlayground, Point(), TRUE ); -#ifdef DEBUG_DRAW_CONTROL - _pDev->SetLineColor( COL_LIGHTRED ); - _pDev->DrawRect( Rectangle( aPlayground.TopLeft(), m_pEngine->GetPaperSize()) ); -#endif - _pDev->Pop(); } |