[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-text-background-color' - editeng/source vcl/source
editeng/source/editeng/editattr.cxx |2 +- vcl/source/gdi/font.cxx |6 +- 2 files changed, 6 insertions(+), 2 deletions(-) New commits: commit 4b2d62f02a386013d0004058a02fed80eb8df675 Author: matteocam matteo.campane...@gmail.com Date: Sat May 31 04:46:44 2014 -0400 Debugging output Change-Id: I4e9418746ad50e1bdb1336459c00a4cf614e2350 diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx index 2eba576..2447ffa 100644 --- a/editeng/source/editeng/editattr.cxx +++ b/editeng/source/editeng/editattr.cxx @@ -133,7 +133,7 @@ void EditCharAttribUnderline::SetFont( SvxFont rFont, OutputDevice* pOutDev ) rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())-GetValue() ); /* FIXME(matteocam) */ -rFont.SetFillColor(aColor); +rFont.SetFillColor(aColor); // XXX: alone it works but it set it white (vcl causing troubes?) // end FIXME if ( pOutDev ) diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index 616fb61..f223d7b 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -299,11 +299,15 @@ void Font::SetFillColor( const Color rColor ) mpImplFont-maFillColor = rColor; if ( rColor.GetTransparency() ) mpImplFont-mbTransparent = true; +if (GetUnderline() == UNDERLINE_SINGLE ) { +fprintf(stderr, I'm setting a filling (from Font) of (%d,%d,%d) \n, +rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue()); +} } void Font::SetBackgroundColor(const Color rColor) { -// FIXME +// FIXME(matteocam) //MakeUnique(); /*mpImplFont-maBkgColor = rColor; if () */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-text-background-color' - editeng/source vcl/source
editeng/source/items/svxfont.cxx |7 +++ vcl/source/outdev/text.cxx |5 + 2 files changed, 8 insertions(+), 4 deletions(-) New commits: commit ea56441757a34082b9ffc5f28936413fcb55e31a Author: matteocam matteo.campane...@gmail.com Date: Thu May 22 16:18:29 2014 -0400 Put text filling in SvxFont Change-Id: I290fff0cb66fc07122b976d977dff24ac491e108 diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 895eef6..e9f2a71 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -457,9 +457,16 @@ void SvxFont::QuickDrawText( OutputDevice *pOut, const sal_Int32 nIdx, const sal_Int32 nLen, const sal_Int32* pDXArray ) const { +fprintf(stderr, About to print %s\n, rTxt.getStr()); + // Font has to be selected in OutputDevice... if ( !IsCaseMap() !IsCapital() !IsKern() !IsEsc() ) { +// set right background +if ( HasBackgroundColor() ) { +Color aColor = COL_RED; +pOut-SetTextFillColor(aColor); +} pOut-DrawTextArray( rPos, rTxt, pDXArray, nIdx, nLen ); return; } diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 90da4db..eea1569 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -288,6 +288,7 @@ bool OutputDevice::ImplDrawTextDirect( SalLayout rSalLayout, if( ImplDrawRotateText( rSalLayout ) ) return true; + long nOldX = rSalLayout.DrawBase().X(); if( HasMirroredGraphics() ) { @@ -330,10 +331,6 @@ bool OutputDevice::ImplDrawTextDirect( SalLayout rSalLayout, maFont.GetStrikeout(), maFont.GetUnderline(), maFont.GetOverline(), maFont.IsWordLineMode(), ImplIsUnderlineAbove( maFont ) ); -// draw background -if ( bTextBkg ) { - -} // emphasis marks if( maFont.GetEmphasisMark() EMPHASISMARK_STYLE ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits