summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtftok/rtftok.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtftok/rtftok.cxx')
-rw-r--r--sw/qa/extras/rtftok/rtftok.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx
index 0628268b9267..472e77566e4b 100644
--- a/sw/qa/extras/rtftok/rtftok.cxx
+++ b/sw/qa/extras/rtftok/rtftok.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/style/CaseMap.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/table/BorderLineStyle.hpp>
@@ -71,6 +72,7 @@ public:
void testN751020();
void testFdo47326();
void testFdo47036();
+ void testFdo46955();
CPPUNIT_TEST_SUITE(RtfModelTest);
#if !defined(MACOSX) && !defined(WNT)
@@ -87,6 +89,7 @@ public:
CPPUNIT_TEST(testN751020);
CPPUNIT_TEST(testFdo47326);
CPPUNIT_TEST(testFdo47036);
+ CPPUNIT_TEST(testFdo46955);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -425,6 +428,27 @@ void RtfModelTest::testFdo47036()
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
}
+void RtfModelTest::testFdo46955()
+{
+ load(OUString(RTL_CONSTASCII_USTRINGPARAM("fdo46955.rtf")));
+
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ while (xParaEnum->hasMoreElements())
+ {
+ uno::Reference<container::XEnumerationAccess> xRangeEnumAccess(xParaEnum->nextElement(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xRangeEnum = xRangeEnumAccess->createEnumeration();
+ while (xRangeEnum->hasMoreElements())
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(xRangeEnum->nextElement(), uno::UNO_QUERY);
+ sal_Int16 nValue;
+ xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharCaseMap"))) >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(style::CaseMap::UPPERCASE, nValue);
+ }
+ }
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(RtfModelTest);
CPPUNIT_PLUGIN_IMPLEMENT();