summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-04 09:24:56 +0200
committerNoel Grandin <noel@peralex.com>2016-03-04 11:48:04 +0200
commit9cc8a26fcdd4dbf7d5d65869bf84b824339751ce (patch)
treeb08de712db450099763ab9cd4e175354ad4c9837 /sw
parent9a1e6d916eff1236cc1be2056c91e56018a482bf (diff)
loplugin:unuseddefaultparam in sw
Change-Id: I1a8a25c09ae0c8ba39fcedb032562df93fdd6ba4
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/dbmgr.hxx3
-rw-r--r--sw/inc/editsh.hxx5
-rw-r--r--sw/inc/frmfmt.hxx2
-rw-r--r--sw/inc/ndarr.hxx3
-rw-r--r--sw/inc/ndtxt.hxx6
-rw-r--r--sw/inc/node.hxx3
-rw-r--r--sw/inc/section.hxx2
-rw-r--r--sw/inc/view.hxx2
-rw-r--r--sw/source/core/docnode/node.cxx6
-rw-r--r--sw/source/core/docnode/section.cxx4
-rw-r--r--sw/source/core/edit/ednumber.cxx4
-rw-r--r--sw/source/core/edit/edsect.cxx7
-rw-r--r--sw/source/core/layout/atrfrm.cxx4
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx18
-rw-r--r--sw/source/ui/fldui/fldpage.cxx29
-rw-r--r--sw/source/ui/fldui/fldpage.hxx5
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx5
-rw-r--r--sw/source/uibase/inc/inputwin.hxx2
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx32
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx4
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx16
-rw-r--r--sw/source/uibase/wrtsh/move.cxx24
-rw-r--r--sw/source/uibase/wrtsh/select.cxx8
23 files changed, 87 insertions, 107 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index f41adaa75b32..7c58b8a20e57 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -366,8 +366,7 @@ public:
const OUString& rTableOrQuery, bool bMergeShell);
/// open the source while fields are updated - for the calculator only!
- bool OpenDataSource(const OUString& rDataSource, const OUString& rTableOrQuery,
- sal_Int32 nCommandType = -1);
+ bool OpenDataSource(const OUString& rDataSource, const OUString& rTableOrQuery);
sal_uInt32 GetSelectedRecordId(const OUString& rDataSource, const OUString& rTableOrQuery, sal_Int32 nCommandType = -1);
bool GetColumnCnt(const OUString& rSourceName, const OUString& rTableName,
const OUString& rColumnName, sal_uInt32 nAbsRecordId, long nLanguage,
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 6e7df6ff7d25..b866ffc4abe9 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -523,7 +523,7 @@ public:
bool SelectionHasNumber() const;
bool SelectionHasBullet() const;
- OUString GetUniqueNumRuleName( const OUString* pChkStr = nullptr ) const;
+ OUString GetUniqueNumRuleName() const;
void ChgNumRuleFormats( const SwNumRule& rRule );
/// Set (and query if) a numbering with StartFlag starts at current PointPos.
@@ -829,8 +829,7 @@ public:
void DelSectionFormat( size_t nFormat);
void UpdateSection( size_t const nSect, SwSectionData &,
SfxItemSet const*const = nullptr);
- bool IsAnySectionInDoc( bool bChkReadOnly = false,
- bool bChkHidden = false ) const;
+ bool IsAnySectionInDoc( bool bChkReadOnly = false ) const;
OUString GetUniqueSectionName( const OUString* pChkStr = nullptr ) const;
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 50c8246bf513..a5e9942087a0 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -176,7 +176,7 @@ public:
SwFlyFrame* GetFrame( const Point* pDocPos = nullptr,
const bool bCalcFrame = false ) const;
- SwAnchoredObject* GetAnchoredObj( const Point* pDocPos = nullptr ) const;
+ SwAnchoredObject* GetAnchoredObj() const;
virtual Graphic MakeGraphic( ImageMap* pMap = nullptr ) override;
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index c2a4e6a6cc7b..fc51e57e65b1 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -204,8 +204,7 @@ public:
/// Implementations of "Make...Node" are in the given .cxx-files.
SwTextNode *MakeTextNode( const SwNodeIndex & rWhere,
- SwTextFormatColl *pColl,
- SwAttrSet* pAutoAttr = nullptr ); ///< in ndtxt.cxx
+ SwTextFormatColl *pColl ); ///< in ndtxt.cxx
SwStartNode* MakeTextSection( const SwNodeIndex & rWhere,
SwStartNodeType eSttNdTyp,
SwTextFormatColl *pColl );
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index efe9462b3fb4..cf196d0203a0 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -694,8 +694,7 @@ public:
bool bReplaceTabsWithSpaces = false ) const;
OUString GetRedlineText( sal_Int32 nIdx = 0,
- sal_Int32 nLen = SAL_MAX_INT32,
- bool bExpandFields = false ) const;
+ sal_Int32 nLen = SAL_MAX_INT32 ) const;
/** @return actual count of initial chars for initial-function.
If nWishLen == 0 that of first word. */
@@ -795,8 +794,7 @@ public:
sal_uInt32 GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const;
sal_uInt32 GetParRsid() const;
- bool CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2,
- sal_Int32 nEnd1 = 0 ) const;
+ bool CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2 ) const;
bool CompareParRsid( const SwTextNode &rTextNode ) const;
DECL_FIXEDMEMPOOL_NEWDEL(SwTextNode)
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 01ad9439e21c..dea2afc64019 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -409,8 +409,7 @@ public:
SwRect FindLayoutRect( const bool bPrtArea = false,
const Point* pPoint = nullptr,
const bool bCalcFrame = false ) const;
- SwRect FindPageFrameRect( const bool bPrtArea = false,
- const Point* pPoint = nullptr ) const;
+ SwRect FindPageFrameRect() const;
/** Method creates all views of document for given node. The content
frames that are created are put in the respective layout. */
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index b5b52ce8b9bf..d98df2cf3993 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -314,7 +314,7 @@ public:
// Query whether section is in Nodes-array or in UndoNodes-array.
bool IsInNodesArr() const;
- SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false);
+ SwSectionNode* GetSectionNode();
const SwSectionNode* GetSectionNode() const
{ return const_cast<SwSectionFormat *>(this)
->GetSectionNode(); }
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index 7d5d1ea2f592..0085004fe8ec 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -504,7 +504,7 @@ public:
void ExecTabWin(SfxRequest&);
void ExecuteStatusLine(SfxRequest&);
DECL_LINK_TYPED( ExecRulerClick, Ruler *, void );
- void ExecSearch(SfxRequest&, bool bNoMessage = false);
+ void ExecSearch(SfxRequest&);
void ExecViewOptions(SfxRequest &);
void StateViewOptions(SfxItemSet &);
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index cbd04e4ed8dc..91767f76ca0f 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1124,13 +1124,13 @@ SwRect SwContentNode::FindLayoutRect( const bool bPrtArea, const Point* pPoint,
return aRet;
}
-SwRect SwContentNode::FindPageFrameRect( const bool bPrtArea, const Point* pPoint ) const
+SwRect SwContentNode::FindPageFrameRect() const
{
SwRect aRet;
SwFrame* pFrame = ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
- FRM_CNTNT, pPoint );
+ FRM_CNTNT );
if( pFrame && nullptr != ( pFrame = pFrame->FindPageFrame() ))
- aRet = bPrtArea ? pFrame->Prt() : pFrame->Frame();
+ aRet = pFrame->Frame();
return aRet;
}
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index fd849ccf7d24..94f21ab19c63 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -1014,10 +1014,10 @@ void SwSectionFormat::UpdateParent()
}
}
-SwSectionNode* SwSectionFormat::GetSectionNode(bool const bAlways)
+SwSectionNode* SwSectionFormat::GetSectionNode()
{
const SwNodeIndex* pIdx = GetContent(false).GetContentIdx();
- if( pIdx && ( bAlways || &pIdx->GetNodes() == &GetDoc()->GetNodes() ))
+ if( pIdx && ( &pIdx->GetNodes() == &GetDoc()->GetNodes() ))
return pIdx->GetNode().GetSectionNode();
return nullptr;
}
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 1ab81d874102..6fe38d1adc7e 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -775,9 +775,9 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
EndAllAction();
}
-OUString SwEditShell::GetUniqueNumRuleName( const OUString* pChkStr ) const
+OUString SwEditShell::GetUniqueNumRuleName() const
{
- return GetDoc()->GetUniqueNumRuleName( pChkStr );
+ return GetDoc()->GetUniqueNumRuleName();
}
void SwEditShell::ChgNumRuleFormats( const SwNumRule& rRule )
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index 252cd2678a1b..060a26872ee8 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -115,7 +115,7 @@ size_t SwEditShell::GetSectionFormatCount() const
return GetDoc()->GetSections().size();
}
-bool SwEditShell::IsAnySectionInDoc( bool bChkReadOnly, bool bChkHidden ) const
+bool SwEditShell::IsAnySectionInDoc( bool bChkReadOnly ) const
{
const SwSectionFormats& rFormats = GetDoc()->GetSections();
@@ -127,9 +127,8 @@ bool SwEditShell::IsAnySectionInDoc( bool bChkReadOnly, bool bChkHidden ) const
&& TOX_HEADER_SECTION != eTmpType ) )
{
const SwSection& rSect = *pFormat->GetSection();
- if( (!bChkReadOnly && !bChkHidden ) ||
- (bChkReadOnly && rSect.IsProtectFlag() ) ||
- (bChkHidden && rSect.IsHiddenFlag() ) )
+ if( !bChkReadOnly ||
+ (bChkReadOnly && rSect.IsProtectFlag() ) )
return true;
}
}
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index de8bdd84583f..eec52b9d5580 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3041,9 +3041,9 @@ SwFlyFrame* SwFlyFrameFormat::GetFrame( const Point* pPoint, const bool bCalcFra
pPoint, nullptr, bCalcFrame ));
}
-SwAnchoredObject* SwFlyFrameFormat::GetAnchoredObj( const Point* pPoint ) const
+SwAnchoredObject* SwFlyFrameFormat::GetAnchoredObj() const
{
- SwFlyFrame* pFlyFrame( GetFrame( pPoint ) );
+ SwFlyFrame* pFlyFrame( GetFrame() );
if ( pFlyFrame )
{
return dynamic_cast<SwAnchoredObject*>(pFlyFrame);
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index b0d349c753ee..6c6350669c66 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -110,12 +110,11 @@ typedef std::vector<SwTextAttr*> SwpHts;
#endif
SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere,
- SwTextFormatColl *pColl,
- SwAttrSet* pAutoAttr )
+ SwTextFormatColl *pColl )
{
OSL_ENSURE( pColl, "Collection pointer is 0." );
- SwTextNode *pNode = new SwTextNode( rWhere, pColl, pAutoAttr );
+ SwTextNode *pNode = new SwTextNode( rWhere, pColl, nullptr );
SwNodeIndex aIdx( *pNode );
@@ -3212,8 +3211,7 @@ bool SwTextNode::GetExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx,
return true;
}
-OUString SwTextNode::GetRedlineText( sal_Int32 nIdx, sal_Int32 nLen,
- bool bExpandFields ) const
+OUString SwTextNode::GetRedlineText( sal_Int32 nIdx, sal_Int32 nLen ) const
{
std::vector<sal_Int32> aRedlArr;
const SwDoc* pDoc = GetDoc();
@@ -3275,13 +3273,13 @@ OUString SwTextNode::GetRedlineText( sal_Int32 nIdx, sal_Int32 nLen,
if( nIdxEnd < nEnd ) nEnd = nIdxEnd;
const sal_Int32 nDelCnt = nEnd - nStt;
aText.remove(nStt - nTextStt, nDelCnt);
- Replace0xFF(*this, aText, nTextStt, nStt - nTextStt, bExpandFields);
+ Replace0xFF(*this, aText, nTextStt, nStt - nTextStt, false/*bExpandFields*/);
nTextStt += nDelCnt;
}
else if( nStt >= nIdxEnd )
break;
}
- Replace0xFF(*this, aText, nTextStt, aText.getLength(), bExpandFields);
+ Replace0xFF(*this, aText, nTextStt, aText.getLength(), false/*bExpandFields*/);
return aText.makeStringAndClear();
}
@@ -4892,11 +4890,9 @@ bool SwTextNode::CompareParRsid( const SwTextNode &rTextNode ) const
return nThisRsid == nRsid;
}
-bool SwTextNode::CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2,
- sal_Int32 nEnd1 ) const
-
+bool SwTextNode::CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2 ) const
{
- sal_uInt32 nThisRsid = GetRsid( nStt1, nEnd1 ? nEnd1 : nStt1 );
+ sal_uInt32 nThisRsid = GetRsid( nStt1, nStt1 );
sal_uInt32 nRsid = rTextNode.GetRsid( nStt2, nStt2 );
return nThisRsid == nRsid;
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 4edd8f205572..964feb751e5b 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -278,28 +278,23 @@ void SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUS
}
}
-void SwFieldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2 )
+void SwFieldPage::SavePos( const ListBox* pLst1 )
{
- const ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, nullptr };
-
- const ListBox** ppLB = aLBArr;
- for( int i = 0; i < coLBCount; ++i, ++ppLB )
- if( (*ppLB) && (*ppLB)->GetEntryCount() )
- m_aLstStrArr[ i ] = (*ppLB)->GetSelectEntry();
- else
- m_aLstStrArr[ i ].clear();
+ if( pLst1 && pLst1->GetEntryCount() )
+ m_aLstStrArr[ 0 ] = pLst1->GetSelectEntry();
+ else
+ m_aLstStrArr[ 0 ].clear();
+ m_aLstStrArr[ 1 ].clear();
+ m_aLstStrArr[ 2 ].clear();
}
-void SwFieldPage::RestorePos(ListBox* pLst1, ListBox* pLst2)
+void SwFieldPage::RestorePos(ListBox* pLst1)
{
sal_Int32 nPos = 0;
- ListBox* aLBArr [ 2 ] = { pLst1, pLst2 };
- ListBox** ppLB = aLBArr;
- for( int i = 0; i < 2; ++i, ++ppLB )
- if( (*ppLB) && (*ppLB)->GetEntryCount() && !m_aLstStrArr[ i ].isEmpty() &&
- LISTBOX_ENTRY_NOTFOUND !=
- ( nPos = (*ppLB)->GetEntryPos(m_aLstStrArr[ i ] ) ) )
- (*ppLB)->SelectEntryPos( nPos );
+ if( pLst1 && pLst1->GetEntryCount() && !m_aLstStrArr[ 0 ].isEmpty() &&
+ LISTBOX_ENTRY_NOTFOUND !=
+ ( nPos = pLst1->GetEntryPos(m_aLstStrArr[ 0 ] ) ) )
+ pLst1->SelectEntryPos( nPos );
}
// Insert new fields
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index ac0a15521ca4..1aaaa87c920f 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -60,9 +60,8 @@ protected:
void InsertHdl(void *);
void Init();
- void SavePos( const ListBox* pLst1,
- const ListBox* pLst2 = nullptr);
- void RestorePos( ListBox* pLst1, ListBox* pLst2 = nullptr );
+ void SavePos( const ListBox* pLst1);
+ void RestorePos( ListBox* pLst1 );
void EnableInsert(bool bEnable = true);
inline bool IsFieldEdit() const { return m_bFieldEdit; }
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 85c283c3c1dc..3a400109a8ca 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2368,13 +2368,12 @@ bool SwDBManager::ToRecordId(sal_Int32 nSet)
return bRet;
}
-bool SwDBManager::OpenDataSource(const OUString& rDataSource, const OUString& rTableOrQuery,
- sal_Int32 nCommandType)
+bool SwDBManager::OpenDataSource(const OUString& rDataSource, const OUString& rTableOrQuery)
{
SwDBData aData;
aData.sDataSource = rDataSource;
aData.sCommand = rTableOrQuery;
- aData.nCommandType = nCommandType;
+ aData.nCommandType = -1;
SwDSParam* pFound = FindDSData(aData, true);
uno::Reference< sdbc::XDataSource> xSource;
diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx
index cc2f3f6e1934..e3338984a1c4 100644
--- a/sw/source/uibase/inc/inputwin.hxx
+++ b/sw/source/uibase/inc/inputwin.hxx
@@ -89,7 +89,7 @@ public:
DECL_LINK_TYPED( SelTableCellsNotify, SwWrtShell&, void );
- void SetFormula( const OUString& rFormula, bool bDelSel = true );
+ void SetFormula( const OUString& rFormula );
const SwView* GetView() const{return pView;}
};
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 5392561cf3c9..5a6778bdb1ff 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -122,7 +122,7 @@ public:
void SttSelect();
void EndSelect();
bool IsInSelect() const { return m_bInSelect; }
- void SetInSelect(bool bSel = true) { m_bInSelect = bSel; }
+ void SetInSelect() { m_bInSelect = true; }
// is there a text- or frameselection?
bool HasSelection() const { return SwCursorShell::HasSelection() ||
IsMultiSelection() || IsSelFrameMode() || IsObjSelected(); }
@@ -160,7 +160,7 @@ public:
void Invalidate();
// select table cells for editing of formulas in the ribbonbar
- inline void SelTableCells( const Link<SwWrtShell&,void> &rLink, bool bMark = true );
+ inline void SelTableCells( const Link<SwWrtShell&,void> &rLink );
inline void EndSelTableCells();
// leave per word or per line selection mode. Is usually called in MB-Up.
@@ -210,10 +210,10 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool EndPg ( bool bSelect = false );
bool SttPara ( bool bSelect = false );
void EndPara ( bool bSelect = false );
- bool FwdPara ( bool bSelect = false )
- { return SimpleMove( &SwWrtShell::_FwdPara, bSelect ); }
- void BwdPara ( bool bSelect = false )
- { SimpleMove( &SwWrtShell::_BwdPara, bSelect ); }
+ bool FwdPara ()
+ { return SimpleMove( &SwWrtShell::_FwdPara, false/*bSelect*/ ); }
+ void BwdPara ()
+ { SimpleMove( &SwWrtShell::_BwdPara, false/*bSelect*/ ); }
void FwdSentence( bool bSelect = false )
{ SimpleMove( &SwWrtShell::_FwdSentence, bSelect ); }
void BwdSentence( bool bSelect = false )
@@ -228,12 +228,12 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr = nullptr );
// per column jumps
- void StartOfColumn ( bool bSelect = false );
- void EndOfColumn ( bool bSelect = false );
- void StartOfNextColumn ( bool bSelect = false );
- void EndOfNextColumn ( bool bSelect = false );
- void StartOfPrevColumn ( bool bSelect = false );
- void EndOfPrevColumn ( bool bSelect = false );
+ void StartOfColumn ();
+ void EndOfColumn ();
+ void StartOfNextColumn ();
+ void EndOfNextColumn ();
+ void StartOfPrevColumn ();
+ void EndOfPrevColumn ();
// set the cursor to page "nPage" at the beginning
// additionally to a identically named implementation in crsrsh.hxx
@@ -580,8 +580,8 @@ private:
// after SSize/Move of a frame update; Point is destination.
SAL_DLLPRIVATE long UpdateLayoutFrame(const Point *, bool bProp=false );
- SAL_DLLPRIVATE void SttLeaveSelect(const Point *, bool bProp=false );
- SAL_DLLPRIVATE void AddLeaveSelect(const Point *, bool bProp=false );
+ SAL_DLLPRIVATE void SttLeaveSelect();
+ SAL_DLLPRIVATE void AddLeaveSelect();
SAL_DLLPRIVATE long Ignore(const Point *, bool bProp=false );
SAL_DLLPRIVATE void LeaveExtSel() { m_bSelWrd = m_bSelLn = false;}
@@ -607,10 +607,10 @@ inline void SwWrtShell::ResetCursorStack()
_ResetCursorStack();
}
-inline void SwWrtShell::SelTableCells(const Link<SwWrtShell&,void> &rLink, bool bMark )
+inline void SwWrtShell::SelTableCells(const Link<SwWrtShell&,void> &rLink )
{
SetSelTableCells( true );
- m_bClearMark = bMark;
+ m_bClearMark = true;
m_aSelTableLink = rLink;
}
inline void SwWrtShell::EndSelTableCells()
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 178be93a7648..b648c7a0d08a 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -458,7 +458,7 @@ IMPL_LINK_TYPED( SwInputWindow, SelTableCellsNotify, SwWrtShell&, rCaller, void
aEdit->GrabFocus();
}
-void SwInputWindow::SetFormula( const OUString& rFormula, bool bDelFlag )
+void SwInputWindow::SetFormula( const OUString& rFormula )
{
OUString sEdit('=');
if( !rFormula.isEmpty() )
@@ -471,7 +471,7 @@ void SwInputWindow::SetFormula( const OUString& rFormula, bool bDelFlag )
aEdit->SetText( sEdit );
aEdit->SetSelection( Selection( sEdit.getLength(), sEdit.getLength() ) );
aEdit->Invalidate();
- bDelSel = bDelFlag;
+ bDelSel = true;
}
IMPL_LINK_NOARG_TYPED(SwInputWindow, ModifyHdl, Edit&, void)
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 0c16fc6ed3f4..23283de9d6b0 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -144,7 +144,7 @@ static void lcl_emitSearchResultCallbacks(SvxSearchItem* pSearchItem, SwWrtShell
}
}
-void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
+void SwView::ExecSearch(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = nullptr;
@@ -152,12 +152,10 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_SEARCH_QUIET, false, &pItem))
bQuiet = static_cast<const SfxBoolItem*>( pItem)->GetValue();
- bool bApi = bQuiet || bNoMessage;
-
sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot == FN_REPEAT_SEARCH && !m_pSrchItem)
{
- if(bApi)
+ if(bQuiet)
{
rReq.SetReturnValue(SfxBoolItem(nSlot, false));
nSlot = 0;
@@ -248,7 +246,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
{
case SvxSearchCmd::FIND:
{
- bool bRet = SearchAndWrap(bApi);
+ bool bRet = SearchAndWrap(bQuiet);
if( bRet )
{
Scroll(m_pWrtShell->GetCharRect().SVRect());
@@ -281,7 +279,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if( !bRet )
{
#if HAVE_FEATURE_DESKTOP
- if( !bApi )
+ if( !bQuiet )
{
m_pWrtShell->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_NOT_FOUND,
m_pSrchItem->GetSearchString().toUtf8().getStr());
@@ -345,7 +343,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
SvxSearchCmd nOldCmd = m_pSrchItem->GetCommand();
m_pSrchItem->SetCommand( nCmd );
- bool bRet = SearchAndWrap(bApi);
+ bool bRet = SearchAndWrap(bQuiet);
if( bRet )
Scroll( m_pWrtShell->GetCharRect().SVRect());
m_pSrchItem->SetCommand( nOldCmd );
@@ -403,7 +401,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if( !nFound )
{
#if HAVE_FEATURE_DESKTOP
- if( !bApi )
+ if( !bQuiet )
{
m_pWrtShell->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_NOT_FOUND,
m_pSrchItem->GetSearchString().toUtf8().getStr());
@@ -414,7 +412,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
return;
}
- if( !bApi && ULONG_MAX != nFound)
+ if( !bQuiet && ULONG_MAX != nFound)
{
OUString aText( SW_RES( STR_NB_REPLACED ) );
aText = aText.replaceFirst("XX", OUString::number( nFound ));
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index 5a663a0ecb03..baaba962613d 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -355,39 +355,39 @@ void SwWrtShell::EndPara( bool bSelect )
// SSelection with or without
// returns success or failure
-void SwWrtShell::StartOfColumn( bool bSelect )
+void SwWrtShell::StartOfColumn()
{
- ShellMoveCursor aTmp( this, bSelect);
+ ShellMoveCursor aTmp( this, false/*bSelect*/);
MoveColumn(fnColumnCurr, fnColumnStart);
}
-void SwWrtShell::EndOfColumn( bool bSelect )
+void SwWrtShell::EndOfColumn()
{
- ShellMoveCursor aTmp( this, bSelect);
+ ShellMoveCursor aTmp( this, false/*bSelect*/);
MoveColumn(fnColumnCurr, fnColumnEnd);
}
-void SwWrtShell::StartOfNextColumn( bool bSelect )
+void SwWrtShell::StartOfNextColumn()
{
- ShellMoveCursor aTmp( this, bSelect);
+ ShellMoveCursor aTmp( this, false/*bSelect*/);
MoveColumn( fnColumnNext, fnColumnStart);
}
-void SwWrtShell::EndOfNextColumn( bool bSelect )
+void SwWrtShell::EndOfNextColumn()
{
- ShellMoveCursor aTmp( this, bSelect);
+ ShellMoveCursor aTmp( this, false/*bSelect*/);
MoveColumn(fnColumnNext, fnColumnEnd);
}
-void SwWrtShell::StartOfPrevColumn( bool bSelect )
+void SwWrtShell::StartOfPrevColumn()
{
- ShellMoveCursor aTmp( this, bSelect);
+ ShellMoveCursor aTmp( this, false/*bSelect*/);
MoveColumn(fnColumnPrev, fnColumnStart);
}
-void SwWrtShell::EndOfPrevColumn( bool bSelect )
+void SwWrtShell::EndOfPrevColumn()
{
- ShellMoveCursor aTmp( this, bSelect);
+ ShellMoveCursor aTmp( this, false/*bSelect*/);
MoveColumn(fnColumnPrev, fnColumnEnd);
}
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index 71dce0e22fc6..35b0b19cc850 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -400,11 +400,11 @@ void SwWrtShell::EndSelect()
m_bInSelect = false;
if (m_bAddMode)
{
- AddLeaveSelect(nullptr);
+ AddLeaveSelect();
}
else
{
- SttLeaveSelect(nullptr);
+ SttLeaveSelect();
m_fnSetCursor = &SwWrtShell::SetCursorKillSel;
m_fnKillSel = &SwWrtShell::ResetSelect;
}
@@ -576,7 +576,7 @@ void SwWrtShell::LeaveExtMode()
// End of a selection; if the selection is empty,
// ClearMark().
-void SwWrtShell::SttLeaveSelect(const Point *, bool )
+void SwWrtShell::SttLeaveSelect()
{
if(SwCursorShell::HasSelection() && !IsSelTableCells() && m_bClearMark) {
return;
@@ -586,7 +586,7 @@ void SwWrtShell::SttLeaveSelect(const Point *, bool )
// Leaving of the selection mode in additional mode
-void SwWrtShell::AddLeaveSelect(const Point *, bool )
+void SwWrtShell::AddLeaveSelect()
{
if(IsTableMode()) LeaveAddMode();
else if(SwCursorShell::HasSelection())