summaryrefslogtreecommitdiff
path: root/sd/qa/unit/import-tests.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit/import-tests.cxx')
-rw-r--r--sd/qa/unit/import-tests.cxx37
1 files changed, 37 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 9e60c8886dec..aa329dfddec6 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -55,6 +55,8 @@
#include <com/sun/star/drawing/ConnectorType.hpp>
#include <stlpool.hxx>
+#include <unotools/syslocaleoptions.hxx>
+#include <comphelper/scopeguard.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/lok.hxx>
#include <svx/svdograf.hxx>
@@ -82,6 +84,7 @@ public:
void testDocumentLayout();
void testTdf149124();
+ void testTdf148965();
void testTdf89449();
void testTdf147459();
void testTdf146223();
@@ -151,6 +154,7 @@ public:
CPPUNIT_TEST(testDocumentLayout);
CPPUNIT_TEST(testTdf149124);
+ CPPUNIT_TEST(testTdf148965);
CPPUNIT_TEST(testTdf89449);
CPPUNIT_TEST(testTdf147459);
CPPUNIT_TEST(testTdf146223);
@@ -309,7 +313,40 @@ void SdImportTest::testTdf149124()
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), nStartGlueId);
sal_Int32 nEndGlueId = xStandardConnector->getPropertyValue("EndGluePointIndex").get<sal_Int32>();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nEndGlueId);
+}
+
+void SdImportTest::testTdf148965()
+{
+ // Set the system user interface to Hungarian
+ SvtSysLocaleOptions aOptions;
+ OUString sUIConfigString = aOptions.GetLanguageTag().getBcp47();
+ aOptions.SetUILocaleConfigString("hu-HU");
+ aOptions.Commit();
+ comphelper::ScopeGuard g([&aOptions, &sUIConfigString] {
+ aOptions.SetUILocaleConfigString(sUIConfigString);
+ aOptions.Commit();
+ });
+
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf148965.pptx"), PPTX);
+ uno::Reference<beans::XPropertySet> xShape1(getShapeFromPage(0, 1, xDocShRef));
+ uno::Reference<document::XEventsSupplier> xEventsSupplier1(xShape1, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xEvents1(xEventsSupplier1->getEvents());
+ uno::Sequence<beans::PropertyValue> props1;
+ xEvents1->getByName("OnClick") >>= props1;
+ comphelper::SequenceAsHashMap map1(props1);
+ auto iter1(map1.find("Bookmark"));
+ CPPUNIT_ASSERT_EQUAL(OUString("page1"), iter1->second.get<OUString>());
+
+ uno::Reference<beans::XPropertySet> xShape2(getShapeFromPage(1, 1, xDocShRef));
+ uno::Reference<document::XEventsSupplier> xEventsSupplier2(xShape2, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xEvents2(xEventsSupplier2->getEvents());
+ uno::Sequence<beans::PropertyValue> props2;
+ xEvents2->getByName("OnClick") >>= props2;
+ comphelper::SequenceAsHashMap map2(props2);
+ auto iter2(map2.find("Bookmark"));
+ CPPUNIT_ASSERT_EQUAL(OUString("page3"), iter2->second.get<OUString>());
xDocShRef->DoClose();
}