summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-08-01 07:56:14 +0000
committerRüdiger Timm <rt@openoffice.org>2008-08-01 07:56:14 +0000
commit49ff8c8942fe55e5b69f4bad969aca68678c7b88 (patch)
tree27bcb38d63208a62b67b4cfaed4abdb07e3f5b74 /dtrans
parent1eddd90c39c4c044acc4259d276861fd6a368b51 (diff)
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
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/aqua/DataFlavorMapping.cxx27
1 files changed, 14 insertions, 13 deletions
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];
}