From 358d1a99484bcc02900bd200a7606a7bf3298cac Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 13 Jul 2013 02:54:05 +0200 Subject: use static LanguageTag::convertTo...() for standalone conversions If no LanguageTag instance is at hand use the static methods to convert between BCP 47 string, Locale and MS-LangID instead of creating temporary instances. Change-Id: I9597f768078eb81c840e84a5db5617f26bb7dc09 --- canvas/source/cairo/cairo_canvasfont.cxx | 2 +- canvas/source/directx/dx_textlayout_drawhelper.cxx | 2 +- canvas/source/vcl/canvasfont.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'canvas') diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx index e4e8d245a2b9..4c627f7276bf 100644 --- a/canvas/source/cairo/cairo_canvasfont.cxx +++ b/canvas/source/cairo/cairo_canvasfont.cxx @@ -57,7 +57,7 @@ namespace cairocanvas rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED ? PITCH_FIXED : PITCH_VARIABLE); - maFont->SetLanguage( LanguageTag( rFontRequest.Locale).getLanguageType( false)); + maFont->SetLanguage( LanguageTag::convertToLanguageType( rFontRequest.Locale, false)); // adjust to stretched/shrinked font if( !::rtl::math::approxEqual( rFontMatrix.m00, rFontMatrix.m11) ) diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index 791603022ed6..d1f76e6233ea 100644 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -125,7 +125,7 @@ namespace dxcanvas rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED ? PITCH_FIXED : PITCH_VARIABLE); - aFont.SetLanguage(LanguageTag(rFontRequest.Locale).getLanguageType()); + aFont.SetLanguage(LanguageTag::convertToLanguageType(rFontRequest.Locale)); // setup font color aFont.SetColor( aColor ); diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index 549cf3e139cf..783ace10ff64 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -59,7 +59,7 @@ namespace vclcanvas rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED ? PITCH_FIXED : PITCH_VARIABLE); - maFont->SetLanguage( LanguageTag( rFontRequest.Locale).getLanguageType( false)); + maFont->SetLanguage( LanguageTag::convertToLanguageType( rFontRequest.Locale, false)); // adjust to stretched/shrinked font if( !::rtl::math::approxEqual( rFontMatrix.m00, rFontMatrix.m11) ) -- cgit