From a5df43611bb27491961f97b758b1c7fc0b3158b0 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 14 Sep 2015 09:10:04 +0200 Subject: tdf#92586 xmloff: fix import of stretched background image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bug document has: When a stretched background image is set on a page style using the Writer UI, then these two style:repeat attributes always match, but not in the bugdoc. The later used to have priority, till commit 7d9bb549d498d6beed2c4050c402d09643febdfa (Related: #i124638# Second step of DrawingLayer FillAttributes..., 2014-06-02). Fix the problem by extending XMLBackgroundImageContext::EndElement(): if we know that the sets the FillBitmapMode property, then don't blindly set BackGraphicLocation, but try to overwrite the exiting FillBitmapMode one. Change-Id: I64ab4363b20cc95003d35acd63ea421472b1c071 (cherry picked from commit 6621da38b3cd217314c2d2295fd1e71be7e1875e) Reviewed-on: https://gerrit.libreoffice.org/18582 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/qa/extras/odfimport/odfimport.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sw/qa/extras/odfimport/odfimport.cxx') diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 4ed43afa89b4..105e046e29db 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -606,6 +606,13 @@ DECLARE_ODFIMPORT_TEST(testBnc800714, "bnc800714.fodt") CPPUNIT_ASSERT(getProperty(getParagraph(2), "ParaKeepTogether")); } +DECLARE_ODFIMPORT_TEST(testTdf92586, "tdf92586.odt") +{ + uno::Reference xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); + // This was BitmapMode_NO_REPEAT. + CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_STRETCH, getProperty(xPageStyle, "FillBitmapMode")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit v1.2.3