summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-04-18 16:47:14 +0200
committerDavid Tardon <dtardon@redhat.com>2014-04-19 15:51:13 +0000
commitd65fff78bfcb4c557d35eec8293c9109ab34fc03 (patch)
tree78ff91a558d3d040696d941f6140f98b11945032 /sw
parenta5cc073852a57adf62fa83b29e1259a35169b10c (diff)
fdo#75735 RTF import: fix COW when writing a nested structure
Regression from a48e2fd9049797110b3b2505c363557284987ca8 (fdo#44736 - convert RTFSprms to a copy-on-write structure., 2012-12-07) (cherry picked from commit 6b6e4d471c2954d34d280398ed1c986d7fb27ae1) Conflicts: writerfilter/source/rtftok/rtfsprm.hxx Change-Id: I2538f440e29cef6d40db2ea914e4afcbfe411890 Reviewed-on: https://gerrit.libreoffice.org/9100 Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo75735.rtf8
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx7
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo75735.rtf b/sw/qa/extras/rtfimport/data/fdo75735.rtf
new file mode 100644
index 000000000000..7d844bd485e9
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo75735.rtf
@@ -0,0 +1,8 @@
+{\rtf1\ansi
+{\fonttbl \f0\froman Times;}
+\pard\tx1440\plain
+{\tx360\tx720\tx1080\tab\tab\tab\tab This is line one.\
+}
+{\tx480\tx960\tab\tab\tab This is line two.\
+}
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 4d61147eaa65..908178f71f74 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/style/LineSpacing.hpp>
#include <com/sun/star/style/LineSpacingMode.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/style/TabStop.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/table/BorderLineStyle.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
@@ -1628,6 +1629,12 @@ DECLARE_RTFIMPORT_TEST(testFdo77267, "fdo77267.rtf")
CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(1), "ParaAdjust")));
}
+DECLARE_RTFIMPORT_TEST(testFdo75735, "fdo75735.rtf")
+{
+ // Number of tabstops in the second paragraph should be 3, was 6.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty< uno::Sequence<style::TabStop> >(getParagraph(2), "ParaTabStops").getLength());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */