[Libreoffice-commits] core.git: sc/qa sc/source

2021-04-22 Thread Winston Min Tjong (via logerrit)
 sc/qa/uitest/calc_tests/columns.py |   20 ++--
 sc/qa/uitest/calc_tests/rows.py|   12 ++--
 sc/source/ui/view/cellsh3.cxx  |8 
 3 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit ad8edac43e73555bc2055514300c5b81a1bb04ea
Author: Winston Min Tjong 
AuthorDate: Thu Apr 8 14:55:00 2021 -0700
Commit: Ilmari Lauhakangas 
CommitDate: Thu Apr 22 18:23:32 2021 +0200

tdf#101217 Change row height and col width decimal places to 4

Bug 101217 - Setting the column width and height should not round
the values causing compounding errors
This patch fixes the problem caused by rounding errors by
increasing the number of decimal places for row height,
optimal row height, column width, and optimal column width to 4.

Change-Id: Iefb5ef09af3bd81d429cf17386c8b1a54e111957
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113824
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sc/qa/uitest/calc_tests/columns.py 
b/sc/qa/uitest/calc_tests/columns.py
index a03ebda37ae2..28649d07f3c2 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.00 cm")
+self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 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.00 cm")
+self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 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.00 cm")
+self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 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.00 cm")
+self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 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.00 cm")
+self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 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.00 cm")
+self.assertEqual(get_state_as_dict(xvalue)["Text"], "2.0003 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.00 cm")
+self.assertEqual(get_state_as_dict(xvalue)["Text"], "3.0004 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.00 cm")
+self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.0001 cm")
 xOK = xDialog.getChild("ok")
 self.ui_test.close_dialog_through_button(xOK)
 
@@ -268,7 +268,7 @@ class CalcColumns(UITestCase):
 

[Libreoffice-commits] core.git: sc/source

2021-03-16 Thread Winston Min Tjong (via logerrit)
 sc/source/ui/view/cellsh3.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 872ab577ccc4626f4720ae71cc298dca8e2968f4
Author: Winston Min Tjong 
AuthorDate: Mon Mar 1 21:32:08 2021 -0800
Commit: Ilmari Lauhakangas 
CommitDate: Tue Mar 16 15:49:52 2021 +0100

tdf#101217 Change row height and col width decimal places to 4

Bug 101217 - Setting the column width and height should not round
the values causing compounding errors
This patch fixes the problem caused by rounding errors by
increasing the number of decimal places for row height,
optimal row height, column width, and optimal column width to 4.
Modified:   sc/source/ui/view/cellsh3.cxx

Change-Id: I29d90b413e6f6f6e8b73d30ac47d644a69d15046
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111800
Reviewed-by: Heiko Tietze 
Tested-by: Ilmari Lauhakangas 

diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index c809c79fce60..433ce133997d 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -699,7 +699,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
 ScopedVclPtr 
pDlg(pFact->CreateScMetricInputDlg(
 pTabViewShell->GetFrameWeld(), "RowHeightDialog",
 nCurHeight, ScGlobal::nStdRowHeight,
-eMetric, 2, MAX_ROW_HEIGHT));
+eMetric, 4, MAX_ROW_HEIGHT));
 
 if ( pDlg->Execute() == RET_OK )
 {
@@ -736,7 +736,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 ScopedVclPtr 
pDlg(pFact->CreateScMetricInputDlg(
 pTabViewShell->GetFrameWeld(), 
"OptimalRowHeightDialog",
-ScGlobal::nLastRowHeightExtra, 0, eMetric, 1, 
MAX_EXTRA_HEIGHT));
+ScGlobal::nLastRowHeightExtra, 0, eMetric, 4, 
MAX_EXTRA_HEIGHT));
 if ( pDlg->Execute() == RET_OK )
 {
 tools::Long nVal = pDlg->GetInputValue();
@@ -797,7 +797,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 ScopedVclPtr 
pDlg(pFact->CreateScMetricInputDlg(
 pTabViewShell->GetFrameWeld(), "ColWidthDialog", 
nCurHeight,
-STD_COL_WIDTH, eMetric, 2, MAX_COL_WIDTH));
+STD_COL_WIDTH, eMetric, 4, MAX_COL_WIDTH));
 if ( pDlg->Execute() == RET_OK )
 {
 tools::Long nVal = pDlg->GetInputValue();
@@ -833,7 +833,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 ScopedVclPtr 
pDlg(pFact->CreateScMetricInputDlg(
 pTabViewShell->GetFrameWeld(), "OptimalColWidthDialog",
-ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, 
eMetric, 1, MAX_EXTRA_WIDTH));
+ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, 
eMetric, 4, MAX_EXTRA_WIDTH));
 if ( pDlg->Execute() == RET_OK )
 {
 tools::Long nVal = pDlg->GetInputValue();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits