summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-30 16:03:52 +0200
committerNoel Grandin <noel@peralex.com>2016-08-31 10:00:07 +0200
commitbf02fe3b4db51c8e5c80c3438f0fc166ef386861 (patch)
tree2b3e595ea7719e1e8477eda68a788bda2a18c81d
parentf1226d19d944791fc0150c064d1a9985d5913907 (diff)
inline some get-function-pointer-collection functions
no need to have two different ways of getting to the SwMoveFnCollection structs, they are already exposed and used as global constants Change-Id: Iec6e1ee2d9cd2edb8237f24d72024652271a9d5e
-rw-r--r--sw/inc/cshtyp.hxx14
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx2
-rw-r--r--sw/source/core/crsr/paminit.cxx17
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx14
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx2
6 files changed, 14 insertions, 37 deletions
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx
index baefa82390fc..3546bb1ff256 100644
--- a/sw/inc/cshtyp.hxx
+++ b/sw/inc/cshtyp.hxx
@@ -45,8 +45,8 @@ typedef bool (*SwWhichPara)( SwPaM&, SwMoveFnCollection const & );
bool GoPrevPara( SwPaM&, SwMoveFnCollection const &);
SW_DLLPUBLIC bool GoCurrPara( SwPaM&, SwMoveFnCollection const &);
bool GoNextPara( SwPaM&, SwMoveFnCollection const &);
-extern SwMoveFnCollection const & fnParaStart;
-extern SwMoveFnCollection const & fnParaEnd;
+extern SW_DLLPUBLIC SwMoveFnCollection const & fnParaStart;
+extern SW_DLLPUBLIC SwMoveFnCollection const & fnParaEnd;
// Direction-parameter for MoveSection.
typedef bool (*SwWhichSection)( SwPaM&, SwMoveFnCollection const & );
@@ -60,8 +60,8 @@ typedef bool (*SwWhichTable)( SwPaM&, SwMoveFnCollection const &, bool bInReadOn
SW_DLLPUBLIC bool GotoPrevTable( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
SW_DLLPUBLIC bool GotoCurrTable( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
bool GotoNextTable( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
-extern SwMoveFnCollection const & fnTableStart;
-extern SwMoveFnCollection const & fnTableEnd;
+extern SW_DLLPUBLIC SwMoveFnCollection const & fnTableStart;
+extern SW_DLLPUBLIC SwMoveFnCollection const & fnTableEnd;
// Direction-parameter for MoveColumn
typedef SwLayoutFrame * (*SwWhichColumn)( const SwLayoutFrame * );
@@ -110,12 +110,6 @@ enum class SwDocPositions
OtherEnd
};
-SW_DLLPUBLIC SwMoveFnCollection const & GetfnParaStart();
-SW_DLLPUBLIC SwMoveFnCollection const & GetfnParaEnd();
-
-SW_DLLPUBLIC SwMoveFnCollection const & GetfnTableStart();
-SW_DLLPUBLIC SwMoveFnCollection const & GetfnTableEnd();
-
#endif // INCLUDED_SW_INC_CSHTYP_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index e1b9a6571c0c..875c2c184851 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -399,7 +399,7 @@ void SwUiWriterTest::testBookmarkCopy()
rIDCO.SplitNode(*aPaM.GetPoint(), false);
rIDCO.InsertString(aPaM, "bar");
aPaM.SetMark();
- aPaM.MovePara(GoCurrPara, GetfnParaStart());
+ aPaM.MovePara(GoCurrPara, fnParaStart);
rIDMA.makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK);
aPaM.Exchange();
aPaM.DeleteMark();
diff --git a/sw/source/core/crsr/paminit.cxx b/sw/source/core/crsr/paminit.cxx
index 9362d111365c..0495bd7cdc17 100644
--- a/sw/source/core/crsr/paminit.cxx
+++ b/sw/source/core/crsr/paminit.cxx
@@ -57,21 +57,4 @@ SwMoveFnCollection const & fnRegionEnd = aBwrd;
SwMoveFnCollection const & fnMoveBackward = aBwrd;
SwMoveFnCollection const & fnMoveForward = aFwrd;
-SwMoveFnCollection const & GetfnParaStart()
-{
- return fnParaStart;
-}
-SwMoveFnCollection const & GetfnParaEnd()
-{
- return fnParaEnd;
-}
-SwMoveFnCollection const & GetfnTableStart()
-{
- return fnTableStart;
-}
-SwMoveFnCollection const & GetfnTableEnd()
-{
- return fnTableEnd;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 1ff76ed1c1cd..18100659f45b 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -281,7 +281,7 @@ void SwDropCapsPict::UpdatePaintSettings()
mpPage->rSh.SttCursorMove();
mpPage->rSh.ClearMark();
SwWhichPara pSwuifnParaCurr = GoCurrPara;
- SwMoveFnCollection const & pSwuifnParaStart = GetfnParaStart();
+ SwMoveFnCollection const & pSwuifnParaStart = fnParaStart;
mpPage->rSh.MovePara(pSwuifnParaCurr,pSwuifnParaStart);
// normal
GetFontSettings( *mpPage, aFont, RES_CHRATR_FONT );
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index d8f0546ed873..412a6670eacd 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1036,7 +1036,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rSh.InsertTable(
pModOpt->GetInsTableFlags(bHTML),
nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFormat : nullptr) );
- rSh.MoveTable( GotoPrevTable, GetfnTableStart() );
+ rSh.MoveTable( GotoPrevTable, fnTableStart );
if( pSelection && pTableSet )
SetTabSet();
@@ -1173,7 +1173,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
pWait.reset(new SwWait( *pView->GetDocShell(), true ));
}
- rSh.MoveTable( GotoCurrTable, GetfnTableStart() );
+ rSh.MoveTable( GotoCurrTable, fnTableStart );
if( !pSelection && ( pTableSet || pTAutoFormat ))
{
if( pTableSet )
@@ -1368,13 +1368,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
// at the end.
rSh.SwCursorShell::MovePara(
- GoCurrPara, GetfnParaStart() );
+ GoCurrPara, fnParaStart );
pMark = rSh.SetBookmark(
vcl::KeyCode(),
OUString(),
OUString(), IDocumentMarkAccess::MarkType::UNO_BOOKMARK );
rSh.SwCursorShell::MovePara(
- GoCurrPara, GetfnParaEnd() );
+ GoCurrPara, fnParaEnd );
bSetCursor = false;
}
}
@@ -1462,14 +1462,14 @@ void SwInsertDBColAutoPilot::SetTabSet()
rSh.GetTableFormat()->GetName() )
pTableSet->ClearItem( FN_PARAM_TABLE_NAME );
- rSh.MoveTable( GotoCurrTable, GetfnTableStart() );
+ rSh.MoveTable( GotoCurrTable, fnTableStart );
rSh.SetMark();
- rSh.MoveTable( GotoCurrTable, GetfnTableEnd() );
+ rSh.MoveTable( GotoCurrTable, fnTableEnd );
ItemSetToTableParam( *pTableSet, rSh );
rSh.ClearMark();
- rSh.MoveTable( GotoCurrTable, GetfnTableStart() );
+ rSh.MoveTable( GotoCurrTable, fnTableStart );
}
DB_ColumnConfigData::~DB_ColumnConfigData() {}
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 6f9a4f4b7745..5ff97ed8ce34 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -449,7 +449,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
else
{
//we may end up inside of a paragraph if the left margin is not at DEFAULT_LEFT_DISTANCE
- rShell.MovePara(GoCurrPara, GetfnParaStart());
+ rShell.MovePara(GoCurrPara, fnParaStart);
}
bool bSplitNode = !rShell.GetText().isEmpty();
sal_Int32 nMoves = rConfigItem.GetGreetingMoves();