From a4dd8a2106215a2ece33d1b82e8725d68ae2630b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 27 Feb 2014 14:57:24 +0200 Subject: [PATCH] remove unused code from i18nlangtag/LanguageTag Specifically: LanguageTag::LanguageTag() LanguageTag::getRegion() const LanguageTag::reset(_rtl_Locale const&) Change-Id: I8822db6e1df7cd912e9ae82cb9d9f51370d4c583 --- .../source/languagetag/languagetag.cxx | 28 ------------------- include/i18nlangtag/languagetag.hxx | 16 ----------- unusedcode.easy | 3 -- 3 files changed, 47 deletions(-) diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index 721bb31c2c4a..6541c90fa45d 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -507,18 +507,6 @@ LanguageTag::LanguageTag( LanguageType nLanguage ) } -LanguageTag::LanguageTag() - : - mnLangID( LANGUAGE_DONTKNOW), - mbSystemLocale( false), - mbInitializedBcp47( false), - mbInitializedLocale( false), - mbInitializedLangID( true), - mbIsFallback( false) -{ -} - - LanguageTag::LanguageTag( const OUString& rBcp47, const OUString& rLanguage, const OUString& rScript, const OUString& rCountry ) : @@ -1067,14 +1055,6 @@ LanguageTag & LanguageTag::reset( LanguageType nLanguage ) } -LanguageTag & LanguageTag::reset( const rtl_Locale & rLocale ) -{ - reset( lang::Locale( rLocale.Language, rLocale.Country, rLocale.Variant)); - convertFromRtlLocale(); - return *this; -} - - bool LanguageTagImpl::canonicalize() { #ifdef erDEBUG @@ -1889,14 +1869,6 @@ OUString LanguageTagImpl::getRegion() const } -OUString LanguageTag::getRegion() const -{ - OUString aRet( getImpl()->getRegion()); - const_cast(this)->syncFromImpl(); - return aRet; -} - - OUString LanguageTagImpl::getVariants() const { if (!mbCachedVariants) diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx index d646127de8c6..dcb95c61d911 100644 --- a/include/i18nlangtag/languagetag.hxx +++ b/include/i18nlangtag/languagetag.hxx @@ -76,12 +76,6 @@ public: /** Init LanguageTag with LanguageType MS-LangID. */ explicit LanguageTag( LanguageType nLanguage ); - /** Default ctor, init LanguageTag with LanguageType LANGUAGE_DONTKNOW. - - To be able to use LanguageTag in maps etc., avoid otherwise. - */ - explicit LanguageTag(); - /** Init LanguageTag with either BCP 47 language tag (precedence if not empty), or a combination of language, script and country. @@ -181,13 +175,6 @@ public: */ OUString getCountry() const; - /** Get BCP 47 region tag, which may be an ISO 3166 country alpha code or - any other BCP 47 region tag. - - Always resolves an empty tag to the system locale. - */ - OUString getRegion() const; - /** Get BCP 47 variant subtags, of the IANA Language Subtag Registry. If there are multiple variant subtags they are separated by '-'. @@ -258,9 +245,6 @@ public: /** Reset with LanguageType MS-LangID. */ LanguageTag & reset( LanguageType nLanguage ); - /** Reset with rtl_Locale. */ - LanguageTag & reset( const rtl_Locale & rLocale ); - /** Fall back to a known locale. diff --git a/unusedcode.easy b/unusedcode.easy index a97ed0948694..3095aae4734c 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -30,9 +30,6 @@ ImportExcel::GetLastFormula(short) Json::Json(std::map, std::allocator >, Json, std::less, std::allocator > >, std::allocator, std::allocator > const, Json> > > const&) Json::Json(std::map, std::allocator >, boost::shared_ptr, std::less, std::allocator > >, std::allocator, std::allocator > const, boost::shared_ptr > > > const&) Json::swap(Json&) -LanguageTag::LanguageTag() -LanguageTag::getRegion() const -LanguageTag::reset(_rtl_Locale const&) ListBox::GetMRUCount() const MenuBar::AddMenuBarButton(Image const&, Link const&, rtl::OUString const&, unsigned short) MenuBar::GetMenuBarButtonRectPixel(unsigned short)