summaryrefslogtreecommitdiffstats
path: root/sw/qa/uibase/uno
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/uibase/uno')
-rw-r--r--sw/qa/uibase/uno/uno.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx
index d38d0bbfc9..3e6d9c93d5 100644
--- a/sw/qa/uibase/uno/uno.cxx
+++ b/sw/qa/uibase/uno/uno.cxx
@@ -560,6 +560,30 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testAllowTextAfterFloatingTableBreak)
CPPUNIT_ASSERT(bAllowTextAfterFloatingTableBreak);
}
+CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testDoNotMirrorRtlDrawObjs)
+{
+ // Given an empty document:
+ createSwDoc();
+
+ // When checking the state of the DoNotMirrorRtlDrawObjs compat flag:
+ uno::Reference<lang::XMultiServiceFactory> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xSettings(
+ xDocument->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY);
+ bool bDoNotMirrorRtlDrawObjs{};
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.beans.UnknownPropertyException
+ // i.e. the compat flag was not recognized.
+ xSettings->getPropertyValue("DoNotMirrorRtlDrawObjs") >>= bDoNotMirrorRtlDrawObjs;
+ // Then make sure it's false by default:
+ CPPUNIT_ASSERT(!bDoNotMirrorRtlDrawObjs);
+
+ // And when setting DoNotMirrorRtlDrawObjs=true:
+ xSettings->setPropertyValue("DoNotMirrorRtlDrawObjs", uno::Any(true));
+ // Then make sure it gets enabled:
+ xSettings->getPropertyValue("DoNotMirrorRtlDrawObjs") >>= bDoNotMirrorRtlDrawObjs;
+ CPPUNIT_ASSERT(bDoNotMirrorRtlDrawObjs);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */