summaryrefslogtreecommitdiffstats
path: root/sw/qa/uibase/uno
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
commit8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59 (patch)
treeca2b0cc4fba88107f5f6e740285184a061011866 /sw/qa/uibase/uno
parentAdding debian version 4:24.2.3-2. (diff)
downloadlibreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.tar.xz
libreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.zip
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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: */