summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-10 09:51:51 +0200
committerNoel Grandin <noel@peralex.com>2016-03-10 10:09:59 +0200
commit3915ffc46fc063fa1f9be68c29a4157984f1bdb3 (patch)
treeabbd427b68c7d683125e60b26340c2e5e83b852c
parent4358dc795cbd2b49aa87c89795cf63413b82400c (diff)
loplugin:constantparam in tools
Change-Id: Ibd093ba4e8140ed3fda87ef340280433302f82a5
-rw-r--r--framework/source/services/urltransformer.cxx4
-rw-r--r--include/tools/pstm.hxx2
-rw-r--r--include/tools/urlobj.hxx8
-rw-r--r--tools/source/fsys/urlobj.cxx7
-rw-r--r--tools/source/ref/pstm.cxx29
5 files changed, 15 insertions, 35 deletions
diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx
index 6ff1450e3d88..bdccdb4d3e25 100644
--- a/framework/source/services/urltransformer.cxx
+++ b/framework/source/services/urltransformer.cxx
@@ -107,8 +107,8 @@ namespace
_rURL.Name = _rParser.GetName ( );
}
- _rURL.Arguments = _rParser.GetParam ( INetURLObject::NO_DECODE );
- _rURL.Mark = _rParser.GetMark ( INetURLObject::DECODE_WITH_CHARSET );
+ _rURL.Arguments = _rParser.GetParam();
+ _rURL.Mark = _rParser.GetMark( INetURLObject::DECODE_WITH_CHARSET );
// INetURLObject supports only an intelligent method of parsing URL's. So write
// back Complete to have a valid encoded URL in all cases!
diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx
index ab7541682340..ffbaac1c0d9f 100644
--- a/include/tools/pstm.hxx
+++ b/include/tools/pstm.hxx
@@ -158,7 +158,7 @@ public:
Index nStartIdx = 1 );
virtual ~SvPersistStream();
- void SetStream( SvStream * pStream );
+ void ClearStream();
SvPersistBase * GetObject( Index nIdx ) const;
Index GetIndex( SvPersistBase * ) const;
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index b127150739ce..ac18bf13e7db 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -731,10 +731,9 @@ public:
inline bool HasParam() const { return m_aQuery.isPresent(); }
- inline OUString GetParam(DecodeMechanism eMechanism = DECODE_TO_IURI,
- rtl_TextEncoding eCharset
+ inline OUString GetParam(rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8) const
- { return decode(m_aQuery, eMechanism, eCharset); }
+ { return decode(m_aQuery, NO_DECODE, eCharset); }
inline bool SetParam(OUString const & rTheQuery,
EncodeMechanism eMechanism = WAS_ENCODED,
@@ -800,8 +799,7 @@ public:
// POP3 and URLs:
- static OUString GetMsgId(DecodeMechanism eMechanism = DECODE_TO_IURI,
- rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
+ static OUString GetMsgId(rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
// Coding:
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 1756bff71880..e8b026012705 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -3656,8 +3656,8 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const
rObject.GetHost(NO_DECODE))
|| GetPort() != rObject.GetPort()
|| HasParam() != rObject.HasParam()
- || GetParam(NO_DECODE) != rObject.GetParam(NO_DECODE)
- || GetMsgId(NO_DECODE) != INetURLObject::GetMsgId(NO_DECODE))
+ || GetParam() != rObject.GetParam()
+ || GetMsgId() != INetURLObject::GetMsgId(NO_DECODE))
return false;
OUString aPath1(GetURLPath(NO_DECODE));
OUString aPath2(rObject.GetURLPath(NO_DECODE));
@@ -4528,8 +4528,7 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle,
}
}
-OUString INetURLObject::GetMsgId(DecodeMechanism,
- rtl_TextEncoding)
+OUString INetURLObject::GetMsgId(rtl_TextEncoding)
{
return OUString();
}
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index 47dc22e40949..6c10aaace559 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -70,33 +70,16 @@ SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream, Ind
SvPersistStream::~SvPersistStream()
{
- SetStream( nullptr );
+ ClearStream();
}
-/**
-
- @param pStream This stream is used as the medium for PersistStream
-
- @warning pStream is used as the medium for PersistStream.
- It must not be manipulated while used in SvPersistStream.
- An Exception to this is pvStream (cf. <SvPersistStream::SetStream>).
-*/
-void SvPersistStream::SetStream( SvStream * pStream )
+void SvPersistStream::ClearStream()
{
- if( pStm != pStream )
- {
- if( pStm )
- {
- SyncSysStream();
- pStm->SetError( GetError() );
- }
- pStm = pStream;
- }
- if( pStm )
+ if( pStm != nullptr )
{
- SetVersion( pStm->GetVersion() );
- SetError( pStm->GetError() );
- SyncSvStream( pStm->Tell() );
+ SyncSysStream();
+ pStm->SetError( GetError() );
+ pStm = nullptr;
}
}