summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-02-21 00:30:16 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-02-21 08:11:23 +0100
commitf00e891f3369f7b8c2532634d9ff4ab19da17c33 (patch)
tree752901b046836b0aab906cd7966a178636bf290e /cui
parentba8a70365ef459c967cd8a71a6d48ca53dd341bd (diff)
tdf#115892: properly get the box' saved value
Previously textual value like "10,5 pt" was converted to int as simply 10 (multiplied by 10, it became 100), which compared as different from unchanged value of 105. This made the fractional values to be treated as always changed. This patch uses the same code to convert saved value as is used for current edit box value. Change-Id: I09a84a6bf33b17e0192b79b31af21ef14d7e9c63 Reviewed-on: https://gerrit.libreoffice.org/50066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/chardlg.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 1e641d05c688..cc34b315dd08 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1040,14 +1040,8 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
if ( pSizeBox->GetText().isEmpty() ) // GetValue() returns the min-value
nSize = 0;
- long nSavedSize = pSizeBox->GetSavedValue().toInt32();
- bool bRel = true;
-
- if ( !pSizeBox->IsRelative() )
- {
- nSavedSize *= 10;
- bRel = false;
- }
+ long nSavedSize = static_cast<long>(pSizeBox->GetSavedIntValue());
+ const bool bRel = pSizeBox->IsRelative();
switch ( eLangGrp )
{