summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2017-10-13 20:47:29 -0400
committerHenry Castro <hcastro@collabora.com>2017-10-14 13:39:05 +0200
commit59e9d163345e7a9eb68c1bae273593cd70c61153 (patch)
tree7594848c67904352f635e4fb142a6750ad5e32db /sd/qa
parent96a0adacab0c07b337b0d3ead69398a1a2a0425b (diff)
sd lok: fix spell checking languages in Impress
Change-Id: I133c9b91521fa7f2b5f7e3a47396f7efa31e1a86 Reviewed-on: https://gerrit.libreoffice.org/43382 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index c72b42a5ac5b..1e3d54e7e6d1 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -30,6 +30,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <svl/srchitem.hxx>
+#include <svl/slstitm.hxx>
#include <comphelper/lok.hxx>
#include <svx/svdotable.hxx>
#include <svx/svdoutl.hxx>
@@ -102,6 +103,7 @@ public:
void testCommentCallbacks();
void testMultiViewInsertDeletePage();
void testDisableUndoRepair();
+ void testLanguageStatus();
CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
CPPUNIT_TEST(testRegisterCallback);
@@ -139,6 +141,7 @@ public:
CPPUNIT_TEST(testCommentCallbacks);
CPPUNIT_TEST(testMultiViewInsertDeletePage);
CPPUNIT_TEST(testDisableUndoRepair);
+ CPPUNIT_TEST(testLanguageStatus);
CPPUNIT_TEST_SUITE_END();
@@ -1827,6 +1830,24 @@ void SdTiledRenderingTest::testDisableUndoRepair()
}
}
+void SdTiledRenderingTest::testLanguageStatus()
+{
+ // Load the document.
+ comphelper::LibreOfficeKit::setActive();
+ createDoc("dummy.odp");
+ SfxViewShell* pView1 = SfxViewShell::Current();
+ SfxLokHelper::createView();
+ SfxViewShell* pView2 = SfxViewShell::Current();
+ {
+ std::unique_ptr<SfxPoolItem> pItem1;
+ std::unique_ptr<SfxPoolItem> pItem2;
+ pView1->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, pItem1);
+ pView2->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, pItem2);
+ CPPUNIT_ASSERT(dynamic_cast< const SfxStringListItem* >(pItem1.get()));
+ CPPUNIT_ASSERT(dynamic_cast< const SfxStringListItem* >(pItem2.get()));
+ }
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);
CPPUNIT_PLUGIN_IMPLEMENT();