diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2020-10-13 20:16:22 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-11-26 09:07:10 +0100 |
commit | b2f4e18f63457d11a783db939729450ddbe9d594 (patch) | |
tree | e1f0e1f0acf47188f2233c00aaa710086af503c4 /sd | |
parent | 7ca0f29249eb11623c98efdc4fb6d0d7725ff10a (diff) |
Check render parameters for AutoSpellChecking
Conflicts:
sc/qa/unit/tiledrendering/tiledrendering.cxx
sw/qa/extras/tiledrendering/tiledrendering.cxx
Change-Id: Ife2551b4023461da26e70ac3de505adf9d7db1e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106602
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index c9bd05d737d4..7464635e5e4d 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -128,6 +128,7 @@ public: void testRegenerateDiagram(); void testLanguageAllText(); void testInsertDeletePageInvalidation(); + void testSpellOnlineRenderParameter(); CPPUNIT_TEST_SUITE(SdTiledRenderingTest); CPPUNIT_TEST(testCreateDestroy); @@ -180,6 +181,7 @@ public: CPPUNIT_TEST(testRegenerateDiagram); CPPUNIT_TEST(testLanguageAllText); CPPUNIT_TEST(testInsertDeletePageInvalidation); + CPPUNIT_TEST(testSpellOnlineRenderParameter); CPPUNIT_TEST_SUITE_END(); @@ -2461,6 +2463,20 @@ void SdTiledRenderingTest::testInsertDeletePageInvalidation() CPPUNIT_ASSERT_EQUAL(size_t(8), aView1.m_aInvalidations.size()); } +void SdTiledRenderingTest::testSpellOnlineRenderParameter() +{ + // Load the document. + SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp"); + bool bSet = pXImpressDocument->GetDoc()->GetOnlineSpell(); + + uno::Sequence<beans::PropertyValue> aPropertyValues = + { + comphelper::InitPropertySequence({ { ".uno:SpellOnline", uno::makeAny(!bSet) } }), + }; + pXImpressDocument->initializeForTiledRendering(aPropertyValues); + CPPUNIT_ASSERT_EQUAL(!bSet, pXImpressDocument->GetDoc()->GetOnlineSpell()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 314741f228cf..4160a8bdc3a6 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2443,6 +2443,8 @@ void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<cs pDrawView->SetPageShadowVisible(rValue.Value.get<bool>()); else if (rValue.Name == ".uno:Author" && rValue.Value.has<OUString>()) pDrawView->SetAuthor(rValue.Value.get<OUString>()); + else if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has<bool>()) + mpDoc->SetOnlineSpell(rValue.Value.get<bool>()); } // Disable comments if requested |