[Libreoffice-commits] core.git: oox/source sw/qa
Miklos Vajna
vmiklos at collabora.co.uk
Fri Dec 6 01:39:13 PST 2013
oox/source/drawingml/shape.cxx | 6 ++++++
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 ++
2 files changed, 8 insertions(+)
New commits:
commit a5c475c25bd432fc80be8c2b437935cd54c4b611
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Dec 6 10:14:45 2013 +0100
Santa Claus brings fixed background color of textframes in drawingml import
Change-Id: Ie2b6885aae5e26c3d29d372da730837cb7dc97ce
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 78a7581..72c7547 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -613,6 +613,12 @@ Reference< XShape > Shape::createAndInsert(
{
if (aServiceName == "com.sun.star.text.TextFrame")
{
+ // TextFrames have BackColor, not FillColor
+ if (aShapeProps.hasProperty(PROP_FillColor))
+ {
+ aShapeProps.setProperty(PROP_BackColor, aShapeProps[PROP_FillColor]);
+ aShapeProps.erase(PROP_FillColor);
+ }
// TextFrames have BackColorTransparency, not FillTransparence
if (aShapeProps.hasProperty(PROP_FillTransparence))
{
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index d7ce137..2b271a3 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1591,6 +1591,8 @@ DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx")
uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
// positionV's posOffset from the bugdoc, was 0.
CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(2514600)), getProperty<sal_Int32>(xFrame, "VertOrientPosition"));
+ // This was -1 (default), make sure the background color is set.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0x4f81bd), getProperty<sal_Int32>(xFrame, "BackColor"));
}
DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
More information about the Libreoffice-commits
mailing list