summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svtools/langtab.hxx7
-rw-r--r--svtools/source/misc/langtab.cxx6
-rw-r--r--unusedcode.easy1
3 files changed, 14 insertions, 0 deletions
diff --git a/include/svtools/langtab.hxx b/include/svtools/langtab.hxx
index 4503d38c634e..003487373271 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 f31ea289c398..b8eeec0ea4aa 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 646cb1eff4bf..ae0ce4b78071 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)