diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2024-01-22 16:43:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-02-08 17:11:39 +0100 |
commit | bdd0579b58f7a3b8c1886ea8513618c647c0ad30 (patch) | |
tree | 69d14074132f8523e055538d24dfeaaae1c9bf08 /sc/source/ui/view/tabview3.cxx | |
parent | f840a0d54d873d3003f8b624a50557f8c9872477 (diff) |
lok: calc: GridWindow size not updated for some view
The grid window size was updated for the view used for painting and
not for other views with the same zoom level. In fact the grid window
size was updated in ScModelObj::paintTile only. Now the required
updating is performed in lcl_ExtendTiledDimension and
ScTabView::SetCursor, too.
In order to get this working it has been neede to revert changes in
`ScModelObj::setClientVisibleArea` introduced by
https://gerrit.libreoffice.org/c/core/+/161907
Change-Id: Ie8f585b861b0c916624d8e2f9d828cf23b799672
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162406
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162558
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc/source/ui/view/tabview3.cxx')
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 7de940ce24a9..fb91cc886ef3 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -423,9 +423,22 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew ) if (pModelObj) aNewSize = pModelObj->getDocumentSize(); + if (aOldSize == aNewSize) + return; + if (!pDocSh) return; + if (pModelObj) + { + ScGridWindow* pGridWindow = aViewData.GetActiveWin(); + if (pGridWindow) + { + Size aNewSizePx(aNewSize.Width() * aViewData.GetPPTX(), aNewSize.Height() * aViewData.GetPPTY()); + pGridWindow->SetOutputSizePixel(aNewSizePx); + } + } + // New area extended to the right of the sheet after last column // including overlapping area with aNewRowArea tools::Rectangle aNewColArea(aOldSize.getWidth(), 0, aNewSize.getWidth(), aNewSize.getHeight()); |