summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-04-17 11:38:00 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-04-17 21:53:51 +0200
commit589fb36b663cbd68afc26419629a4a95bd593a89 (patch)
tree5e1b52f1cba505da1e8e3b0b6e22a2f46179cc92 /sd
parent58de3a5f1cd80cfff0c7e8db326a66d34501e09b (diff)
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.mcnamara@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx8
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx2
2 files changed, 6 insertions, 4 deletions
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);