summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-29 08:03:43 +0200
committerNoel Grandin <noel@peralex.com>2016-02-29 08:04:06 +0200
commit1a3ace4d098eaea7cae26311330046cd900e21af (patch)
treee40af516375cee0a03a8729459a2497ab97c256a /sw/source
parent2ac1c2f75e5f020fbb8c2c98b00ef32faa4770aa (diff)
loplugin:unuseddefaultparam in sw (part2)
Change-Id: I7eefd83d7f84c0a6301fd3ba37d77463d809e5f9
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/SwNumberTree/SwNumberTree.cxx4
-rw-r--r--sw/source/core/bastyp/swcache.cxx2
-rw-r--r--sw/source/core/bastyp/swregion.cxx4
-rw-r--r--sw/source/core/doc/docfld.cxx5
-rw-r--r--sw/source/core/doc/doctxm.cxx19
-rw-r--r--sw/source/core/doc/tblrwcl.cxx6
-rw-r--r--sw/source/core/frmedt/tblsel.cxx6
-rw-r--r--sw/source/core/inc/SwXMLTextBlocks.hxx6
-rw-r--r--sw/source/core/inc/UndoTable.hxx2
-rw-r--r--sw/source/core/inc/docfld.hxx3
-rw-r--r--sw/source/core/inc/doctxm.hxx2
-rw-r--r--sw/source/core/inc/rolbck.hxx4
-rw-r--r--sw/source/core/inc/sectfrm.hxx14
-rw-r--r--sw/source/core/inc/swblocks.hxx6
-rw-r--r--sw/source/core/inc/swcache.hxx2
-rw-r--r--sw/source/core/inc/txtfly.hxx6
-rw-r--r--sw/source/core/layout/sectfrm.cxx4
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx32
-rw-r--r--sw/source/core/swg/swblocks.cxx4
-rw-r--r--sw/source/core/text/porlay.hxx12
-rw-r--r--sw/source/core/txtnode/atrfld.cxx8
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx5
-rw-r--r--sw/source/core/txtnode/txtedt.cxx5
-rw-r--r--sw/source/core/undo/rolbck.cxx4
-rw-r--r--sw/source/core/undo/untbl.cxx4
-rw-r--r--sw/source/core/unocore/unoobj.cxx4
-rw-r--r--sw/source/filter/html/css1atr.cxx6
-rw-r--r--sw/source/filter/html/htmlcss1.cxx5
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx6
-rw-r--r--sw/source/filter/html/parcss1.hxx7
-rw-r--r--sw/source/filter/html/swhtml.cxx14
-rw-r--r--sw/source/filter/html/swhtml.hxx12
-rw-r--r--sw/source/filter/html/wrthtml.hxx2
-rw-r--r--sw/source/uibase/app/swmodul1.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx4
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx4
36 files changed, 84 insertions, 151 deletions
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index a6863fe3ff72..eb8899ba74ae 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -725,9 +725,9 @@ bool SwNumberTreeNode::IsValid(const SwNumberTreeNode * pChild) const
}
-void SwNumberTreeNode::SetPhantom(bool _bPhantom)
+void SwNumberTreeNode::SetPhantom()
{
- mbPhantom = _bPhantom;
+ mbPhantom = true;
}
bool SwNumberTreeNode::HasOnlyPhantoms() const
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 54d361e984e9..baf8e33b2c32 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -123,7 +123,7 @@ SwCache::~SwCache()
delete *it;
}
-void SwCache::Flush( const sal_uInt8 )
+void SwCache::Flush()
{
INCREMENT( m_nFlushCnt );
SwCacheObj *pObj = pRealFirst;
diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx
index 922c1c9d91c0..551df2580331 100644
--- a/sw/source/core/bastyp/swregion.cxx
+++ b/sw/source/core/bastyp/swregion.cxx
@@ -141,7 +141,7 @@ inline SwTwips CalcArea( const SwRect &rRect )
}
// combine all adjacent rectangles
-void SwRegionRects::Compress( bool bFuzzy )
+void SwRegionRects::Compress()
{
for (size_type i = 0; i < size(); )
{
@@ -170,7 +170,7 @@ void SwRegionRects::Compress( bool bFuzzy )
// paints), the area of the union can be a little bit larger:
// ( 9622 * 141.5 = 1361513 ~= a quarter (1/4) centimeter wider
// than the width of a A4 page
- const long nFuzzy = bFuzzy ? 1361513 : 0;
+ const long nFuzzy = 1361513;
SwRect aUnion( (*this)[i] );
aUnion.Union( (*this)[j] );
SwRect aInter( (*this)[i] );
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index cd25942f9be4..8f042a45ebef 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -345,10 +345,9 @@ _HashStr::_HashStr( const OUString& rName, const OUString& rText,
}
/// Look up the Name, if it is present, return its String, otherwise return an empty String
-OUString LookString( SwHash** ppTable, sal_uInt16 nSize, const OUString& rName,
- sal_uInt16* pPos )
+OUString LookString( SwHash** ppTable, sal_uInt16 nSize, const OUString& rName )
{
- SwHash* pFnd = Find( comphelper::string::strip(rName, ' '), ppTable, nSize, pPos );
+ SwHash* pFnd = Find( comphelper::string::strip(rName, ' '), ppTable, nSize );
if( pFnd )
return static_cast<_HashStr*>(pFnd)->aSetStr;
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 98859a809dfb..e942770948b1 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -719,26 +719,15 @@ SwTOXBaseSection::~SwTOXBaseSection()
delete *it;
}
-bool SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos, bool bAtStart ) const
+bool SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos ) const
{
bool bRet = false;
const SwSectionNode* pSectNd = GetFormat()->GetSectionNode();
if( pSectNd )
{
- SwContentNode* pCNd;
- sal_Int32 nC = 0;
- if( bAtStart )
- {
- rPos.nNode = *pSectNd;
- pCNd = pSectNd->GetDoc()->GetNodes().GoNext( &rPos.nNode );
- }
- else
- {
- rPos.nNode = *pSectNd->EndOfSectionNode();
- pCNd = SwNodes::GoPrevious( &rPos.nNode );
- if( pCNd ) nC = pCNd->Len();
- }
- rPos.nContent.Assign( pCNd, nC );
+ rPos.nNode = *pSectNd;
+ SwContentNode* pCNd = pSectNd->GetDoc()->GetNodes().GoNext( &rPos.nNode );
+ rPos.nContent.Assign( pCNd, 0 );
bRet = true;
}
return bRet;
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 15ae0f2381ff..f6e3a40fa840 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1332,13 +1332,11 @@ static void lcl_CpyLines( sal_uInt16 nStt, sal_uInt16 nEnd,
static void lcl_CpyBoxes( sal_uInt16 nStt, sal_uInt16 nEnd,
SwTableBoxes& rBoxes,
- SwTableLine* pInsLine,
- sal_uInt16 nPos = USHRT_MAX )
+ SwTableLine* pInsLine )
{
for( sal_uInt16 n = nStt; n < nEnd; ++n )
rBoxes[n]->SetUpper( pInsLine );
- if( USHRT_MAX == nPos )
- nPos = pInsLine->GetTabBoxes().size();
+ sal_uInt16 nPos = pInsLine->GetTabBoxes().size();
pInsLine->GetTabBoxes().insert( pInsLine->GetTabBoxes().begin() + nPos,
rBoxes.begin() + nStt, rBoxes.begin() + nEnd );
rBoxes.erase( rBoxes.begin() + nStt, rBoxes.begin() + nEnd );
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 94970d1b097d..fdebdc725ed7 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -2138,9 +2138,7 @@ inline void UnsetFollow( SwFlowFrame *pTab )
pTab->m_pPrecede = nullptr;
}
-//When bAccTableDispose is FALSE,the acc table should not be disposed.
-//void _FndBox::DelFrames( SwTable &rTable )
-void _FndBox::DelFrames( SwTable &rTable, bool bAccTableDispose )
+void _FndBox::DelFrames( SwTable &rTable )
{
// All lines between pLineBefore and pLineBehind should be cut
// from the layout and erased.
@@ -2258,7 +2256,7 @@ void _FndBox::DelFrames( SwTable &rTable, bool bAccTableDispose )
static_cast<SwTabFrame*>(pTabFrame)->SetFollowFlowLine( false );
}
//Set acc table dispose state
- pFrame->SetAccTableDispose( bAccTableDispose );
+ pFrame->SetAccTableDispose( false/*bAccTableDispose*/ );
pFrame->Cut();
//Set acc table dispose state to default value.
pFrame->SetAccTableDispose( true );
diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx
index 884af8c2fff5..19e35fa68e35 100644
--- a/sw/source/core/inc/SwXMLTextBlocks.hxx
+++ b/sw/source/core/inc/SwXMLTextBlocks.hxx
@@ -77,11 +77,9 @@ public:
bool IsOnlyTextBlock( sal_uInt16 nIdx ) const;
void SetIsTextOnly( const OUString& rShort, bool bNewValue );
- virtual sal_uLong GetMacroTable( sal_uInt16, SvxMacroTableDtor& rMacroTable,
- bool bFileAlreadyOpen = false ) override;
+ virtual sal_uLong GetMacroTable( sal_uInt16, SvxMacroTableDtor& rMacroTable ) override;
virtual sal_uLong SetMacroTable( sal_uInt16 nIdx,
- const SvxMacroTableDtor& rMacroTable,
- bool bFileAlreadyOpen = false ) override;
+ const SvxMacroTableDtor& rMacroTable ) override;
virtual bool PutMuchEntries( bool bOn ) override;
public:
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 2e18078a5ac1..807ff64d7c87 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -373,7 +373,7 @@ public:
virtual void RepeatImpl( ::sw::RepeatContext & ) override;
};
-void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = nullptr );
+void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx );
#endif // INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX
diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx
index 47531e223514..c3df4d1b7288 100644
--- a/sw/source/core/inc/docfld.hxx
+++ b/sw/source/core/inc/docfld.hxx
@@ -126,8 +126,7 @@ struct SwCalcFieldType : public SwHash
};
// search for the string that was saved under rName in the hash table
-OUString LookString( SwHash** ppTable, sal_uInt16 nSize, const OUString& rName,
- sal_uInt16* pPos = nullptr );
+OUString LookString( SwHash** ppTable, sal_uInt16 nSize, const OUString& rName );
const int GETFLD_ALL = 3; // combine flags via OR
const int GETFLD_CALC = 1;
diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx
index bc9c543e1519..937691ce1e40 100644
--- a/sw/source/core/inc/doctxm.hxx
+++ b/sw/source/core/inc/doctxm.hxx
@@ -80,7 +80,7 @@ public:
const SwTOXSortTabBases& GetTOXSortTabBases() const { return aSortArr; }
- bool SetPosAtStartEnd( SwPosition& rPos, bool bAtStart = true ) const;
+ bool SetPosAtStartEnd( SwPosition& rPos ) const;
};
struct SwDefTOXBase_Impl
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 14ccafe418c2..e902fb627981 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -341,8 +341,8 @@ public:
SwHistory( sal_uInt16 nInitSz = 0 );
~SwHistory();
- // delete History from nStart to array end
- void Delete( sal_uInt16 nStart = 0 );
+ // delete History
+ void Delete();
// call and delete all objects between nStart and array end
bool Rollback( SwDoc* pDoc, sal_uInt16 nStart = 0 );
// call all objects between nStart and TmpEnd; store nStart as TmpEnd
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 4184cb78ffad..7c39a521ba5b 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -81,7 +81,7 @@ public:
SwSectionFrame* FindMaster() const;
SwContentFrame *FindLastContent( sal_uInt8 nMode = 0 );
- inline const SwContentFrame *FindLastContent( sal_uInt8 nMode = 0 ) const;
+ inline const SwContentFrame *FindLastContent() const;
inline SwSection* GetSection() { return m_pSection; }
inline const SwSection* GetSection() const { return m_pSection; }
inline void ColLock() { mbColLocked = true; }
@@ -121,16 +121,12 @@ public:
* Returns the size delta that the section would like to be
* greater if it has undersized TextFrames in it.
*
- * If we don't pass a @param bOverSize or false, the return value
- * is > 0 for undersized Frames, or 0 otherwise.
- * If @param bOverSize == true, we can also get a negative return value,
- * if the SectionFrame is not completely filled, which happens often for
- * e.g. SectionFrames with Follows.
+ * The return value is > 0 for undersized Frames, or 0 otherwise.
*
* If necessary the undersized-flag is corrected.
* We need this in the FormatWidthCols to "deflate" columns there.
*/
- SwTwips Undersize(bool bOverSize = false);
+ SwTwips Undersize();
SwTwips CalcUndersize() const;
/// Adapt size to surroundings
@@ -174,9 +170,9 @@ inline SwSectionFrame *SwSectionFrame::GetFollow()
{
return static_cast<SwSectionFrame*>(SwFlowFrame::GetFollow());
}
-inline const SwContentFrame *SwSectionFrame::FindLastContent( sal_uInt8 nMode ) const
+inline const SwContentFrame *SwSectionFrame::FindLastContent() const
{
- return const_cast<SwSectionFrame*>(this)->FindLastContent( nMode );
+ return const_cast<SwSectionFrame*>(this)->FindLastContent();
}
#endif // INCLUDED_SW_SOURCE_CORE_INC_SECTFRM_HXX
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index 53127ee14b5a..1ca4b5251f81 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -115,11 +115,9 @@ public:
virtual bool IsOnlyTextBlock( const OUString& rShort ) const;
- virtual sal_uLong GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTable,
- bool bFileAlreadyOpen = false );
+ virtual sal_uLong GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTable );
virtual sal_uLong SetMacroTable( sal_uInt16 nIdx,
- const SvxMacroTableDtor& rMacroTable,
- bool bFileAlreadyOpen = false );
+ const SvxMacroTableDtor& rMacroTable );
virtual bool PutMuchEntries( bool bOn );
};
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index a905c3247eb4..7d22b7cdbded 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -93,7 +93,7 @@ public:
/// The dtor will free all objects still in the vector
~SwCache();
- void Flush( const sal_uInt8 nPercent = 100 );
+ void Flush();
//bToTop == false -> No LRU resorting!
SwCacheObj *Get( const void *pOwner, const bool bToTop = true );
diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx
index 6702f8f62eaf..3a08805707af 100644
--- a/sw/source/core/inc/txtfly.hxx
+++ b/sw/source/core/inc/txtfly.hxx
@@ -214,7 +214,7 @@ public:
void SetTopRule();
- SwRect GetFrame( const SwRect &rPortion, bool bTop = true ) const;
+ SwRect GetFrame( const SwRect &rPortion ) const;
bool IsOn() const;
/**
@@ -354,9 +354,9 @@ inline void SwTextFly::SetNextTop( long nNew ) const
const_cast<SwTextFly*>(this)->nNextTop = nNew;
}
-inline SwRect SwTextFly::GetFrame( const SwRect &rRect, bool bTop ) const
+inline SwRect SwTextFly::GetFrame( const SwRect &rRect ) const
{
- return bOn ? _GetFrame( rRect, bTop ) : SwRect();
+ return bOn ? _GetFrame( rRect, true/*bTop*/ ) : SwRect();
}
inline void SwTextFly::SetIgnoreCurrentFrame( bool bNew )
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index c9bf7173e4b3..8d5555df8adc 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -2498,11 +2498,11 @@ SwTwips SwSectionFrame::CalcUndersize() const
return InnerHeight() - (Prt().*fnRect->fnGetHeight)();
}
-SwTwips SwSectionFrame::Undersize(bool bOverSize)
+SwTwips SwSectionFrame::Undersize()
{
const auto nRet = CalcUndersize();
m_bUndersized = (nRet > 0);
- return (nRet <= 0 && !bOverSize) ? 0 : nRet;
+ return nRet <= 0 ? 0 : nRet;
}
void SwSectionFrame::CalcFootnoteContent()
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index 889be6a14534..278b063fd352 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -157,8 +157,7 @@ const struct SvEventDescription aAutotextEvents[] =
};
sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx,
- SvxMacroTableDtor& rMacroTable,
- bool bFileAlreadyOpen )
+ SvxMacroTableDtor& rMacroTable )
{
// set current auto text
aShort = aNames[nIdx]->aShort;
@@ -168,11 +167,8 @@ sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx,
sal_uLong nRet = 0;
// open stream in proper sub-storage
- if( !bFileAlreadyOpen )
- {
- CloseFile();
- nRet = OpenFile();
- }
+ CloseFile();
+ nRet = OpenFile();
if ( 0 == nRet )
{
try
@@ -516,8 +512,7 @@ void SwXMLTextBlocks::WriteInfo()
sal_uLong SwXMLTextBlocks::SetMacroTable(
sal_uInt16 nIdx,
- const SvxMacroTableDtor& rMacroTable,
- bool bFileAlreadyOpen )
+ const SvxMacroTableDtor& rMacroTable )
{
// set current autotext
aShort = aNames[nIdx]->aShort;
@@ -538,11 +533,8 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
return ERR_SWG_WRITE_ERROR;
// open stream in proper sub-storage
- if( !bFileAlreadyOpen )
- {
- CloseFile(); // close (it may be open in read-only-mode)
- nRes = OpenFile ( false );
- }
+ CloseFile(); // close (it may be open in read-only-mode)
+ nRes = OpenFile ( false );
if ( 0 == nRes )
{
@@ -608,12 +600,9 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
if ( xTmpTrans.is() )
xTmpTrans->commit();
- if ( !bFileAlreadyOpen )
- {
- uno::Reference < embed::XTransactedObject > xTrans( xBlkRoot, uno::UNO_QUERY );
- if ( xTrans.is() )
- xTrans->commit();
- }
+ uno::Reference < embed::XTransactedObject > xTrans( xBlkRoot, uno::UNO_QUERY );
+ if ( xTrans.is() )
+ xTrans->commit();
xRoot = nullptr;
}
@@ -622,8 +611,7 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
nRes = ERR_SWG_WRITE_ERROR;
}
- if( !bFileAlreadyOpen )
- CloseFile();
+ CloseFile();
}
else
nRes = ERR_SWG_WRITE_ERROR;
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index 316b308749d4..b7557eba343a 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -217,12 +217,12 @@ bool SwImpBlocks::IsOnlyTextBlock( const OUString& ) const
return false;
}
-sal_uLong SwImpBlocks::GetMacroTable( sal_uInt16, SvxMacroTableDtor&, bool )
+sal_uLong SwImpBlocks::GetMacroTable( sal_uInt16, SvxMacroTableDtor& )
{
return 0;
}
-sal_uLong SwImpBlocks::SetMacroTable( sal_uInt16 , const SvxMacroTableDtor& , bool )
+sal_uLong SwImpBlocks::SetMacroTable( sal_uInt16 , const SvxMacroTableDtor& )
{
return 0;
}
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index 29018d0e45a8..19e58a309923 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -123,7 +123,7 @@ public:
inline bool HasContent() const { return m_bContent; }
inline void SetRedline( const bool bNew = true ) { m_bRedline = bNew; }
inline bool HasRedline() const { return m_bRedline; }
- inline void SetForcedLeftMargin( const bool bNew = true ) { m_bForcedLeftMargin = bNew; }
+ inline void SetForcedLeftMargin() { m_bForcedLeftMargin = true; }
inline bool HasForcedLeftMargin() const { return m_bForcedLeftMargin; }
inline void SetHanging( const bool bNew = true ) { m_bHanging = bNew; }
inline void SetUnderscore( const bool bNew = true ) { m_bUnderscore = bNew; }
@@ -277,21 +277,21 @@ public:
bool UpdateQuoVadis( const OUString &rQuo );
// Flags
- inline void SetFly( const bool bNew = true ) { m_bFlys = bNew; }
+ inline void SetFly() { m_bFlys = true; }
inline bool HasFly() const { return m_bFlys; }
// Preps
- inline void SetPrep( const bool bNew = true ) { m_bPrep = bNew; }
+ inline void SetPrep() { m_bPrep = true; }
inline bool IsPrep() const { return m_bPrep; }
- inline void SetPrepWidows( const bool bNew = true ) { m_bPrepWidows = bNew; }
+ inline void SetPrepWidows() { m_bPrepWidows = true; }
inline bool IsPrepWidows() const { return m_bPrepWidows; }
inline void SetPrepMustFit( const bool bNew = true ) { m_bPrepMustFit = bNew; }
inline bool IsPrepMustFit() const { return m_bPrepMustFit; }
- inline void SetPrepAdjust( const bool bNew = true ) { m_bPrepAdjust = bNew; }
+ inline void SetPrepAdjust() { m_bPrepAdjust = true; }
inline bool IsPrepAdjust() const { return m_bPrepAdjust; }
inline void SetFollowField( const bool bNew = true ) { m_bFollowField = bNew; }
inline bool IsFollowField() const { return m_bFollowField; }
- inline void SetFixLineHeight( const bool bNew = true ) { m_bFixLineHeight = bNew; }
+ inline void SetFixLineHeight() { m_bFixLineHeight = true; }
inline bool IsFixLineHeight() const { return m_bFixLineHeight; }
inline void SetFootnoteNum( const bool bNew = true ) { m_bFootnoteNum = bNew; }
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index a86a5a2cc98d..2e895c947a5f 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -626,8 +626,7 @@ SwTextAnnotationField::~SwTextAnnotationField()
{
}
-::sw::mark::IMark* SwTextAnnotationField::GetAnnotationMark(
- SwDoc* pDoc ) const
+::sw::mark::IMark* SwTextAnnotationField::GetAnnotationMark() const
{
const SwPostItField* pPostItField = dynamic_cast<const SwPostItField*>(GetFormatField().GetField());
OSL_ENSURE( pPostItField != nullptr, "<SwTextAnnotationField::GetAnnotationMark()> - field missing" );
@@ -636,10 +635,7 @@ SwTextAnnotationField::~SwTextAnnotationField()
return nullptr;
}
- if ( pDoc == nullptr )
- {
- pDoc = static_cast<const SwPostItFieldType*>(pPostItField->GetTyp())->GetDoc();
- }
+ SwDoc* pDoc = static_cast<const SwPostItFieldType*>(pPostItField->GetTyp())->GetDoc();
OSL_ENSURE( pDoc != nullptr, "<SwTextAnnotationField::GetAnnotationMark()> - missing document" );
if ( pDoc == nullptr )
{
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 4147b5dd5154..fb4235c0f1df 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2918,8 +2918,7 @@ static void Replace0xFF(
OUStringBuffer & rText,
sal_Int32 & rTextStt,
sal_Int32 nEndPos,
- bool const bExpandFields,
- bool const bExpandFootnote = true )
+ bool const bExpandFields )
{
if (rNode.GetpSwpHints())
{
@@ -2952,7 +2951,7 @@ static void Replace0xFF(
case RES_TXTATR_FTN:
rText.remove(nPos, 1);
- if( bExpandFields && bExpandFootnote )
+ if( bExpandFields )
{
const SwFormatFootnote& rFootnote = pAttr->GetFootnote();
OUString sExpand;
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 8cc2f3919f1d..d96423cccf08 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -145,8 +145,7 @@ lcl_MaskRedlines( const SwTextNode& rNode, OUStringBuffer& rText,
static bool
lcl_MaskRedlinesAndHiddenText( const SwTextNode& rNode, OUStringBuffer& rText,
sal_Int32 nStt, sal_Int32 nEnd,
- const sal_Unicode cChar = CH_TXTATR_INWORD,
- bool bCheckShowHiddenChar = true )
+ const sal_Unicode cChar = CH_TXTATR_INWORD )
{
sal_Int32 nRedlinesMasked = 0;
sal_Int32 nHiddenCharsMasked = 0;
@@ -165,7 +164,7 @@ lcl_MaskRedlinesAndHiddenText( const SwTextNode& rNode, OUStringBuffer& rText,
// If called from word count, we want to mask the hidden ranges even
// if they are visible:
- if ( !bCheckShowHiddenChar || bHideHidden )
+ if ( bHideHidden )
{
nHiddenCharsMasked =
SwScriptInfo::MaskHiddenRanges( rNode, rText, nStt, nEnd, cChar );
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index fd439e76356d..cdf6e98387e5 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -1167,9 +1167,9 @@ bool SwHistory::TmpRollback( SwDoc* pDoc, sal_uInt16 nStart, bool bToFirst )
return true;
}
-void SwHistory::Delete( sal_uInt16 nStart )
+void SwHistory::Delete()
{
- for ( sal_uInt16 n = Count(); n > nStart; )
+ for ( sal_uInt16 n = Count(); n > 0; )
{
delete m_SwpHstry[ --n ];
m_SwpHstry.erase( m_SwpHstry.begin() + n );
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index d13cad2453c6..b2f8564bb241 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -3123,7 +3123,7 @@ void SwUndoMergeTable::SaveFormula( SwHistory& rHistory )
pHistory->Move( 0, &rHistory );
}
-void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos )
+void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx )
{
size_t nO = rArr.size();
size_t nU = 0;
@@ -3147,8 +3147,6 @@ void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx, sal_uInt16* pIn
}
}
rArr.insert( rArr.begin() + nU, nIdx );
- if( pInsPos )
- *pInsPos = nU;
}
#if OSL_DEBUG_LEVEL > 0
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index f30d1c176a7a..22aa10a3cd66 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1769,7 +1769,7 @@ void SwUnoCursorHelper::SetPropertyValue(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
const OUString& rPropertyName,
const uno::Any& rValue,
- const SetAttrMode nAttrMode, const bool bTableMode)
+ const SetAttrMode nAttrMode)
throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
@@ -1777,7 +1777,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
uno::Sequence< beans::PropertyValue > aValues(1);
aValues[0].Name = rPropertyName;
aValues[0].Value = rValue;
- SetPropertyValues(rPaM, rPropSet, aValues, nAttrMode, bTableMode);
+ SetPropertyValues(rPaM, rPropSet, aValues, nAttrMode);
}
// FN_UNO_PARA_STYLE is known to set attributes for nodes, inside
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 518d2a9bc9e1..817a90b0c81f 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -535,7 +535,7 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet,
}
}
-void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed )
+void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc )
{
m_bFirstCSS1Rule = true;
@@ -604,7 +604,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed )
{
const SwTextFormatColl* pColl = (*pDoc->GetTextFormatColls())[i];
sal_uInt16 nPoolId = pColl->GetPoolFormatId();
- if( !bUsed || nPoolId == RES_POOLCOLL_TEXT ||
+ if( nPoolId == RES_POOLCOLL_TEXT ||
pDoc->IsUsed( *pColl ) )
OutCSS1_SwFormat( *this, *pColl, &pDoc->getIDocumentStylePoolAccess(), m_pTemplate );
}
@@ -615,7 +615,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed )
{
const SwCharFormat *pCFormat = (*pDoc->GetCharFormats())[i];
sal_uInt16 nPoolId = pCFormat->GetPoolFormatId();
- if( !bUsed || nPoolId == RES_POOLCHR_INET_NORMAL ||
+ if( nPoolId == RES_POOLCHR_INET_NORMAL ||
nPoolId == RES_POOLCHR_INET_VISIT ||
pDoc->IsUsed( *pCFormat ) )
OutCSS1_SwFormat( *this, *pCFormat, &pDoc->getIDocumentStylePoolAccess(), m_pTemplate );
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index fcc108dcf9f7..bdd1bdf34570 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -2238,7 +2238,7 @@ void SwHTMLParser::GetULSpaceFromContext( sal_uInt16& nUpper,
nLower = rULSpace.GetLower();
}
-void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, bool bRemove )
+void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext )
{
_HTMLAttrs &rAttrs = pContext->GetAttrs();
for( auto pAttr : rAttrs )
@@ -2258,9 +2258,6 @@ void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, bool bRemove )
EndAttr( pAttr );
}
-
- if( bRemove && !rAttrs.empty() )
- rAttrs.clear();
}
void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet )
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index 633afe6e83f9..b1191a31cd86 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -75,8 +75,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
sal_Int16 eVertOri,
sal_Int16 eHoriOri,
SfxItemSet& rCSS1ItemSet,
- SvxCSS1PropertyInfo& rCSS1PropInfo,
- bool bHidden )
+ SvxCSS1PropertyInfo& rCSS1PropInfo )
{
// always on top of text.
// but in invisible layer. <ConnectToLayout> will move the object
@@ -180,8 +179,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
text::HoriOrientation::LEFT == eHoriOri )
{
aAnchor.SetType( FLY_AT_PARA );
- aFrameSet.Put( SwFormatSurround(bHidden ? SURROUND_THROUGHT
- : SURROUND_RIGHT) );
+ aFrameSet.Put( SwFormatSurround(SURROUND_RIGHT) );
// #i26791# - direct positioning for <SwDoc::Insert(..)>
pNewDrawObj->SetRelativePos( Point(nLeftSpace, nUpperSpace) );
}
diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx
index eaea4365e11d..4485acd89897 100644
--- a/sw/source/filter/html/parcss1.hxx
+++ b/sw/source/filter/html/parcss1.hxx
@@ -128,8 +128,7 @@ public:
~CSS1Expression();
- inline void Set( CSS1Token eTyp, const OUString &rVal, double nVal,
- sal_Unicode cO = 0 );
+ inline void Set( CSS1Token eTyp, const OUString &rVal, double nVal );
CSS1Token GetType() const { return eType; }
const OUString& GetString() const { return aValue; }
@@ -146,9 +145,9 @@ public:
};
inline void CSS1Expression::Set( CSS1Token eTyp, const OUString &rVal,
- double nVal, sal_Unicode cO )
+ double nVal )
{
- cOp = cO; eType = eTyp; aValue = rVal; nValue = nVal; pNext = nullptr;
+ cOp = 0; eType = eTyp; aValue = rVal; nValue = nVal; pNext = nullptr;
}
inline sal_uInt32 CSS1Expression::GetULength() const
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 3095745b1ecc..e127c5bbba25 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -3371,8 +3371,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
}
}
-void SwHTMLParser::RestoreAttrTab( _HTMLAttrTable& rNewAttrTab,
- bool bSetNewStart )
+void SwHTMLParser::RestoreAttrTab( _HTMLAttrTable& rNewAttrTab )
{
// preliminary paragraph attributes are not allowed here, they could
// be set here and then the pointers become invalid!
@@ -3388,10 +3387,6 @@ void SwHTMLParser::RestoreAttrTab( _HTMLAttrTable& rNewAttrTab,
{
OSL_ENSURE(!*pHTMLAttributes, "Die Attribut-Tabelle ist nicht leer!");
- const SwPosition *pPos = m_pPam->GetPoint();
- const SwNodeIndex& rSttPara = pPos->nNode;
- const sal_Int32 nSttCnt = pPos->nContent.GetIndex();
-
*pHTMLAttributes = *pSaveAttributes;
_HTMLAttr *pAttr = *pHTMLAttributes;
@@ -3400,13 +3395,6 @@ void SwHTMLParser::RestoreAttrTab( _HTMLAttrTable& rNewAttrTab,
OSL_ENSURE( !pAttr->GetPrev() || !pAttr->GetPrev()->ppHead,
"Previous-Attribut hat noch einen Header" );
pAttr->SetHead(pHTMLAttributes);
- if( bSetNewStart )
- {
- pAttr->nSttPara = rSttPara;
- pAttr->nEndPara = rSttPara;
- pAttr->nSttContent = nSttCnt;
- pAttr->nEndContent = nSttCnt;
- }
pAttr = pAttr->GetNext();
}
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index d9d0ee4360ea..599d90f7bf31 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -111,7 +111,7 @@ public:
sal_Int32 GetEndCnt() const { return nEndContent; }
bool IsLikePara() const { return bLikePara; }
- void SetLikePara( bool bPara=true ) { bLikePara = bPara; }
+ void SetLikePara() { bLikePara = true; }
SfxPoolItem& GetItem() { return *pItem; }
const SfxPoolItem& GetItem() const { return *pItem; }
@@ -510,12 +510,11 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
bool bChkEmpty=true );
void DeleteAttr( _HTMLAttr* pAttr );
- void EndContextAttrs( _HTMLAttrContext *pContext, bool bRemove=false );
+ void EndContextAttrs( _HTMLAttrContext *pContext );
void SaveAttrTab( _HTMLAttrTable& rNewAttrTab );
void SplitAttrTab( const SwPosition& rNewPos );
void SplitAttrTab( _HTMLAttrTable& rNewAttrTab, bool bMoveEndBack = true );
- void RestoreAttrTab( _HTMLAttrTable& rNewAttrTab,
- bool bSetNewStart = false );
+ void RestoreAttrTab( _HTMLAttrTable& rNewAttrTab );
void InsertAttr( const SfxPoolItem& rItem, bool bLikePara = false,
bool bInsAtStart=false );
void InsertAttrs( _HTMLAttrs& rAttrs );
@@ -767,9 +766,8 @@ private:
sal_Int16 eVertOri,
sal_Int16 eHoriOri,
SfxItemSet& rCSS1ItemSet,
- SvxCSS1PropertyInfo& rCSS1PropInfo,
- bool bHidden=false );
- css::uno::Reference< css::drawing::XShape > InsertControl(
+ SvxCSS1PropertyInfo& rCSS1PropInfo );
+ css::uno::Reference< css::drawing::XShape > InsertControl(
const css::uno::Reference< css::form::XFormComponent > & rFormComp,
const css::uno::Reference< css::beans::XPropertySet > & rFCompPropSet,
const Size& rSize,
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 2968d9fb80b2..247b3423fece 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -434,7 +434,7 @@ public:
void OutAndSetDefList( sal_uInt16 nNewLvl );
- void OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed=true );
+ void OutStyleSheet( const SwPageDesc& rPageDesc );
inline void OutCSS1_PropertyAscii( const sal_Char *pProp,
const sal_Char *pVal );
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index d9d52fbd8a1b..ad02fe812c8b 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -364,7 +364,7 @@ SwChapterNumRules* SwModule::GetChapterNumRules()
return m_pChapterNumRules;
}
-void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, bool /*bOnlyIfAvailable*/)
+void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData)
{
Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface();
Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY);
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 84f06ec923f3..11fe98d0d0d0 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2280,9 +2280,9 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe
return nFound;
}
-void SwView::EnableMailMerge(bool bEnable )
+void SwView::EnableMailMerge()
{
- m_bInMailMerge = bEnable;
+ m_bInMailMerge = true;
SfxBindings& rBind = GetViewFrame()->GetBindings();
rBind.Invalidate(FN_INSERT_FIELD_DATA_ONLY);
rBind.Update(FN_INSERT_FIELD_DATA_ONLY);
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index d0989d66f2b3..0c16fc6ed3f4 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -666,7 +666,7 @@ bool SwView::SearchAndWrap(bool bApi)
return m_bFound;
}
-bool SwView::SearchAll(sal_uInt16* pFound)
+bool SwView::SearchAll()
{
SwWait aWait( *GetDocShell(), true );
m_pWrtShell->StartAllAction();
@@ -685,8 +685,6 @@ bool SwView::SearchAll(sal_uInt16* pFound)
}
m_bExtra = false;
sal_uInt16 nFound = (sal_uInt16)FUNC_Search( aOpts );
- if(pFound)
- *pFound = nFound;
m_bFound = 0 != nFound;
m_pWrtShell->EndAllAction();