diff options
author | Eike Rathke <erack@redhat.com> | 2013-07-13 02:54:05 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-07-13 11:55:16 +0200 |
commit | 358d1a99484bcc02900bd200a7606a7bf3298cac (patch) | |
tree | 031f808141dbc712553b8a4a029a354a2699a622 /canvas | |
parent | 5d1a8e0d47b6d6e9e3e5735d0ee52fa0b4782202 (diff) |
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
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_canvasfont.cxx | 2 | ||||
-rw-r--r-- | canvas/source/directx/dx_textlayout_drawhelper.cxx | 2 | ||||
-rw-r--r-- | canvas/source/vcl/canvasfont.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
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) ) |