diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-16 13:17:24 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-17 06:09:42 +0000 |
commit | 8ca50d20c189dda2fcc4477303ef2947c72bb01e (patch) | |
tree | 4e68e83104b3822f3b9949f39b2de6a66b67ef97 /include/tools | |
parent | a976a19ca82661d8b459b85f5514b0e4c9222d47 (diff) |
loplugin:constantparam in tools
Change-Id: I3774661799c074561c694515baba42a375d0a077
Reviewed-on: https://gerrit.libreoffice.org/23301
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/b3dtrans.hxx | 6 | ||||
-rw-r--r-- | include/tools/multisel.hxx | 2 | ||||
-rw-r--r-- | include/tools/poly.hxx | 3 | ||||
-rw-r--r-- | include/tools/pstm.hxx | 5 | ||||
-rw-r--r-- | include/tools/stream.hxx | 3 | ||||
-rw-r--r-- | include/tools/urlobj.hxx | 51 | ||||
-rw-r--r-- | include/tools/zcodec.hxx | 2 |
7 files changed, 32 insertions, 40 deletions
diff --git a/include/tools/b3dtrans.hxx b/include/tools/b3dtrans.hxx index 2ec9071d239a..bf0f96121d5a 100644 --- a/include/tools/b3dtrans.hxx +++ b/include/tools/b3dtrans.hxx @@ -128,8 +128,7 @@ public: // Parameters of ViewportTransformation void SetDeviceRectangle(double fL=-1.0, double fR=1.0, - double fB=-1.0, double fT=1.0, - bool bBroadCastChange=true); + double fB=-1.0, double fT=1.0); double GetDeviceRectangleWidth() const { return mfRightBound - mfLeftBound; } void SetPerspective(bool bNew); @@ -214,8 +213,7 @@ public: B3dCamera( const basegfx::B3DPoint& rPos = basegfx::B3DPoint(0.0, 0.0, 1.0), const basegfx::B3DVector& rLkAt = basegfx::B3DVector(0.0, 0.0, 0.0), - double fFocLen = 35.0, double fBnkAng = 0.0, - bool bUseFocLen = false); + double fFocLen = 35.0, double fBnkAng = 0.0); virtual ~B3dCamera(); protected: diff --git a/include/tools/multisel.hxx b/include/tools/multisel.hxx index 9f270eba7504..e8ad7ce38eb9 100644 --- a/include/tools/multisel.hxx +++ b/include/tools/multisel.hxx @@ -95,7 +95,7 @@ class TOOLS_DLLPUBLIC StringRangeEnumerator 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 insertJoinedRanges( const std::vector< sal_Int32 >& rNumbers ); bool checkValue( sal_Int32, const std::set< sal_Int32 >* i_pPossibleValues = nullptr ) const; public: class TOOLS_DLLPUBLIC Iterator diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index df8366142ec3..79da3e8c7d18 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -91,8 +91,7 @@ public: Polygon( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); Polygon( const Point& rCenter, - long nRadX, long nRadY, - sal_uInt16 nPoints = 0 ); + long nRadX, long nRadY ); Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEnd, PolyStyle ePolyStyle = POLY_ARC, diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx index b948f15b24e8..cb778d2dc60c 100644 --- a/include/tools/pstm.hxx +++ b/include/tools/pstm.hxx @@ -146,13 +146,12 @@ private: protected: void WriteObj( sal_uInt8 nHdr, SvPersistBase * pObj ); - void ReadObj( SvPersistBase * & rpObj, bool bRegister ); + void ReadObj( SvPersistBase * & rpObj ); public: virtual void ResetError() override; - SvPersistStream( SvClassManager &, SvStream * pStream, - Index nStartIdx = 1 ); + SvPersistStream( SvClassManager &, SvStream * pStream ); virtual ~SvPersistStream(); void ClearStream(); diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index 4edadde1b37e..a77f09537662 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -690,8 +690,9 @@ public: const void* GetData() { Flush(); return pBuf; } void* SwitchBuffer(); + // the buffer is not owned by this class void SetBuffer( void* pBuf, sal_Size nSize, - bool bOwnsData=true, sal_Size nEOF=0 ); + sal_Size nEOF=0 ); void ObjectOwnsMemory( bool bOwn ) { bOwnsData = bOwn; } void SetResizeOffset( sal_Size nNewResize ) { nResize = nNewResize; } diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index ac18bf13e7db..383a3aa00700 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -422,7 +422,7 @@ public: { return decode(m_aAuth, eMechanism, eCharset); } inline bool SetUser(OUString const & rTheUser) - { return setUser(rTheUser, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8); } + { return setUser(rTheUser, WAS_ENCODED, RTL_TEXTENCODING_UTF8); } inline bool SetPass(OUString const & rThePassword); @@ -444,7 +444,7 @@ public: sal_uInt32 GetPort() const; inline bool SetHost(OUString const & rTheHost) - { return setHost(rTheHost, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8); } + { return setHost(rTheHost, WAS_ENCODED, RTL_TEXTENCODING_UTF8); } bool SetPort(sal_uInt32 nThePort); @@ -460,7 +460,7 @@ public: inline bool SetURLPath(OUString const & rThePath, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) - { return setPath(rThePath, false, eMechanism, eCharset); } + { return setPath(rThePath, eMechanism, eCharset); } // Hierarchical Path: @@ -515,6 +515,8 @@ public: bool bIgnoreFinalSlash = true); /** Insert a new segment into the hierarchical path. + A final slash at the end of the + hierarchical path does not denote an empty segment, but is ignored. @param rTheName The name part of the new segment. The new segment will contain no parameters. @@ -528,9 +530,6 @@ public: getSegmentCount() inserts the new segment at the end of the hierarchical path. - @param bIgnoreFinalSlash If true, a final slash at the end of the - hierarchical path does not denote an empty segment, but is ignored. - @param eMechanism See the general discussion for set-methods. @param eCharset See the general discussion for set-methods. @@ -543,7 +542,6 @@ public: inline bool insertName(OUString const & rTheName, bool bAppendFinalSlash = false, sal_Int32 nIndex = LAST_SEGMENT, - bool bIgnoreFinalSlash = true, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); @@ -604,15 +602,14 @@ public: const; /** Set the base of the name of a segment (preserving the extension). + A final slash at the end of the + hierarchical path does not denote an empty segment, but is ignored. @param rTheBase The new base. @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. - @param eMechanism See the general discussion for set-methods. @param eCharset See the general discussion for set-methods. @@ -624,7 +621,6 @@ public: */ bool setBase(OUString const & rTheBase, sal_Int32 nIndex = LAST_SEGMENT, - bool bIgnoreFinalSlash = true, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); @@ -920,7 +916,7 @@ public: inline bool Append(OUString const & rTheSegment, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) - { return appendSegment(rTheSegment, false, eMechanism, eCharset); } + { return appendSegment(rTheSegment, eMechanism, eCharset); } void CutLastName(); @@ -1026,7 +1022,7 @@ private: FSysStyle eStyle) const; bool convertAbsToRel( - OUString const & rTheAbsURIRef, bool bOctets, + OUString const & rTheAbsURIRef, OUString & rTheRelURIRef, EncodeMechanism eEncodeMechanism, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset, FSysStyle eStyle) const; @@ -1064,13 +1060,13 @@ private: // User Info: bool setUser( - OUString const & rTheUser, bool bOctets, + OUString const & rTheUser, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); bool clearPassword(); bool setPassword( - OUString const & rThePassword, bool bOctets, + OUString const & rThePassword, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Host and Port: @@ -1085,7 +1081,7 @@ private: bool bNetBiosName, OUStringBuffer* pCanonic); bool setHost( - OUString const & rTheHost, bool bOctets, + OUString const & rTheHost, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Path: @@ -1099,7 +1095,7 @@ private: OUStringBuffer &rSynPath); bool setPath( - OUString const & rThePath, bool bOctets, + OUString const & rThePath, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Hierarchical Path: @@ -1107,7 +1103,7 @@ private: TOOLS_DLLPRIVATE bool checkHierarchical() const; bool appendSegment( - OUString const & rTheSegment, bool bOctets, + OUString const & rTheSegment, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); TOOLS_DLLPRIVATE SubString getSegment( @@ -1123,7 +1119,7 @@ private: bool clearQuery(); bool setQuery( - OUString const & rTheQuery, bool bOctets, + OUString const & rTheQuery, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Fragment: @@ -1131,7 +1127,7 @@ private: bool clearFragment(); bool setFragment( - OUString const & rTheMark, bool bOctets, + OUString const & rTheMark, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // FILE URLs: @@ -1270,7 +1266,7 @@ inline OUString INetURLObject::GetRelURL(OUString const & rTheBaseURIRef, { OUString aTheRelURIRef; INetURLObject(rTheBaseURIRef, eEncodeMechanism, eCharset). - convertAbsToRel(rTheAbsURIRef, false, aTheRelURIRef, eEncodeMechanism, + convertAbsToRel(rTheAbsURIRef, aTheRelURIRef, eEncodeMechanism, eDecodeMechanism, eCharset, eStyle); return aTheRelURIRef; } @@ -1303,27 +1299,26 @@ inline bool INetURLObject::SetPass(OUString const & rThePassword) { return rThePassword.isEmpty() ? clearPassword() : - setPassword(rThePassword, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8); + setPassword(rThePassword, WAS_ENCODED, RTL_TEXTENCODING_UTF8); } inline bool INetURLObject::SetUserAndPass(OUString const & rTheUser, OUString const & rThePassword) { - return setUser(rTheUser, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8) + return setUser(rTheUser, WAS_ENCODED, RTL_TEXTENCODING_UTF8) && (rThePassword.isEmpty() ? clearPassword() : - setPassword(rThePassword, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8)); + setPassword(rThePassword, WAS_ENCODED, RTL_TEXTENCODING_UTF8)); } inline bool INetURLObject::insertName(OUString const & rTheName, bool bAppendFinalSlash, sal_Int32 nIndex, - bool bIgnoreFinalSlash, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { return insertName(rTheName, false, bAppendFinalSlash, nIndex, - bIgnoreFinalSlash, eMechanism, eCharset); + true/*bIgnoreFinalSlash*/, eMechanism, eCharset); } inline bool INetURLObject::SetParam(OUString const & rTheQuery, @@ -1332,7 +1327,7 @@ inline bool INetURLObject::SetParam(OUString const & rTheQuery, { return rTheQuery.isEmpty() ? clearQuery() : - setQuery(rTheQuery, false, eMechanism, eCharset); + setQuery(rTheQuery, eMechanism, eCharset); } inline bool INetURLObject::SetMark(OUString const & rTheFragment, @@ -1341,7 +1336,7 @@ inline bool INetURLObject::SetMark(OUString const & rTheFragment, { return rTheFragment.isEmpty() ? clearFragment() : - setFragment(rTheFragment, false, eMechanism, eCharset); + setFragment(rTheFragment, eMechanism, eCharset); } inline INetURLObject::INetURLObject(OUString const & rFSysPath, diff --git a/include/tools/zcodec.hxx b/include/tools/zcodec.hxx index d84b66a8cb61..023811557d51 100644 --- a/include/tools/zcodec.hxx +++ b/include/tools/zcodec.hxx @@ -67,7 +67,7 @@ public: void Compress( SvStream& rIStm, SvStream& rOStm ); long Decompress( SvStream& rIStm, SvStream& rOStm ); - bool AttemptDecompression( SvStream& rIStm, SvStream& rOStm, bool updateCrc = false, bool gzLib = false ); + bool AttemptDecompression( SvStream& rIStm, SvStream& rOStm ); void Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize ); long Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize ); |