editeng/source/editeng/impedit.cxx |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 9f60d8858a5b6ba0ea7cd9958e1cd8701b918b2c
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Thu Jun 9 15:08:41 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Thu Jun 9 19:53:17 2022 +0200

    remove incorrect #ifdef DBG_UTIL around normal code (tdf#149476)
    
    This code sets sufficient size for the virtual device that saves
    the content, so it's not some optional debug code. Without this
    selecting text in Calc formula bar and dragging it around leaves
    artifacts, because the saved content is not large enough to restore
    the original widget content. This dates back to
    d51fe1189dcbe0fe06805c8d99687c125cd254eb, which supposedly made
    the code warning-free (and also correct-free).
    
    Change-Id: I52dab8c8d3a083fff9da8aed27facdf21076622e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135555
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index 348bb24f9577..d33632f56838 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -2151,9 +2151,6 @@ void ImpEditView::ShowDDCursor( const tools::Rectangle& 
rRect )
     aSaveRect.AdjustRight(1 );
     aSaveRect.AdjustBottom(1 );
 
-#ifdef DBG_UTIL
-    Size aNewSzPx( aSaveRect.GetSize() );
-#endif
     if ( !pDragAndDropInfo->pBackground )
     {
         pDragAndDropInfo->pBackground = VclPtr<VirtualDevice>::Create(rOutDev);
@@ -2163,14 +2160,13 @@ void ImpEditView::ShowDDCursor( const tools::Rectangle& 
rRect )
 
     }
 
-#ifdef DBG_UTIL
+    Size aNewSzPx( aSaveRect.GetSize() );
     Size aCurSzPx( pDragAndDropInfo->pBackground->GetOutputSizePixel() );
     if ( ( aCurSzPx.Width() < aNewSzPx.Width() ) ||( aCurSzPx.Height() < 
aNewSzPx.Height() ) )
     {
         bool bDone = pDragAndDropInfo->pBackground->SetOutputSizePixel( 
aNewSzPx );
         DBG_ASSERT( bDone, "Virtual Device broken?" );
     }
-#endif
 
     aSaveRect = rOutDev.PixelToLogic( aSaveRect );
 

Reply via email to