summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-30 14:26:13 +0200
committerNoel Grandin <noel@peralex.com>2016-08-31 10:00:07 +0200
commitf0a563cce1c6e6f6babbe33bc3382d4ad4439754 (patch)
treebe9c7933bd2ed1c5468b4d9f85aaaf5ed048a13d
parent8c0db3e8ac158c8e131085843fcc326073e28c05 (diff)
Get rid of a pointless indirect function pointer variable
Change-Id: Ibcfac031bb0891b4849dc48904893bb891887788
-rw-r--r--sw/inc/cshtyp.hxx4
-rw-r--r--sw/source/core/crsr/trvlcol.cxx3
-rw-r--r--sw/source/uibase/wrtsh/move.cxx12
3 files changed, 9 insertions, 10 deletions
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx
index ac1761b400f6..75962455ab3b 100644
--- a/sw/inc/cshtyp.hxx
+++ b/sw/inc/cshtyp.hxx
@@ -66,7 +66,9 @@ extern SwMoveFnCollection const & fnTableEnd;
// Direction-parameter for MoveColumn
typedef SwLayoutFrame * (*SwWhichColumn)( const SwLayoutFrame * );
typedef SwContentFrame * (*SwPosColumn)( const SwLayoutFrame * );
-extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext;
+SwLayoutFrame* GetPrevColumn( const SwLayoutFrame* pLayFrame );
+SwLayoutFrame* GetCurrColumn( const SwLayoutFrame* pLayFrame );
+SwLayoutFrame* GetNextColumn( const SwLayoutFrame* pLayFrame );
extern SwPosColumn fnColumnStart, fnColumnEnd;
// Direction-parameter for MoveRegion (ranges!)
diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx
index fcfeb3053947..ce7ea3699254 100644
--- a/sw/source/core/crsr/trvlcol.cxx
+++ b/sw/source/core/crsr/trvlcol.cxx
@@ -64,9 +64,6 @@ SwContentFrame* GetColumnEnd( const SwLayoutFrame* pColFrame )
return pRet;
}
-SwWhichColumn fnColumnPrev = &GetPrevColumn;
-SwWhichColumn fnColumnCurr = &GetCurrColumn;
-SwWhichColumn fnColumnNext = &GetNextColumn;
SwPosColumn fnColumnStart = &GetColumnStt;
SwPosColumn fnColumnEnd = &GetColumnEnd;
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index 3aedea42a4d5..58ab87399a26 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -357,37 +357,37 @@ void SwWrtShell::EndPara( bool bSelect )
void SwWrtShell::StartOfColumn()
{
ShellMoveCursor aTmp( this, false/*bSelect*/);
- MoveColumn(fnColumnCurr, fnColumnStart);
+ MoveColumn(GetCurrColumn, fnColumnStart);
}
void SwWrtShell::EndOfColumn()
{
ShellMoveCursor aTmp( this, false/*bSelect*/);
- MoveColumn(fnColumnCurr, fnColumnEnd);
+ MoveColumn(GetCurrColumn, fnColumnEnd);
}
void SwWrtShell::StartOfNextColumn()
{
ShellMoveCursor aTmp( this, false/*bSelect*/);
- MoveColumn( fnColumnNext, fnColumnStart);
+ MoveColumn( GetNextColumn, fnColumnStart);
}
void SwWrtShell::EndOfNextColumn()
{
ShellMoveCursor aTmp( this, false/*bSelect*/);
- MoveColumn(fnColumnNext, fnColumnEnd);
+ MoveColumn(GetNextColumn, fnColumnEnd);
}
void SwWrtShell::StartOfPrevColumn()
{
ShellMoveCursor aTmp( this, false/*bSelect*/);
- MoveColumn(fnColumnPrev, fnColumnStart);
+ MoveColumn(GetPrevColumn, fnColumnStart);
}
void SwWrtShell::EndOfPrevColumn()
{
ShellMoveCursor aTmp( this, false/*bSelect*/);
- MoveColumn(fnColumnPrev, fnColumnEnd);
+ MoveColumn(GetPrevColumn, fnColumnEnd);
}
bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect)