[Libreoffice-commits] core.git: 2 commits - include/svl include/tools svl/source tools/source
Noel Grandin
noel at peralex.com
Tue Mar 1 09:20:54 UTC 2016
include/svl/filerec.hxx | 4 +-
include/svl/inettype.hxx | 3 -
include/svl/itempool.hxx | 2 -
include/svl/itemset.hxx | 7 +--
include/svl/undo.hxx | 4 +-
include/svl/urihelper.hxx | 3 -
include/svl/zforlist.hxx | 4 +-
include/svl/zformat.hxx | 11 ++---
include/tools/color.hxx | 4 +-
include/tools/inetmsg.hxx | 3 -
include/tools/multisel.hxx | 2 -
include/tools/poly.hxx | 13 ++----
include/tools/stream.hxx | 2 -
include/tools/urlobj.hxx | 73 ++++++++++++-------------------------
svl/source/filerec/filerec.cxx | 10 ++---
svl/source/items/itempool.cxx | 4 +-
svl/source/items/itemset.cxx | 50 +++++++++----------------
svl/source/misc/inethist.cxx | 8 ++--
svl/source/misc/inettype.cxx | 7 +--
svl/source/misc/urihelper.cxx | 9 ++--
svl/source/numbers/zforlist.cxx | 8 ++--
svl/source/numbers/zformat.cxx | 65 ++++----------------------------
svl/source/undo/undo.cxx | 4 +-
tools/source/fsys/urlobj.cxx | 46 +++++++++--------------
tools/source/generic/color.cxx | 16 ++------
tools/source/generic/poly.cxx | 12 +-----
tools/source/generic/poly2.cxx | 4 +-
tools/source/inet/inetmsg.cxx | 4 +-
tools/source/memtools/multisel.cxx | 8 +---
tools/source/stream/stream.cxx | 4 +-
30 files changed, 132 insertions(+), 262 deletions(-)
New commits:
commit c6eb232cb7b2a1fc58edb379463d1aa589973af4
Author: Noel Grandin <noel at peralex.com>
Date: Tue Mar 1 09:12:39 2016 +0200
loplugin:unuseddefaultparam in svl
Change-Id: Ifc82563c8930332d460df4d97935ba6e9946689f
diff --git a/include/svl/filerec.hxx b/include/svl/filerec.hxx
index b5685f3..063d296 100644
--- a/include/svl/filerec.hxx
+++ b/include/svl/filerec.hxx
@@ -386,7 +386,7 @@ protected:
public:
inline ~SfxMultiFixRecordWriter();
- sal_uInt32 Close( bool bSeekToEndOfRec = true );
+ sal_uInt32 Close();
};
/** write record with multiple content items
@@ -450,7 +450,7 @@ public:
void NewContent();
- sal_uInt32 Close( bool bSeekToEndOfRec = true );
+ sal_uInt32 Close();
};
/** write record with multiple content items with identical size
diff --git a/include/svl/inettype.hxx b/include/svl/inettype.hxx
index 4fe3206..a5282a5 100644
--- a/include/svl/inettype.hxx
+++ b/include/svl/inettype.hxx
@@ -219,8 +219,7 @@ class SVL_DLLPUBLIC INetContentTypes
public:
static INetContentType RegisterContentType(OUString const & rTypeName,
OUString const & rPresentation,
- OUString const * pExtension = nullptr,
- OUString const * pSystemFileType = nullptr);
+ OUString const * pExtension = nullptr);
static INetContentType GetContentType(OUString const & rTypeName);
diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index a719a11..e9f216b 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -204,7 +204,7 @@ public:
sal_uInt16 GetWhich( sal_uInt16 nSlot, bool bDeep = true ) const;
sal_uInt16 GetSlotId( sal_uInt16 nWhich, bool bDeep = true ) const;
sal_uInt16 GetTrueWhich( sal_uInt16 nSlot, bool bDeep = true ) const;
- sal_uInt16 GetTrueSlotId( sal_uInt16 nWhich, bool bDeep = true ) const;
+ sal_uInt16 GetTrueSlotId( sal_uInt16 nWhich ) const;
void SetVersionMap( sal_uInt16 nVer,
sal_uInt16 nOldStart, sal_uInt16 nOldEnd,
diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx
index 6607ad5..ac3ea8d 100644
--- a/include/svl/itemset.hxx
+++ b/include/svl/itemset.hxx
@@ -118,7 +118,7 @@ public:
void DisableItem(sal_uInt16 nWhich);
void InvalidateItem( sal_uInt16 nWhich );
sal_uInt16 ClearItem( sal_uInt16 nWhich = 0);
- void ClearInvalidItems( bool bHardDefault = false );
+ void ClearInvalidItems();
void InvalidateAllItems(); // HACK(via nWhich = 0) ???
inline void SetParent( const SfxItemSet* pNew );
@@ -136,7 +136,7 @@ public:
bool Set( const SfxItemSet&, bool bDeep = true );
void Intersect( const SfxItemSet& rSet );
- void MergeValues( const SfxItemSet& rSet, bool bOverwriteDefaults = false );
+ void MergeValues( const SfxItemSet& rSet );
void Differentiate( const SfxItemSet& rSet );
void MergeValue( const SfxPoolItem& rItem, bool bOverwriteDefaults = false );
@@ -146,8 +146,7 @@ public:
void MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo );
const SfxItemSet* GetParent() const { return m_pParent; }
- void Load( SvStream &, bool bDirect = false,
- const SfxItemPool *pRefPool = nullptr );
+ void Load( SvStream &, bool bDirect = false );
void Store( SvStream &, bool bDirect = false ) const;
bool operator==(const SfxItemSet &) const;
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 0dce807..cefb5fb 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -199,7 +199,7 @@ namespace svl
virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const = 0;
virtual OUString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0;
- virtual SfxUndoAction* GetRedoAction( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0;
+ virtual SfxUndoAction* GetRedoAction( size_t nNo=0 ) const = 0;
virtual bool Undo() = 0;
virtual bool Redo() = 0;
@@ -317,7 +317,7 @@ public:
virtual SfxUndoAction* GetUndoAction( size_t nNo=0 ) const override;
virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const override;
virtual OUString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const override;
- virtual SfxUndoAction* GetRedoAction( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const override;
+ virtual SfxUndoAction* GetRedoAction( size_t nNo=0 ) const override;
virtual bool Undo() override;
virtual bool Redo() override;
virtual void Clear() override;
diff --git a/include/svl/urihelper.hxx b/include/svl/urihelper.hxx
index 5f76330..ce10bc9 100644
--- a/include/svl/urihelper.hxx
+++ b/include/svl/urihelper.hxx
@@ -120,8 +120,7 @@ SVL_DLLPUBLIC OUString FindFirstURLInText(OUString const & rText,
sal_Int32 & rEnd,
CharClass const & rCharClass,
INetURLObject::EncodeMechanism eMechanism = INetURLObject::WAS_ENCODED,
- rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
- INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT);
+ rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
/** Remove any password component from both absolute and relative URLs.
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 6178de7..2b98347 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -845,7 +845,7 @@ private:
LanguageType eLnge );
// Create builtin formats for language/country if necessary, return CLOffset
- SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge, bool bNoAdditionalFormats = false );
+ SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge );
// Build negative currency format, old compatibility style
SVL_DLLPRIVATE void ImpGetNegCurrFormat(OUStringBuffer& sNegStr, const OUString& rCurrSymbol);
@@ -879,7 +879,7 @@ private:
// Non-PRODUCT version may check locale data for matching defaults in one
// FormatElement group.
SVL_DLLPRIVATE void ImpAdjustFormatCodeDefault( css::i18n::NumberFormatCode * pFormatArr,
- sal_Int32 nCount, bool bCheckCorrectness = true );
+ sal_Int32 nCount );
// Obtain the format entry for a given key index.
SVL_DLLPRIVATE SvNumberformat* GetFormatEntry( sal_uInt32 nKey );
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index b66006b..2b3569e 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -196,8 +196,7 @@ public:
// Build a format string of application defined keywords
OUString GetMappedFormatstring( const NfKeywordTable& rKeywords,
- const LocaleDataWrapper& rLoc,
- bool bDontQuote = false ) const;
+ const LocaleDataWrapper& rLoc ) const;
void SetStarFormatSupport( bool b ) { bStarFlag = b; }
@@ -239,7 +238,7 @@ public:
//! Only onLoad: convert from stored to current system language/country
void ConvertLanguage( SvNumberFormatter& rConverter,
- LanguageType eConvertFrom, LanguageType eConvertTo, bool bSystem = false );
+ LanguageType eConvertFrom, LanguageType eConvertTo );
// Substring of a subformat code nNumFor (0..3)
// nPos == 0xFFFF => last substring
@@ -249,8 +248,7 @@ public:
// Subtype of a subformat code nNumFor (0..3)
// nPos == 0xFFFF => last substring
- // bString==true: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
- short GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos, bool bString = false ) const;
+ short GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos ) const;
sal_Int32 GetForcedDenominatorForType( sal_uInt16 nNumFor ) const;
/** If the count of string elements (substrings, ignoring [modifiers] and
@@ -354,8 +352,7 @@ public:
*/
static sal_Int32 GetQuoteEnd( const OUString& rString, sal_Int32 nPos,
sal_Unicode cQuote = '"',
- sal_Unicode cEscIn = '\0',
- sal_Unicode cEscOut = '\\' );
+ sal_Unicode cEscIn = '\0' );
void SetComment( const OUString& rStr )
{ sComment = rStr; }
diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx
index 73bd612..01b1317 100644
--- a/svl/source/filerec/filerec.cxx
+++ b/svl/source/filerec/filerec.cxx
@@ -307,7 +307,7 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter(sal_uInt8 nRecordType,
/**
* @see SfxMiniRecordWriter
*/
-sal_uInt32 SfxMultiFixRecordWriter::Close( bool bSeekToEndOfRec )
+sal_uInt32 SfxMultiFixRecordWriter::Close()
{
// Header not written yet?
if ( !_bHeaderOk )
@@ -320,8 +320,7 @@ sal_uInt32 SfxMultiFixRecordWriter::Close( bool bSeekToEndOfRec )
_pStream->WriteUInt32( _nContentSize );
// seek to end of record or stay after the header
- if ( bSeekToEndOfRec )
- _pStream->Seek(nEndPos);
+ _pStream->Seek(nEndPos);
return nEndPos;
}
@@ -417,7 +416,7 @@ void SfxMultiVarRecordWriter::NewContent()
/**
* @see SfxMiniRecordWriter
*/
-sal_uInt32 SfxMultiVarRecordWriter::Close( bool bSeekToEndOfRec )
+sal_uInt32 SfxMultiVarRecordWriter::Close()
{
// Header not written yet?
if ( !_bHeaderOk )
@@ -444,8 +443,7 @@ sal_uInt32 SfxMultiVarRecordWriter::Close( bool bSeekToEndOfRec )
_pStream->WriteUInt32( nContentOfsPos );
// seek to the end of the record or stay where we are
- if ( bSeekToEndOfRec )
- _pStream->Seek(nEndPos);
+ _pStream->Seek(nEndPos);
return nEndPos;
}
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index ca03fb8..40fd54c 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -1000,14 +1000,14 @@ sal_uInt16 SfxItemPool::GetTrueWhich( sal_uInt16 nSlotId, bool bDeep ) const
}
-sal_uInt16 SfxItemPool::GetTrueSlotId( sal_uInt16 nWhich, bool bDeep ) const
+sal_uInt16 SfxItemPool::GetTrueSlotId( sal_uInt16 nWhich ) const
{
if ( !IsWhich(nWhich) )
return 0;
if ( !IsInRange( nWhich ) )
{
- if ( pImp->mpSecondary && bDeep )
+ if ( pImp->mpSecondary )
return pImp->mpSecondary->GetTrueSlotId(nWhich);
assert(false && "unknown WhichId - cannot get slot-id");
return 0;
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 1f77288..d55bfa6 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -325,29 +325,20 @@ sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich )
return nDel;
}
-void SfxItemSet::ClearInvalidItems( bool bHardDefault )
+void SfxItemSet::ClearInvalidItems()
{
sal_uInt16* pPtr = m_pWhichRanges;
SfxItemArray ppFnd = m_pItems;
- if ( bHardDefault )
- while( *pPtr )
- {
- for ( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
- if ( IsInvalidItem(*ppFnd) )
- *ppFnd = &m_pPool->Put( m_pPool->GetDefaultItem(nWhich) );
- pPtr += 2;
- }
- else
- while( *pPtr )
- {
- for( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
- if( IsInvalidItem(*ppFnd) )
- {
- *ppFnd = nullptr;
- --m_nCount;
- }
- pPtr += 2;
- }
+ while( *pPtr )
+ {
+ for( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
+ if( IsInvalidItem(*ppFnd) )
+ {
+ *ppFnd = nullptr;
+ --m_nCount;
+ }
+ pPtr += 2;
+ }
}
void SfxItemSet::InvalidateAllItems()
@@ -1139,7 +1130,7 @@ static void MergeItem_Impl( SfxItemPool *_pPool, sal_uInt16 &rCount,
}
}
-void SfxItemSet::MergeValues( const SfxItemSet& rSet, bool bIgnoreDefaults )
+void SfxItemSet::MergeValues( const SfxItemSet& rSet )
{
// WARNING! When making changes/fixing bugs, always update the table above!!
assert( GetPool() == rSet.GetPool() && "MergeValues with different Pools" );
@@ -1167,7 +1158,7 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, bool bIgnoreDefaults )
SfxItemArray ppFnd2 = rSet.m_pItems;
for( ; nSize; --nSize, ++ppFnd1, ++ppFnd2 )
- MergeItem_Impl(m_pPool, m_nCount, ppFnd1, *ppFnd2, bIgnoreDefaults);
+ MergeItem_Impl(m_pPool, m_nCount, ppFnd1, *ppFnd2, false/*bIgnoreDefaults*/);
}
else
{
@@ -1180,14 +1171,13 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, bool bIgnoreDefaults )
if( !pItem )
{
// Not set, so default
- if ( !bIgnoreDefaults )
- MergeValue( rSet.GetPool()->GetDefaultItem( nWhich ), bIgnoreDefaults );
+ MergeValue( rSet.GetPool()->GetDefaultItem( nWhich ) );
}
else if( IsInvalidItem( pItem ) )
// don't care
InvalidateItem( nWhich );
else
- MergeValue( *pItem, bIgnoreDefaults );
+ MergeValue( *pItem );
}
}
}
@@ -1326,22 +1316,18 @@ void SfxItemSet::Load
(
SvStream& rStream, // Stream we're loading from
- bool bDirect, /* true
+ bool bDirect /* true
Items are directly read form the stream
and not via Surrogates
false (default)
Items are read via Surrogates */
-
- const SfxItemPool* pRefPool /* Pool that can resolve the Surrogates
- (e.g. when inserting documents) */
)
{
assert(m_pPool);
- // No RefPool => Resolve Surrogates with ItemSet's Pool
- if ( !pRefPool )
- pRefPool = m_pPool;
+ // Resolve Surrogates with ItemSet's Pool
+ const SfxItemPool *pRefPool = m_pPool;
// Load Item count and as many Items
sal_uInt16 nCount = 0;
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index ce76e2b..09fec7d 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -71,9 +71,9 @@ class INetURLHistory_Impl: private boost::noncopyable
/** Initialization.
*/
- void initialize (sal_uInt16 nLru, sal_uInt32 nHash = 0)
+ void initialize (sal_uInt16 nLru)
{
- m_nHash = nHash;
+ m_nHash = 0;
m_nLru = nLru;
m_nMBZ = 0;
}
@@ -100,9 +100,9 @@ class INetURLHistory_Impl: private boost::noncopyable
/** Initialization.
*/
- void initialize (sal_uInt16 nThis, sal_uInt32 nHash = 0)
+ void initialize (sal_uInt16 nThis)
{
- m_nHash = nHash;
+ m_nHash = 0;
m_nNext = nThis;
m_nPrev = nThis;
}
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index 15ca63f..fc99529 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -537,14 +537,13 @@ MediaTypeEntry const * seekEntry(OUString const & rTypeName,
//static
INetContentType INetContentTypes::RegisterContentType(OUString const & rTypeName,
OUString const & rPresentation,
- OUString const * pExtension,
- OUString const * pSystemFileType)
+ OUString const * pExtension)
{
INetContentType eTypeID = GetContentType(rTypeName);
if (eTypeID == CONTENT_TYPE_UNKNOWN)
eTypeID = Registration::RegisterContentType(rTypeName, rPresentation,
pExtension,
- pSystemFileType);
+ nullptr/*pSystemFileType*/);
else if (eTypeID > CONTENT_TYPE_LAST)
{
TypeIDMapEntry * pTypeEntry = Registration::getEntry(eTypeID);
@@ -552,8 +551,6 @@ INetContentType INetContentTypes::RegisterContentType(OUString const & rTypeName
{
if (!rPresentation.isEmpty())
pTypeEntry->m_aPresentation = rPresentation;
- if (pSystemFileType)
- pTypeEntry->m_aSystemFileType = *pSystemFileType;
}
if (pExtension)
{
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index e24b982..b53a725 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -429,8 +429,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
sal_Int32 & rEnd,
CharClass const & rCharClass,
INetURLObject::EncodeMechanism eMechanism,
- rtl_TextEncoding eCharset,
- INetURLObject::FSysStyle eStyle)
+ rtl_TextEncoding eCharset)
{
if (!(rBegin <= rEnd && rEnd <= rText.getLength()))
return OUString();
@@ -529,7 +528,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
{
INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos),
INetProtocol::File, eMechanism, eCharset,
- eStyle);
+ INetURLObject::FSYS_DETECT);
if (!aUri.HasError())
{
rBegin = nPos;
@@ -618,7 +617,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
}
}
- if ((eStyle & INetURLObject::FSYS_DOS) != 0 && rEnd - nPos >= 3
+ if (rEnd - nPos >= 3
&& rText[nPos + 1] == ':'
&& (rText[nPos + 2] == '/'
|| rText[nPos + 2] == '\\')) // 7th, 8th
@@ -644,7 +643,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
}
}
}
- else if ((eStyle & INetURLObject::FSYS_DOS) != 0 && rEnd - nPos >= 2
+ else if (rEnd - nPos >= 2
&& rText[nPos] == '\\'
&& rText[nPos + 1] == '\\') // 6th
{
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 7b1f0bd..dd48e2c 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -944,7 +944,7 @@ SvNumberFormatTable& SvNumberFormatter::GetFirstEntryTable(
return GetEntryTable(eTypetmp, FIndex, rLnge);
}
-sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, bool bNoAdditionalFormats )
+sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge )
{
ChangeIntl(eLnge);
sal_uInt32 CLOffset = ImpGetCLOffset(ActLnge);
@@ -999,7 +999,7 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, bool bNoAdditio
}
MaxCLOffset += SV_COUNTRY_LANGUAGE_OFFSET;
- ImpGenerateFormats( MaxCLOffset, bNoAdditionalFormats );
+ ImpGenerateFormats( MaxCLOffset, false/*bNoAdditionalFormats*/ );
CLOffset = MaxCLOffset;
}
return CLOffset;
@@ -2092,13 +2092,13 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex(
void SvNumberFormatter::ImpAdjustFormatCodeDefault(
css::i18n::NumberFormatCode * pFormatArr,
- sal_Int32 nCnt, bool bCheckCorrectness )
+ sal_Int32 nCnt )
{
using namespace ::com::sun::star;
if ( !nCnt )
return;
- if (bCheckCorrectness && LocaleDataWrapper::areChecksEnabled())
+ if (LocaleDataWrapper::areChecksEnabled())
{
// check the locale data for correctness
OStringBuffer aMsg;
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 1590893..c19d52b 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1594,32 +1594,20 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString,
void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter,
LanguageType eConvertFrom,
- LanguageType eConvertTo, bool bSystem )
+ LanguageType eConvertTo )
{
sal_Int32 nCheckPos;
sal_uInt32 nKey;
short nType = eType;
OUString aFormatString( sFormatstring );
- if ( bSystem )
- {
- rConverter.PutandConvertEntrySystem( aFormatString, nCheckPos, nType,
- nKey, eConvertFrom, eConvertTo );
- }
- else
- {
- rConverter.PutandConvertEntry( aFormatString, nCheckPos, nType,
- nKey, eConvertFrom, eConvertTo );
- }
+ rConverter.PutandConvertEntry( aFormatString, nCheckPos, nType,
+ nKey, eConvertFrom, eConvertTo );
const SvNumberformat* pFormat = rConverter.GetEntry( nKey );
DBG_ASSERT( pFormat, "SvNumberformat::ConvertLanguage: Conversion ohne Format" );
if ( pFormat )
{
ImpCopyNumberformat( *pFormat );
// Reset values taken over from Formatter/Scanner
- if ( bSystem )
- {
- maLocale.meLanguage = LANGUAGE_SYSTEM;
- }
// pColor still points to table in temporary Formatter/Scanner
for ( sal_uInt16 i = 0; i < 4; i++ )
{
@@ -4488,8 +4476,7 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16
return &NumFor[nNumFor].Info().sStrArray[nPos];
}
-short SvNumberformat::GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos,
- bool bString /* = false */ ) const
+short SvNumberformat::GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos ) const
{
if ( nNumFor > 3 )
{
@@ -4503,41 +4490,11 @@ short SvNumberformat::GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos,
if ( nPos == 0xFFFF )
{
nPos = nAnz - 1;
- if ( bString )
- {
- // Backwards
- short* pType = NumFor[nNumFor].Info().nTypeArray + nPos;
- while ( nPos > 0 && (*pType != NF_SYMBOLTYPE_STRING) &&
- (*pType != NF_SYMBOLTYPE_CURRENCY) )
- {
- pType--;
- nPos--;
- }
- if ( (*pType != NF_SYMBOLTYPE_STRING) && (*pType != NF_SYMBOLTYPE_CURRENCY) )
- {
- return 0;
- }
- }
}
else if ( nPos > nAnz - 1 )
{
return 0;
}
- else if ( bString )
- {
- // Forwards
- short* pType = NumFor[nNumFor].Info().nTypeArray + nPos;
- while ( nPos < nAnz && (*pType != NF_SYMBOLTYPE_STRING) &&
- (*pType != NF_SYMBOLTYPE_CURRENCY) )
- {
- pType++;
- nPos++;
- }
- if ( (*pType != NF_SYMBOLTYPE_STRING) && (*pType != NF_SYMBOLTYPE_CURRENCY) )
- {
- return 0;
- }
- }
return NumFor[nNumFor].Info().nTypeArray[nPos];
}
@@ -4706,8 +4663,7 @@ static void lcl_SvNumberformat_AddLimitStringImpl( OUString& rStr,
}
OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& rKeywords,
- const LocaleDataWrapper& rLocWrp,
- bool bDontQuote ) const
+ const LocaleDataWrapper& rLocWrp ) const
{
OUStringBuffer aStr;
bool bDefault[4];
@@ -4854,11 +4810,7 @@ OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& rKeywords,
aStr.append( rLocWrp.getTime100SecSep() );
break;
case NF_SYMBOLTYPE_STRING :
- if( bDontQuote )
- {
- aStr.append( pStr[j] );
- }
- else if ( pStr[j].getLength() == 1 )
+ if ( pStr[j].getLength() == 1 )
{
aStr.append( '\\' );
aStr.append( pStr[j] );
@@ -5076,8 +5028,7 @@ bool SvNumberformat::IsInQuote( const OUString& rStr, sal_Int32 nPos,
// static
sal_Int32 SvNumberformat::GetQuoteEnd( const OUString& rStr, sal_Int32 nPos,
- sal_Unicode cQuote, sal_Unicode cEscIn,
- sal_Unicode cEscOut )
+ sal_Unicode cQuote, sal_Unicode cEscIn )
{
if ( nPos < 0 )
{
@@ -5088,7 +5039,7 @@ sal_Int32 SvNumberformat::GetQuoteEnd( const OUString& rStr, sal_Int32 nPos,
{
return -1;
}
- if ( !IsInQuote( rStr, nPos, cQuote, cEscIn, cEscOut ) )
+ if ( !IsInQuote( rStr, nPos, cQuote, cEscIn ) )
{
if ( rStr[ nPos ] == cQuote )
{
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index 868f275..164c653 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -849,11 +849,11 @@ size_t SfxUndoManager::ImplGetRedoActionCount_Lock( bool const i_currentLevel )
}
-SfxUndoAction* SfxUndoManager::GetRedoAction( size_t nNo, bool const i_currentLevel ) const
+SfxUndoAction* SfxUndoManager::GetRedoAction( size_t nNo ) const
{
UndoManagerGuard aGuard( *m_xData );
- const SfxUndoArray* pUndoArray = i_currentLevel ? m_xData->pActUndoArray : m_xData->pUndoArray;
+ const SfxUndoArray* pUndoArray = m_xData->pActUndoArray;
if ( (pUndoArray->nCurUndoAction + nNo) > pUndoArray->aUndoActions.size() )
{
return nullptr;
commit 3da977def7fa97e791c279c05de6b2e06b79fcd4
Author: Noel Grandin <noel at peralex.com>
Date: Tue Mar 1 08:45:39 2016 +0200
loplugin:unuseddefaultparam in tools
Change-Id: I2a974ba76566700c2037fcb38de3ecfea9d2651d
diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index e7fb8ec..61a23e2 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -202,8 +202,8 @@ public:
return !(Color::operator==(rColor));
}
- SvStream& Read(SvStream& rIStream, bool bNewFormat = true);
- SvStream& Write(SvStream& rOStream, bool bNewFormat = true) const;
+ SvStream& Read(SvStream& rIStream);
+ SvStream& Write(SvStream& rOStream) const;
TOOLS_DLLPUBLIC friend SvStream& ReadColor(SvStream& rIStream, Color& rColor);
TOOLS_DLLPUBLIC friend SvStream& WriteColor(SvStream& rOStream, const Color& rColor);
diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx
index ae7f23c..7c3748e 100644
--- a/include/tools/inetmsg.hxx
+++ b/include/tools/inetmsg.hxx
@@ -175,8 +175,7 @@ public:
INetMIMEMessage* GetParent() const { return pParent; }
void EnableAttachMultipartFormDataChild();
- void AttachChild (
- INetMIMEMessage& rChildMsg, bool bOwner = true );
+ void AttachChild( INetMIMEMessage& rChildMsg );
const OString& GetMultipartBoundary() const { return m_aBoundary; }
};
diff --git a/include/tools/multisel.hxx b/include/tools/multisel.hxx
index 1731b49..a2b785e 100644
--- a/include/tools/multisel.hxx
+++ b/include/tools/multisel.hxx
@@ -93,7 +93,7 @@ class TOOLS_DLLPUBLIC StringRangeEnumerator
sal_Int32 mnOffset;
bool mbValidInput;
- bool setRange( const OUString& i_rNewRange, bool i_bStrict = false );
+ bool setRange( const OUString& i_rNewRange );
bool insertRange( sal_Int32 nFirst, sal_Int32 nLast, bool bSequence, bool bMayAdjust );
bool insertJoinedRanges( const std::vector< sal_Int32 >& rNumbers, bool i_bStrict );
bool checkValue( sal_Int32, const std::set< sal_Int32 >* i_pPossibleValues = nullptr ) const;
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index a956b20..df83661 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -123,7 +123,7 @@ public:
bool IsInside( const Point& rPt ) const;
bool IsRightOrientated() const;
double CalcDistance( sal_uInt16 nPt1, sal_uInt16 nPt2 );
- void Clip( const Rectangle& rRect, bool bPolygon = true );
+ void Clip( const Rectangle& rRect );
void Optimize( PolyOptimizeFlags nOptimizeFlags );
/** Adaptive subdivision of polygons with curves
@@ -153,7 +153,7 @@ public:
void Rotate( const Point& rCenter, double fSin, double fCos );
void Rotate( const Point& rCenter, sal_uInt16 nAngle10 );
- void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags = POLY_NORMAL );
+ void Insert( sal_uInt16 nPos, const Point& rPt );
void Insert( sal_uInt16 nPos, const tools::Polygon& rPoly );
const Point& operator[]( sal_uInt16 nPos ) const { return GetPoint( nPos ); }
@@ -227,16 +227,11 @@ public:
@param rResult
The resulting subdivided polygon
- @param d
- This parameter controls the amount of subdivision. The
- original curve is guaranteed to not differ by more than this
- amount per bezier segment from the subdivided
- lines. Concretely, if the polygon is in device coordinates and
- d equals 1.0, then the difference between the subdivided and
+ If the polygon is in device coordinates, then the difference between the subdivided and
the original polygon is guaranteed to be smaller than one
pixel.
*/
- void AdaptiveSubdivide( tools::PolyPolygon& rResult, const double d = 1.0 ) const;
+ void AdaptiveSubdivide( tools::PolyPolygon& rResult ) const;
static tools::PolyPolygon SubdivideBezier( const tools::PolyPolygon& rPolyPoly );
void GetIntersection( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon& rResult ) const;
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index aba3304..ab905ec 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -689,7 +689,7 @@ public:
sal_Size GetEndOfData() const { return nEndOfData; }
const void* GetData() { Flush(); return pBuf; }
- void* SwitchBuffer( sal_Size nInitSize=512, sal_Size nResize=64 );
+ void* SwitchBuffer( sal_Size nInitSize=512 );
void SetBuffer( void* pBuf, sal_Size nSize,
bool bOwnsData=true, sal_Size nEOF=0 );
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 3985942..add0673 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -204,8 +204,7 @@ public:
OUString const & rThePassword,
OUString const & rTheHost, sal_uInt32 nThePort,
OUString const & rThePath,
- EncodeMechanism eMechanism = WAS_ENCODED,
- rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
+ EncodeMechanism eMechanism = WAS_ENCODED);
// Smart Parsing:
@@ -332,7 +331,7 @@ public:
INetURLObject * pTheAbsURIRef,
EncodeMechanism eMechanism = WAS_ENCODED,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
- FSysStyle eStyle = FSYS_DETECT, bool bIgnoreFragment = false)
+ FSysStyle eStyle = FSYS_DETECT)
const;
/** @descr If rTheRelURIRef cannot be converted to an absolute URL
@@ -348,8 +347,7 @@ public:
bool bIgnoreFragment = false,
EncodeMechanism eEncodeMechanism = WAS_ENCODED,
DecodeMechanism eDecodeMechanism = DECODE_TO_IURI,
- rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
- FSysStyle eStyle = FSYS_DETECT);
+ rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
static inline OUString
GetRelURL(OUString const & rTheBaseURIRef,
@@ -361,9 +359,7 @@ public:
// External URLs:
- OUString getExternalURL(DecodeMechanism eMechanism = DECODE_TO_IURI,
- rtl_TextEncoding eCharset
- = RTL_TEXTENCODING_UTF8) const;
+ OUString getExternalURL(DecodeMechanism eMechanism = DECODE_TO_IURI) const;
static inline bool translateToExternal(OUString const & rTheIntURIRef,
OUString & rTheExtURIRef,
@@ -430,19 +426,15 @@ public:
{ return decode(m_aAuth, eMechanism, eCharset); }
inline bool SetUser(OUString const & rTheUser,
- EncodeMechanism eMechanism = WAS_ENCODED,
- rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
- { return setUser(rTheUser, false, eMechanism, eCharset); }
+ EncodeMechanism eMechanism = WAS_ENCODED)
+ { return setUser(rTheUser, false, eMechanism, RTL_TEXTENCODING_UTF8); }
inline bool SetPass(OUString const & rThePassword,
- EncodeMechanism eMechanism = WAS_ENCODED,
- rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
+ EncodeMechanism eMechanism = WAS_ENCODED);
inline bool SetUserAndPass(OUString const & rTheUser,
OUString const & rThePassword,
- EncodeMechanism eMechanism = WAS_ENCODED,
- rtl_TextEncoding eCharset
- = RTL_TEXTENCODING_UTF8);
+ EncodeMechanism eMechanism = WAS_ENCODED);
// Host and Port:
@@ -459,9 +451,8 @@ public:
sal_uInt32 GetPort() const;
inline bool SetHost(OUString const & rTheHost,
- EncodeMechanism eMechanism = WAS_ENCODED,
- rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
- { return setHost(rTheHost, false, eMechanism, eCharset); }
+ EncodeMechanism eMechanism = WAS_ENCODED)
+ { return setHost(rTheHost, false, eMechanism, RTL_TEXTENCODING_UTF8); }
bool SetPort(sal_uInt32 nThePort);
@@ -599,8 +590,6 @@ public:
@param eMechanism See the general discussion for set-methods.
- @param eCharset See the general discussion for set-methods.
-
@return True if the name has successfully been modified (and the
resulting URI is still valid). If the path is not hierarchical, or
the specified segment does not exist, false is returned. If false is
@@ -609,8 +598,7 @@ public:
bool setName(OUString const & rTheName,
sal_Int32 nIndex = LAST_SEGMENT,
bool bIgnoreFinalSlash = true,
- EncodeMechanism eMechanism = WAS_ENCODED,
- rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
+ EncodeMechanism eMechanism = WAS_ENCODED);
/** Get the base of the name of a segment.
@@ -664,15 +652,11 @@ public:
@param nIndex The non-negative index of the segment, or LAST_SEGMENT
if addressing the last segment.
- @param bIgnoreFinalSlash If true, a final slash at the end of the
- hierarchical path does not denote an empty segment, but is ignored.
-
@return True if the name of the specified segment has an extension.
If the path is not hierarchical, or the specified segment does not
exist, false is returned.
*/
- bool hasExtension(sal_Int32 nIndex = LAST_SEGMENT,
- bool bIgnoreFinalSlash = true) const;
+ bool hasExtension(sal_Int32 nIndex = LAST_SEGMENT) const;
/** Get the extension of the name of a segment.
@@ -933,9 +917,7 @@ public:
// OBSOLETE Hierarchical Path:
OUString GetPartBeforeLastName(DecodeMechanism eMechanism
- = DECODE_TO_IURI,
- rtl_TextEncoding eCharset
- = RTL_TEXTENCODING_UTF8) const;
+ = DECODE_TO_IURI) const;
/** Get the last segment in the path.
@@ -995,17 +977,12 @@ public:
{ return GetLastName(eMechanism, eCharset); }
void SetExtension(OUString const & rTheExtension,
- EncodeMechanism eMechanism = WAS_ENCODED,
- rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
+ EncodeMechanism eMechanism = WAS_ENCODED);
- inline OUString GetExtension(
- DecodeMechanism eMechanism = DECODE_TO_IURI,
- rtl_TextEncoding eCharset
- = RTL_TEXTENCODING_UTF8) const
- { return GetFileExtension(eMechanism, eCharset); }
+ inline OUString GetExtension( DecodeMechanism eMechanism = DECODE_TO_IURI ) const
+ { return GetFileExtension(eMechanism); }
- OUString CutExtension(DecodeMechanism eMechanism = DECODE_TO_IURI,
- rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
+ OUString CutExtension(DecodeMechanism eMechanism = DECODE_TO_IURI);
static bool IsCaseSensitive() { return true; }
@@ -1304,13 +1281,13 @@ inline bool INetURLObject::GetNewAbsURL(OUString const & rTheRelURIRef,
INetURLObject * pTheAbsURIRef,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset,
- FSysStyle eStyle, bool bIgnoreFragment)
+ FSysStyle eStyle)
const
{
INetURLObject aTheAbsURIRef;
bool bWasAbsolute;
if (!convertRelToAbs(rTheRelURIRef, false, aTheAbsURIRef, bWasAbsolute,
- eMechanism, eCharset, bIgnoreFragment, false, false,
+ eMechanism, eCharset, false/*bIgnoreFragment*/, false, false,
eStyle))
return false;
if (pTheAbsURIRef)
@@ -1358,23 +1335,21 @@ inline bool INetURLObject::translateToInternal(OUString const &
}
inline bool INetURLObject::SetPass(OUString const & rThePassword,
- EncodeMechanism eMechanism,
- rtl_TextEncoding eCharset)
+ EncodeMechanism eMechanism)
{
return rThePassword.isEmpty() ?
clearPassword() :
- setPassword(rThePassword, false, eMechanism, eCharset);
+ setPassword(rThePassword, false, eMechanism, RTL_TEXTENCODING_UTF8);
}
inline bool INetURLObject::SetUserAndPass(OUString const & rTheUser,
OUString const & rThePassword,
- EncodeMechanism eMechanism,
- rtl_TextEncoding eCharset)
+ EncodeMechanism eMechanism)
{
- return setUser(rTheUser, false, eMechanism, eCharset)
+ return setUser(rTheUser, false, eMechanism, RTL_TEXTENCODING_UTF8)
&& (rThePassword.isEmpty() ?
clearPassword() :
- setPassword(rThePassword, false, eMechanism, eCharset));
+ setPassword(rThePassword, false, eMechanism, RTL_TEXTENCODING_UTF8));
}
inline bool INetURLObject::insertName(OUString const & rTheName,
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 57e73e4..597ecfd 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -3701,8 +3701,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
OUString const & rTheHost,
sal_uInt32 nThePort,
OUString const & rThePath,
- EncodeMechanism eMechanism,
- rtl_TextEncoding eCharset)
+ EncodeMechanism eMechanism)
{
setInvalid();
m_eScheme = eTheScheme;
@@ -3721,7 +3720,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
{
m_aUser.set(m_aAbsURIRef,
encodeText(rTheUser, false, PART_USER_PASSWORD,
- eMechanism, eCharset, false),
+ eMechanism, RTL_TEXTENCODING_UTF8, false),
m_aAbsURIRef.getLength());
bUserInfo = true;
}
@@ -3738,7 +3737,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
m_aAbsURIRef.append(':');
m_aAuth.set(m_aAbsURIRef,
encodeText(rThePassword, false, PART_USER_PASSWORD,
- eMechanism, eCharset, false),
+ eMechanism, RTL_TEXTENCODING_UTF8, false),
m_aAbsURIRef.getLength());
bUserInfo = true;
}
@@ -3785,7 +3784,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
}
if (!parseHostOrNetBiosName(
aSynHost.getStr(), aSynHost.getStr() + aSynHost.getLength(),
- false, eMechanism, eCharset, bNetBiosName, &aSynHost))
+ false, eMechanism, RTL_TEXTENCODING_UTF8, bNetBiosName, &aSynHost))
{
setInvalid();
return false;
@@ -3817,7 +3816,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
OUStringBuffer aSynPath;
sal_Unicode const * p = rThePath.getStr();
sal_Unicode const * pEnd = p + rThePath.getLength();
- if (!parsePath(m_eScheme, &p, pEnd, false, eMechanism, eCharset, false, '/',
+ if (!parsePath(m_eScheme, &p, pEnd, false, eMechanism, RTL_TEXTENCODING_UTF8, false, '/',
0x80000000, 0x80000000, 0x80000000, aSynPath)
|| p != pEnd)
{
@@ -3835,8 +3834,7 @@ OUString INetURLObject::GetAbsURL(OUString const & rTheBaseURIRef,
bool bIgnoreFragment,
EncodeMechanism eEncodeMechanism,
DecodeMechanism eDecodeMechanism,
- rtl_TextEncoding eCharset,
- FSysStyle eStyle)
+ rtl_TextEncoding eCharset)
{
// Backwards compatibility:
if (rTheRelURIRef.isEmpty() || rTheRelURIRef[0] == '#')
@@ -3848,7 +3846,7 @@ OUString INetURLObject::GetAbsURL(OUString const & rTheBaseURIRef,
convertRelToAbs(rTheRelURIRef, false, aTheAbsURIRef,
bWasAbsolute, eEncodeMechanism,
eCharset, bIgnoreFragment, false,
- false, eStyle)
+ false, FSYS_DETECT)
|| eEncodeMechanism != WAS_ENCODED
|| eDecodeMechanism != DECODE_TO_IURI
|| eCharset != RTL_TEXTENCODING_UTF8 ?
@@ -3856,12 +3854,11 @@ OUString INetURLObject::GetAbsURL(OUString const & rTheBaseURIRef,
rTheRelURIRef;
}
-OUString INetURLObject::getExternalURL(DecodeMechanism eMechanism,
- rtl_TextEncoding eCharset) const
+OUString INetURLObject::getExternalURL(DecodeMechanism eMechanism) const
{
OUString aTheExtURIRef;
translateToExternal(
- m_aAbsURIRef.toString(), aTheExtURIRef, eMechanism, eCharset);
+ m_aAbsURIRef.toString(), aTheExtURIRef, eMechanism);
return aTheExtURIRef;
}
@@ -4016,8 +4013,7 @@ OUString INetURLObject::getName(sal_Int32 nIndex, bool bIgnoreFinalSlash,
bool INetURLObject::setName(OUString const & rTheName, sal_Int32 nIndex,
bool bIgnoreFinalSlash,
- EncodeMechanism eMechanism,
- rtl_TextEncoding eCharset)
+ EncodeMechanism eMechanism)
{
SubString aSegment(getSegment(nIndex, bIgnoreFinalSlash));
if (!aSegment.isPresent())
@@ -4039,17 +4035,17 @@ bool INetURLObject::setName(OUString const & rTheName, sal_Int32 nIndex,
OUStringBuffer aNewPath;
aNewPath.append(pPathBegin, pSegBegin - pPathBegin);
aNewPath.append(encodeText(rTheName, false, PART_PCHAR,
- eMechanism, eCharset, true));
+ eMechanism, RTL_TEXTENCODING_UTF8, true));
aNewPath.append(p, pPathEnd - p);
return setPath(aNewPath.makeStringAndClear(), false, NOT_CANONIC,
RTL_TEXTENCODING_UTF8);
}
-bool INetURLObject::hasExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash)
+bool INetURLObject::hasExtension(sal_Int32 nIndex)
const
{
- SubString aSegment(getSegment(nIndex, bIgnoreFinalSlash));
+ SubString aSegment(getSegment(nIndex, true/*bIgnoreFinalSlash*/));
if (!aSegment.isPresent())
return false;
@@ -4866,8 +4862,7 @@ bool INetURLObject::scanIPv6reference(sal_Unicode const *& rBegin,
return false;
}
-OUString INetURLObject::GetPartBeforeLastName(DecodeMechanism eMechanism,
- rtl_TextEncoding eCharset)
+OUString INetURLObject::GetPartBeforeLastName(DecodeMechanism eMechanism)
const
{
if (!checkHierarchical())
@@ -4877,7 +4872,7 @@ OUString INetURLObject::GetPartBeforeLastName(DecodeMechanism eMechanism,
aTemp.clearQuery();
aTemp.removeSegment(LAST_SEGMENT, false);
aTemp.setFinalSlash();
- return aTemp.GetMainURL(eMechanism, eCharset);
+ return aTemp.GetMainURL(eMechanism);
}
OUString INetURLObject::GetLastName(DecodeMechanism eMechanism,
@@ -4954,17 +4949,14 @@ void INetURLObject::SetName(OUString const & rTheName,
}
void INetURLObject::SetExtension(OUString const & rTheExtension,
- EncodeMechanism eMechanism,
- rtl_TextEncoding eCharset)
+ EncodeMechanism eMechanism)
{
- setExtension(rTheExtension, LAST_SEGMENT, false, eMechanism, eCharset);
+ setExtension(rTheExtension, LAST_SEGMENT, false, eMechanism);
}
-OUString INetURLObject::CutExtension(DecodeMechanism eMechanism,
- rtl_TextEncoding eCharset)
+OUString INetURLObject::CutExtension(DecodeMechanism eMechanism)
{
- OUString aTheExtension(getExtension(LAST_SEGMENT, false, eMechanism,
- eCharset));
+ OUString aTheExtension(getExtension(LAST_SEGMENT, false, eMechanism));
return removeExtension(LAST_SEGMENT, false)
? aTheExtension : OUString();
}
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 7692d01..e4d5945 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -212,23 +212,15 @@ ColorData Color::HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri )
return RGB_COLORDATA( cR, cG, cB );
}
-SvStream& Color::Read( SvStream& rIStm, bool bNewFormat )
+SvStream& Color::Read( SvStream& rIStm )
{
- if ( bNewFormat )
- rIStm.ReadUInt32( mnColor );
- else
- ReadColor( rIStm, *this );
-
+ rIStm.ReadUInt32( mnColor );
return rIStm;
}
-SvStream& Color::Write( SvStream& rOStm, bool bNewFormat ) const
+SvStream& Color::Write( SvStream& rOStm ) const
{
- if ( bNewFormat )
- rOStm.WriteUInt32( mnColor );
- else
- WriteColor( rOStm, *this );
-
+ rOStm.WriteUInt32( mnColor );
return rOStm;
}
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 52c4c5c..319c111 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1319,7 +1319,7 @@ void Polygon::Rotate( const Point& rCenter, double fSin, double fCos )
}
}
-void Polygon::Clip( const Rectangle& rRect, bool bPolygon )
+void Polygon::Clip( const Rectangle& rRect )
{
// #105251# Justify rect before edge filtering
Rectangle aJustifiedRect( rRect );
@@ -1334,7 +1334,7 @@ void Polygon::Clip( const Rectangle& rRect, bool bPolygon )
for ( sal_uInt16 i = 0; i < nSourceSize; i++ )
aVertFilter.Input( mpImplPolygon->mpPointAry[i] );
- if ( bPolygon || aVertFilter.IsPolygon() )
+ if ( aVertFilter.IsPolygon() )
aVertFilter.LastPoint();
else
aPolygon.LastPoint();
@@ -1468,7 +1468,7 @@ bool Polygon::IsRightOrientated() const
return GetSignedArea() >= 0.0;
}
-void Polygon::Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags )
+void Polygon::Insert( sal_uInt16 nPos, const Point& rPt )
{
ImplMakeUnique();
@@ -1477,12 +1477,6 @@ void Polygon::Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags )
mpImplPolygon->ImplSplit( nPos, 1 );
mpImplPolygon->mpPointAry[ nPos ] = rPt;
-
- if( POLY_NORMAL != eFlags )
- {
- mpImplPolygon->ImplCreateFlagArray();
- mpImplPolygon->mpFlagAry[ nPos ] = (sal_uInt8) eFlags;
- }
}
void Polygon::Insert( sal_uInt16 nPos, const tools::Polygon& rPoly )
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 65db27e..35afdd4 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -281,7 +281,7 @@ void PolyPolygon::Optimize( PolyOptimizeFlags nOptimizeFlags )
}
}
-void PolyPolygon::AdaptiveSubdivide( tools::PolyPolygon& rResult, const double d ) const
+void PolyPolygon::AdaptiveSubdivide( tools::PolyPolygon& rResult ) const
{
rResult.Clear();
@@ -289,7 +289,7 @@ void PolyPolygon::AdaptiveSubdivide( tools::PolyPolygon& rResult, const double d
for( sal_uInt16 i = 0; i < mpImplPolyPolygon->mnCount; i++ )
{
- mpImplPolyPolygon->mpPolyAry[ i ]->AdaptiveSubdivide( aPolygon, d );
+ mpImplPolyPolygon->mpPolyAry[ i ]->AdaptiveSubdivide( aPolygon, 1.0 );
rResult.Insert( aPolygon );
}
}
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index c161f76..19eed71 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -305,11 +305,11 @@ void INetMIMEMessage::EnableAttachMultipartFormDataChild()
SetContentTransferEncoding("7bit");
}
-void INetMIMEMessage::AttachChild(INetMIMEMessage& rChildMsg, bool bOwner)
+void INetMIMEMessage::AttachChild(INetMIMEMessage& rChildMsg)
{
if (IsContainer())
{
- if (bOwner) rChildMsg.pParent = this;
+ rChildMsg.pParent = this;
aChildren.push_back( &rChildMsg );
}
}
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index 61a44b1..e0b7207 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -645,7 +645,7 @@ bool StringRangeEnumerator::insertJoinedRanges(
return true;
}
-bool StringRangeEnumerator::setRange( const OUString& i_rNewRange, bool i_bStrict )
+bool StringRangeEnumerator::setRange( const OUString& i_rNewRange )
{
mnCount = 0;
maSequence.clear();
@@ -675,8 +675,7 @@ bool StringRangeEnumerator::setRange( const OUString& i_rNewRange, bool i_bStric
{
if( bSequence && !aNumbers.empty() )
aNumbers.push_back( mnMax );
- if( ! insertJoinedRanges( aNumbers, i_bStrict ) && i_bStrict )
- return false;
+ insertJoinedRanges( aNumbers, false/*i_bStrict*/ );
aNumbers.clear();
bSequence = false;
@@ -690,8 +689,7 @@ bool StringRangeEnumerator::setRange( const OUString& i_rNewRange, bool i_bStric
// insert last entries
if( bSequence && !aNumbers.empty() )
aNumbers.push_back( mnMax );
- if( ! insertJoinedRanges( aNumbers, i_bStrict ) && i_bStrict )
- return false;
+ insertJoinedRanges( aNumbers, false/*i_bStrict*/ );
return true;
}
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index b306724..cdf59a6 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1937,7 +1937,7 @@ void SvMemoryStream::FreeMemory()
delete[] pBuf;
}
-void* SvMemoryStream::SwitchBuffer( sal_Size nInitSize, sal_Size nResizeOffset)
+void* SvMemoryStream::SwitchBuffer( sal_Size nInitSize)
{
Flush();
if( !bOwnsData )
@@ -1947,7 +1947,7 @@ void* SvMemoryStream::SwitchBuffer( sal_Size nInitSize, sal_Size nResizeOffset)
void* pRetVal = pBuf;
pBuf = nullptr;
nEndOfData = 0L;
- nResize = nResizeOffset;
+ nResize = 64;
nPos = 0;
if( nResize != 0 && nResize < 16 )
More information about the Libreoffice-commits
mailing list