summaryrefslogtreecommitdiffstats
path: root/editeng
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 /editeng
parentTest on changing background (diff)
downloadcore-d097bc8e156b50a4fd04dd82c42efa2921f0e886.tar.gz
core-d097bc8e156b50a4fd04dd82c42efa2921f0e886.zip
HasBkg method to Font.HasBkg iff HasSingleUnderline.SetBkgColor in OutputDev
Change-Id: I10e6e1b916df0c78d26596a37944e8b57b2897e7 (cherry picked from commit 181266201b5e6aaad1dcd9cbc2dd4db44ecf3dc5)
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx9
-rw-r--r--editeng/source/items/svxfont.cxx1
2 files changed, 6 insertions, 4 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 436c3754ceb3..b5053b2e16f8 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3673,7 +3673,12 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev
VirtualDevice* pVDev = GetVirtualDevice( pTarget->GetMapMode(), pTarget->GetDrawMode() );
pVDev->SetDigitLanguage( GetRefDevice()->GetDigitLanguage() );
+ /*
+ * Set the appropriate background color according
+ * to text criteria
+ */
{
+
Color aBackgroundColor( pView->GetBackgroundColor() );
// #i47161# Check if text is visible on background
SvxFont aTmpFont;
@@ -3699,11 +3704,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev
if( nColorDiff < 8 )
aBackgroundColor = aFontColor.IsDark() ? COL_WHITE : COL_BLACK;
- // XXX: BEGIN my changes
- aBackgroundColor = COL_GRAY;
pVDev->SetBackground( aBackgroundColor );
- // END my changes
- //pVDev->SetBackground( aBackgroundColor ); // original code
}
bool bVDevValid = true;
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 7feb70e196ed..895eef60291c 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -456,6 +456,7 @@ void SvxFont::QuickDrawText( OutputDevice *pOut,
const Point &rPos, const OUString &rTxt,
const sal_Int32 nIdx, const sal_Int32 nLen, const sal_Int32* pDXArray ) const
{
+
// Font has to be selected in OutputDevice...
if ( !IsCaseMap() && !IsCapital() && !IsKern() && !IsEsc() )
{