[Libreoffice-commits] core.git: 2 commits - include/svtools svtools/source

Eike Rathke erack at redhat.com
Tue May 13 03:04:56 PDT 2014


 include/svtools/langtab.hxx     |    7 +++++++
 svtools/source/misc/langtab.cxx |    6 ++++++
 2 files changed, 13 insertions(+)

New commits:
commit d0787149cf25377bad97ab503f81a5c0793bbad7
Author: Eike Rathke <erack at redhat.com>
Date:   Tue May 13 12:03:53 2014 +0200

    remove SvtLanguageTable::AddLanguageTag from this list
    
    ... I'm about to use.
    
    Change-Id: I4f665e14d0d2161085760a6b31f642e0a8a8345b

diff --git a/unusedcode.easy b/unusedcode.easy
index ae0ce4b..646cb1e 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -68,7 +68,6 @@ StyleSettings::SetTitleHeight(long)
 StyleSettings::SetUseFlatBorders(bool)
 StyleSettings::SetUseFlatMenus(bool)
 SvpSalInstance::PostedEventsInQueue()
-SvtLanguageTable::AddLanguageTag(LanguageTag const&, rtl::OUString const&)
 SvtListener::IsListening(SvtBroadcaster&) const
 SvxDummyShapeContainer::SvxDummyShapeContainer(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes>)
 SvxNumberFormatShell::IsAdded_Impl(unsigned long)
commit 213e429cfb48510650308975d4adca6ab9aee4f4
Author: Eike Rathke <erack at redhat.com>
Date:   Tue May 13 12:02:42 2014 +0200

    Revert "remove unused code -SvtLanguageTable::AddLanguageTag"
    
    This reverts commit d812b784313ed85ae5085d54a3ae50aa064c053c.
    
    I added that code in preparation of changes I'm doing.

diff --git a/include/svtools/langtab.hxx b/include/svtools/langtab.hxx
index 4503d38..0034873 100644
--- a/include/svtools/langtab.hxx
+++ b/include/svtools/langtab.hxx
@@ -43,6 +43,13 @@ public:
      */
     static OUString     GetLanguageString( const LanguageType eType, bool bUserInterfaceSelection );
 
+    /** Add a language tag to the table.
+
+        @param  rString
+                UI visible description string. If empty, the rLanguageTag Bcp47
+                string is used instead.
+     */
+    static sal_uInt32   AddLanguageTag( const LanguageTag& rLanguageTag, const OUString& rString );
 };
 
 // Add LRE or RLE embedding characters to the string based on the
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index f31ea28..b8eeec0 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -233,4 +233,10 @@ LanguageType SvtLanguageTable::GetLanguageTypeAtIndex( sal_uInt32 nIndex )
 }
 
 
+sal_uInt32 SvtLanguageTable::AddLanguageTag( const LanguageTag& rLanguageTag, const OUString& rString )
+{
+    return theLanguageTable::get().AddItem( (rString.isEmpty() ? rLanguageTag.getBcp47() : rString),
+            rLanguageTag.getLanguageType());
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index 646cb1e..ae0ce4b 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -68,6 +68,7 @@ StyleSettings::SetTitleHeight(long)
 StyleSettings::SetUseFlatBorders(bool)
 StyleSettings::SetUseFlatMenus(bool)
 SvpSalInstance::PostedEventsInQueue()
+SvtLanguageTable::AddLanguageTag(LanguageTag const&, rtl::OUString const&)
 SvtListener::IsListening(SvtBroadcaster&) const
 SvxDummyShapeContainer::SvxDummyShapeContainer(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes>)
 SvxNumberFormatShell::IsAdded_Impl(unsigned long)


More information about the Libreoffice-commits mailing list