From 59e9d163345e7a9eb68c1bae273593cd70c61153 Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Fri, 13 Oct 2017 20:47:29 -0400 Subject: sd lok: fix spell checking languages in Impress Change-Id: I133c9b91521fa7f2b5f7e3a47396f7efa31e1a86 Reviewed-on: https://gerrit.libreoffice.org/43382 Tested-by: Jenkins Reviewed-by: Henry Castro --- sd/qa/unit/tiledrendering/tiledrendering.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'sd/qa') 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 #include #include +#include #include #include #include @@ -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 pItem1; + std::unique_ptr 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(); -- cgit