summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-03-15 13:56:35 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-15 14:22:09 +0100
commita936658e6cd92d8f073227cd5c586bcecc7124e0 (patch)
tree6a3a364bb7105011553e0ffec38a7451027d8fd1 /sw/qa/extras
parentfb83e8a5a421f751b06faf991177ad3b2100976c (diff)
RTF export: handle \sautoupd
Change-Id: Ifddb3fda827aef0a95649bf074dad7d9cc797edb
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/rtfexport/data/sautoupd.rtf7
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx9
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/sautoupd.rtf b/sw/qa/extras/rtfexport/data/sautoupd.rtf
new file mode 100644
index 000000000000..960855d1b4e4
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/sautoupd.rtf
@@ -0,0 +1,7 @@
+{\rtf1
+{\stylesheet
+{\s1\sautoupd heading 1;}
+{\s2 heading 2;}
+}
+\pard\plain hello\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index f056208d1513..de571a2eda7e 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -867,6 +867,15 @@ DECLARE_RTFEXPORT_TEST(testMargmirror, "margmirror.rtf")
CPPUNIT_ASSERT_EQUAL(style::PageStyleLayout_MIRRORED, getProperty<style::PageStyleLayout>(xPageStyle, "PageStyleLayout"));
}
+DECLARE_RTFEXPORT_TEST(testSautoupd, "sautoupd.rtf")
+{
+ // \sautoupd was ignored during import and export.
+ uno::Reference<beans::XPropertySet> xHeading1(getStyles("ParagraphStyles")->getByName("Heading 1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xHeading1, "IsAutoUpdate"));
+ uno::Reference<beans::XPropertySet> xHeading2(getStyles("ParagraphStyles")->getByName("Heading 2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xHeading2, "IsAutoUpdate"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */