[Libreoffice-commits] core.git: 2 commits - filter/source fpicker/source

Stephan Bergmann sbergman at redhat.com
Tue Nov 17 01:37:30 PST 2015


 filter/source/flash/swfwriter2.cxx           |    2 +-
 fpicker/source/aqua/CFStringUtilities.mm     |    4 ++--
 fpicker/source/aqua/NSString_OOoAdditions.mm |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f199bbafd3cbe186b71e806557dca3b1cbcbe430
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Nov 17 10:37:05 2015 +0100

    Don't assume sal_Unicode is unsigned short
    
    Change-Id: I82bb9471479523d68641fd815da1208f0d45b8a8

diff --git a/fpicker/source/aqua/CFStringUtilities.mm b/fpicker/source/aqua/CFStringUtilities.mm
index 464fbfa..ead151e 100644
--- a/fpicker/source/aqua/CFStringUtilities.mm
+++ b/fpicker/source/aqua/CFStringUtilities.mm
@@ -41,13 +41,13 @@ rtl::OUString CFStringToOUString(const CFStringRef sOrig) {
 
     //DBG_PRINT_EXIT("CFStringUtilities", __func__, unichars);
 
-    return rtl::OUString(unichars);
+    return rtl::OUString(reinterpret_cast<sal_Unicode *>(unichars));
 }
 
 CFStringRef CFStringCreateWithOUString(const rtl::OUString& aString) {
     //DBG_PRINT_ENTRY("CFStringUtilities", __func__);
 
-    CFStringRef ref = CFStringCreateWithCharacters(kCFAllocatorDefault, aString.getStr(), aString.getLength());
+    CFStringRef ref = CFStringCreateWithCharacters(kCFAllocatorDefault, reinterpret_cast<UniChar const *>(aString.getStr()), aString.getLength());
 
     //DBG_PRINT_EXIT("CFStringUtilities", __func__, ref);
 
diff --git a/fpicker/source/aqua/NSString_OOoAdditions.mm b/fpicker/source/aqua/NSString_OOoAdditions.mm
index 5b4263a..7b7a891 100644
--- a/fpicker/source/aqua/NSString_OOoAdditions.mm
+++ b/fpicker/source/aqua/NSString_OOoAdditions.mm
@@ -28,7 +28,7 @@
 {
     DBG_PRINT_ENTRY(CLASS_NAME, __func__, "ouString", ouString);
 
-    NSString *string = [[NSString alloc] initWithCharacters:ouString.getStr() length:ouString.getLength()];
+    NSString *string = [[NSString alloc] initWithCharacters:reinterpret_cast<unichar const *>(ouString.getStr()) length:ouString.getLength()];
 
     DBG_PRINT_EXIT(CLASS_NAME, __func__, string);
     return [string autorelease];
@@ -45,7 +45,7 @@
 
     [self getCharacters:unichars];
 
-    return rtl::OUString(unichars);
+    return rtl::OUString(reinterpret_cast<sal_Unicode *>(unichars));
 }
 
 @end
commit e22a16a3b9aa127f6e2bc2c5b893d7527ceab21c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Nov 17 10:36:54 2015 +0100

    Don't assume sal_Unicode is unsigned short
    
    Change-Id: I1bf672c3d3c47b82906a0c755a6dd8e55dc48f88

diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx
index f13c63d..3649cce 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -460,7 +460,7 @@ sal_uInt16 FlashFont::getGlyph( sal_uInt16 nChar, VirtualDevice* pVDev )
 
     // let the virtual device convert the character to polygons
     tools::PolyPolygon aPolyPoly;
-    pVDev->GetTextOutline( aPolyPoly, OUString(nChar) );
+    pVDev->GetTextOutline( aPolyPoly, OUString(sal_Unicode(nChar)) );
 
     maGlyphOffsets.push_back( _uInt16( maGlyphData.getOffset() ) );
 


More information about the Libreoffice-commits mailing list