summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authormatteocam <matteo.campanelli@gmail.com>2014-05-24 13:02:43 -0400
committerFridrich Štrba <fridrich.strba@bluewin.ch>2014-06-30 22:54:37 +0200
commitbe085bf52324f8b1c7f59a3d49a39e14e04824df (patch)
treea0203ad18eb78e02a602e610c8de96e2da079f6f /vcl
parent039599e9d52461ea57a9690f847bbfe5bae6f3aa (diff)
Moved Text Filling Color in OutDev. Text Filling occurs in ImplDrawText
Change-Id: I9c75066a8dea32721757d0511a2af58c68408438 (cherry picked from commit b09cf493611f2521e66159287b88acc3c05d6d33)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/outdev/outdevstate.cxx5
-rw-r--r--vcl/source/outdev/text.cxx19
2 files changed, 16 insertions, 8 deletions
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 8787a6ea0566..15fa53ccb1f3 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -521,11 +521,6 @@ void OutputDevice::SetFont( const Font& rNewFont )
aFont.SetColor( aTextColor );
mbTextBackground = aFont.HasBackgroundColor();
- if ( mbTextBackground )
- {
- Color aRedColor ( COL_RED );
- SetBackground(aRedColor);
- }
bool bTransFill = aFont.IsTransparent();
if ( !bTransFill )
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 52c05374d543..eeb1575f504b 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -281,7 +281,6 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
bool bTextLines,
- bool bTextBkg,
sal_uInt32 flags )
{
if( mpFontEntry->mnOwnOrientation )
@@ -289,6 +288,8 @@ bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
return true;
+
+
long nOldX = rSalLayout.DrawBase().X();
if( HasMirroredGraphics() )
{
@@ -427,7 +428,7 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
if ( maFont.IsOutline() )
{
- if(! ImplDrawTextDirect( rSalLayout, mbTextLines, false, DRAWTEXT_F_OUTLINE))
+ if(! ImplDrawTextDirect( rSalLayout, mbTextLines, DRAWTEXT_F_OUTLINE))
{
rSalLayout.DrawBase() = aOrigPos + Point(-1,-1);
ImplDrawTextDirect( rSalLayout, mbTextLines );
@@ -472,13 +473,24 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
rSalLayout.DrawBase() += Point( mnTextOffX, mnTextOffY );
+ /*
+ if the text has some background get it (XXX: now getting fixed color)
+ and the set it as the new filling color
+ */
+ if (mbTextBackground) {
+ // set right background
+ Color aColor = COL_PINK;
+ // SetBackground does not work
+ SetFillColor(aColor);
+ }
+
if( IsTextFillColor() )
ImplDrawTextBackground( rSalLayout );
if( mbTextSpecial )
ImplDrawSpecialText( rSalLayout );
else
- ImplDrawTextDirect( rSalLayout, mbTextLines, mbTextBackground );
+ ImplDrawTextDirect( rSalLayout, mbTextLines );
}
long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
@@ -836,6 +848,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
nLen = rStr.getLength() - nIndex;
}
+
if( mpOutDevData && mpOutDevData->mpRecordLayout )
{
pVector = &mpOutDevData->mpRecordLayout->m_aUnicodeBoundRects;