This fixes an issue where const NSString* is assigned to a non-const NSString* field in FlavorMap. The NSString cannot be const when passed to an objective-C method expecting a non-const value (the NSStrings from flavor map are passed to such methods elsewhere in the code). Also, if you want to modify the actual string contents, you need to use NSMutableString anyway.

regards,

-kris.
>From 9a4c64f3c656213ce91fc7a58fca907f56ecb942 Mon Sep 17 00:00:00 2001
From: Kristian Rietveld <k...@lanedo.com>
Date: Sat, 22 Oct 2011 09:40:55 +0200
Subject: [PATCH 4/8] SystemFlavor NSStrings should not be const

---
 vcl/aqua/source/dtrans/DataFlavorMapping.cxx |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx 
b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index 2e2e0c2..d0146f8 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -89,18 +89,18 @@ namespace // private
   }
 
 
-  const NSString* PBTYPE_SODX = 
@"application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star 
Object Descriptor (XML)\"";
-  const NSString* PBTYPE_SESX = 
@"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed 
Source (XML)\"";
-  const NSString* PBTYPE_SLSDX = 
@"application/x-openoffice-linksrcdescriptor-xml;windows_formatname=\"Star Link 
Source Descriptor (XML)\"";
-  const NSString* PBTYPE_ESX = 
@"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed 
Source (XML)\"";
-  const NSString* PBTYPE_LSX = 
@"application/x-openoffice-link-source-xml;windows_formatname=\"Star Link 
Source (XML)\"";
-  const NSString* PBTYPE_EOX = 
@"application/x-openoffice-embedded-obj-xml;windows_formatname=\"Star Embedded 
Object (XML)\"";
-  const NSString* PBTYPE_SVXB = 
@"application/x-openoffice-svbx;windows_formatname=\"SVXB (StarView 
Bitmap/Animation)\"";
-  const NSString* PBTYPE_GDIMF = 
@"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"";
-  const NSString* PBTYPE_WMF = 
@"application/x-openoffice-wmf;windows_formatname=\"Image WMF\"";
-  const NSString* PBTYPE_EMF = 
@"application/x-openoffice-emf;windows_formatname=\"Image EMF\"";
-
-  const NSString* PBTYPE_DUMMY_INTERNAL = @"application/x-openoffice-internal";
+  NSString* PBTYPE_SODX = 
@"application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star 
Object Descriptor (XML)\"";
+  NSString* PBTYPE_SESX = 
@"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed 
Source (XML)\"";
+  NSString* PBTYPE_SLSDX = 
@"application/x-openoffice-linksrcdescriptor-xml;windows_formatname=\"Star Link 
Source Descriptor (XML)\"";
+  NSString* PBTYPE_ESX = 
@"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed 
Source (XML)\"";
+  NSString* PBTYPE_LSX = 
@"application/x-openoffice-link-source-xml;windows_formatname=\"Star Link 
Source (XML)\"";
+  NSString* PBTYPE_EOX = 
@"application/x-openoffice-embedded-obj-xml;windows_formatname=\"Star Embedded 
Object (XML)\"";
+  NSString* PBTYPE_SVXB = 
@"application/x-openoffice-svbx;windows_formatname=\"SVXB (StarView 
Bitmap/Animation)\"";
+  NSString* PBTYPE_GDIMF = 
@"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"";
+  NSString* PBTYPE_WMF = 
@"application/x-openoffice-wmf;windows_formatname=\"Image WMF\"";
+  NSString* PBTYPE_EMF = 
@"application/x-openoffice-emf;windows_formatname=\"Image EMF\"";
+
+  NSString* PBTYPE_DUMMY_INTERNAL = @"application/x-openoffice-internal";
 
   const char* FLAVOR_SODX = 
"application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object 
Descriptor (XML)\"";
   const char* FLAVOR_SESX = 
"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed 
Source (XML)\"";
-- 
1.7.4.4

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to