diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2020-05-23 12:22:56 +0530 |
---|---|---|
committer | Dennis Francis <dennis.francis@collabora.com> | 2020-07-05 09:37:33 +0200 |
commit | a94216649b629dc466a2fb0aafc37bd612cf975d (patch) | |
tree | a6afb5a20c770b5006ca5b78109abded99bdcc8b /sc/source/ui/inc/viewdata.hxx | |
parent | 6420c1edbf5b41c4ad0063e98e2040f2d74cf034 (diff) |
Allow cell coordinates calculation in print twips too
Change-Id: Ie8f23bd7ba8de57d7aab104add99501a54f08819
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97961
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
(cherry picked from commit 0722934920d7b743d82e55c793d4abbf6c9bc11d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97990
Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/inc/viewdata.hxx')
-rw-r--r-- | sc/source/ui/inc/viewdata.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 345f9d9ae00f..b893eb63dab0 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -503,6 +503,7 @@ public: // TRUE: Cell is merged bool GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix ) const; + bool GetMergeSizePrintTwips( SCCOL nX, SCROW nY, long& rSizeXTwips, long& rSizeYTwips ) const; void GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, SCCOL& rPosX, SCROW& rPosY, bool bTestMerge = true, bool bRepair = false ); @@ -603,10 +604,13 @@ public: bool bAllowNeg = false ) const; Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScHSplitPos eWhich ) const; Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich ) const; + /// returns the position (top-left corner) of the requested cell in print twips coordinates. + Point GetPrintTwipsPos( SCCOL nCol, SCROW nRow ) const; /// return json for our cursor position. OString describeCellCursor() const { return describeCellCursorAt(GetCurX(), GetCurY()); } - OString describeCellCursorAt( SCCOL nCol, SCROW nRow ) const; + OString describeCellCursorInPrintTwips() const { return describeCellCursorAt(GetCurX(), GetCurY(), false); } + OString describeCellCursorAt( SCCOL nCol, SCROW nRow, bool bPixelAligned = true ) const; SCCOL CellsAtX( SCCOL nPosX, SCCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeY = SC_SIZE_NONE ) const; SCROW CellsAtY( SCROW nPosY, SCROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeX = SC_SIZE_NONE ) const; |