summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-05-10 11:49:41 +0200
committerJan Holesovsky <kendy@collabora.com>2016-05-10 11:52:23 +0200
commitb105b8c4c966f68bef93d72458edf64d6cb0cea2 (patch)
tree153d6d26ff31553448ab9582b4cb5b91e24b42d1
parentfd5ae1f201a894c5b15d52f3cab57ef15c9eb5b9 (diff)
sc lok: Extend the spreadsheet area when we are "close enough" to the end.
We can tweak later what the "close enough" means - for the moment it is 10 columns and 25 rows. Change-Id: I92127a71aa6683c03692e96b9e0da7827942c94b
-rw-r--r--sc/source/ui/view/tabview3.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index d16efbc14e7a..2005d914ef20 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -304,16 +304,17 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew )
if (comphelper::LibreOfficeKit::isActive())
{
- if ( nPosX > aViewData.GetMaxTiledCol() || nPosY > aViewData.GetMaxTiledRow() )
+ if (nPosX > aViewData.GetMaxTiledCol() - 10 || nPosY > aViewData.GetMaxTiledRow() - 25)
{
- aViewData.SetMaxTiledCol( std::max( nPosX, aViewData.GetMaxTiledCol() ) );
- aViewData.SetMaxTiledRow( std::max( nPosY, aViewData.GetMaxTiledRow() ) );
+ if (nPosX > aViewData.GetMaxTiledCol() - 10)
+ aViewData.SetMaxTiledCol(std::max(nPosX, aViewData.GetMaxTiledCol()) + 10);
+
+ if (nPosY > aViewData.GetMaxTiledRow() - 25)
+ aViewData.SetMaxTiledRow(std::max(nPosY, aViewData.GetMaxTiledRow()) + 25);
ScDocShell* pDocSh = aViewData.GetDocShell();
if (pDocSh)
- {
pDocSh->libreOfficeKitCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, "");
- }
}
}
}