summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Carl <[email protected]>2018-01-09 03:57:02 +0000
committerJens Carl <[email protected]>2018-01-09 06:22:27 +0100
commit95307f2ca73480176634e5cc46d96a19b735e87b (patch)
tree99cf8fcba206a072183c81eaefea79d52a5e1cda
parentc29828daa32f3dee503e4db2b5b55d3d12f1fd39 (diff)
tdf#45904 Move _SpreadsheetViewSettings Java tests to C++
Change-Id: I68dcabd15b4b318a833a893b4de96c64ffd2a164 Reviewed-on: https://gerrit.libreoffice.org/47625 Tested-by: Jenkins <[email protected]> Reviewed-by: Jens Carl <[email protected]>
-rw-r--r--include/test/sheet/spreadsheetviewsettings.hxx34
-rw-r--r--qadevOOo/Jar_OOoRunner.mk1
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTabViewObj.csv20
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_SpreadsheetViewSettings.java66
-rw-r--r--sc/qa/extras/sctabviewobj.cxx14
-rw-r--r--test/Library_subsequenttest.mk1
-rw-r--r--test/source/sheet/spreadsheetviewsettings.cxx243
7 files changed, 288 insertions, 91 deletions
diff --git a/include/test/sheet/spreadsheetviewsettings.hxx b/include/test/sheet/spreadsheetviewsettings.hxx
new file mode 100644
index 000000000000..135c95e5d078
--- /dev/null
+++ b/include/test/sheet/spreadsheetviewsettings.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_SHEET_SPREADSHEETVIEWSETTINGS_HXX
+#define INCLUDED_TEST_SHEET_SPREADSHEETVIEWSETTINGS_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST SpreadsheetViewSettings
+{
+public:
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+ void testSpreadsheetViewSettingsProperties();
+
+protected:
+ ~SpreadsheetViewSettings() {}
+};
+}
+
+#endif // INCLUDED_TEST_SHEET_SPREADSHEETVIEWSETTINGS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 2e855eca6e1e..227ede99d893 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -575,7 +575,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/ifc/sheet/_Spreadsheet \
qadevOOo/tests/java/ifc/sheet/_SpreadsheetDocument \
qadevOOo/tests/java/ifc/sheet/_SpreadsheetDocumentSettings \
- qadevOOo/tests/java/ifc/sheet/_SpreadsheetViewSettings \
qadevOOo/tests/java/ifc/sheet/_TableAutoFormatField \
qadevOOo/tests/java/ifc/sheet/_XActivationBroadcaster \
qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange \
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTabViewObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTabViewObj.csv
index bd00af8e020d..e13c05bfda4e 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTabViewObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTabViewObj.csv
@@ -15,26 +15,6 @@
"ScTabViewObj";"com::sun::star::sheet::XCellRangeReferrer";"getReferredCells()"
"ScTabViewObj";"com::sun::star::container::XElementAccess";"getElementType()"
"ScTabViewObj";"com::sun::star::container::XElementAccess";"hasElements()"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ShowFormulas"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ShowZeroValues"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"IsValueHighlightingEnabled"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ShowNotes"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"HasVerticalScrollBar"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"HasHorizontalScrollBar"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"HasSheetTabs"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"IsOutlineSymbolsSet"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"HasColumnRowHeaders"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ShowGrid"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"GridColor"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ShowHelpLines"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ShowAnchor"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ShowPageBreaks"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ShowObjects"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ShowCharts"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ShowDrawing"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"HideSpellMarks"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ZoomType"
-"ScTabViewObj";"com::sun::star::sheet::SpreadsheetViewSettings";"ZoomValue"
"ScTabViewObj";"com::sun::star::sheet::XActivationBroadcaster#optional";"addActivationEventListener()"
"ScTabViewObj";"com::sun::star::sheet::XActivationBroadcaster#optional";"removeActivationEventListener()"
"ScTabViewObj";"com::sun::star::sheet::XRangeSelection";"startRangeSelection()"
diff --git a/qadevOOo/tests/java/ifc/sheet/_SpreadsheetViewSettings.java b/qadevOOo/tests/java/ifc/sheet/_SpreadsheetViewSettings.java
deleted file mode 100644
index 2e90a1f666c2..000000000000
--- a/qadevOOo/tests/java/ifc/sheet/_SpreadsheetViewSettings.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package ifc.sheet;
-
-import com.sun.star.view.DocumentZoomType;
-
-import lib.MultiPropertyTest;
-
-
-/**
-* Testing <code>com.sun.star.sheet.SpreadsheetViewSettings</code>
-* service properties :
-* <ul>
-* <li><code> ShowFormulas</code></li>
-* <li><code> ShowZeroValues</code></li>
-* <li><code> IsValueHighlightingEnabled</code></li>
-* <li><code> ShowNotes</code></li>
-* <li><code> HasVerticalScrollBar</code></li>
-* <li><code> HasHorizontalScrollBar</code></li>
-* <li><code> HasSheetTabs</code></li>
-* <li><code> IsOutlineSymbolsSet</code></li>
-* <li><code> HasColumnRowHeaders</code></li>
-* <li><code> ShowGrid</code></li>
-* <li><code> GridColor</code></li>
-* <li><code> ShowHelpLines</code></li>
-* <li><code> ShowAnchor</code></li>
-* <li><code> ShowPageBreaks</code></li>
-* <li><code> ShowObjects</code></li>
-* <li><code> ShowCharts</code></li>
-* <li><code> ShowDrawing</code></li>
-* <li><code> HideSpellMarks</code></li>
-* <li><code> ZoomType</code></li>
-* <li><code> ZoomValue</code></li>
-* </ul> <p>
-* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
-* @see com.sun.star.sheet.SpreadsheetViewSettings
-*/
-public class _SpreadsheetViewSettings extends MultiPropertyTest {
- public void _ZoomType() {
- testProperty("ZoomType", Short.valueOf(DocumentZoomType.PAGE_WIDTH),
- Short.valueOf(DocumentZoomType.BY_VALUE));
- }
-
- /**
- * Forces environment recreation.
- */
- @Override
- protected void after() {
- disposeEnvironment();
- }
-} // finish class _SpreadsheetViewSettings
diff --git a/sc/qa/extras/sctabviewobj.cxx b/sc/qa/extras/sctabviewobj.cxx
index fbcf21bd8f67..4a8cbfe2befb 100644
--- a/sc/qa/extras/sctabviewobj.cxx
+++ b/sc/qa/extras/sctabviewobj.cxx
@@ -8,6 +8,7 @@
*/
#include <test/calc_unoapi_test.hxx>
+#include <test/sheet/spreadsheetviewsettings.hxx>
#include <test/sheet/xspreadsheetview.hxx>
#include <test/sheet/xviewfreezable.hxx>
#include <test/sheet/xviewsplitable.hxx>
@@ -26,11 +27,13 @@ using namespace css::uno;
namespace sc_apitest {
-#define NUMBER_OF_TESTS 3
+#define NUMBER_OF_TESTS 4
-class ScTabViewObj : public CalcUnoApiTest, public apitest::XSpreadsheetView,
- public apitest::XViewFreezable,
- public apitest::XViewSplitable
+class ScTabViewObj : public CalcUnoApiTest,
+ public apitest::SpreadsheetViewSettings,
+ public apitest::XSpreadsheetView,
+ public apitest::XViewFreezable,
+ public apitest::XViewSplitable
{
public:
ScTabViewObj();
@@ -41,6 +44,9 @@ public:
CPPUNIT_TEST_SUITE(ScTabViewObj);
+ // SpreadsheetViewSettings
+ CPPUNIT_TEST(testSpreadsheetViewSettingsProperties);
+
// XSpreadsheetView
CPPUNIT_TEST(testGetSetActiveSheet);
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 9ad263fa411c..fd771e86495d 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/datapilotitem \
test/source/sheet/documentsettings \
test/source/sheet/scenario \
+ test/source/sheet/spreadsheetviewsettings \
test/source/sheet/subtotaldescriptor \
test/source/sheet/tableautoformat \
test/source/sheet/tablevalidation \
diff --git a/test/source/sheet/spreadsheetviewsettings.cxx b/test/source/sheet/spreadsheetviewsettings.cxx
new file mode 100644
index 000000000000..9fb5d274f0d2
--- /dev/null
+++ b/test/source/sheet/spreadsheetviewsettings.cxx
@@ -0,0 +1,243 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <test/sheet/spreadsheetviewsettings.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/util/Color.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+
+namespace apitest
+{
+void SpreadsheetViewSettings::testSpreadsheetViewSettingsProperties()
+{
+ uno::Reference<beans::XPropertySet> xSpreadsheetViewSettings(init(), UNO_QUERY_THROW);
+ OUString propName;
+ uno::Any aNewValue;
+
+ propName = "ShowFormulas";
+ bool aShowFormulas = true;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowFormulas);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue ShowFormulas", !aShowFormulas);
+
+ aNewValue <<= true;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowFormulas);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue ShowFormulas", aShowFormulas);
+
+ propName = "ShowZeroValues";
+ bool aShowZeroValues = false;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowZeroValues);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue ShowZeroValues", aShowZeroValues);
+
+ aNewValue <<= false;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowZeroValues);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue ShowZeroValues", !aShowZeroValues);
+
+ propName = "IsValueHighlightingEnabled";
+ bool aIsValueHighlightingEnabled = true;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName)
+ >>= aIsValueHighlightingEnabled);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue IsValueHighlightingEnabled",
+ !aIsValueHighlightingEnabled);
+
+ aNewValue <<= true;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName)
+ >>= aIsValueHighlightingEnabled);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue IsValueHighlightingEnabled",
+ aIsValueHighlightingEnabled);
+
+ propName = "ShowNotes";
+ bool aShowNotes = false;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowNotes);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue ShowNotes", aShowNotes);
+
+ aNewValue <<= false;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowNotes);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue ShowNotes", !aShowNotes);
+
+ propName = "HasVerticalScrollBar";
+ bool aHasVerticalScrollBar = false;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aHasVerticalScrollBar);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue HasVerticalScrollBar",
+ aHasVerticalScrollBar);
+
+ aNewValue <<= false;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aHasVerticalScrollBar);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue HasVerticalScrollBar",
+ !aHasVerticalScrollBar);
+
+ propName = "HasHorizontalScrollBar";
+ bool aHasHorizontalScrollBar = false;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName)
+ >>= aHasHorizontalScrollBar);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue HasHorizontalScrollBar",
+ aHasHorizontalScrollBar);
+
+ aNewValue <<= false;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName)
+ >>= aHasHorizontalScrollBar);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue HasHorizontalScrollBar",
+ !aHasHorizontalScrollBar);
+
+ propName = "HasSheetTabs";
+ bool aHasSheetTabs = false;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aHasSheetTabs);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue HasSheetTabs", aHasSheetTabs);
+
+ aNewValue <<= false;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aHasSheetTabs);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue HasSheetTabs", !aHasSheetTabs);
+
+ propName = "IsOutlineSymbolsSet";
+ bool aIsOutlineSymbolsSet = false;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aIsOutlineSymbolsSet);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue IsOutlineSymbolsSet", aIsOutlineSymbolsSet);
+
+ aNewValue <<= false;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aIsOutlineSymbolsSet);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue IsOutlineSymbolsSet",
+ !aIsOutlineSymbolsSet);
+
+ propName = "HasColumnRowHeaders";
+ bool aHasColumnRowHeaders = false;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aHasColumnRowHeaders);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue HasColumnRowHeaders", aHasColumnRowHeaders);
+
+ aNewValue <<= false;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aHasColumnRowHeaders);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue HasColumnRowHeaders",
+ !aHasColumnRowHeaders);
+
+ propName = "ShowGrid";
+ bool aShowGrid = false;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowGrid);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue ShowGrid", aShowGrid);
+
+ aNewValue <<= false;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowGrid);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue ShowGrid", !aShowGrid);
+
+ propName = "GridColor";
+ util::Color aGridColor;
+ xSpreadsheetViewSettings->getPropertyValue(propName) >>= aGridColor;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get PropertyValue GridColor", sal_Int32(12632256),
+ aGridColor);
+
+ aNewValue <<= sal_Int32(42);
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ xSpreadsheetViewSettings->getPropertyValue(propName) >>= aGridColor;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set PropertyValue GridColor", sal_Int32(42),
+ aGridColor);
+
+ propName = "ShowHelpLines";
+ bool aShowHelpLines = true;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowHelpLines);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue ShowHelpLines", !aShowHelpLines);
+
+ aNewValue <<= true;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowHelpLines);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue ShowHelpLines", aShowHelpLines);
+
+ propName = "ShowAnchor";
+ bool aShowAnchor = false;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowAnchor);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue ShowAnchor", aShowAnchor);
+
+ aNewValue <<= false;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowAnchor);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue ShowAnchor", !aShowAnchor);
+
+ propName = "ShowPageBreaks";
+ bool aShowPageBreaks = false;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowPageBreaks);
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue ShowPageBreaks", aShowPageBreaks);
+
+ aNewValue <<= false;
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowPageBreaks);
+ CPPUNIT_ASSERT_MESSAGE("Unable to set PropertyValue ShowPageBreaks", !aShowPageBreaks);
+
+ propName = "ShowObjects";
+ sal_Int16 aShowObjects = 42;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowObjects);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get PropertyValue ShowObjects", sal_Int16(0),
+ aShowObjects);
+
+ aNewValue <<= sal_Int16(1);
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowObjects);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set PropertyValue ShowObjects", sal_Int16(1),
+ aShowObjects);
+
+ propName = "ShowCharts";
+ sal_Int16 aShowCharts = 42;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowCharts);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get PropertyValue ShowCharts", sal_Int16(0),
+ aShowCharts);
+
+ aNewValue <<= sal_Int16(1);
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowCharts);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set PropertyValue ShowCharts", sal_Int16(1),
+ aShowCharts);
+
+ propName = "ShowDrawing";
+ sal_Int16 aShowDrawing = 42;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowDrawing);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get PropertyValue ShowDrawing", sal_Int16(0),
+ aShowDrawing);
+
+ aNewValue <<= sal_Int16(1);
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aShowDrawing);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set PropertyValue ShowDrawing", sal_Int16(1),
+ aShowDrawing);
+
+ propName = "ZoomType";
+ sal_Int16 aZoomType = 42;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aZoomType);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get PropertyValue ZoomType", sal_Int16(3), aZoomType);
+
+ aNewValue <<= sal_Int16(1);
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aZoomType);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set PropertyValue ZoomType", sal_Int16(1), aZoomType);
+
+ propName = "ZoomValue";
+ sal_Int16 aZoomValue = 42;
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aZoomValue);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get PropertyValue ZoomValue", sal_Int16(116),
+ aZoomValue);
+
+ aNewValue <<= sal_Int16(1);
+ xSpreadsheetViewSettings->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xSpreadsheetViewSettings->getPropertyValue(propName) >>= aZoomValue);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set PropertyValue ZoomValue", sal_Int16(1), aZoomValue);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */