[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Mar 21 14:32:58 UTC 2021


 sw/source/uibase/dochdl/swdtflvr.cxx |    4 ++--
 sw/source/uibase/inc/swdtflvr.hxx    |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7844323db795ed2912af0cd9c7d631ca8fc6aa4d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Mar 20 20:10:47 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Mar 21 15:32:14 2021 +0100

    remove need to const_cast
    
    Change-Id: Ie4cdf7fa49681201db9bbd9999ad423f8b195e6e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112820
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index f0888e2b18ce..6466f17af9c2 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -376,10 +376,10 @@ const Graphic* SwTransferable::FindOLEReplacementGraphic() const
     return nullptr;
 }
 
-void SwTransferable::RemoveDDELinkFormat( const vcl::Window& rWin )
+void SwTransferable::RemoveDDELinkFormat(vcl::Window& rWin)
 {
     RemoveFormat( SotClipboardFormatId::LINK );
-    CopyToClipboard( const_cast<vcl::Window*>(&rWin) );
+    CopyToClipboard(&rWin);
 }
 
 namespace
diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx
index 6a74656e6cb5..e4575ad4796e 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -187,7 +187,7 @@ public:
     bool  CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr );
 
     // remove the DDE-Link format promise
-    void RemoveDDELinkFormat( const vcl::Window& rWin );
+    void RemoveDDELinkFormat(vcl::Window& rWin);
 
     // paste - methods and helper methods for the paste
     static bool IsPaste( const SwWrtShell&, const TransferableDataHelper& );


More information about the Libreoffice-commits mailing list