diff options
-rw-r--r-- | cui/source/dialogs/pastedlg.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 17468a7779e5..85e49f637b09 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -97,9 +97,11 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, { //TODO/LATER: why is the Descriptor never used?! TransferableObjectDescriptor aDesc; - if( rHelper.HasFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) ) - ((TransferableDataHelper&)rHelper).GetTransferableObjectDescriptor( - SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aDesc ); + if (rHelper.HasFormat(SOT_FORMATSTR_ID_OBJECTDESCRIPTOR)) + { + (void)const_cast<TransferableDataHelper&>(rHelper).GetTransferableObjectDescriptor( + SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aDesc); + } if ( !pFormats ) pFormats = &rHelper.GetDataFlavorExVector(); |