summaryrefslogtreecommitdiff
path: root/sw/source/core/text/inftxt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/inftxt.cxx')
-rw-r--r--sw/source/core/text/inftxt.cxx57
1 files changed, 34 insertions, 23 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 9341206dfa71..f7c96d9dc745 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1142,27 +1142,30 @@ void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked)
{
SwRect aIntersect;
CalcRect( rPor, &aIntersect, 0 );
- if ( aIntersect.HasArea() ) {
- if (OnWin()) {
- OutputDevice* pOutDev = (OutputDevice*)GetOut();
- pOutDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
- pOutDev->SetLineColor( Color(220, 233, 245));
- pOutDev->SetFillColor( Color(220, 233, 245));
- pOutDev->DrawRect( aIntersect.SVRect() );
- pOutDev->Pop();
- }
- const int delta=10;
- Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta);
- pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
- pOut->SetLineColor( Color(0, 0, 0));
- pOut->SetFillColor();
- pOut->DrawRect( r );
- if (checked) {
- pOut->DrawLine(r.TopLeft(), r.BottomRight());
- pOut->DrawLine(r.TopRight(), r.BottomLeft());
+ if ( aIntersect.HasArea() )
+ {
+ if (OnWin() && SwViewOption::IsFieldShadings() &&
+ !GetOpt().IsPagePreview())
+ {
+ OutputDevice* pOut_ = (OutputDevice*)GetOut();
+ pOut_->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pOut_->SetFillColor( SwViewOption::GetFieldShadingsColor() );
+ pOut_->SetLineColor();
+ pOut_->DrawRect( aIntersect.SVRect() );
+ pOut_->Pop();
+ }
+ const int delta=10;
+ Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta);
+ pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pOut->SetLineColor( Color(0, 0, 0));
+ pOut->SetFillColor();
+ pOut->DrawRect( r );
+ if (checked) {
+ pOut->DrawLine(r.TopLeft(), r.BottomRight());
+ pOut->DrawLine(r.TopRight(), r.BottomLeft());
+ }
pOut->Pop();
}
- }
}
/*************************************************************************
@@ -1216,14 +1219,22 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
}
}
bool bIsStartMark=(1==GetLen() && CH_TXT_ATR_FIELDSTART==GetTxt().GetChar(GetIdx()));
- if(pFieldmark) OSL_TRACE("Found Fieldmark");
+ if(pFieldmark) {
+ OSL_TRACE("Found Fieldmark");
+#if DEBUG
+ rtl::OUString str = pFieldmark->ToString( );
+ fprintf( stderr, "%s\n", rtl::OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr( ) );
+#endif
+ }
if(bIsStartMark) OSL_TRACE("Found StartMark");
- if (OnWin() && (pFieldmark!=NULL || bIsStartMark))
+ if (OnWin() && (pFieldmark!=NULL || bIsStartMark) &&
+ SwViewOption::IsFieldShadings() &&
+ !GetOpt().IsPagePreview())
{
OutputDevice* pOutDev = (OutputDevice*)GetOut();
pOutDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
- pOutDev->SetLineColor( Color(220, 233, 245));
- pOutDev->SetFillColor( Color(220, 233, 245));
+ pOutDev->SetFillColor( SwViewOption::GetFieldShadingsColor() );
+ pOutDev->SetLineColor( );
pOutDev->DrawRect( aIntersect.SVRect() );
pOutDev->Pop();
}