diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-10-18 13:28:53 +0200 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-10-18 13:28:53 +0200 |
commit | dcc7ee5540e58c117a450eec93c099b59a7530c8 (patch) | |
tree | adbe7d801b2f1b0a91f389978581ac05469aa2c4 /vcl/aqua/source/dtrans | |
parent | e21cf551ed6ec03facb14a2649c35886be9f022c (diff) | |
parent | 2d04029ec3cc0306012d73ac6197be424c4cc734 (diff) |
CWS-TOOLING: integrate CWS vcl115
Diffstat (limited to 'vcl/aqua/source/dtrans')
-rw-r--r-- | vcl/aqua/source/dtrans/aqua_clipboard.cxx | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.cxx b/vcl/aqua/source/dtrans/aqua_clipboard.cxx index 52fb13e1e11f..abffeebcb6c1 100644 --- a/vcl/aqua/source/dtrans/aqua_clipboard.cxx +++ b/vcl/aqua/source/dtrans/aqua_clipboard.cxx @@ -322,14 +322,17 @@ void AquaClipboard::fireLostClipboardOwnershipEvent(Reference<XClipboardOwner> o void AquaClipboard::provideDataForType(NSPasteboard* sender, NSString* type) { - DataProviderPtr_t dp = mpDataFlavorMapper->getDataProvider(type, mXClipboardContent); - NSData* pBoardData = NULL; - - if (dp.get() != NULL) - { - pBoardData = (NSData*)dp->getSystemData(); - [sender setData: pBoardData forType: type]; - } + if( mXClipboardContent.is() ) + { + DataProviderPtr_t dp = mpDataFlavorMapper->getDataProvider(type, mXClipboardContent); + NSData* pBoardData = NULL; + + if (dp.get() != NULL) + { + pBoardData = (NSData*)dp->getSystemData(); + [sender setData: pBoardData forType: type]; + } + } } @@ -340,20 +343,21 @@ void AquaClipboard::provideDataForType(NSPasteboard* sender, NSString* type) void SAL_CALL AquaClipboard::flushClipboard() throw(RuntimeException) { - if (mXClipboardContent.is()) + if (mXClipboardContent.is()) { Sequence<DataFlavor> flavorList = mXClipboardContent->getTransferDataFlavors(); sal_uInt32 nFlavors = flavorList.getLength(); for (sal_uInt32 i = 0; i < nFlavors; i++) - { + { NSString* sysType = mpDataFlavorMapper->openOfficeToSystemFlavor(flavorList[i]); if (sysType != NULL) - { + { provideDataForType(mPasteboard, sysType); - } - } + } + } + mXClipboardContent.clear(); } } |