diff options
author | Vasily Melenchuk <Vasily.Melenchuk@cib.de> | 2017-06-20 14:20:31 +0300 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-06-27 15:39:12 +0200 |
commit | d5b19100ca4d3670d1b5367e8000739af60a6892 (patch) | |
tree | 96bb0dd67ccfbe6cc7611255e3d6afb4eb543d8b /sw | |
parent | 16e625c92f73eae7b95c788e2545d01dc9b05680 (diff) |
tdf#100075 DOCX frame height rule updated
According to "[MS-OE376]: Office Implementation Information for
ECMA-376 Standards Support" Word treats default value for
hRule attribute in a different way: if frame height is missing it
is "auto" (as in specification), but if frame height exist, then
default value for hRule is "atLeast".
Change-Id: I0ce30b61d1a6b85febbbd8a6bf5af3eb1bb2767f
Reviewed-on: https://gerrit.libreoffice.org/39065
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf100075.docx | bin | 0 -> 11834 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf100075.docx b/sw/qa/extras/ooxmlexport/data/tdf100075.docx Binary files differnew file mode 100644 index 000000000000..6312050aaf2f --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf100075.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index f628aab82670..55582cce7800 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -711,6 +711,23 @@ DECLARE_OOXMLEXPORT_TEST(testTdf108682, "tdf108682.docx") CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(459), aLineSpacing.Height); } +DECLARE_OOXMLEXPORT_TEST(testTdf100075, "tdf100075.docx") +{ + uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); + + // There are two frames in document + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xIndexAccess->getCount()); + + uno::Reference<beans::XPropertySet> xFrame1(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xFrame2(xIndexAccess->getByIndex(1), uno::UNO_QUERY); + + // Ensure that frame#1 height is more that frame#2: if no hRul attribute + // defined, MS Word will use hRul=auto if height is not defined, + // and hRul=atLeast if height is provided. So frame#1 should be higher + CPPUNIT_ASSERT(getProperty<sal_Int32>(xFrame1, "Height") > getProperty<sal_Int32>(xFrame2, "Height")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |