From 49ff8c8942fe55e5b69f4bad969aca68678c7b88 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Fri, 1 Aug 2008 07:56:14 +0000 Subject: INTEGRATION: CWS vcl30stop1 (1.5.4); FILE MERGED 2008/07/22 14:53:50 pl 1.5.4.1: #i90747# generalize the fix for i89462 --- dtrans/source/aqua/DataFlavorMapping.cxx | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'dtrans') diff --git a/dtrans/source/aqua/DataFlavorMapping.cxx b/dtrans/source/aqua/DataFlavorMapping.cxx index 6b145dbeac5d..ce042e15b4d8 100644 --- a/dtrans/source/aqua/DataFlavorMapping.cxx +++ b/dtrans/source/aqua/DataFlavorMapping.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: DataFlavorMapping.cxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.6 $ * * This file is part of OpenOffice.org. * @@ -655,23 +655,24 @@ NSArray* DataFlavorMapper::flavorSequenceToTypesArray(const com::sun::star::uno: sal_uInt32 nFlavors = flavors.getLength(); NSMutableArray* array = [[NSMutableArray alloc] initWithCapacity: 1]; - if( nFlavors == 0 ) // #i89462# work around insane impress implementation + for (sal_uInt32 i = 0; i < nFlavors; i++) { - [array addObject: PBTYPE_DUMMY_INTERNAL]; - } - else - { - for (sal_uInt32 i = 0; i < nFlavors; i++) - { - NSString* str = openOfficeToSystemFlavor(flavors[i]); + NSString* str = openOfficeToSystemFlavor(flavors[i]); - if (str != NULL) - { - [array addObject: str]; - } + if (str != NULL) + { + [array addObject: str]; } } + // #i89462# #i90747# + // in case no system flavor was found to report + // report at least one so D&D between OOo targets works + if( [array count] == 0 ) + { + [array addObject: PBTYPE_DUMMY_INTERNAL]; + } + return [array autorelease]; } -- cgit v1.2.3