[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/qa sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Dec 18 00:50:09 PST 2015
sw/qa/extras/odfimport/data/tdf96113.odt |binary
sw/qa/extras/odfimport/odfimport.cxx | 6 ++++++
sw/source/core/unocore/unoframe.cxx | 2 +-
3 files changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 09ea045d373bc00de4238363c6551fdffa7f3548
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Dec 15 09:08:50 2015 +0100
tdf#96113 sw: don't overwrite fo:background-color on ODT frame import
The situation is similar to commit
79fb61efb847405fa47235002b52ee8efad5e339 (tdf#92379: svx: don't
overwrite fo:background-color on ODF import, 2015-08-21), except that
here text frames had the problem of loosing colors when transparency is
set.
Fix the problem by informing getSvxBrushItemFromSourceSet() about if
we're in XML import or not.
(cherry picked from commit 3a0c0af7309e1f5ba3811bbe8a73e506cf5cd069)
Conflicts:
sw/qa/extras/odfimport/odfimport.cxx
Change-Id: Id1adf60b14a3762f0a2a43c49caeed9f6ea039be
Reviewed-on: https://gerrit.libreoffice.org/20744
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sw/qa/extras/odfimport/data/tdf96113.odt b/sw/qa/extras/odfimport/data/tdf96113.odt
new file mode 100644
index 0000000..ede7b07
Binary files /dev/null and b/sw/qa/extras/odfimport/data/tdf96113.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 105e046..5c60935 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -613,6 +613,12 @@ DECLARE_ODFIMPORT_TEST(testTdf92586, "tdf92586.odt")
CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_STRETCH, getProperty<drawing::BitmapMode>(xPageStyle, "FillBitmapMode"));
}
+DECLARE_ODFIMPORT_TEST(testTdf96113, "tdf96113.odt")
+{
+ // Background of the formula frame was white (0xffffff), not green.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00ff00), getProperty<sal_Int32>(getShape(1), "BackColor"));
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index dd9f789..ab14e38 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1803,7 +1803,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if(RES_BACKGROUND == pEntry->nWID)
{
const SwAttrSet& rSet = pFormat->GetAttrSet();
- const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rSet, RES_BACKGROUND));
+ const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rSet, RES_BACKGROUND, true, pDoc->IsInXMLImport()));
SvxBrushItem aChangedBrushItem(aOriginalBrushItem);
aChangedBrushItem.PutValue(aValue, nMemberId);
More information about the Libreoffice-commits
mailing list