| OSXTransferable.cxx (3ee7bea8) | OSXTransferable.cxx (e7dbd3e3) |
|---|---|
| 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 71 unchanged lines hidden (view full) --- 80{ 81 if (!isValidFlavor(aFlavor) || !isDataFlavorSupported(aFlavor)) 82 { 83 throw UnsupportedFlavorException(OUString(RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Unsupported data flavor")), 84 static_cast<XTransferable*>(this)); 85 } 86 87 bool bInternal(false); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 71 unchanged lines hidden (view full) --- 80{ 81 if (!isValidFlavor(aFlavor) || !isDataFlavorSupported(aFlavor)) 82 { 83 throw UnsupportedFlavorException(OUString(RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Unsupported data flavor")), 84 static_cast<XTransferable*>(this)); 85 } 86 87 bool bInternal(false); |
| 88 NSString* sysFormat = | 88 const NSString* sysFormat = |
| 89 (aFlavor.MimeType.compareToAscii( "image/png", 9 ) == 0) 90 ? mDataFlavorMapper->openOfficeImageToSystemFlavor( mPasteboard ) 91 : mDataFlavorMapper->openOfficeToSystemFlavor(aFlavor, bInternal); 92 DataProviderPtr_t dp; 93 94 if ([sysFormat caseInsensitiveCompare: NSFilenamesPboardType] == NSOrderedSame) 95 { | 89 (aFlavor.MimeType.compareToAscii( "image/png", 9 ) == 0) 90 ? mDataFlavorMapper->openOfficeImageToSystemFlavor( mPasteboard ) 91 : mDataFlavorMapper->openOfficeToSystemFlavor(aFlavor, bInternal); 92 DataProviderPtr_t dp; 93 94 if ([sysFormat caseInsensitiveCompare: NSFilenamesPboardType] == NSOrderedSame) 95 { |
| 96 NSArray* sysData = [mPasteboard propertyListForType: sysFormat]; | 96 NSArray* sysData = [mPasteboard propertyListForType: (NSString*)sysFormat]; |
| 97 dp = mDataFlavorMapper->getDataProvider(sysFormat, sysData); 98 } 99 else 100 { | 97 dp = mDataFlavorMapper->getDataProvider(sysFormat, sysData); 98 } 99 else 100 { |
| 101 NSData* sysData = [mPasteboard dataForType: sysFormat]; | 101 NSData* sysData = [mPasteboard dataForType: (NSString*)sysFormat]; |
| 102 dp = mDataFlavorMapper->getDataProvider(sysFormat, sysData); 103 } 104 105 if (dp.get() == NULL) 106 { 107 throw UnsupportedFlavorException(OUString(RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Unsupported data flavor")), 108 static_cast<XTransferable*>(this)); 109 } --- 103 unchanged lines hidden --- | 102 dp = mDataFlavorMapper->getDataProvider(sysFormat, sysData); 103 } 104 105 if (dp.get() == NULL) 106 { 107 throw UnsupportedFlavorException(OUString(RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Unsupported data flavor")), 108 static_cast<XTransferable*>(this)); 109 } --- 103 unchanged lines hidden --- |