summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatteocam <matteo.campanelli@gmail.com>2014-05-29 11:14:09 -0400
committerFridrich Štrba <fridrich.strba@bluewin.ch>2014-06-30 22:54:39 +0200
commita74e588518df1a3f5e7209e52dcaccf38ae88e56 (patch)
tree6105a76e7b01924329b4ffbe81c3ba6b45d695bd
parent7b59e44925b4c46e682661f5468d7aa2d7d3231d (diff)
Setting SetTextFillColor from Attrs. Experiment with line color
Change-Id: If34f000d6c5ef6ec38f7f735ada194b8fff4f56d (cherry picked from commit 7fb0e8c9a659417607c85f9b0e8245e4af4552dc)
-rw-r--r--editeng/source/editeng/editattr.cxx9
-rw-r--r--vcl/source/outdev/text.cxx10
2 files changed, 16 insertions, 3 deletions
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index c7eab83e40fa..bfd0c388150a 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -128,12 +128,15 @@ EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr,
void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
{
+ Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF); // blue-ish
+
rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())->GetValue() );
- if ( pOutDev )
- pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
+ if ( pOutDev ) // FIXME(matteocam)
+ pOutDev->SetTextLineColor( aColor );
+ //pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
// FIXME(matteocam)
- Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF); // blue-ish
+
if ( pOutDev )
pOutDev->SetTextFillColor(aColor);
}
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index fcdcb9a2532f..fbc0db33f7eb 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -465,6 +465,7 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
{
+
if( mbInitClipRegion )
InitClipRegion();
if( mbOutputClipped )
@@ -828,6 +829,8 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
MetricVector* pVector, OUString* pDisplayText
)
{
+
+
if(nLen == 0x0FFFF)
{
SAL_INFO("sal.rtl.xub",
@@ -948,6 +951,12 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
const sal_Int32* pDXAry,
sal_Int32 nIndex, sal_Int32 nLen )
{
+ fprintf(stderr, "TextFillColor printing %c is (%d, %d, %d)\n",
+ (char) rStr.toChar(),
+ GetTextFillColor().GetRed(),
+ GetTextFillColor().GetGreen(),
+ GetTextFillColor().GetBlue());
+
if(nLen == 0x0FFFF)
{
SAL_INFO("sal.rtl.xub",
@@ -1429,6 +1438,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
MetricVector* pVector, OUString* pDisplayText,
::vcl::ITextLayout& _rLayout )
{
+
Color aOldTextColor;
Color aOldTextFillColor;
bool bRestoreFillColor = false;