diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-14 16:25:42 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-14 20:04:44 +0000 |
commit | ac8be3d609a219c62713d37d22f8fef0115809f1 (patch) | |
tree | 5f6847bb2f7d6e2063c2787f61a99619036b97c8 /sw | |
parent | 53cd20e94d7cd2a72bf82d0dc8ed71fc5140e938 (diff) |
tdf#89478: svx: ODF import: SvxBrushItem Graphics should override Color
The bugdoc has:
<style:page-layout-properties fo:background-color="#007f7f" >
<style:background-image
xlink:href="Pictures/2000003900002FA3000055F455EC9F63.svm"/>
</style:page-layout-properties>
In this case it's clearly better to prefer the Graphics.
The old code could actually store both in the model but the UI only
allows setting either Color or Graphic, so this should be good enough.
(regression from 7d9bb549d498d6beed2c4050c402d09643febdfa)
Change-Id: Id33231ad90815d9791f90289fb0b55455d334c14
(cherry picked from commit b82791e3c586d6e4247d0eb1bb94681bcb113762)
Reviewed-on: https://gerrit.libreoffice.org/15307
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/odfimport/data/PageBackground.odt | bin | 13175 -> 13301 bytes | |||
-rw-r--r-- | sw/qa/extras/odfimport/odfimport.cxx | 6 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/data/PageBackground.odt b/sw/qa/extras/odfimport/data/PageBackground.odt Binary files differindex dbb1082d2b77..3733d5baed20 100644 --- a/sw/qa/extras/odfimport/data/PageBackground.odt +++ b/sw/qa/extras/odfimport/data/PageBackground.odt diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index a4de654390ae..5db4370ed701 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -315,6 +315,12 @@ DECLARE_ODFIMPORT_TEST(testPageBackground, "PageBackground.odt") CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xPropertySet, "FillStyle")); CPPUNIT_ASSERT_EQUAL(OUString("Sky"), getProperty<OUString>(xPropertySet, "FillBitmapName")); CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_REPEAT, getProperty<drawing::BitmapMode>(xPropertySet, "FillBitmapMode")); + + uno::Reference<beans::XPropertySet> xPropertySetOld(getStyles("PageStyles")->getByName("OldStandard"), uno::UNO_QUERY); + // The background image was overridden by color + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xPropertySetOld, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Sky"), getProperty<OUString>(xPropertySetOld, "FillBitmapName")); + CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_REPEAT, getProperty<drawing::BitmapMode>(xPropertySetOld, "FillBitmapMode")); } DECLARE_ODFIMPORT_TEST(testFdo56272, "fdo56272.odt") |