diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2020-06-03 15:18:31 +0530 |
---|---|---|
committer | Dennis Francis <dennis.francis@collabora.com> | 2020-07-08 11:44:00 +0200 |
commit | ecbad850058c567f4739ec51926e1953c49e187f (patch) | |
tree | 9e38de4b7a92f87beb0d1885f5b9710ece840aba /sc | |
parent | 5701b35279444a635e6ef33ba2ffd35965e1c25d (diff) |
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.francis@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
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)) |