From c63a90453b59352950bbccce93a210964ccb7c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 27 Apr 2017 16:55:05 +0100 Subject: crashtesting: crash on exporting fdo31814-3.emf to odg since commit f9af0abce2c266a53f536a207a62bc691213f6a0 Date: Sat Apr 15 01:44:46 2017 +0200 EMF+ Add initial support for EmfPlusStringFormat Object The EmfPlusStringFormat object specifies text layout, display manipulations, and language identification. With this commit the support for font language and country was added. Also Bold style is applied, for strings which needs that. elsewhere the pattern is to mask with 0xff to restrict to the hardcoded 256 size, so do that here too Change-Id: Iba5bcc3fabe836c963b3eef47a864e87425675c7 --- cppcanvas/source/mtfrenderer/emfplus.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cppcanvas/source/mtfrenderer') diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index bd13102eb6a6..a4411c22bcfe 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1278,7 +1278,7 @@ namespace cppcanvas OUString text = read_uInt16s_ToOUString(rMF, stringLength); - EMFPStringFormat *stringFormat = static_cast< EMFPStringFormat* >( aObjects[ formatId ] ); + EMFPStringFormat *stringFormat = static_cast< EMFPStringFormat* >( aObjects[ formatId & 0xff ] ); css::rendering::FontRequest aFontRequest; LanguageTag aLanguageTag( static_cast< LanguageType >( stringFormat->language ) ); aFontRequest.Locale = aLanguageTag.getLocale( false ); -- cgit v1.2.1