summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport/rtfimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 58353bff2fb2..9a6974f15767 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -146,6 +146,7 @@ public:
void testFdo39001();
void testFdo66565();
void testFdo54900();
+ void testFdo64637();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -279,6 +280,7 @@ void Test::run()
{"fdo39001.rtf", &Test::testFdo39001},
{"fdo66565.rtf", &Test::testFdo66565},
{"fdo54900.rtf", &Test::testFdo54900},
+ {"fdo64637.rtf", &Test::testFdo64637},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1343,6 +1345,14 @@ void Test::testFdo54900()
CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraphOfText(1, xCell->getText()), "ParaAdjust")));
}
+void Test::testFdo64637()
+{
+ // The problem was that the custom "Company" property was added twice, the second invocation resulted in an exception.
+ uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xDocumentPropertiesSupplier->getDocumentProperties()->getUserDefinedProperties(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("bbb"), getProperty<OUString>(xPropertySet, "Company"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();