summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <ooo@erack.de>2011-08-04 23:43:09 +0200
committerCaolán McNamara <caolanm@redhat.com>2011-08-05 12:13:40 +0100
commite6517372fbc8d298fdcbc1a4de148ed05469132b (patch)
treeebc88006aa6ec3922359570ada21b2925f8e37e6
parent0008ecd67c1c753c27a72fa5a08b93778572e719 (diff)
fdo#38956 related changes in split libs-core repository to support LCID changes
(cherry picked from commit 513e2e78a9bb0861064f73c17000afd75239c7a6)
-rw-r--r--svx/source/items/numfmtsh.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 837fdea456..9f7081703b 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -289,6 +289,20 @@ sal_Bool SvxNumberFormatShell::AddFormat( String& rFormat, xub_StrLen& rErrPos,
bInserted = pFormatter->PutEntry( rFormat, rErrPos,
nCurCategory, nAddKey,
eCurLanguage );
+ if (bInserted)
+ {
+ // May be sorted under a different locale if LCID was parsed.
+ const SvNumberformat* pEntry = pFormatter->GetEntry( nAddKey);
+ if (pEntry)
+ {
+ LanguageType nLang = pEntry->GetLanguage();
+ if (eCurLanguage != nLang)
+ {
+ // Current language's list would not show entry, adapt.
+ eCurLanguage = nLang;
+ }
+ }
+ }
}
if ( bInserted ) // eingefuegt