[Libreoffice-commits] .: vcl/generic vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 16 08:49:39 PST 2012
vcl/generic/glyphs/graphite_serverfont.cxx | 6 +++---
vcl/source/app/i18nhelp.cxx | 4 ++--
vcl/source/app/settings.cxx | 5 +++--
vcl/source/gdi/outdev3.cxx | 3 ++-
vcl/source/gdi/pdfwriter_impl.cxx | 4 ++--
5 files changed, 12 insertions(+), 10 deletions(-)
New commits:
commit 2694fed55757e0827f16e881371d87ec9dcb74f9
Author: Eike Rathke <erack at redhat.com>
Date: Fri Nov 16 17:44:48 2012 +0100
use LanguageTag
Change-Id: I48187540869ba8750e83b1c5e9aa5cb84b1a5c9c
diff --git a/vcl/generic/glyphs/graphite_serverfont.cxx b/vcl/generic/glyphs/graphite_serverfont.cxx
index 838e694..87cd464 100644
--- a/vcl/generic/glyphs/graphite_serverfont.cxx
+++ b/vcl/generic/glyphs/graphite_serverfont.cxx
@@ -25,7 +25,7 @@
//
// Platform
-#include <i18npool/mslangid.hxx>
+#include <i18npool/languagetag.hxx>
#include <sallayout.hxx>
// Module
#include "gcach_ftyp.hxx"
@@ -70,8 +70,8 @@ GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) thro
rtl::OString aLang("");
if (rServerFont.GetFontSelData().meLanguage != LANGUAGE_DONTKNOW)
{
- aLang = MsLangId::convertLanguageToIsoByteString(
- rServerFont.GetFontSelData().meLanguage );
+ aLang = rtl::OUStringToOString( LanguageTag( rServerFont.GetFontSelData().meLanguage ).getBcp47(),
+ RTL_TEXTENCODING_UTF8 );
}
rtl::OString name = rtl::OUStringToOString(
rServerFont.GetFontSelData().maTargetName, RTL_TEXTENCODING_UTF8 );
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx
index 0448bc7..895e862 100644
--- a/vcl/source/app/i18nhelp.cxx
+++ b/vcl/source/app/i18nhelp.cxx
@@ -22,7 +22,7 @@
#include "unotools/localedatawrapper.hxx"
#include "unotools/transliterationwrapper.hxx"
-#include "i18npool/mslangid.hxx"
+#include "i18npool/languagetag.hxx"
#include "rtl/ustrbuf.hxx"
@@ -65,7 +65,7 @@ utl::TransliterationWrapper& vcl::I18nHelper::ImplGetTransliterationWrapper() co
nModules |= i18n::TransliterationModules_IGNORE_CASE;
((vcl::I18nHelper*)this)->mpTransliterationWrapper = new utl::TransliterationWrapper( m_xContext, (i18n::TransliterationModules)nModules );
- ((vcl::I18nHelper*)this)->mpTransliterationWrapper->loadModuleIfNeeded( MsLangId::convertLocaleToLanguage( maLocale ) );
+ ((vcl::I18nHelper*)this)->mpTransliterationWrapper->loadModuleIfNeeded( LanguageTag( maLocale ).getLanguageType() );
}
return *mpTransliterationWrapper;
}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 72dc906..82440fd 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -22,6 +22,7 @@
#include "tools/debug.hxx"
#include "i18npool/mslangid.hxx"
+#include "i18npool/languagetag.hxx"
#include "vcl/svapp.hxx"
#include "vcl/event.hxx"
@@ -1439,7 +1440,7 @@ void AllSettings::SetLocale( const ::com::sun::star::lang::Locale& rLocale )
if ( rLocale.Language.isEmpty() )
mpData->meLanguage = LANGUAGE_SYSTEM;
else
- mpData->meLanguage = MsLangId::convertLocaleToLanguage( rLocale );
+ mpData->meLanguage = LanguageTag( rLocale ).getLanguageType( false);
if ( mpData->mpLocaleDataWrapper )
{
delete mpData->mpLocaleDataWrapper;
@@ -1468,7 +1469,7 @@ void AllSettings::SetLanguage( LanguageType eLang )
CopyData();
mpData->meLanguage = eLang;
- MsLangId::convertLanguageToLocale( GetLanguage(), ((AllSettings*)this)->mpData->maLocale );
+ mpData->maLocale = LanguageTag( GetLanguage() ).getLocale();
if ( mpData->mpLocaleDataWrapper )
{
delete mpData->mpLocaleDataWrapper;
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 94837fc..d3cfb45 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -18,6 +18,7 @@
*/
#include "i18npool/mslangid.hxx"
+#include "i18npool/languagetag.hxx"
#include "rtl/tencinfo.h"
#include "rtl/logfile.hxx"
@@ -476,7 +477,7 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang,
}
else
{
- MsLangId::convertLanguageToLocale( eLang, aLocale );
+ aLocale = LanguageTag( eLang ).getLocale();
}
utl::DefaultFontConfiguration& rDefaults = utl::DefaultFontConfiguration::get();
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 0e79d79..73c349c 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -43,7 +43,7 @@
#include <tools/zcodec.hxx>
#include <tools/stream.hxx>
-#include <i18npool/mslangid.hxx>
+#include <i18npool/languagetag.hxx>
#include <vcl/virdev.hxx>
#include <vcl/bmpacc.hxx>
@@ -11666,7 +11666,7 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
{
if( eAttr == PDFWriter::Language )
{
- m_aStructure[ m_nCurrentStructElement ].m_aLocale = MsLangId::convertLanguageToLocale( (LanguageType)nValue );
+ m_aStructure[ m_nCurrentStructElement ].m_aLocale = LanguageTag( (LanguageType)nValue ).getLocale();
return true;
}
More information about the Libreoffice-commits
mailing list