[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/source
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 6 06:40:51 UTC 2020
sc/source/ui/unoobj/docuno.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 4c84a73d741022e6ee0015a4a6bd3e4e8dc884e7
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Thu May 28 04:56:25 2020 +0530
Commit: Dennis Francis <dennis.francis at collabora.com>
CommitDate: Mon Jul 6 08:40:13 2020 +0200
lokit: Do not assume 100% zoom for computing document-size
This fix prevents rendering issues (bottom/right area the sheet clipped
off/extra spaces) at the bottom/right of sheets with certain non default
zooms in online.
Change-Id: I2778d6259f8caf5a99d9eab57ae7b87751304ce3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98052
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 416357b35bea..63aaf55bc3e6 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -620,20 +620,22 @@ Size ScModelObj::getDocumentSize()
rDoc.GetTiledRenderingArea(nTab, nEndCol, nEndRow);
const ScDocument* pThisDoc = &rDoc;
+ const double fPPTX = pViewData->GetPPTX();
+ const double fPPTY = pViewData->GetPPTY();
- auto GetColWidthPx = [pThisDoc, nTab](SCCOL nCol) {
+ auto GetColWidthPx = [pThisDoc, fPPTX, nTab](SCCOL nCol) {
const sal_uInt16 nSize = pThisDoc->GetColWidth(nCol, nTab);
- return ScViewData::ToPixel(nSize, 1.0 / TWIPS_PER_PIXEL);
+ return ScViewData::ToPixel(nSize, fPPTX);
};
long nDocWidthPixel = pViewData->GetLOKWidthHelper().computePosition(nEndCol, GetColWidthPx);
- long nDocHeightPixel = pThisDoc->GetScaledRowHeight( 0, nEndRow, nTab, 1.0 / TWIPS_PER_PIXEL );
+ long nDocHeightPixel = pThisDoc->GetScaledRowHeight(0, nEndRow, nTab, fPPTY);
if (nDocWidthPixel > 0 && nDocHeightPixel > 0)
{
// convert to twips
- aSize.setWidth(nDocWidthPixel * TWIPS_PER_PIXEL);
- aSize.setHeight(nDocHeightPixel * TWIPS_PER_PIXEL);
+ aSize.setWidth(nDocWidthPixel / fPPTX);
+ aSize.setHeight(nDocHeightPixel / fPPTY);
}
else
{
More information about the Libreoffice-commits
mailing list