diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-28 23:58:40 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-29 03:54:26 +0100 |
commit | 8810812e58f1b014d3156235c1ab5a2d6c73c828 (patch) | |
tree | 14d7af8f7c402331e96b10b801fe9e6713b26a86 /test/source | |
parent | b2c56ac95b15b675b9fabed889e7f9709bdc793f (diff) |
tdf#132145: Synchronize ScAppCfg with configuration
Change-Id: Iadf5ff86d043f63355fd30816a9e2011479465c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125990
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'test/source')
-rw-r--r-- | test/source/sheet/globalsheetsettings.cxx | 49 |
1 files changed, 13 insertions, 36 deletions
diff --git a/test/source/sheet/globalsheetsettings.cxx b/test/source/sheet/globalsheetsettings.cxx index b707a770f921..c1e527158794 100644 --- a/test/source/sheet/globalsheetsettings.cxx +++ b/test/source/sheet/globalsheetsettings.cxx @@ -83,18 +83,21 @@ void GlobalSheetSettings::testGlobalSheetSettingsProperties() DoCheck("UsePrinterMetrics", false, true, node, "UsePrinterMetrics"); DoCheck("ReplaceCellsWarning", true, false, node, "ReplaceCellsWarning"); - OUString propName; - uno::Any aNewValue; + node = "/org.openoffice.Office.Calc/Layout/Other/MeasureUnit"; + DoCheck("Metric", sal_Int16(8), sal_Int16(1), node, "NonMetric"); // Test uses en-US locale - propName = "Metric"; - sal_Int16 aMetric = 42; - CPPUNIT_ASSERT(xGlobalSheetSettings->getPropertyValue(propName) >>= aMetric); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get PropertyValue Metric", sal_Int16(8), aMetric); + node = "/org.openoffice.Office.Calc/Input"; + DoCheck("DoAutoComplete", true, false, node, "AutoInput"); - aNewValue <<= sal_Int16(1); - xGlobalSheetSettings->setPropertyValue(propName, aNewValue); - CPPUNIT_ASSERT(xGlobalSheetSettings->getPropertyValue(propName) >>= aMetric); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set PropertyValue Metric", sal_Int16(1), aMetric); + node = "/org.openoffice.Office.Calc/Content/Update"; + DoCheck("LinkUpdateMode", sal_Int16(2), sal_Int16(1), node, "Link"); + + node = "/org.openoffice.Office.Calc/Print/"; + DoCheck("PrintAllSheets", false, true, node + "Other", "AllSheets"); + DoCheck("PrintEmptyPages", false, true, node + "Page", "EmptyPages"); + + OUString propName; + uno::Any aNewValue; propName = "Scale"; sal_Int16 aScale = 42; @@ -106,16 +109,6 @@ void GlobalSheetSettings::testGlobalSheetSettingsProperties() CPPUNIT_ASSERT(xGlobalSheetSettings->getPropertyValue(propName) >>= aScale); CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set PropertyValue Scale", sal_Int16(-1), aScale); - propName = "DoAutoComplete"; - bool aDoAutoComplete = false; - CPPUNIT_ASSERT(xGlobalSheetSettings->getPropertyValue(propName) >>= aDoAutoComplete); - CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue DoAutoComplete", aDoAutoComplete); - - aNewValue <<= false; - xGlobalSheetSettings->setPropertyValue(propName, aNewValue); - CPPUNIT_ASSERT(xGlobalSheetSettings->getPropertyValue(propName) >>= aDoAutoComplete); - CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue DoAutoComplete", !aDoAutoComplete); - propName = "StatusBarFunction"; sal_Int16 aStatusBarFunction = 42; CPPUNIT_ASSERT(xGlobalSheetSettings->getPropertyValue(propName) >>= aStatusBarFunction); @@ -151,22 +144,6 @@ void GlobalSheetSettings::testGlobalSheetSettingsProperties() xGlobalSheetSettings->setPropertyValue(propName, aNewValue); CPPUNIT_ASSERT(xGlobalSheetSettings->getPropertyValue(propName) >>= aUserLists); CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue UserLists", !aUserLists.hasElements()); - - propName = "LinkUpdateMode"; - sal_Int16 aLinkUpdateMode = 42; - CPPUNIT_ASSERT(xGlobalSheetSettings->getPropertyValue(propName) >>= aLinkUpdateMode); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get PropertyValue LinkUpdateMode", sal_Int16(2), - aLinkUpdateMode); - - aNewValue <<= sal_Int16(1); - xGlobalSheetSettings->setPropertyValue(propName, aNewValue); - CPPUNIT_ASSERT(xGlobalSheetSettings->getPropertyValue(propName) >>= aLinkUpdateMode); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set PropertyValue LinkUpdateMode", sal_Int16(1), - aLinkUpdateMode); - - node = "/org.openoffice.Office.Calc/Print/"; - DoCheck("PrintAllSheets", false, true, node + "Other", "AllSheets"); - DoCheck("PrintEmptyPages", false, true, node + "Page", "EmptyPages"); } } |