diff options
Diffstat (limited to 'sd/qa/unit/uiimpress.cxx')
-rw-r--r-- | sd/qa/unit/uiimpress.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index ce7a310bc289..738b09a3fd7d 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -275,6 +275,23 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillGradient) CPPUNIT_ASSERT_EQUAL(OUString("ff0000"), aGradient.GetStartColor().AsRGBHexString()); CPPUNIT_ASSERT_EQUAL(OUString("0000ff"), aGradient.GetEndColor().AsRGBHexString()); } + +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter) +{ + mxComponent = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/empty.fodp")); + auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); + bool bSet = pImpressDocument->GetDoc()->GetOnlineSpell(); + + uno::Sequence<beans::PropertyValue> params(comphelper::InitPropertySequence({{"Enable", uno::makeAny(!bSet)}})); + dispatchCommand(mxComponent, ".uno:SpellOnline", params); + CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell()); + + // set the same state as now and we don't expect any change (no-toggle) + params = comphelper::InitPropertySequence({{"Enable", uno::makeAny(!bSet)}}); + dispatchCommand(mxComponent, ".uno:SpellOnline", params); + CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |