summaryrefslogtreecommitdiff
path: root/include/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 /include/tools
parent436aea863573b358e491f48b20af02ab0f5eb2eb (diff)
loplugin:unuseddefaultparam in tools
Change-Id: I2a974ba76566700c2037fcb38de3ecfea9d2651d
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/color.hxx4
-rw-r--r--include/tools/inetmsg.hxx3
-rw-r--r--include/tools/multisel.hxx2
-rw-r--r--include/tools/poly.hxx13
-rw-r--r--include/tools/stream.hxx2
-rw-r--r--include/tools/urlobj.hxx73
6 files changed, 33 insertions, 64 deletions
diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index e7fb8ec2516d..61a23e2d5ac5 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 ae7f23ce49af..7c3748effe01 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 1731b4925f6a..a2b785e6c7ad 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 a956b200651a..df8366142ec3 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 aba3304ea83f..ab905eca91ba 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 3985942857ea..add06739a010 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,