diff options
author | Eike Rathke <erack@redhat.com> | 2019-01-16 17:40:18 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2019-01-16 20:25:49 +0100 |
commit | c9d19b70c93b02e5c666414097e835039c598731 (patch) | |
tree | a0acf9417a06ef14c4bc0df3734bb385c040a166 /cui | |
parent | 7b7cc20d83f48a0d114f3e726c9d5710aabc1a4c (diff) |
Resolves: tdf#122509 we have a second list with generated currency formats
... which kicks in if SvxNumberFormatShell::FindEntry() determined
a format index of NUMBERFORMAT_ENTRY_NEW_CURRENCY instead of a
real existing index.
Regression from
commit e607f1da329a2d4dd91904053d7ff86ac05c77bf
CommitDate: Thu Oct 4 15:02:13 2018 +0200
Select the current format if multiple instead of first matching format code
The old (now removed as unused)
SvxNumberFormatShell::GetListPos4Entry(const OUString&)
used before took care of that, add the functionality back but
combine into the existing GetListPos4Entry() function, the
additional FindEntry() call wasn't necessary anyway because it was
just called before in the caller.
The actual crash happened elsewhere in
SvNumberFormatter::GenerateFormat() because no format exists for
the then determined entry, which should be changed independently
to prevent such abuses.
Change-Id: Id42efa152693119fbde82b234f367679f818cfab
Reviewed-on: https://gerrit.libreoffice.org/66472
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 8214ac4f6874..7e8dfe6e0bba 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -1504,7 +1504,7 @@ void SvxNumberFormatTabPage::EditHdl_Impl(const weld::Entry* pEdFormat) if (nTmpCurPos != sal_uInt16(-1)) set_active_currency(nTmpCurPos); } - short nPosi=pNumFmtShell->GetListPos4Entry( nCurKey); + short nPosi=pNumFmtShell->GetListPos4Entry( nCurKey, aFormat); if(nPosi>=0) m_xLbFormat->select(static_cast<sal_uInt16>(nPosi)); |