summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-11-22 20:08:42 +0100
committerAndras Timar <andras.timar@collabora.com>2014-11-23 14:32:38 +0100
commitd31ea9715b87630bd270d3121ea706647a63f3fa (patch)
treed269bde686b581091ceab69749d4b50b11894ce5 /sw/qa
parent4a4ecd95861b4b68913d0ae54851e2a34c649295 (diff)
fdo#82006 RTF filter: import \sbauto and \saauto
(cherry picked from commit bb77fd64f9219f1b8f990f5041d81cfddd021213) Conflicts: sw/qa/extras/rtfexport/rtfexport.cxx Change-Id: Iabff543c8191fc86dceb9274ea1552f60d73dabd Reviewed-on: https://gerrit.libreoffice.org/13054 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/rtfexport/data/fdo82006.rtf4
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx7
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/fdo82006.rtf b/sw/qa/extras/rtfexport/data/fdo82006.rtf
new file mode 100644
index 000000000000..0f5ee43ad2d5
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/fdo82006.rtf
@@ -0,0 +1,4 @@
+{\rtf1
+\pard\plain
+\ql \sb100\sa100\sbauto1\saauto1 hello\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 0bcf1a836794..83b9aba2ab6e 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -665,6 +665,13 @@ DECLARE_RTFEXPORT_TEST(testFdo82858, "fdo82858.docx")
CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::NONE, getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineStyle);
}
+DECLARE_RTFEXPORT_TEST(testFdo82006, "fdo82006.rtf")
+{
+ // These were 176 (100 twips), as \sbauto and \sbbefore were ignored.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)), getProperty<sal_Int32>(getParagraph(0), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)), getProperty<sal_Int32>(getParagraph(0), "ParaBottomMargin"));
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();