[Libreoffice-commits] core.git: sc/source
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 7 09:44:21 UTC 2020
sc/source/ui/inc/viewdata.hxx | 2 +-
sc/source/ui/view/viewdata.cxx | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit ecb2dc9705d2197833cfbfd2259d3ac289f3e82d
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Tue Jun 2 15:32:29 2020 +0530
Commit: Dennis Francis <dennis.francis at collabora.com>
CommitDate: Tue Jul 7 11:43:34 2020 +0200
Allow edit-area computation in print-twips...
via a optional flag bInPrintTwips (false by default) in
ScViewData::GetEditArea()
Change-Id: I9bf7465b703a2df817fe438db3671261d0d907a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98122
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index b893eb63dab0..286330adeaee 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -595,7 +595,7 @@ public:
SCROW GetEditEndRow() const { return nEditEndRow; }
tools::Rectangle GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, vcl::Window* pWin,
- const ScPatternAttr* pPattern, bool bForceToTop );
+ const ScPatternAttr* pPattern, bool bForceToTop, bool bInPrintTwips = false );
void SetTabNo( SCTAB nNewTab );
void SetActivePart( ScSplitPos eNewActive );
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 7a4a630d409c..f7f8735da490 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1421,10 +1421,12 @@ void ScViewData::SetMaxTiledRow( SCROW nNewMaxRow )
tools::Rectangle ScViewData::GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY,
vcl::Window* pWin, const ScPatternAttr* pPattern,
- bool bForceToTop )
+ bool bForceToTop, bool bInPrintTwips )
{
- return ScEditUtil( pDoc, nPosX, nPosY, nTabNo, GetScrPos(nPosX,nPosY,eWhich,true),
- pWin, nPPTX, nPPTY, GetZoomX(), GetZoomY() ).
+ Point aCellTopLeft = bInPrintTwips ?
+ GetPrintTwipsPos(nPosX, nPosY) : GetScrPos(nPosX, nPosY, eWhich, true);
+ return ScEditUtil( pDoc, nPosX, nPosY, nTabNo, aCellTopLeft,
+ pWin, nPPTX, nPPTY, GetZoomX(), GetZoomY(), bInPrintTwips ).
GetEditArea( pPattern, bForceToTop );
}
More information about the Libreoffice-commits
mailing list