summaryrefslogtreecommitdiff
path: root/svx/source/items/numfmtsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/items/numfmtsh.cxx')
-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