diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-02-21 00:30:16 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-25 20:14:06 +0200 |
commit | 73629949c1d6245f7fad419b677cf92a49ffd18a (patch) | |
tree | 65b6fab1a7759b3f32cf355a1de868650870e743 /cui | |
parent | 3ac438cde11c4cbe32a1c09e9fe885a0b0accc2c (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.
Reviewed-on: https://gerrit.libreoffice.org/50066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit f00e891f3369f7b8c2532634d9ff4ab19da17c33)
Change-Id: I09a84a6bf33b17e0192b79b31af21ef14d7e9c63
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index af80bb565ef7..75dab248267c 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1041,14 +1041,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 ) { |