From 2a9e22157b61a67591057b3926e290236250efd0 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 10 Oct 2023 12:47:41 +0300 Subject: Make some methods const, and avoid some const_casts Change-Id: I4964abd34836438e3d24ee7c3c3b324f356477b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157746 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- cui/source/dialogs/pastedlg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index d86d277cc34f..423637e9d9e9 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -85,7 +85,7 @@ void SvPasteObjectDialog::PreGetFormat( const TransferableDataHelper &rHelper ) TransferableObjectDescriptor aDesc; if (rHelper.HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR)) { - (void)const_cast(rHelper).GetTransferableObjectDescriptor( + (void)rHelper.GetTransferableObjectDescriptor( SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc); } const DataFlavorExVector* pFormats = &rHelper.GetDataFlavorExVector(); @@ -204,7 +204,7 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelpe TransferableObjectDescriptor aDesc; if (rHelper.HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR)) { - (void)const_cast(rHelper).GetTransferableObjectDescriptor( + (void)rHelper.GetTransferableObjectDescriptor( SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc); } const DataFlavorExVector* pFormats = &rHelper.GetDataFlavorExVector(); -- cgit