ScGridWindow::UpdateEditViewPos: keep EditView's print-twips data updated

Change-Id: I2f6fab371a107a4f16704030e341198a541020f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98127
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
This commit is contained in:
Dennis Francis 2020-06-03 14:59:12 +05:30
parent 5483183ab0
commit 33509fd948

View file

@ -4554,6 +4554,18 @@ void ScGridWindow::UpdateEditViewPos()
{
// bForceToTop = sal_True for editing
tools::Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, nullptr, true );
if (comphelper::LibreOfficeKit::isActive() &&
comphelper::LibreOfficeKit::isCompatFlagSet(
comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
{
tools::Rectangle aPTwipsRect = pViewData->GetEditArea(eWhich, nCol, nRow, this, nullptr,
true, true /* bInPrintTwips */);
tools::Rectangle aOutputAreaPTwips = pView->GetLOKSpecialOutputArea();
aOutputAreaPTwips.SetPos(aPTwipsRect.TopLeft());
pView->SetLOKSpecialOutputArea(aOutputAreaPTwips);
}
Point aScrPos = PixelToLogic( aPixRect.TopLeft(), pViewData->GetLogicMode() );
tools::Rectangle aRect = pView->GetOutputArea();