summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2020-10-13 20:16:22 +0300
committerJan Holesovsky <kendy@collabora.com>2020-10-19 09:51:03 +0200
commit5c5fa6597af973ebce48f983af8fdbb87789d03f (patch)
treed674e0bc91145407e8ed523814080ae1d603962c /sd
parent44b5084beb7380996b1eb9c7f946768834779b1c (diff)
Check render parameters for AutoSpellChecking
Change-Id: Ife2551b4023461da26e70ac3de505adf9d7db1e8 Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104274 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx16
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx2
2 files changed, 18 insertions, 0 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index d7c2719e105a..79163b0cea67 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -126,6 +126,7 @@ public:
void testRegenerateDiagram();
void testLanguageAllText();
void testInsertDeletePageInvalidation();
+ void testSpellOnlineRenderParameter();
CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
CPPUNIT_TEST(testCreateDestroy);
@@ -177,6 +178,7 @@ public:
CPPUNIT_TEST(testRegenerateDiagram);
CPPUNIT_TEST(testLanguageAllText);
CPPUNIT_TEST(testInsertDeletePageInvalidation);
+ CPPUNIT_TEST(testSpellOnlineRenderParameter);
CPPUNIT_TEST_SUITE_END();
@@ -2429,6 +2431,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 f02868f0ca83..17d07ec02cef 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2442,6 +2442,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