summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/test/sheet/xviewfreezable.hxx35
-rw-r--r--qadevOOo/Jar_OOoRunner.mk1
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTabViewObj.csv2
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XViewFreezable.java69
-rw-r--r--sc/qa/extras/sctabviewobj.cxx13
-rw-r--r--test/Library_subsequenttest.mk1
-rw-r--r--test/source/sheet/xviewfreezable.cxx33
7 files changed, 77 insertions, 77 deletions
diff --git a/include/test/sheet/xviewfreezable.hxx b/include/test/sheet/xviewfreezable.hxx
new file mode 100644
index 000000000000..da5b56febe41
--- /dev/null
+++ b/include/test/sheet/xviewfreezable.hxx
@@ -0,0 +1,35 @@
+/* -*- 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_XVIEWFREEZABLE_HXX
+#define INCLUDED_TEST_SHEET_XVIEWFREEZABLE_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <test/testdllapi.hxx>
+
+using namespace css;
+using namespace css::uno;
+
+namespace apitest {
+
+class OOO_DLLPUBLIC_TEST XViewFreezable
+{
+public:
+ virtual uno::Reference< uno::XInterface > init() = 0;
+ virtual ~XViewFreezable(){}
+
+ void testFreeze();
+};
+
+}
+
+#endif // INCLUDED_TEST_SHEET_XVIEWFREEZABLE_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 67511ce41228..dbf725e84c1f 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -647,7 +647,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/ifc/sheet/_XSubTotalDescriptor \
qadevOOo/tests/java/ifc/sheet/_XSubTotalField \
qadevOOo/tests/java/ifc/sheet/_XUniqueCellFormatRangesSupplier \
- qadevOOo/tests/java/ifc/sheet/_XViewFreezable \
qadevOOo/tests/java/ifc/style/_CharacterProperties \
qadevOOo/tests/java/ifc/style/_CharacterPropertiesAsian \
qadevOOo/tests/java/ifc/style/_CharacterPropertiesComplex \
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 3f082cec3a73..6a366ee450cc 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTabViewObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTabViewObj.csv
@@ -35,8 +35,6 @@
"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::XViewFreezable";"hasFrozenPanes()"
-"ScTabViewObj";"com::sun::star::sheet::XViewFreezable";"freezeAtPosition()"
"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/_XViewFreezable.java b/qadevOOo/tests/java/ifc/sheet/_XViewFreezable.java
deleted file mode 100644
index cedec0951a78..000000000000
--- a/qadevOOo/tests/java/ifc/sheet/_XViewFreezable.java
+++ /dev/null
@@ -1,69 +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 lib.MultiMethodTest;
-
-import com.sun.star.sheet.XViewFreezable;
-
-/**
-* Testing <code>com.sun.star.sheet.XViewFreezable</code>
-* interface methods :
-* <ul>
-* <li><code> hasFrozenPanes()</code></li>
-* <li><code> freezeAtPosition()</code></li>
-* </ul> <p>
-* @see com.sun.star.sheet.XViewFreezable
-*/
-public class _XViewFreezable extends MultiMethodTest {
-
- public XViewFreezable oObj = null;
-
- /**
- * Test calls the method. <p>
- * Has <b> OK </b> status if the method successfully returns. <p>
- */
- public void _freezeAtPosition() {
- oObj.freezeAtPosition(2, 2);
- tRes.tested("freezeAtPosition()", true);
- }
-
- /**
- * Test calls the method, checks returned value, unfreezes panes, calls the
- * method and checks returned value again. <p>
- * Has <b> OK </b> status if returned value is true after first call and
- * returned value is false after second. <p>
- * The following method tests are to be completed successfully before :
- * <ul>
- * <li> <code> freezeAtPosition() </code> : to freeze panes with the
- * specified number of columns and rows </li>
- * </ul>
- */
- public void _hasFrozenPanes() {
- requiredMethod("freezeAtPosition()");
- boolean result = oObj.hasFrozenPanes();
- oObj.freezeAtPosition(0,0);
- result &= !oObj.hasFrozenPanes();
- tRes.tested("hasFrozenPanes()", result);
- }
-
-
-} // finish class _XViewFreezable
-
-
diff --git a/sc/qa/extras/sctabviewobj.cxx b/sc/qa/extras/sctabviewobj.cxx
index 7b83d08037da..6badea0619b8 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/xviewfreezable.hxx>
#include <test/sheet/xviewsplitable.hxx>
#include <com/sun/star/lang/XComponent.hpp>
@@ -21,9 +22,9 @@ using namespace css::uno;
namespace sc_apitest {
-#define NUMBER_OF_TESTS 1
+#define NUMBER_OF_TESTS 2
-class ScTabViewObj : public CalcUnoApiTest, public apitest::XViewSplitable
+class ScTabViewObj : public CalcUnoApiTest, public apitest::XViewFreezable, public apitest::XViewSplitable
{
public:
ScTabViewObj();
@@ -33,6 +34,10 @@ public:
virtual void tearDown() override;
CPPUNIT_TEST_SUITE(ScTabViewObj);
+
+ // XViewFreezable
+ CPPUNIT_TEST(testFreeze);
+
// XViewSplitable
CPPUNIT_TEST(testSplit);
@@ -61,9 +66,7 @@ uno::Reference< uno::XInterface > ScTabViewObj::init()
CPPUNIT_ASSERT_MESSAGE("no calc document", xSheetDoc.is());
uno::Reference< frame::XModel > xModel(xSheetDoc, uno::UNO_QUERY_THROW);
- uno::Reference< sheet::XViewSplitable > xViewSplitable(xModel->getCurrentController(), uno::UNO_QUERY_THROW);
-
- return xViewSplitable;
+ return xModel->getCurrentController();
}
void ScTabViewObj::setUp()
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index e1c6c3c1f064..bc442ba621b9 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -68,6 +68,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/xstyleloader \
test/source/sheet/xusedareacursor \
test/source/sheet/xviewpane \
+ test/source/sheet/xviewfreezable \
test/source/sheet/xviewsplitable \
test/source/text/xtext \
test/source/text/xtextfield \
diff --git a/test/source/sheet/xviewfreezable.cxx b/test/source/sheet/xviewfreezable.cxx
new file mode 100644
index 000000000000..89b8d06099ff
--- /dev/null
+++ b/test/source/sheet/xviewfreezable.cxx
@@ -0,0 +1,33 @@
+/* -*- 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/xviewfreezable.hxx>
+
+#include <com/sun/star/sheet/XViewFreezable.hpp>
+
+#include "cppunit/extensions/HelperMacros.h"
+
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+
+namespace apitest {
+
+void XViewFreezable::testFreeze()
+{
+ uno::Reference< sheet::XViewFreezable > xViewFreezable(init(), UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT_MESSAGE("View has already frozen panes", !xViewFreezable->hasFrozenPanes());
+
+ xViewFreezable->freezeAtPosition(1,1);
+ CPPUNIT_ASSERT_MESSAGE("Unable to freeze pane", xViewFreezable->hasFrozenPanes());
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */