summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2020-06-03 15:18:31 +0530
committerDennis Francis <dennis.francis@collabora.com>2020-07-06 17:43:32 +0200
commit849d7d8c09120d842ea1a75dd266ee375cb25c78 (patch)
tree29a163e6334634fffd9c7d0b86d5b444103f7970 /sc
parent320f0c0e6c7d4af6849b6a72ecf9988fe32689f8 (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/+/98064 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/viewdata.cxx12
1 files changed, 7 insertions, 5 deletions
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))