[Libreoffice-commits] .: Branch 'libreoffice-3-4' - svx/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Aug 5 04:19:09 PDT 2011


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

New commits:
commit e6517372fbc8d298fdcbc1a4de148ed05469132b
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
    (cherry picked from commit 513e2e78a9bb0861064f73c17000afd75239c7a6)

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