summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-10-03 22:20:53 +0200
committerEike Rathke <erack@redhat.com>2022-10-04 02:01:16 +0200
commit85353c42de80e7492f5c80499e18375f942c75c9 (patch)
treef83e2d75cc707dd6f579f26dfd2fd66ac662cf5f
parente86d7b19760e47d2b1a707c2085ed56be2afa4ad (diff)
SvtLanguageTable::AddLanguageTag() unneeded return can be void
Change-Id: I048d38c90e0ca60d0de5defdb16c5411cfd161b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140929 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
-rw-r--r--include/svtools/langtab.hxx2
-rw-r--r--svtools/source/misc/langtab.cxx8
2 files changed, 4 insertions, 6 deletions
diff --git a/include/svtools/langtab.hxx b/include/svtools/langtab.hxx
index 2d71901c17f3..032832935a18 100644
--- a/include/svtools/langtab.hxx
+++ b/include/svtools/langtab.hxx
@@ -42,7 +42,7 @@ public:
/** Add a language tag to the table.
*/
- static sal_uInt32 AddLanguageTag( const LanguageTag& rLanguageTag );
+ static void AddLanguageTag( const LanguageTag& rLanguageTag );
};
// 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 00e676d149ef..c3f1da4705d3 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -59,10 +59,9 @@ public:
LanguageType GetType( std::u16string_view rStr ) const;
sal_uInt32 GetEntryCount() const;
LanguageType GetTypeAtIndex( sal_uInt32 nIndex ) const;
- sal_uInt32 AddItem(const OUString& rLanguage, const LanguageType eType)
+ void AddItem(const OUString& rLanguage, const LanguageType eType)
{
m_aStrings.emplace_back(rLanguage, eType);
- return m_aStrings.size();
}
LanguageType GetValue(sal_uInt32 nIndex) const
{
@@ -298,10 +297,9 @@ LanguageType SvtLanguageTable::GetLanguageTypeAtIndex( sal_uInt32 nIndex )
}
-sal_uInt32 SvtLanguageTable::AddLanguageTag( const LanguageTag& rLanguageTag )
+void SvtLanguageTable::AddLanguageTag( const LanguageTag& rLanguageTag )
{
- return theLanguageTable::get().AddItem( lcl_getDescription(rLanguageTag),
- rLanguageTag.getLanguageType());
+ theLanguageTable::get().AddItem( lcl_getDescription(rLanguageTag), rLanguageTag.getLanguageType());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */