summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-01 08:45:39 +0200
committerNoel Grandin <noel@peralex.com>2016-03-01 11:20:24 +0200
commit3da977def7fa97e791c279c05de6b2e06b79fcd4 (patch)
tree84108dab6fff3cc11b0b085019bd67e23adf6a6a /tools
parent436aea863573b358e491f48b20af02ab0f5eb2eb (diff)
loplugin:unuseddefaultparam in tools
Change-Id: I2a974ba76566700c2037fcb38de3ecfea9d2651d
Diffstat (limited to 'tools')
-rw-r--r--tools/source/fsys/urlobj.cxx46
-rw-r--r--tools/source/generic/color.cxx16
-rw-r--r--tools/source/generic/poly.cxx12
-rw-r--r--tools/source/generic/poly2.cxx4
-rw-r--r--tools/source/inet/inetmsg.cxx4
-rw-r--r--tools/source/memtools/multisel.cxx8
-rw-r--r--tools/source/stream/stream.cxx4
7 files changed, 35 insertions, 59 deletions
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 57e73e4805cc..597ecfdec43a 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 7692d011d611..e4d5945921fd 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 52c4c5c4513c..319c11192c48 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 65db27eedfed..35afdd4e0f86 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 c161f76b85f4..19eed712c4bd 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 61a44b1bfce3..e0b72076c511 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 b3067242b93c..cdf59a659b85 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 )