diff options
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/rtfexport/data/sautoupd.rtf | 7 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 9 |
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: */ |