summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2021-11-26 11:30:26 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-11-29 15:17:34 +0100
commit3529262802b77d7c5993d8184e69434b59a6bab2 (patch)
treeae844d4eed35bddf219e6386809e15420a377de4 /sc
parent5ece740b3672b4204231c995a31ae97c108e7c80 (diff)
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 <xiscofauli@libreoffice.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit f82f6a2714fbf7882eb1d77351574392ae8e4c27) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125888 Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126015
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/uitest/calc_tests/columns.py20
-rw-r--r--sc/qa/uitest/calc_tests/rows.py12
-rw-r--r--sc/source/ui/view/cellsh3.cxx8
3 files changed, 18 insertions, 22 deletions
diff --git a/sc/qa/uitest/calc_tests/columns.py b/sc/qa/uitest/calc_tests/columns.py
index 28649d07f3c2..a03ebda37ae2 100644
--- a/sc/qa/uitest/calc_tests/columns.py
+++ b/sc/qa/uitest/calc_tests/columns.py
@@ -46,7 +46,7 @@ class CalcColumns(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ColumnWidth")
xDialog = self.xUITest.getTopFocusWindow()
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")
xCancel = xDialog.getChild("cancel")
self.ui_test.close_dialog_through_button(xCancel)
@@ -79,7 +79,7 @@ class CalcColumns(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ColumnWidth")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -87,7 +87,7 @@ class CalcColumns(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ColumnWidth")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -126,7 +126,7 @@ class CalcColumns(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ColumnWidth")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -236,7 +236,7 @@ class CalcColumns(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ColumnWidth")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -244,7 +244,7 @@ class CalcColumns(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ColumnWidth")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -252,7 +252,7 @@ class CalcColumns(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ColumnWidth")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -260,7 +260,7 @@ class CalcColumns(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ColumnWidth")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -268,7 +268,7 @@ class CalcColumns(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ColumnWidth")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -276,7 +276,7 @@ class CalcColumns(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ColumnWidth")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
diff --git a/sc/qa/uitest/calc_tests/rows.py b/sc/qa/uitest/calc_tests/rows.py
index b5e40fa1e327..f1ee519ba09a 100644
--- a/sc/qa/uitest/calc_tests/rows.py
+++ b/sc/qa/uitest/calc_tests/rows.py
@@ -46,7 +46,7 @@ class CalcRows(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:RowHeight")
xDialog = self.xUITest.getTopFocusWindow()
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")
xCancel = xDialog.getChild("cancel")
self.ui_test.close_dialog_through_button(xCancel)
@@ -79,7 +79,7 @@ class CalcRows(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:RowHeight")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -87,7 +87,7 @@ class CalcRows(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:RowHeight")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -127,7 +127,7 @@ class CalcRows(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:RowHeight")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -214,7 +214,7 @@ class CalcRows(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:RowHeight")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
@@ -222,7 +222,7 @@ class CalcRows(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:RowHeight")
xDialog = self.xUITest.getTopFocusWindow()
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")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 0bf79d6d108b..e77475d499b0 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -699,9 +699,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 )
{
@@ -799,9 +797,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();