LCOV - code coverage report
Current view: top level - writerfilter/source/dmapper - ThemeTable.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 114 143 79.7 %
Date: 2015-06-13 12:38:46 Functions: 13 13 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <ThemeTable.hxx>
      21             : #include <ooxml/resourceids.hxx>
      22             : 
      23             : using namespace com::sun::star;
      24             : 
      25             : namespace writerfilter {
      26             : namespace dmapper
      27             : {
      28             : 
      29        1381 : struct ThemeTable_Impl
      30             : {
      31        1381 :     ThemeTable_Impl() :
      32             :         m_currentThemeFontId(0),
      33             :         m_currentFontThemeEntry(),
      34        1381 :         m_supplementalFontId(0)
      35        1381 :         {}
      36             :     std::map<sal_uInt32, std::map<sal_uInt32, OUString> > m_themeFontMap;
      37             :     sal_uInt32 m_currentThemeFontId;
      38             :     std::map<sal_uInt32, OUString> m_currentFontThemeEntry;
      39             :     OUString m_supplementalFontName;
      40             :     sal_uInt32 m_supplementalFontId;
      41             :     OUString m_themeFontLangEastAsia;
      42             :     OUString m_themeFontLangBidi;
      43             : };
      44             : 
      45        1381 : ThemeTable::ThemeTable()
      46             : : LoggedProperties("ThemeTable")
      47             : , LoggedTable("ThemeTable")
      48        1381 : , m_pImpl( new ThemeTable_Impl )
      49             : {
      50             : 
      51        1381 : }
      52             : 
      53        4143 : ThemeTable::~ThemeTable()
      54             : {
      55        1381 :     delete m_pImpl;
      56        2762 : }
      57             : 
      58      172698 : void ThemeTable::lcl_attribute(Id Name, Value & val)
      59             : {
      60      172698 :     OUString sValue = val.getString();
      61      172698 :     switch(Name)
      62             :     {
      63             :         case NS_ooxml::LN_CT_TextFont_typeface:
      64        8280 :          if (!sValue.isEmpty())
      65        2760 :              m_pImpl->m_currentFontThemeEntry[m_pImpl->m_currentThemeFontId] = sValue;
      66        8280 :          break;
      67             :         case NS_ooxml::LN_CT_SupplementalFont_script:
      68       81394 :             if (!sValue.isEmpty())
      69             :             {
      70       81394 :                 if (sValue == m_pImpl->m_themeFontLangBidi)
      71         632 :                     m_pImpl->m_supplementalFontId = NS_ooxml::LN_CT_FontCollection_cs;
      72       80762 :                 else if (sValue == m_pImpl->m_themeFontLangEastAsia)
      73         562 :                     m_pImpl->m_supplementalFontId = NS_ooxml::LN_CT_FontCollection_ea;
      74             :             }
      75       81394 :             break;
      76             :         case NS_ooxml::LN_CT_SupplementalFont_typeface:
      77       81394 :             if (!sValue.isEmpty())
      78       81394 :                 m_pImpl->m_supplementalFontName = sValue;
      79       81394 :             break;
      80             :         default:
      81             :         {
      82             : #ifdef DEBUG_WRITERFILTER
      83             :             TagLogger::getInstance().element("unhandled");
      84             : #endif
      85             :         }
      86             :     }
      87      172698 :     if(m_pImpl->m_supplementalFontId && m_pImpl->m_supplementalFontName.getLength() > 0)
      88             :     {
      89        1194 :         m_pImpl->m_currentFontThemeEntry[m_pImpl->m_supplementalFontId] = m_pImpl->m_supplementalFontName;
      90        1194 :         m_pImpl->m_supplementalFontName.clear();
      91        1194 :         m_pImpl->m_supplementalFontId = 0;
      92      172698 :     }
      93      172698 : }
      94             : 
      95       96574 : void ThemeTable::lcl_sprm(Sprm& rSprm)
      96             : {
      97             : #ifdef DEBUG_WRITERFILTER
      98             :     TagLogger::getInstance().startElement("ThemeTable.sprm");
      99             :     TagLogger::getInstance().chars(rSprm.toString());
     100             : #endif
     101             : 
     102       96574 :     m_pImpl->m_supplementalFontName.clear();
     103       96574 :     m_pImpl->m_supplementalFontId = 0;
     104             : 
     105       96574 :     sal_uInt32 nSprmId = rSprm.getId();
     106       96574 :     switch(nSprmId)
     107             :     {
     108             :     case NS_ooxml::LN_CT_BaseStyles_fontScheme:
     109             :         {
     110        1380 :             writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
     111        1380 :             if( pProperties.get())
     112        1380 :                 pProperties->resolve(*this);
     113             :     }
     114        1380 :     break;
     115             :     case NS_ooxml::LN_CT_FontScheme_majorFont:
     116             :     case NS_ooxml::LN_CT_FontScheme_minorFont:
     117             :         {
     118        2760 :             writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
     119        2760 :         m_pImpl->m_currentFontThemeEntry = std::map<sal_uInt32, OUString>();
     120        2760 :             if( pProperties.get())
     121        2760 :                 pProperties->resolve(*this);
     122        2760 :             m_pImpl->m_themeFontMap[nSprmId] = m_pImpl->m_currentFontThemeEntry;
     123             :     }
     124        2760 :     break;
     125             :     case NS_ooxml::LN_CT_FontCollection_latin:
     126             :     case NS_ooxml::LN_CT_FontCollection_ea:
     127             :     case NS_ooxml::LN_CT_FontCollection_cs:
     128             :         {
     129        8280 :         m_pImpl->m_currentThemeFontId = nSprmId;
     130        8280 :             writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
     131        8280 :             if( pProperties.get())
     132        8280 :                 pProperties->resolve(*this);
     133             :     }
     134        8280 :     break;
     135             :     case NS_ooxml::LN_CT_FontCollection_font:
     136             :     {
     137       81394 :         writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
     138       81394 :         if (pProperties.get())
     139       81394 :             pProperties->resolve(*this);
     140             :     }
     141       81394 :     break;
     142             :     default:
     143             :         {
     144             : #ifdef DEBUG_WRITERFILTER
     145             :             TagLogger::getInstance().element("unhandled");
     146             : #endif
     147             :         }
     148             :     }
     149             : #ifdef DEBUG_WRITERFILTER
     150             :     TagLogger::getInstance().endElement();
     151             : #endif
     152       96574 : }
     153             : 
     154        1380 : void ThemeTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref)
     155             : {
     156             : #ifdef DEBUG_WRITERFILTER
     157             :     TagLogger::getInstance().startElement("ThemeTable.entry");
     158             : #endif
     159             : 
     160        1380 :     ref->resolve(*this);
     161             : 
     162             : #ifdef DEBUG_WRITERFILTER
     163             :     TagLogger::getInstance().endElement();
     164             : #endif
     165        1380 : }
     166             : 
     167       40330 : OUString ThemeTable::getStringForTheme(const Id id)
     168             : {
     169       40330 :     switch (id)
     170             :     {
     171             :         case NS_ooxml::LN_Value_ST_Theme_majorEastAsia:
     172        3436 :             return OUString("majorEastAsia");
     173             :         case NS_ooxml::LN_Value_ST_Theme_majorBidi:
     174        4380 :             return OUString("majorBidi");
     175             :         case NS_ooxml::LN_Value_ST_Theme_majorAscii:
     176           0 :             return OUString("majorAscii");
     177             :         case NS_ooxml::LN_Value_ST_Theme_majorHAnsi:
     178        6860 :             return OUString("majorHAnsi");
     179             :         case NS_ooxml::LN_Value_ST_Theme_minorEastAsia:
     180        3342 :             return OUString("minorEastAsia");
     181             :         case NS_ooxml::LN_Value_ST_Theme_minorBidi:
     182        4544 :             return OUString("minorBidi");
     183             :         case NS_ooxml::LN_Value_ST_Theme_minorAscii:
     184           0 :             return OUString("minorAscii");
     185             :         case NS_ooxml::LN_Value_ST_Theme_minorHAnsi:
     186       17768 :             return OUString("minorHAnsi");
     187             :     }
     188           0 :     return OUString();
     189             : }
     190       15043 : const OUString ThemeTable::getFontNameForTheme(const Id id) const
     191             : {
     192       15043 :     std::map<sal_uInt32, OUString> tmpThemeFontMap;
     193       15043 :     switch (id)
     194             :     {
     195             :     case NS_ooxml::LN_Value_ST_Theme_majorEastAsia:
     196             :     case NS_ooxml::LN_Value_ST_Theme_majorBidi:
     197             :     case NS_ooxml::LN_Value_ST_Theme_majorAscii:
     198             :     case NS_ooxml::LN_Value_ST_Theme_majorHAnsi:
     199        5451 :         tmpThemeFontMap = m_pImpl->m_themeFontMap[NS_ooxml::LN_CT_FontScheme_majorFont];
     200        5451 :     break;
     201             :     case NS_ooxml::LN_Value_ST_Theme_minorEastAsia:
     202             :     case NS_ooxml::LN_Value_ST_Theme_minorBidi:
     203             :     case NS_ooxml::LN_Value_ST_Theme_minorAscii:
     204             :     case NS_ooxml::LN_Value_ST_Theme_minorHAnsi:
     205        9592 :         tmpThemeFontMap = m_pImpl->m_themeFontMap[NS_ooxml::LN_CT_FontScheme_minorFont];
     206        9592 :     break;
     207             :     default:
     208           0 :         return OUString();
     209             :     }
     210             : 
     211       15043 :     switch (id)
     212             :     {
     213             :     case NS_ooxml::LN_Value_ST_Theme_majorAscii:
     214             :     case NS_ooxml::LN_Value_ST_Theme_majorHAnsi:
     215             :     case NS_ooxml::LN_Value_ST_Theme_minorAscii:
     216             :     case NS_ooxml::LN_Value_ST_Theme_minorHAnsi:
     217             :     {
     218        7390 :          std::map<sal_uInt32, OUString>::const_iterator Iter = tmpThemeFontMap.find(NS_ooxml::LN_CT_FontCollection_latin);
     219        7390 :              if (Iter != tmpThemeFontMap.end())
     220        7388 :                   return (Iter)->second;
     221           2 :              return OUString();
     222             :         }
     223             :     case NS_ooxml::LN_Value_ST_Theme_majorBidi:
     224             :     case NS_ooxml::LN_Value_ST_Theme_minorBidi:
     225             :         {
     226        4268 :              std::map<sal_uInt32, OUString>::const_iterator Iter = tmpThemeFontMap.find(NS_ooxml::LN_CT_FontCollection_cs);
     227        4268 :              if (Iter != tmpThemeFontMap.end())
     228        1576 :                  return (Iter)->second;
     229        2692 :              return OUString();
     230             :         }
     231             :     case NS_ooxml::LN_Value_ST_Theme_majorEastAsia:
     232             :     case NS_ooxml::LN_Value_ST_Theme_minorEastAsia:
     233             :         {
     234        3385 :              std::map<sal_uInt32, OUString>::const_iterator Iter = tmpThemeFontMap.find(NS_ooxml::LN_CT_FontCollection_ea);
     235        3385 :              if (Iter != tmpThemeFontMap.end())
     236        1259 :                  return (Iter)->second;
     237        2126 :              return OUString();
     238             :         }
     239             :     default:
     240           0 :     return OUString();
     241       15043 :     }
     242             : }
     243             : 
     244        1380 : void ThemeTable::setThemeFontLangProperties(const uno::Sequence<beans::PropertyValue>& aPropSeq)
     245             : {
     246        5520 :     for (sal_Int32 i = 0 ; i < aPropSeq.getLength() ; i ++)
     247             :     {
     248        4140 :         OUString sLocaleName;
     249        4140 :         aPropSeq.getConstArray()[i].Value >>= sLocaleName;
     250        4140 :         if (aPropSeq.getConstArray()[i].Name == "eastAsia")
     251         788 :             m_pImpl->m_themeFontLangEastAsia = fromLocaleToScriptTag(sLocaleName);
     252        4140 :         if (aPropSeq.getConstArray()[i].Name == "bidi")
     253         810 :             m_pImpl->m_themeFontLangBidi = fromLocaleToScriptTag(sLocaleName);
     254             : 
     255        4140 :     }
     256        1380 : }
     257             : 
     258        1598 : OUString ThemeTable::fromLocaleToScriptTag(const OUString& sLocale)
     259             : {
     260        1598 :     return fromLCIDToScriptTag(LanguageTag::convertToLanguageType(sLocale));
     261             : }
     262             : 
     263        1598 : OUString ThemeTable::fromLCIDToScriptTag(LanguageType lang)
     264             : {
     265             :     // conversion list from:
     266             :     // http://blogs.msdn.com/b/officeinteroperability/archive/2013/04/22/office-open-xml-themes-schemes-and-fonts.aspx
     267        1598 :     switch (lang)
     268             :     {
     269             :         case 0x429  :  // lidFarsi
     270             :         case 0x401  :  // lidArabic
     271             :         case 0x801  :  // lidIraq
     272             :         case 0xc01  :  // lidEgyptian
     273             :         case 0x1001 :  // lidLibya
     274             :         case 0x1401 :  // lidAlgerian
     275             :         case 0x1801 :  // lidMorocco
     276             :         case 0x1c01 :  // lidTunisia
     277             :         case 0x2001 :  // lidOman
     278             :         case 0x2401 :  // lidYemen
     279             :         case 0x2801 :  // lidSyria
     280             :         case 0x2c01 :  // lidJordan
     281             :         case 0x3001 :  // lidLebanon
     282             :         case 0x3401 :  // lidKuwait
     283             :         case 0x3801 :  // lidUAE
     284             :         case 0x3c01 :  // lidBahrain
     285             :         case 0x4001 :  // lidQatar
     286             :         case 0x420  :  // lidUrdu
     287             :         case 0x846  :  // lidPunjabiPakistan
     288             :         case 0x859  :  // lidSindhiPakistan
     289             :         case 0x45f  :  // lidTamazight
     290             :         case 0x460  :  // lidKashmiri
     291             :         case 0x463  :  // lidPashto
     292             :         case 0x48c  :  // lidDari
     293          17 :             return OUString("Arab");
     294             :         case 0x42b  :  // lidArmenian
     295           0 :             return OUString("Armn");
     296             :         case 0x445  :  // lidBengali
     297             :         case 0x845  :  // lidBengaliBangladesh
     298             :         case 0x44d  :  // lidAssamese
     299             :         case 0x458  :  // lidManipuri
     300           0 :             return OUString("Beng");
     301             :         case 0x45d  :  // lidInuktitut
     302           0 :             return OUString("Cans");
     303             :         case 0x45c  :  // lidCherokee
     304           0 :             return OUString("Cher");
     305             :         case 0x419  :  // lidRussian
     306             :         case 0x402  :  // lidBulgarian
     307             :         case 0x281a :  // lidSerbianCyrillic
     308             :         case 0x422  :  // lidUkranian
     309             :         case 0x819  :  // lidRussianMoldavia
     310             :         case 0xc1a  :  // lidSerbianCyrillicSerbMont
     311             :         case 0x1c1a :  // lidSerbianBosniaHerzegovinaCyrillic
     312             :         case 0x201a :  // lidBosnianBosniaHerzegovinaCyrillic
     313             :         case 0x301a :  // lidSerbianMontenegroCyrillic
     314             :         case 0x423  :  // lidByelorussian
     315             :         case 0x428  :  // lidTajik
     316             :         case 0x82c  :  // lidAzeriCyrillic
     317             :         case 0x42f  :  // lidMacedonian
     318             :         case 0x43f  :  // lidKazakh
     319             :         case 0x440  :  // lidKyrgyz
     320             :         case 0x843  :  // lidUzbekCyrillic
     321             :         case 0x444  :  // lidTatar
     322             :         case 0x450  :  // lidMongolian
     323             :         case 0x46d  :  // lidBashkir
     324             :         case 0x485  :  // lidSakha
     325           0 :             return OUString("Cyrl");
     326             :         case 0x439  :  // lidHindi
     327             :         case 0x44e  :  // lidMarathi
     328             :         case 0x44f  :  // lidSanskrit
     329             :         case 0x457  :  // lidKonkani
     330             :         case 0x459  :  // lidSindhi
     331             :         case 0x860  :  // lidKashmiriIndia
     332             :         case 0x461  :  // lidNepali
     333             :         case 0x861  :  // lidNepaliIndia
     334           3 :             return OUString("Deva");
     335             :         case 0x45e  :  // lidAmharic
     336             :         case 0x473  :  // lidTigrignaEthiopic
     337             :         case 0x873  :  // lidTigrignaEritrea
     338           0 :             return OUString("Ethi");
     339             :         case 0x437  :  // lidGeorgian
     340           0 :             return OUString("Geor");
     341             :         case 0x408  :  // lidGreek
     342           0 :             return OUString("Grek");
     343             :         case 0x447  :  // lidGujarati
     344           0 :             return OUString("Gujr");
     345             :         case 0x446  :  // lidPunjabi
     346           0 :             return OUString("Guru");
     347             :         case 0x412  :  // lidKoreanExtWansung
     348           1 :             return OUString("Hang");
     349             :         case 0x804  :  // lidChineseSimp
     350             :         case 0x1004 :  // lidSingapore
     351          67 :             return OUString("Hans");
     352             :         case 0x404  :  // lidChineseTrad
     353             :         case 0xc04  :  // lidHongkong
     354             :         case 0x1404 :  // lidMacau
     355          22 :             return OUString("Hant");
     356             :         case 0x40d  :  // lidHebrew
     357             :         case 0x43d  :  // lidYiddish
     358         283 :             return OUString("Hebr");
     359             :         case 0x411  :  // lidJapanese
     360         192 :             return OUString("Jpan");
     361             :         case 0x453  :  // lidKhmer
     362           3 :             return OUString("Khmr");
     363             :         case 0x44b  :  // lidKannada
     364           0 :             return OUString("Knda");
     365             :         case 0x454  :  // lidLao
     366           0 :             return OUString("Laoo");
     367             :         case 0x409  :  // lidAmerican
     368             :         case 0xc09  :  // lidAustralian
     369             :         case 0x809  :  // lidBritish
     370             :         case 0x1009 :  // lidEnglishCanadian
     371             :         case 0x403  :  // lidCatalan
     372             :         case 0x406  :  // lidDanish
     373             :         case 0x413  :  // lidDutch
     374             :         case 0x813  :  // lidDutchBelgian
     375             :         case 0x479  :  // lidPapiamentu
     376             :         case 0x40b  :  // lidFinnish
     377             :         case 0x40c  :  // lidFrench
     378             :         case 0xc0c  :  // lidFrenchCanadian
     379             :         case 0x407  :  // lidGerman
     380             :         case 0x807  :  // lidSwissGerman
     381             :         case 0xc07  :  // lidAustrianGerman
     382             :         case 0x1007 :  // lidGermanLuxembourg
     383             :         case 0x1407 :  // lidGermanLiechtenstein
     384             :         case 0x410  :  // lidItalian
     385             :         case 0x414  :  // lidNorskBokmal
     386             :         case 0x814  :  // lidNorskNynorsk
     387             :         case 0x416  :  // lidPortBrazil
     388             :         case 0x816  :  // lidPortIberian
     389             :         case 0x40a  :  // lidSpanish
     390             :         case 0x41d  :  // lidSwedish
     391             :         case 0x405  :  // lidCzech
     392             :         case 0x40e  :  // lidHungarian
     393             :         case 0x415  :  // lidPolish
     394             :         case 0x41f  :  // lidTurkish
     395             :         case 0x42d  :  // lidBasque
     396             :         case 0x424  :  // lidSlovenian
     397             :         case 0x426  :  // lidLatvian
     398             :         case 0x427  :  // lidLithuanian
     399             :         case 0x418  :  // lidRomanian
     400             :         case 0x818  :  // lidRomanianMoldavia
     401             :         case 0x241a :  // lidSerbianLatin
     402             :         case 0x41a  :  // lidCroatian, lidCroat
     403             :         case 0x491  :  // lidGaelicScots
     404             :         case 0x83c  :  // lidGaelicIrish
     405             :         case 0x430  :  // lidSutu
     406             :         case 0x431  :  // lidTsonga
     407             :         case 0x432  :  // lidTswana
     408             :         case 0x433  :  // lidVenda
     409             :         case 0x434  :  // lidXhosa
     410             :         case 0x435  :  // lidZulu
     411             :         case 0x436  :  // lidAfrikaans
     412             :         case 0x425  :  // lidEstonian
     413             :         case 0x456  :  // lidGalician
     414             :         case 0x41b  :  // lidSlovak
     415             :         case 0x1409 :  // lidEnglishNewZealand
     416             :         case 0x1809 :  // lidEnglishIreland
     417             :         case 0x1c09 :  // lidEnglishSouthAfrica
     418             :         case 0x2009 :  // lidEnglishJamaica
     419             :         case 0x2409 :  // lidEnglishCaribbean
     420             :         case 0x2809 :  // lidEnglishBelize
     421             :         case 0x2c09 :  // lidEnglishTrinidad
     422             :         case 0x3009 :  // lidEnglishZimbabwe
     423             :         case 0x3409 :  // lidEnglishPhilippines
     424             :         case 0x3809 :  // lidEnglishIndonesia
     425             :         case 0x3c09 :  // lidEnglishHongKong
     426             :         case 0x4009 :  // lidEnglishIndia
     427             :         case 0x4409 :  // lidEnglishMalaysia
     428             :         case 0x4809 :  // lidEnglishSingapore
     429             :         case 0x80a  :  // lidSpanishMexican, lidMexican
     430             :         case 0xc0a  :  // lidSpanishModern
     431             :         case 0x100a :  // lidGuatemala
     432             :         case 0x140a :  // lidCostaRica
     433             :         case 0x180a :  // lidPanama
     434             :         case 0x1c0a :  // lidDominicanRepublic
     435             :         case 0x200a :  // lidSpanishSA, lidVenezuela
     436             :         case 0x240a :  // lidColombia
     437             :         case 0x280a :  // lidPeru
     438             :         case 0x2c0a :  // lidArgentina
     439             :         case 0x300a :  // lidEcuador
     440             :         case 0x340a :  // lidChile
     441             :         case 0x380a :  // lidUruguay
     442             :         case 0x3c0a :  // lidParguay
     443             :         case 0x400a :  // lidBolivia
     444             :         case 0x440a :  // lidElSalvador
     445             :         case 0x480a :  // lidHonduras
     446             :         case 0x4c0a :  // lidNicaragua
     447             :         case 0x500a :  // lidPuertoRico
     448             :         case 0x540a :  // lidSpanishUS
     449             :         case 0x80c  :  // lidFrenchBelgian
     450             :         case 0x100c :  // lidFrenchSwiss
     451             :         case 0x140c :  // lidFrenchLuxembourg
     452             :         case 0x180c :  // lidFrenchMonaco
     453             :         case 0x1c0c :  // lidFrenchWestIndies
     454             :         case 0x200c :  // lidFrenchReunion
     455             :         case 0x240c :  // lidFrenchCongoDRC, lidFrenchZaire
     456             :         case 0x280c :  // lidFrenchSenegal
     457             :         case 0x2c0c :  // lidFrenchCameroon
     458             :         case 0x300c :  // lidFrenchCotedIvoire
     459             :         case 0x340c :  // lidFrenchMali
     460             :         case 0x3c0c :  // lidFrenchHaiti
     461             :         case 0x380c :  // lidFrenchMorocco
     462             :         case 0x40f  :  // lidIcelandic
     463             :         case 0x810  :  // lidItalianSwiss
     464             :         case 0x417  :  // lidRhaetoRomanic, lidRomanic
     465             :         case 0x81a  :  // lidSerbianLatinSerbMont, lidCroatSerbo
     466             :         case 0x101a :  // lidBosniaHerzegovina
     467             :         case 0x141a :  // lidBosnianBosniaHerzegovinaLatin
     468             :         case 0x181a :  // lidSerbianBosniaHerzegovinaLatin
     469             :         case 0x2c1a :  // lidSerbianMontenegroLatin
     470             :         case 0x41c  :  // lidAlbanian
     471             :         case 0x81d  :  // lidSwedishFinland
     472             :         case 0x421  :  // lidBahasa, lidIndonesian
     473             :         case 0x42c  :  // lidAzeriLatin
     474             :         case 0x42e  :  // lidSorbian
     475             :         case 0x82e  :  // lidLowerSorbian
     476             :         case 0x438  :  // lidFaeroese
     477             :         case 0x43a  :  // lidMaltese
     478             :         case 0x43b  :  // lidSamiLappish
     479             :         case 0x83b  :  // lidNorthSamiSwe
     480             :         case 0xc3b  :  // lidNorthernSamiFi
     481             :         case 0x103b :  // lidLuleSamiNor
     482             :         case 0x143b :  // lidLuleSamiSwe
     483             :         case 0x183b :  // lidSouthSamiNor
     484             :         case 0x1c3b :  // lidSouthSamiSwe
     485             :         case 0x203b :  // lidSkoltSami
     486             :         case 0x243b :  // lidInariSami
     487             :         case 0x43e  :  // lidMalaysian
     488             :         case 0x83e  :  // lidMalayBrunei
     489             :         case 0x441  :  // lidSwahili
     490             :         case 0x442  :  // lidTurkmen
     491             :         case 0x443  :  // lidUzbekLatin
     492             :         case 0x452  :  // lidWelsh
     493             :         case 0x85d  :  // lidInuktitutLatin
     494             :         case 0x85f  :  // lidTamazightLatin
     495             :         case 0x462  :  // lidFrisian
     496             :         case 0x464  :  // lidFilipino
     497             :         case 0x466  :  // lidEdo
     498             :         case 0x467  :  // lidFulfulde
     499             :         case 0x468  :  // lidHausa
     500             :         case 0x469  :  // lidIbibio
     501             :         case 0x46a  :  // lidYoruba
     502             :         case 0x46b  :  // lidQuechuaBol
     503             :         case 0x86b  :  // lidQuechuaEcu
     504             :         case 0xc6b  :  // lidQuechuaPe
     505             :         case 0x46c  :  // lidSesothoSaLeboa
     506             :         case 0x46e  :  // lidLuxembourgish
     507             :         case 0x46f  :  // lidGreenlandic
     508             :         case 0x470  :  // lidIgbo
     509             :         case 0x471  :  // lidKanuri
     510             :         case 0x472  :  // lidOromo
     511             :         case 0x474  :  // lidGuarani
     512             :         case 0x475  :  // lidHawaiian
     513             :         case 0x476  :  // lidLatin
     514             :         case 0x477  :  // lidSomali
     515             :         case 0x47a  :  // lidMapudungun
     516             :         case 0x47c  :  // lidMohawk
     517             :         case 0x47e  :  // lidBreton
     518             :         case 0x481  :  // lidMaori
     519             :         case 0x482  :  // lidOccitan
     520             :         case 0x483  :  // lidCorsican
     521             :         case 0x484  :  // lidAlsatian
     522             :         case 0x486  :  // lidKiche
     523             :         case 0x487  :  // lidKinyarwanda
     524             :         case 0x488  :  // lidWolof
     525         504 :             return OUString("Latn");
     526             :         case 0x44c  :  // lidMalayalam
     527           0 :             return OUString("Mlym");
     528             :         case 0x850  :  // lidMongolianMongo
     529           0 :             return OUString("Mong");
     530             :         case 0x455  :  // lidBurmese
     531           0 :             return OUString("Mymr");
     532             :         case 0x448  :  // lidOriya
     533           0 :             return OUString("Orya");
     534             :         case 0x45b  :  // lidSinhalese
     535           0 :             return OUString("Sinh");
     536             :         case 0x45a  :  // lidSyriac
     537           0 :             return OUString("Syrc");
     538             :         case 0x449  :  // lidTamil
     539           4 :             return OUString("Taml");
     540             :         case 0x44a  :  // lidTelugu
     541           0 :             return OUString("Telu");
     542             :         case 0x465  :  // lidMaldivian
     543           0 :             return OUString("Thaa");
     544             :         case 0x41e  :  // lidThai
     545           7 :             return OUString("Thai");
     546             :         case 0x451  :  // lidTibetan
     547             :         case 0x851  :  // lidBhutanese
     548           0 :             return OUString("Tibt");
     549             :         case 0x480  :  // lidUighur
     550           0 :             return OUString("Uigh");
     551             :         case 0x42a  :  // lidVietnamese
     552           0 :             return OUString("Viet");
     553             :         case 0x478  :  // lidYi
     554           0 :             return OUString("Yiii");
     555             :         default:
     556         495 :             return OUString("");
     557             :     }
     558             : }
     559             : 
     560             : }//namespace dmapper
     561             : } //namespace writerfilter
     562             : 
     563             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11