[Libreoffice-commits] .: svx/source

Eike Rathke erack at kemper.freedesktop.org
Fri Aug 5 03:37:56 PDT 2011


 svx/source/items/numfmtsh.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 513e2e78a9bb0861064f73c17000afd75239c7a6
Author: Eike Rathke <ooo at erack.de>
Date:   Thu Aug 4 23:43:09 2011 +0200

    fdo#38956 related changes in split libs-core repository to support LCID changes

diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 837fdea..9f70817 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


More information about the Libreoffice-commits mailing list