summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-06-30 18:04:18 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-07-01 13:30:13 +0200
commit7b66810f17c1000ac1d4dc3c5ba49842a0d146be (patch)
tree2135ebef97086c0c40eca2feb8e7747380e00978 /svx
parent0df2e8d6826cb8672d61e05280d98840a51b2771 (diff)
getSvxBrushItemFromSourceSet: add fix for JunitTest_sw_complex
Change-Id: I826cd15923ecb2088161e4cf9650b2f388fd84b5
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/unobrushitemhelper.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx
index c95c200d12b0..f6fe915e6c85 100644
--- a/svx/source/unodraw/unobrushitemhelper.cxx
+++ b/svx/source/unodraw/unobrushitemhelper.cxx
@@ -191,7 +191,15 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt
if(!pXFillStyleItem || XFILL_NONE == pXFillStyleItem->GetValue())
{
- Color aFillColor(COL_AUTO);
+ // no fill, still need to rescue the evtl. set RGB color, but use as transparent color (we have XFILL_NONE)
+ Color aFillColor(static_cast< const XFillColorItem& >(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents)).GetColorValue());
+
+ // when fill style is none, then don't allow anything other than 0 or auto.
+ if (aFillColor.GetColor() != 0)
+ aFillColor.SetColor(COL_AUTO);
+
+ aFillColor.SetTransparency(0xff);
+
return SvxBrushItem(aFillColor, nBackgroundID);
}