sc/source/ui/view/viewdata.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
New commits: commit 849d7d8c09120d842ea1a75dd266ee375cb25c78 Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Wed Jun 3 15:18:31 2020 +0530 Commit: Dennis Francis <dennis.fran...@collabora.com> CommitDate: Mon Jul 6 17:43:32 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/+/98064 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> 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 35d75e227245..1eadc05975f1 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -1528,9 +1528,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()) @@ -1539,6 +1536,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 @@ -2019,10 +2019,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, @@ -2132,10 +2133,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