summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/uitest/calc_tests2/tdf37623.py31
-rw-r--r--sc/qa/uitest/data/tdf37623.odsbin7281 -> 0 bytes
-rw-r--r--sc/qa/unit/uicalc/uicalc.cxx30
3 files changed, 30 insertions, 31 deletions
diff --git a/sc/qa/uitest/calc_tests2/tdf37623.py b/sc/qa/uitest/calc_tests2/tdf37623.py
deleted file mode 100644
index d38b3afacb64..000000000000
--- a/sc/qa/uitest/calc_tests2/tdf37623.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# 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/.
-#
-from uitest.framework import UITestCase
-from uitest.uihelper.common import get_url_for_data_file
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-class tdf37623(UITestCase):
-
- def test_tdf37623_autofill_rows_hidden(self):
- with self.ui_test.load_file(get_url_for_data_file("tdf37623.ods")) as calc_doc:
- xCalcDoc = self.xUITest.getTopFocusWindow()
- gridwin = xCalcDoc.getChild("grid_window")
- gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A2:A6"}))
- with self.ui_test.execute_dialog_through_command(".uno:FillSeries") as xDialog:
- xautofill = xDialog.getChild("autofill")
- xautofill.executeAction("CLICK", tuple())
-
- self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 1)
- self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getValue(), 0)
- self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getValue(), 0)
- self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getValue(), 2)
- self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 5).getValue(), 3)
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf37623.ods b/sc/qa/uitest/data/tdf37623.ods
deleted file mode 100644
index 68100bbee8b5..000000000000
--- a/sc/qa/uitest/data/tdf37623.ods
+++ /dev/null
Binary files differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 4ba8aaa040cb..41397c17c26a 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -265,6 +265,36 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf63805)
CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 1, 0)));
}
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf37623)
+{
+ mxComponent = loadFromDesktop("private:factory/scalc");
+ ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
+ CPPUNIT_ASSERT(pModelObj);
+ ScDocument* pDoc = pModelObj->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+
+ goToCell("A3:A4");
+
+ dispatchCommand(mxComponent, ".uno:HideRow", {});
+
+ insertStringToCell(*pModelObj, "A2", "1");
+
+ goToCell("A2:A6");
+
+ uno::Sequence<beans::PropertyValue> aArgs(
+ comphelper::InitPropertySequence({ { "FillDir", uno::Any(OUString("B")) },
+ { "FillCmd", uno::Any(OUString("A")) },
+ { "FillStep", uno::Any(OUString("1")) },
+ { "FillDateCmd", uno::Any(OUString("M")) } }));
+ dispatchCommand(mxComponent, ".uno:FillSeries", aArgs);
+
+ CPPUNIT_ASSERT_EQUAL(1.0, pDoc->GetValue(ScAddress(0, 1, 0)));
+ CPPUNIT_ASSERT_EQUAL(0.0, pDoc->GetValue(ScAddress(0, 2, 0)));
+ CPPUNIT_ASSERT_EQUAL(0.0, pDoc->GetValue(ScAddress(0, 3, 0)));
+ CPPUNIT_ASSERT_EQUAL(2.0, pDoc->GetValue(ScAddress(0, 4, 0)));
+ CPPUNIT_ASSERT_EQUAL(3.0, pDoc->GetValue(ScAddress(0, 5, 0)));
+}
+
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf144308)
{
mxComponent = loadFromDesktop("private:factory/scalc");