summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authormatteocam <matteo.campanelli@gmail.com>2014-05-22 13:53:19 -0400
committerFridrich Štrba <fridrich.strba@bluewin.ch>2014-06-30 22:54:37 +0200
commitd097bc8e156b50a4fd04dd82c42efa2921f0e886 (patch)
treeb565e8f581fa7856f816995781e204b0693b6981 /vcl
parent285c6cd514eedb0718029906a6189bf39d8232e4 (diff)
HasBkg method to Font.HasBkg iff HasSingleUnderline.SetBkgColor in OutputDev
Change-Id: I10e6e1b916df0c78d26596a37944e8b57b2897e7 (cherry picked from commit 181266201b5e6aaad1dcd9cbc2dd4db44ecf3dc5)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/outdev/font.cxx1
-rw-r--r--vcl/source/outdev/outdevstate.cxx7
-rw-r--r--vcl/source/outdev/text.cxx14
3 files changed, 19 insertions, 3 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 5c0333f3e5ad..e1e431c90860 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1594,6 +1594,7 @@ bool OutputDevice::ImplNewFont() const
mbTextSpecial = maFont.IsShadow() || maFont.IsOutline() ||
(maFont.GetRelief() != RELIEF_NONE);
+
// #95414# fix for OLE objects which use scale factors very creatively
if( mbMap && !aSize.Width() )
{
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 2dcaf11f76a0..8787a6ea0566 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -520,6 +520,13 @@ 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 b7bb028d2963..2f3303bae8fb 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -279,7 +279,10 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
return true;
}
-bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, bool bTextLines, sal_uInt32 flags )
+bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
+ bool bTextLines,
+ bool bTextBkg,
+ sal_uInt32 flags )
{
if( mpFontEntry->mnOwnOrientation )
if( ImplDrawRotateText( rSalLayout ) )
@@ -327,6 +330,11 @@ bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, bool bTextLines, s
maFont.GetStrikeout(), maFont.GetUnderline(), maFont.GetOverline(),
maFont.IsWordLineMode(), ImplIsUnderlineAbove( maFont ) );
+ // draw background
+ if ( bTextBkg ) {
+
+ }
+
// emphasis marks
if( maFont.GetEmphasisMark() & EMPHASISMARK_STYLE )
ImplDrawEmphasisMarks( rSalLayout );
@@ -422,7 +430,7 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
if ( maFont.IsOutline() )
{
- if(! ImplDrawTextDirect( rSalLayout, mbTextLines, DRAWTEXT_F_OUTLINE))
+ if(! ImplDrawTextDirect( rSalLayout, mbTextLines, false, DRAWTEXT_F_OUTLINE))
{
rSalLayout.DrawBase() = aOrigPos + Point(-1,-1);
ImplDrawTextDirect( rSalLayout, mbTextLines );
@@ -473,7 +481,7 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
if( mbTextSpecial )
ImplDrawSpecialText( rSalLayout );
else
- ImplDrawTextDirect( rSalLayout, mbTextLines );
+ ImplDrawTextDirect( rSalLayout, mbTextLines, mbTextBackground );
}
long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,