diff options
author | Eike Rathke <erack@redhat.com> | 2019-10-26 19:00:21 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2019-10-26 21:53:00 +0200 |
commit | f357831478ca063190eedeef12635117b8360277 (patch) | |
tree | 7ec58c14ac0d326845fd5c769dbb5cdef0c9b5e1 /sc/source/ui | |
parent | 4dfb22acfe30f9322ecc0ad9d01b17a3814c87a2 (diff) |
Resolves: tdf#128403 Use ScPatternAttr::GetNumberFormat()
... it does or will do the right thing.
See also https://bugs.documentfoundation.org/show_bug.cgi?id=117715#c12
Change-Id: I4ecaa6be8b2358d4ea4d84655cde74dce5319c2a
Reviewed-on: https://gerrit.libreoffice.org/81548
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/view/output2.cxx | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 6fbb00412663..41a9760cc450 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -454,15 +454,7 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt // number format sal_uLong nOld = nValueFormat; - const SfxPoolItem* pFormItem; - if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,true,&pFormItem) != SfxItemState::SET ) - pFormItem = &pPattern->GetItem(ATTR_VALUE_FORMAT); - const SfxPoolItem* pLangItem; - if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,true,&pLangItem) != SfxItemState::SET ) - pLangItem = &pPattern->GetItem(ATTR_LANGUAGE_FORMAT); - nValueFormat = pOutput->mpDoc->GetFormatTable()->GetFormatForLanguageIfBuiltIn( - static_cast<const SfxUInt32Item*>(pFormItem)->GetValue(), - static_cast<const SvxLanguageItem*>(pLangItem)->GetLanguage() ); + nValueFormat = pPattern->GetNumberFormat( pOutput->mpDoc->GetFormatTable(), pCondSet ); if (nValueFormat != nOld) maLastCell.clear(); // always reformat |