include/svtools/langtab.hxx | 19 ++----------------- svtools/source/misc/langtab.cxx | 28 +++++++++++++++++++++------- 2 files changed, 23 insertions(+), 24 deletions(-)
New commits: commit d80490e938ec0fcc876879a09062fccca321998e Author: Eike Rathke <er...@redhat.com> Date: Tue May 6 19:55:49 2014 +0100 move ResArray into SvtLanguageTableImpl Change-Id: I0921fcef306f1ca60196fc9dfa2652e91db63004 diff --git a/include/svtools/langtab.hxx b/include/svtools/langtab.hxx index e19aa75..14b506b 100644 --- a/include/svtools/langtab.hxx +++ b/include/svtools/langtab.hxx @@ -19,20 +19,13 @@ #ifndef INCLUDED_SVTOOLS_LANGTAB_HXX #define INCLUDED_SVTOOLS_LANGTAB_HXX - -#include <tools/resary.hxx> #include <i18nlangtag/lang.h> +#include <rtl/ustring.hxx> #include <svtools/svtdllapi.h> - -// class SvtLanguageTable - - -class SVT_DLLPUBLIC SvtLanguageTable : public ResStringArray +class SVT_DLLPUBLIC SvtLanguageTable { public: - SvtLanguageTable(); - ~SvtLanguageTable(); static OUString GetLanguageString( const LanguageType eType ); static LanguageType GetLanguageType( const OUString& rStr ); @@ -47,14 +40,6 @@ public: parameter. */ static OUString GetLanguageString( const LanguageType eType, bool bUserInterfaceSelection ); - -private: - - const OUString GetString( const LanguageType eType, bool bUserInterfaceSelection = false ) const; - LanguageType GetType( const OUString& rStr ) const; - sal_uInt32 GetEntryCount() const; - LanguageType GetTypeAtIndex( sal_uInt32 nIndex ) const; - }; // 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 2cd2994..08d50bd 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -31,12 +31,26 @@ #include <svtools/svtresid.hxx> #include <svtools/langtab.hxx> #include <unotools/syslocale.hxx> +#include <tools/resary.hxx> using namespace ::com::sun::star; +class SvtLanguageTableImpl : public ResStringArray +{ +public: + + SvtLanguageTableImpl(); + virtual ~SvtLanguageTableImpl(); + + const OUString GetString( const LanguageType eType, bool bUserInterfaceSelection = false ) const; + LanguageType GetType( const OUString& rStr ) const; + sal_uInt32 GetEntryCount() const; + LanguageType GetTypeAtIndex( sal_uInt32 nIndex ) const; +}; + namespace { -struct theLanguageTable : public rtl::Static< SvtLanguageTable, theLanguageTable > {}; +struct theLanguageTable : public rtl::Static< SvtLanguageTableImpl, theLanguageTable > {}; } SVT_DLLPUBLIC const OUString ApplyLreOrRleEmbedding( const OUString &rText ) @@ -122,20 +136,20 @@ namespace { // "The value of STR_ARR_SVT_LANGUAGE_TABLE has changed. wizards/com/sun/star/wizards/letter/LocaleCodes.java has this value hard coded, please adapt it to your change." } -SvtLanguageTable::SvtLanguageTable() : +SvtLanguageTableImpl::SvtLanguageTableImpl() : ResStringArray( SvtResId( STR_ARR_SVT_LANGUAGE_TABLE ) ) { } -SvtLanguageTable::~SvtLanguageTable() +SvtLanguageTableImpl::~SvtLanguageTableImpl() { } -const OUString SvtLanguageTable::GetString( const LanguageType eType, bool bUserInterfaceSelection ) const +const OUString SvtLanguageTableImpl::GetString( const LanguageType eType, bool bUserInterfaceSelection ) const { LanguageType eLang = MsLangId::getReplacementForObsoleteLanguage( eType, bUserInterfaceSelection); sal_uInt32 nPos = FindIndex( eLang ); @@ -164,7 +178,7 @@ OUString SvtLanguageTable::GetLanguageString( const LanguageType eType, bool bUs -LanguageType SvtLanguageTable::GetType( const OUString& rStr ) const +LanguageType SvtLanguageTableImpl::GetType( const OUString& rStr ) const { LanguageType eType = LANGUAGE_DONTKNOW; sal_uInt32 nCount = Count(); @@ -187,7 +201,7 @@ LanguageType SvtLanguageTable::GetLanguageType( const OUString& rStr ) -sal_uInt32 SvtLanguageTable::GetEntryCount() const +sal_uInt32 SvtLanguageTableImpl::GetEntryCount() const { return Count(); } @@ -199,7 +213,7 @@ sal_uInt32 SvtLanguageTable::GetLanguageEntryCount() -LanguageType SvtLanguageTable::GetTypeAtIndex( sal_uInt32 nIndex ) const +LanguageType SvtLanguageTableImpl::GetTypeAtIndex( sal_uInt32 nIndex ) const { LanguageType nType = LANGUAGE_DONTKNOW; if (nIndex < Count()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits