summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc/viewdata.hxx
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2017-03-29 12:55:12 +0200
committerMarco Cecchetti <mrcekets@gmail.com>2017-10-02 18:44:46 +0200
commitb230f845e794641721254e0a95b006eb3588aa0c (patch)
treea8fce1f2b972d7ccd9745b4448a908603b00862a /sc/source/ui/inc/viewdata.hxx
parenta789ef3c41443a3aa964bea31e2c8e22552fcdfd (diff)
lok - sc: document size as sum of row heights/col widths in pixel
Grid lines, cursor overlay, row/col headers are all computed by summing up row heights / col widths converted to pixels. On the contrary the document size was converted to pixel only at the end after having summed up heights/widths in twips. All that lead to have a document height/width greater than the position of the last row/col, with the scrolling in online going unplesantly far beyond the last row/column. This patch change the way the document size is computed, so that the spreadsheet height/width matches the position of the last row/column. Moreover it exploits the cache-like structure for row/col positions introduced in a previous commit. Change-Id: Ibb2cc6a7b592e359a0b1202dc9bea1dd4c421354 Reviewed-on: https://gerrit.libreoffice.org/40448 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Diffstat (limited to 'sc/source/ui/inc/viewdata.hxx')
-rw-r--r--sc/source/ui/inc/viewdata.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index dbda16afe2f2..0b3fbb2f61b3 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -337,6 +337,9 @@ public:
SCROW GetCurYForTab( SCTAB nTabIndex ) const;
SCCOL GetOldCurX() const;
SCROW GetOldCurY() const;
+ long GetLOKDocWidthPixel() const { return pThisTab->aWidthHelper.getPosition(pThisTab->nMaxTiledCol); }
+ long GetLOKDocHeightPixel() const { return pThisTab->aHeightHelper.getPosition(pThisTab->nMaxTiledRow); }
+
ScPositionHelper& GetLOKWidthHelper() { return pThisTab->aWidthHelper; }
ScPositionHelper& GetLOKHeightHelper() { return pThisTab->aHeightHelper; }
@@ -367,8 +370,8 @@ public:
void SetVSplitPos( long nPos ) { pThisTab->nVSplitPos = nPos; }
void SetFixPosX( SCCOL nPos ) { pThisTab->nFixPosX = nPos; }
void SetFixPosY( SCROW nPos ) { pThisTab->nFixPosY = nPos; }
- void SetMaxTiledCol( SCCOL nCol ) { pThisTab->nMaxTiledCol = nCol; }
- void SetMaxTiledRow( SCROW nRow ) { pThisTab->nMaxTiledRow = nRow; }
+ void SetMaxTiledCol( SCCOL nCol );
+ void SetMaxTiledRow( SCROW nRow );
void SetPagebreakMode( bool bSet );
void SetPasteMode ( ScPasteFlags nFlags ) { nPasteFlags = nFlags; }