summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2021-10-19 10:40:41 +0200
committerCaolán McNamara <caolanm@redhat.com>2021-11-18 12:16:15 +0100
commitb9a3b141d09450a94d601d60f139d17b2ae07040 (patch)
treeb53d228cd1948fbbdc4aa12b044d03a2b3397055
parentResolves: tdf#145645 pivot table popups don't dismiss when item activated (diff)
downloadcore-b9a3b141d09450a94d601d60f139d17b2ae07040.tar.gz
core-b9a3b141d09450a94d601d60f139d17b2ae07040.zip
Resolves tdf#144247 - Change display precision of row height / column width
Use 2 digits by default but 4 in case of user-defined values for row height and column width. This partially reverts ad8edac43e73555bc2055514300c5b81a1bb04ea as the optimal width is back to 2 digits Change-Id: I4cb53071783c76d9fbea0cc2feaa0b860c73c647 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123802 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit e396017b598e6ef161e71f18638b4d94cd92e6ee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125349 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit c6fb8ffc6a35d94002a2c5b5b36c228c161cde85) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125358 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/ui/view/cellsh3.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index b98440d9e552..0bf79d6d108b 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -699,7 +699,9 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScopedVclPtr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
pTabViewShell->GetFrameWeld(), "RowHeightDialog",
nCurHeight, ScGlobal::nStdRowHeight,
- eMetric, 4, MAX_ROW_HEIGHT));
+ eMetric,
+ nCurHeight == ScGlobal::nStdRowHeight ? 2 : 4, //use 4 digits for user-defined values
+ MAX_ROW_HEIGHT));
if ( pDlg->Execute() == RET_OK )
{
@@ -736,7 +738,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
ScopedVclPtr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
pTabViewShell->GetFrameWeld(), "OptimalRowHeightDialog",
- ScGlobal::nLastRowHeightExtra, 0, eMetric, 4, MAX_EXTRA_HEIGHT));
+ ScGlobal::nLastRowHeightExtra, 0, eMetric, 2, MAX_EXTRA_HEIGHT));
if ( pDlg->Execute() == RET_OK )
{
tools::Long nVal = pDlg->GetInputValue();
@@ -797,7 +799,9 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
ScopedVclPtr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
pTabViewShell->GetFrameWeld(), "ColWidthDialog", nCurHeight,
- STD_COL_WIDTH, eMetric, 4, MAX_COL_WIDTH));
+ STD_COL_WIDTH, eMetric,
+ nCurHeight == STD_COL_WIDTH ? 2 : 4, //use 4 digits for user-defined values
+ MAX_COL_WIDTH));
if ( pDlg->Execute() == RET_OK )
{
tools::Long nVal = pDlg->GetInputValue();
@@ -833,7 +837,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
ScopedVclPtr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
pTabViewShell->GetFrameWeld(), "OptimalColWidthDialog",
- ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, eMetric, 4, MAX_EXTRA_WIDTH));
+ ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, eMetric, 2, MAX_EXTRA_WIDTH));
if ( pDlg->Execute() == RET_OK )
{
tools::Long nVal = pDlg->GetInputValue();