From 36bc405d72f1d1898437dfa25d8cb4bdfba63e06 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 9 Aug 2012 15:44:23 +0200 Subject: fix column navigation with CTRL + direction, fdo#45020 Change-Id: I422b1b85e539d4e2819b93deaf8543410b44b9bd --- sc/inc/column.hxx | 2 +- sc/inc/document.hxx | 2 +- sc/inc/global.hxx | 8 ++++++++ sc/inc/table.hxx | 6 +++++- 4 files changed, 15 insertions(+), 3 deletions(-) (limited to 'sc/inc') diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 6bc8c8c2f5b7..d9c18ec57585 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -167,7 +167,7 @@ public: SCROW GetFirstVisDataPos() const; bool GetPrevDataPos(SCROW& rRow) const; bool GetNextDataPos(SCROW& rRow) const; - void FindDataAreaPos(SCROW& rRow, long nMovY) const; // (without Broadcaster) + void FindDataAreaPos(SCROW& rRow, bool bDown) const; // (without Broadcaster) void FindUsed( SCROW nStartRow, SCROW nEndRow, bool* pUsed ) const; SCSIZE VisibleCount( SCROW nStartRow, SCROW nEndRow ) const; diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 9893e7aef448..8fcdc6d29e4b 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -959,7 +959,7 @@ public: SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, ScDirection eDir ); - SC_DLLPUBLIC void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY ); + SC_DLLPUBLIC void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ); SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData& rMark ); diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 371431fc0265..44d8810ddd2d 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -329,6 +329,14 @@ enum FillCmd FILL_AUTO }; +enum ScMoveDirection +{ + SC_MOVE_RIGHT, + SC_MOVE_LEFT, + SC_MOVE_UP, + SC_MOVE_DOWN +}; + enum FillDateCmd { FILL_DAY, diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index bb365dbf29d4..87483266ba82 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -424,7 +424,7 @@ public: SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ); - void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY ); + void FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection ); void GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData& rMark ); @@ -913,6 +913,10 @@ private: void CopyPrintRange(const ScTable& rTable); + SCCOL FindNextVisibleColWithContent(SCCOL nCol, bool bRight, SCROW nRow); + + SCCOL FindNextVisibleCol(SCCOL nCol, bool bRight); + /** * Use this to iterate through non-empty visible cells in a single column. */ -- cgit