summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-03-29 14:03:00 +0200
committerAndras Timar <andras.timar@collabora.com>2016-04-04 23:56:12 +0200
commit6fdbedf117ed1929adb52e566174cdeaf44616db (patch)
treeb12d81e90b34b617d8bdda3a723669ad507cc485 /sw
parentaafd797aeee0333c446d69b9d1625aa9fb6e5019 (diff)
tdf#98882 DOCX import: set default para properties on the Standard para style
That's what the DOC import does, and that's the reason e.g. the strange unwanted crop of the as-char anchored picture doesn't happen there. This also needs the "reset all existing style properties back to default" logic to be adapted: the Standard style has to be reset before the default are set, and later it should be left alone, otherwise the defaults are lost. (cherry picked from commit eae2331f83bd58bacccd898d60f6c5f54856c036) Change-Id: Ie422a0b64b80a826fa4f469145a26283fb32d734 Reviewed-on: https://gerrit.libreoffice.org/23598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 490ce780fa876ec14055d95339933ea0081ce0e7)
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf98882.docxbin0 -> 18390 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx8
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf98882.docx b/sw/qa/extras/ooxmlimport/data/tdf98882.docx
new file mode 100644
index 000000000000..53c1098dc78a
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf98882.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index c280b5487048..a5b5cac303e7 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2909,6 +2909,14 @@ DECLARE_OOXMLIMPORT_TEST(testTdf95213, "tdf95213.docx")
CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xStyle, "CharWeight"));
}
+DECLARE_OOXMLIMPORT_TEST(testTdf98882, "tdf98882.docx")
+{
+ sal_Int32 nFlyHeight = parseDump("//fly/infos/bounds", "height").toInt32();
+ sal_Int32 nContentHeight = parseDump("//notxt/infos/bounds", "height").toInt32();
+ // The content height was 600, not 360, so the frame and the content height did not match.
+ CPPUNIT_ASSERT_EQUAL(nFlyHeight, nContentHeight);
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();