sc/source/ui/view/viewdata.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit ecbad850058c567f4739ec51926e1953c49e187f
Author:     Dennis Francis <dennis.fran...@collabora.com>
AuthorDate: Wed Jun 3 15:18:31 2020 +0530
Commit:     Dennis Francis <dennis.fran...@collabora.com>
CommitDate: Wed Jul 8 11:44:00 2020 +0200

    SetLOKSpecialOutputArea() call must precede SetOutputArea()
    
    The ordering matters at the moment (unfortunately), since
    EditView::SetOutputArea(), after updating the output-area it also sends the
    LOK messages(cursor/selection) immediately. So we need to update the
    print-twips version in EditView by calling SetLOKSpecialOutputArea()
    beforehand to avoid wrong messages.
    
    Change-Id: Ibff64ad1a92f332ad726452369ecb2c5b2aaae53
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98128
    Tested-by: Jenkins
    Reviewed-by: Dennis Francis <dennis.fran...@collabora.com>

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 7a4d8224a06f..3469399f40b4 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1530,9 +1530,6 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
             aPTwipsRect.AdjustRight(TWIPS_PER_PIXEL);
     }
 
-    tools::Rectangle aOutputArea = pWin->PixelToLogic( aPixRect, 
GetLogicMode() );
-    pEditView[eWhich]->SetOutputArea( aOutputArea );
-
     if (bLOKPrintTwips)
     {
         if (!pEditView[eWhich]->HasLOKSpecialPositioning())
@@ -1541,6 +1538,9 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
             pEditView[eWhich]->SetLOKSpecialOutputArea(aPTwipsRect);
     }
 
+    tools::Rectangle aOutputArea = pWin->PixelToLogic( aPixRect, 
GetLogicMode() );
+    pEditView[eWhich]->SetOutputArea( aOutputArea );
+
     if ( bActive && eWhich == GetActivePart() )
     {
         // keep the part that has the active edit view available after
@@ -2021,10 +2021,11 @@ void ScViewData::EditGrowX()
             bMoveArea = false;
         }
 
-        pCurView->SetOutputArea(aArea);
         if (bLOKPrintTwips)
             pCurView->SetLOKSpecialOutputArea(aAreaPTwips);
 
+        pCurView->SetOutputArea(aArea);
+
         //  In vertical mode, the whole text is moved to the next cell 
(right-aligned),
         //  so everything must be repainted. Otherwise, paint only the new 
area.
         //  If growing in centered alignment, if the cells left and right have 
different sizes,
@@ -2134,10 +2135,11 @@ void ScViewData::EditGrowY( bool bInitial )
 
     if (bChanged)
     {
-        pCurView->SetOutputArea(aArea);
         if (bLOKPrintTwips)
             pCurView->SetLOKSpecialOutputArea(aAreaPTwips);
 
+        pCurView->SetOutputArea(aArea);
+
         if (nEditEndRow >= nBottom || bMaxReached)
         {
             if (!(nControl & EVControlBits::AUTOSCROLL))
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to