diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-04-17 21:35:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-26 08:50:54 +0200 |
commit | c70d49c7c888da8cfd73db8585e7be1f37fc398a (patch) | |
tree | c0e540401850018464ca76300536faf9aa7e27d2 /filter | |
parent | cd4344d3bdef631b3e64ac12a9e64bc9670c1b7c (diff) |
use strong_int for LanguageType
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448
Reviewed-on: https://gerrit.libreoffice.org/36629
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/countryid.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/filter/source/msfilter/countryid.cxx b/filter/source/msfilter/countryid.cxx index 6fa9066d6d85..b2dd7021df62 100644 --- a/filter/source/msfilter/countryid.cxx +++ b/filter/source/msfilter/countryid.cxx @@ -276,7 +276,7 @@ inline bool CountryEntryPred_Language::operator()( const CountryEntry& rCmp ) co // rCmp.mbUseSubLang==true -> compare full language type // rCmp.mbUseSubLang==false -> compare primary language only return rCmp.mbUseSubLang ? (meLanguage == rCmp.meLanguage) : - ((meLanguage & 0x03FF) == (rCmp.meLanguage & 0x03FF)); + (primary(meLanguage) == primary(rCmp.meLanguage)); } } // namespace diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 2748b61896ae..6b50a7bda803 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -4445,7 +4445,7 @@ PPTCharPropSet::PPTCharPropSet(sal_uInt32 nParagraph) mnHylinkOrigColor = 0; mbIsHyperlink = false; mbHardHylinkOrigColor = false; - mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0; + mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = LANGUAGE_SYSTEM; } PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet ) @@ -4475,7 +4475,7 @@ PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 n mnOriginalTextPos = rCharPropSet.mnOriginalTextPos; maString = rCharPropSet.maString; mpFieldItem.reset( rCharPropSet.mpFieldItem ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : nullptr ); - mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0; + mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = LANGUAGE_SYSTEM; } PPTCharPropSet::~PPTCharPropSet() @@ -4737,9 +4737,9 @@ PPTTextSpecInfo::PPTTextSpecInfo( sal_uInt32 _nCharIdx ) : nCharIdx ( _nCharIdx ), nDontKnow ( 1 ) { - nLanguage[ 0 ] = 0x400; - nLanguage[ 1 ] = 0; - nLanguage[ 2 ] = 0; + nLanguage[ 0 ] = LANGUAGE_PROCESS_OR_USER_DEFAULT; + nLanguage[ 1 ] = LANGUAGE_SYSTEM; + nLanguage[ 2 ] = LANGUAGE_SYSTEM; } PPTTextSpecInfo::~PPTTextSpecInfo() @@ -4796,14 +4796,14 @@ bool PPTTextSpecInfoAtomInterpreter::Read( SvStream& rIn, const DffRecordHeader& if ( nLang ) { // #i119985#, we could probably handle this better if we have a - // place to over-ride the final language for weak + // place to override the final language for weak // characters/fields to fallback to, rather than the current // application locale. Assuming that we can determine what the // default fallback language for a given .ppt, etc is during // load time. if (i == 2) { - pEntry->nLanguage[ 0 ] = pEntry->nLanguage[ 1 ] = pEntry->nLanguage[ 2 ] = nLang; + pEntry->nLanguage[ 0 ] = pEntry->nLanguage[ 1 ] = pEntry->nLanguage[ 2 ] = LanguageType(nLang); } } nFlags &= ~i; |