summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-11 08:42:22 +0200
committerNoel Grandin <noel@peralex.com>2015-08-11 09:48:18 +0200
commitd58e542d7df3f761047b0e5f9a5917901b4579d1 (patch)
tree96c7f9e20e7da0dd22ec4a52f35c514104dd235b /svl
parente5da350e4dd9b175c2f50cb392b23a805dac9a27 (diff)
loplugin: defaultparams
Change-Id: I1d88744207f7fa7c8230f8b29d9cc123f488dfaa
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/cntwall.cxx4
-rw-r--r--svl/source/items/itemset.cxx12
-rw-r--r--svl/source/items/poolio.cxx12
-rw-r--r--svl/source/items/style.cxx6
-rw-r--r--svl/source/numbers/zforfind.cxx4
-rw-r--r--svl/source/numbers/zforlist.cxx8
-rw-r--r--svl/source/undo/undo.cxx2
7 files changed, 24 insertions, 24 deletions
diff --git a/svl/source/items/cntwall.cxx b/svl/source/items/cntwall.cxx
index 827c88c35fae..fcd7419b7f2b 100644
--- a/svl/source/items/cntwall.cxx
+++ b/svl/source/items/cntwall.cxx
@@ -50,7 +50,7 @@ CntWallpaperItem::CntWallpaperItem( sal_uInt16 which, SvStream& rStream, sal_uIn
_aURL = readUnicodeString(rStream, nVersion >= 1);
// !!! Color stream operators do not work - they discard any
// transparency info !!!
- _nColor.Read( rStream, true );
+ _nColor.Read( rStream );
rStream.ReadUInt16( _nStyle );
}
else
@@ -122,7 +122,7 @@ SvStream& CntWallpaperItem::Store( SvStream& rStream, sal_uInt16 ) const
// !!! Color stream operators do not work - they discard any
// transparency info !!!
// ??? Why the hell Color::Write(...) isn't const ???
- (const_cast< CntWallpaperItem* >(this))->_nColor.Write( rStream, true );
+ (const_cast< CntWallpaperItem* >(this))->_nColor.Write( rStream );
rStream.WriteUInt16( _nStyle );
return rStream;
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 8a8dafd89666..e6961c4649f9 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -296,7 +296,7 @@ sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich )
if ( nWhich <= SFX_WHICH_MAX )
{
const SfxPoolItem& rNew = m_pParent
- ? m_pParent->Get( nWhich, true )
+ ? m_pParent->Get( nWhich )
: m_pPool->GetDefaultItem( nWhich );
Changed( *pItemToClear, rNew );
@@ -334,7 +334,7 @@ sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich )
if ( nWhich <= SFX_WHICH_MAX )
{
const SfxPoolItem& rNew = m_pParent
- ? m_pParent->Get( nWhich, true )
+ ? m_pParent->Get( nWhich )
: m_pPool->GetDefaultItem( nWhich );
Changed( *pItemToClear, rNew );
@@ -524,7 +524,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
if (nWhich <= SFX_WHICH_MAX )
{
const SfxPoolItem& rOld = m_pParent
- ? m_pParent->Get( nWhich, true )
+ ? m_pParent->Get( nWhich )
: m_pPool->GetDefaultItem( nWhich );
Changed( rOld, rNew );
}
@@ -974,7 +974,7 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
if(nWhich <= SFX_WHICH_MAX)
{
const SfxPoolItem& rNew = m_pParent
- ? m_pParent->Get( nWhich, true )
+ ? m_pParent->Get( nWhich )
: m_pPool->GetDefaultItem( nWhich );
Changed( **ppFnd1, rNew );
@@ -1042,7 +1042,7 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
if(nWhich <= SFX_WHICH_MAX)
{
const SfxPoolItem& rNew = m_pParent
- ? m_pParent->Get( nWhich, true )
+ ? m_pParent->Get( nWhich )
: m_pPool->GetDefaultItem( nWhich );
Changed( **ppFnd1, rNew );
@@ -1824,7 +1824,7 @@ const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhi
{
bIncrementCount = true;
pOld = (m_pParent)
- ? &m_pParent->Get( nWhich, true )
+ ? &m_pParent->Get( nWhich )
: ((nWhich <= SFX_WHICH_MAX)
? &m_pPool->GetDefaultItem(nWhich)
: nullptr);
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 1d2e30f1657c..441396054eab 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -324,7 +324,7 @@ void SfxItemPool::LoadCompleted()
{
if (*ppHtArr)
{
- if ( !ReleaseRef( **ppHtArr, 1 ) )
+ if ( !ReleaseRef( **ppHtArr ) )
DELETEZ( *ppHtArr );
}
}
@@ -389,7 +389,7 @@ void SfxItemPool_Impl::readTheItems (
if ( !mbPersistentRefCounts )
// Hold onto it until SfxItemPool::LoadCompleted()
- SfxItemPool::AddRef(*pItem, 1);
+ SfxItemPool::AddRef(*pItem);
else
{
if ( nRef > SFX_ITEMS_OLD_MAXREF )
@@ -482,7 +482,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
{
DBG_WARNING( "loading non-empty ItemPool" );
- AddRef( **ppHtArr, 1 );
+ AddRef( **ppHtArr );
}
}
}
@@ -798,7 +798,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
{
// If the pool in the stream has a different structure, the SlotId
// from the stream must be mapable to a WhichId
- sal_uInt16 nMappedWhich = nSlotId ? GetWhich(nSlotId, true) : 0;
+ sal_uInt16 nMappedWhich = nSlotId ? GetWhich(nSlotId) : 0;
if ( IsWhich(nMappedWhich) )
{
// Mapped SlotId can be taken over
@@ -839,7 +839,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
// References have NOT been loaded together with the pool?
if ( !pTarget->HasPersistentRefCounts() )
- AddRef( *pItem, 1 );
+ AddRef( *pItem );
else
return pItem;
@@ -1165,7 +1165,7 @@ bool SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
DBG_ASSERT( !pImp->bInSetItem || !rItem.ISA(SfxSetItem),
"SetItem contains ItemSet with SetItem" );
- sal_uInt16 nSlotId = pPool->GetSlotId( rItem.Which(), true );
+ sal_uInt16 nSlotId = pPool->GetSlotId( rItem.Which() );
sal_uInt16 nItemVersion = rItem.GetVersion(pImp->mnFileFormatVersion);
if ( USHRT_MAX == nItemVersion )
return false;
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 4404a2543d03..5e9e5246004c 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -837,7 +837,7 @@ void SfxStyleSheetBasePool::ChangeParent(const OUString& rOld,
bool bVirtual)
{
const sal_uInt16 nTmpMask = GetSearchMask();
- SetSearchMask(GetSearchFamily(), SFXSTYLEBIT_ALL);
+ SetSearchMask(GetSearchFamily());
for( SfxStyleSheetBase* p = First(); p; p = Next() )
{
if( p->GetParent() == rOld )
@@ -891,14 +891,14 @@ bool SfxStyleSheet::SetParent( const OUString& rName )
// Remove from notification chain of the old parent if applicable
if(!aOldParent.isEmpty())
{
- SfxStyleSheet *pParent = static_cast<SfxStyleSheet *>(pPool->Find(aOldParent, nFamily, SFXSTYLEBIT_ALL));
+ SfxStyleSheet *pParent = static_cast<SfxStyleSheet *>(pPool->Find(aOldParent, nFamily));
if(pParent)
EndListening(*pParent);
}
// Add to the notification chain of the new parent
if(!aParent.isEmpty())
{
- SfxStyleSheet *pParent = static_cast<SfxStyleSheet *>(pPool->Find(aParent, nFamily, SFXSTYLEBIT_ALL));
+ SfxStyleSheet *pParent = static_cast<SfxStyleSheet *>(pPool->Find(aParent, nFamily));
if(pParent)
StartListening(*pParent);
}
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index a8d849faa5f4..f359c509cd46 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -1244,7 +1244,7 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt )
using namespace comphelper::string;
// Trailing blanks in input.
OUStringBuffer aBuf(sStrArray[nNext]);
- aBuf.stripEnd((sal_Unicode)' ');
+ aBuf.stripEnd();
// Expand again in case of pattern "M. D. " and
// input "M. D. ", maybe fetched far, but..
padToLength(aBuf, rPat.getLength() - nPat, ' ');
@@ -1356,7 +1356,7 @@ bool ImpSvNumberInputScan::SkipDatePatternSeparator( sal_uInt16 nParticle, sal_I
// IsAcceptedDatePattern().
using namespace comphelper::string;
OUStringBuffer aBuf(sStrArray[nNext]);
- aBuf.stripEnd((sal_Unicode)' ');
+ aBuf.stripEnd();
padToLength(aBuf, rPat.getLength() - nPat, ' ');
bOk = (rPat.indexOf( aBuf.makeStringAndClear(), nPat) == nPat);
}
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 38bdce0a7518..69ec74d7269e 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -3767,8 +3767,8 @@ sal_uInt16 SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr
if ( bBank )
{
// Only bank symbols.
- OUString aPositiveBank = rCurr.BuildPositiveFormatString(true, *xLocaleData, 1);
- OUString aNegativeBank = rCurr.BuildNegativeFormatString(true, *xLocaleData, 1 );
+ OUString aPositiveBank = rCurr.BuildPositiveFormatString(true, *xLocaleData);
+ OUString aNegativeBank = rCurr.BuildNegativeFormatString(true, *xLocaleData );
OUStringBuffer format1(aPositiveBank);
format1.append(';');
@@ -3789,8 +3789,8 @@ sal_uInt16 SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr
{
// Mixed formats like in SvNumberFormatter::ImpGenerateFormats() but no
// duplicates if no decimals in currency.
- OUString aPositive = rCurr.BuildPositiveFormatString(false, *xLocaleData, 1);
- OUString aNegative = rCurr.BuildNegativeFormatString(false, *xLocaleData, 1 );
+ OUString aPositive = rCurr.BuildPositiveFormatString(false, *xLocaleData );
+ OUString aNegative = rCurr.BuildNegativeFormatString(false, *xLocaleData );
OUStringBuffer format1;
OUStringBuffer format2;
OUStringBuffer format3;
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index f7cd0ac30aac..045586dca21e 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -655,7 +655,7 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bT
}
// clear redo stack, if requested
- if ( bClearRedo && ( ImplGetRedoActionCount_Lock( CurrentLevel ) > 0 ) )
+ if ( bClearRedo && ( ImplGetRedoActionCount_Lock() > 0 ) )
ImplClearRedo( i_guard, IUndoManager::CurrentLevel );
// respect max number