sc/qa/uitest/calc_tests/columns.py | 20 ++++++++++---------- sc/qa/uitest/calc_tests/rows.py | 12 ++++++------ sc/qa/uitest/calc_tests9/tdf126673.py | 2 +- sc/source/ui/view/cellsh3.cxx | 8 ++------ 4 files changed, 19 insertions(+), 23 deletions(-)
New commits: commit d808f4f6df7fc987a918670c21162b21a0f8bd9f Author: Heiko Tietze <tietze.he...@gmail.com> AuthorDate: Fri Nov 26 11:30:26 2021 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Nov 26 18:25:43 2021 +0100 Reverts tdf#144247 tdf#101217 - 4 digits in row height/col width Reverts patch I29d90b413e6f6f6e8b73d30ac47d644a69d15046, ad8edac43e73555bc2055514300c5b81a1bb04ea and partially Ibdee348d84a8b96d8f698e7fc6db89eb24422f5d Change-Id: Iba5fd2d2a65d813c2d5ba85e66a7c3e07b726ca5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125871 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> (cherry picked from commit f82f6a2714fbf7882eb1d77351574392ae8e4c27) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125888 diff --git a/sc/qa/uitest/calc_tests/columns.py b/sc/qa/uitest/calc_tests/columns.py index dafd825c76c8..19033f86ea7e 100644 --- a/sc/qa/uitest/calc_tests/columns.py +++ b/sc/qa/uitest/calc_tests/columns.py @@ -42,7 +42,7 @@ class CalcColumns(UITestCase): #verify with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth", close_button="cancel") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") def test_column_width_two_columns(self): @@ -67,12 +67,12 @@ class CalcColumns(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C1"})) with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") def test_column_width_copy(self): @@ -103,7 +103,7 @@ class CalcColumns(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C1"})) with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") def test_column_hide_show(self): @@ -195,32 +195,32 @@ class CalcColumns(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C1"})) with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "D1"})) with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "2.0003 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "2.00 cm") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "E1"})) with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "3.0004 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "3.00 cm") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "F1"})) with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "G1"})) with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "2.0003 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "2.00 cm") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "H1"})) with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "3.0004 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "3.00 cm") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests/rows.py b/sc/qa/uitest/calc_tests/rows.py index 1e426623aaaa..4eeb9820ab5e 100644 --- a/sc/qa/uitest/calc_tests/rows.py +++ b/sc/qa/uitest/calc_tests/rows.py @@ -43,7 +43,7 @@ class CalcRows(UITestCase): #verify with self.ui_test.execute_dialog_through_command(".uno:RowHeight", close_button="cancel") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") def test_row_height_two_rows(self): @@ -68,12 +68,12 @@ class CalcRows(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) with self.ui_test.execute_dialog_through_command(".uno:RowHeight") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"})) with self.ui_test.execute_dialog_through_command(".uno:RowHeight") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") def test_tdf89140_row_height_copy(self): @@ -105,7 +105,7 @@ class CalcRows(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"})) with self.ui_test.execute_dialog_through_command(".uno:RowHeight") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") def test_row_hide_show(self): @@ -180,12 +180,12 @@ class CalcRows(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"})) with self.ui_test.execute_dialog_through_command(".uno:RowHeight") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A4"})) with self.ui_test.execute_dialog_through_command(".uno:RowHeight") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm") + self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests9/tdf126673.py b/sc/qa/uitest/calc_tests9/tdf126673.py index bcc2c49b69a0..e300942935e8 100644 --- a/sc/qa/uitest/calc_tests9/tdf126673.py +++ b/sc/qa/uitest/calc_tests9/tdf126673.py @@ -34,6 +34,6 @@ class tdf126673(UITestCase): #row height with self.ui_test.execute_dialog_through_command(".uno:RowHeight", close_button="cancel") as xDialog: xvalue = xDialog.getChild("value") - self.assertEqual("1.2365 cm", get_state_as_dict(xvalue)["Text"]) + self.assertEqual("1.24 cm", get_state_as_dict(xvalue)["Text"]) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index 5f4275fd8572..f24c06e9a0d2 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -690,9 +690,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) ScopedVclPtr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg( pTabViewShell->GetFrameWeld(), "RowHeightDialog", nCurHeight, ScGlobal::nStdRowHeight, - eMetric, - nCurHeight == ScGlobal::nStdRowHeight ? 2 : 4, //use 4 digits for user-defined values - MAX_ROW_HEIGHT)); + eMetric, 2, MAX_ROW_HEIGHT)); if ( pDlg->Execute() == RET_OK ) { @@ -790,9 +788,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); ScopedVclPtr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg( pTabViewShell->GetFrameWeld(), "ColWidthDialog", nCurHeight, - STD_COL_WIDTH, eMetric, - nCurHeight == STD_COL_WIDTH ? 2 : 4, //use 4 digits for user-defined values - MAX_COL_WIDTH)); + STD_COL_WIDTH, eMetric, 2, MAX_COL_WIDTH)); if ( pDlg->Execute() == RET_OK ) { tools::Long nVal = pDlg->GetInputValue();