sd/qa/unit/tiledrendering/tiledrendering.cxx |    8 ++++----
 sd/source/ui/unoidl/unomodel.cxx             |    2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 589fb36b663cbd68afc26419629a4a95bd593a89
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Apr 17 11:38:00 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Apr 17 21:53:51 2024 +0200

    add Spell state to impress RenderState like we do for calc/writer
    
    Change-Id: I1adfef0fa7220d93b096fbe4b86d0c04b2e5547e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166099
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 8f0fd9cfc4ae..b15821f1329b 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2420,11 +2420,11 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testGetViewRenderState)
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     int nFirstViewId = SfxLokHelper::getView();
     ViewCallback aView1;
-    CPPUNIT_ASSERT_EQUAL(";Default"_ostr, 
pXImpressDocument->getViewRenderState());
+    CPPUNIT_ASSERT_EQUAL("S;Default"_ostr, 
pXImpressDocument->getViewRenderState());
     // Create a second view
     SfxLokHelper::createView();
     ViewCallback aView2;
-    CPPUNIT_ASSERT_EQUAL(";Default"_ostr, 
pXImpressDocument->getViewRenderState());
+    CPPUNIT_ASSERT_EQUAL("S;Default"_ostr, 
pXImpressDocument->getViewRenderState());
     // Set to dark scheme
     {
         uno::Sequence<beans::PropertyValue> aPropertyValues = 
comphelper::InitPropertySequence(
@@ -2434,10 +2434,10 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testGetViewRenderState)
         );
         dispatchCommand(mxComponent, ".uno:ChangeTheme", aPropertyValues);
     }
-    CPPUNIT_ASSERT_EQUAL(";Dark"_ostr, 
pXImpressDocument->getViewRenderState());
+    CPPUNIT_ASSERT_EQUAL("S;Dark"_ostr, 
pXImpressDocument->getViewRenderState());
     // Switch back to the first view, and check that the options string is the 
same
     SfxLokHelper::setView(nFirstViewId);
-    CPPUNIT_ASSERT_EQUAL(";Default"_ostr, 
pXImpressDocument->getViewRenderState());
+    CPPUNIT_ASSERT_EQUAL("S;Default"_ostr, 
pXImpressDocument->getViewRenderState());
 }
 
 // Helper function to get a tile to a bitmap and check the pixel color
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 6dbc5bd57a25..52a52177a401 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2352,6 +2352,8 @@ OString 
SdXImpressDocument::getViewRenderState(SfxViewShell* pViewShell)
     if (pView)
     {
         const SdViewOptions& pVOpt = pView->GetViewOptions();
+        if (mpDoc->GetOnlineSpell())
+            aState.append('S');
         aState.append(';');
 
         OString aThemeName = OUStringToOString(pVOpt.msColorSchemeName, 
RTL_TEXTENCODING_UTF8);

Reply via email to