Kaydet (Commit) 06eb767c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Turn LanguageTag::ScriptType into scoped enum

...to avoid -Werror,-Wshadow from Clang trunk with
<https://reviews.llvm.org/D52400> "Improve -Wshadow warnings with enumerators",
warning about shadowing of UNKNOWN in e.g. enum ESCHER_BlibType in
include/filter/msfilter/escherex.hxx

Change-Id: Id6608474e76730be4c439f480c31f661b8b5748e
Reviewed-on: https://gerrit.libreoffice.org/62013
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 07a70e84
......@@ -673,7 +673,7 @@ LanguageTag::ScriptType LanguageTag::getOnTheFlyScriptType( LanguageType nRegist
if (itID != rMapLangID.end())
return (*itID).second->getScriptType();
else
return UNKNOWN;
return ScriptType::UNKNOWN;
}
......
......@@ -62,7 +62,7 @@ public:
These need to correspond to the ExtraLanguages.ScriptType template
property in officecfg/registry/schema/org/openoffice/VCL.xcs
*/
enum ScriptType
enum class ScriptType
{
UNKNOWN = 0,
WESTERN = 1, // Copies css::i18n::ScriptType for strong types
......
......@@ -186,7 +186,7 @@ SvtLanguageTableImpl::SvtLanguageTableImpl()
{
LanguageTag aLang(rBcp47);
LanguageType nLangType = aLang.getLanguageType();
if (nType <= LanguageTag::ScriptType::RTL && nType > LanguageTag::ScriptType::UNKNOWN)
if (nType <= sal_Int32(LanguageTag::ScriptType::RTL) && nType > sal_Int32(LanguageTag::ScriptType::UNKNOWN))
aLang.setScriptType(LanguageTag::ScriptType(nType));
sal_uInt32 nPos = FindIndex(nLangType);
if (nPos == RESARRAY_INDEX_NOTFOUND)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment