summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-18 13:18:56 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-19 06:40:28 +0000
commit581e4da5847733a0e87d5ff9cd1c9f2b9fa471fe (patch)
tree9a641b563b2a930056f1e3ce3ed5ad20944b4911
parent0a17332884db7a999df7190e674cfe2ecc0069c6 (diff)
loplugin:unusedmethods in tools
Change-Id: I26a4ce6e849615d6d24632650ca03c40ab16502e Reviewed-on: https://gerrit.libreoffice.org/25089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--include/tools/errinf.hxx15
-rw-r--r--include/tools/multisel.hxx1
-rw-r--r--include/tools/stream.hxx24
-rw-r--r--include/tools/svborder.hxx5
-rw-r--r--include/tools/vcompat.hxx4
-rw-r--r--svtools/source/misc/ehdl.cxx11
-rw-r--r--tools/source/stream/stream.cxx54
7 files changed, 2 insertions, 112 deletions
diff --git a/include/tools/errinf.hxx b/include/tools/errinf.hxx
index 571561eccdc0..18822c9542cf 100644
--- a/include/tools/errinf.hxx
+++ b/include/tools/errinf.hxx
@@ -97,21 +97,6 @@ public:
const OUString& GetArg2() const { return aArg2; }
};
-class TOOLS_DLLPUBLIC MessageInfo : public DynamicErrorInfo
-{
-public:
-
- MessageInfo(sal_uIntPtr UserId, sal_uInt16 nMask = 0) :
- DynamicErrorInfo(UserId, nMask) {}
- MessageInfo(sal_uIntPtr UserId, const OUString &rArg, sal_uInt16 nMask = 0 ) :
- DynamicErrorInfo(UserId, nMask), aArg(rArg) {}
-
- const OUString& GetMessageArg() const { return aArg; }
-
-private:
- OUString aArg;
-};
-
struct ErrorContextImpl;
class TOOLS_DLLPUBLIC ErrorContext
{
diff --git a/include/tools/multisel.hxx b/include/tools/multisel.hxx
index 103d7fa0ee02..5e5767ae26f9 100644
--- a/include/tools/multisel.hxx
+++ b/include/tools/multisel.hxx
@@ -114,7 +114,6 @@ public:
, nRangeIndex( i_nRange ), nCurrent( i_nCurrent ) {}
public:
- Iterator() : pEnumerator( nullptr ), pPossibleValues( nullptr ), nRangeIndex( -1 ), nCurrent( -1 ) {}
Iterator& operator++();
sal_Int32 operator*() const { return nCurrent;}
bool operator==(const Iterator&) const;
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index a77f09537662..a75341eb107c 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -153,28 +153,6 @@ public:
};
-// SvAsyncLockBytes
-
-class SvAsyncLockBytes: public SvOpenLockBytes
-{
- sal_uInt64 m_nSize;
- bool m_bTerminated;
-
-public:
-
- SvAsyncLockBytes(SvStream * pStream, bool bOwner):
- SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(false) {}
-
- virtual ErrCode ReadAt(sal_uInt64 nPos, void * pBuffer, sal_Size nCount,
- sal_Size * pRead) const override;
- virtual ErrCode WriteAt(sal_uInt64 nPos, const void * pBuffer, sal_Size nCount,
- sal_Size * pWritten) override;
-
- virtual ErrCode FillAppend(const void * pBuffer, sal_Size nCount,
- sal_Size * pWritten) override;
-};
-
-
// SvStream
class TOOLS_DLLPUBLIC SvStream
@@ -675,8 +653,6 @@ protected:
/// resized. FreeMemory may need to NULLify handles in derived classes.
void FreeMemory();
- SvMemoryStream(void*) { } // for sub-classes
-
public:
SvMemoryStream( void* pBuf, sal_Size nSize, StreamMode eMode);
SvMemoryStream( sal_Size nInitSize=512, sal_Size nResize=64 );
diff --git a/include/tools/svborder.hxx b/include/tools/svborder.hxx
index c919d8cd76ca..50ee5814139c 100644
--- a/include/tools/svborder.hxx
+++ b/include/tools/svborder.hxx
@@ -32,11 +32,6 @@ public:
{
nTop = nRight = nBottom = nLeft = 0;
}
- SvBorder( const Size & rSz )
- {
- nTop = nBottom = rSz.Height();
- nRight = nLeft = rSz.Width();
- }
SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP )
{
nLeft = nLeftP;
diff --git a/include/tools/vcompat.hxx b/include/tools/vcompat.hxx
index 149bebda5e7b..71b64beef916 100644
--- a/include/tools/vcompat.hxx
+++ b/include/tools/vcompat.hxx
@@ -38,12 +38,10 @@ class TOOLS_DLLPUBLIC VersionCompat
StreamMode mnStmMode;
sal_uInt16 mnVersion;
- VersionCompat() {}
- VersionCompat( const VersionCompat& ) {}
+ VersionCompat( const VersionCompat& ) = delete;
VersionCompat& operator=( const VersionCompat& ) { return *this; }
public:
-
VersionCompat( SvStream& rStm, StreamMode nStreamMode, sal_uInt16 nVersion = 1 );
~VersionCompat();
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index 6f805ec303d6..4579966143cc 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -173,16 +173,7 @@ bool SfxErrorHandler::CreateString(
sal_uLong nErrCode = pErr->GetErrorCode() & ERRCODE_ERROR_MASK;
if( nErrCode>=lEnd || nErrCode<=lStart )
return false;
- const MessageInfo *pMsgInfo = dynamic_cast<const MessageInfo*>( pErr );
- if(pMsgInfo)
- {
- if(GetMessageString(nErrCode, rStr, nFlags))
- {
- rStr = rStr.replaceAll("$(ARG1)", pMsgInfo->GetMessageArg());
- return true;
- }
- }
- else if(GetErrorString(nErrCode, rStr, nFlags))
+ if(GetErrorString(nErrCode, rStr, nFlags))
{
const StringErrorInfo *pStringInfo = dynamic_cast<const StringErrorInfo *>(pErr);
if(pStringInfo)
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 0074ed6fd670..b57cda22ffde 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -250,60 +250,6 @@ ErrCode SvLockBytes::Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const
return ERRCODE_NONE;
}
-// class SvOpenLockBytes
-
-
-// class SvAsyncLockBytes
-
-
-// virtual
-ErrCode SvAsyncLockBytes::ReadAt(sal_uInt64 const nPos, void * pBuffer, sal_Size nCount,
- sal_Size * pRead) const
-{
- if (m_bTerminated)
- return SvOpenLockBytes::ReadAt(nPos, pBuffer, nCount, pRead);
- else
- {
- sal_Size nTheCount =
- std::min<sal_Size>(nPos < m_nSize ? m_nSize - nPos : 0, nCount);
- ErrCode nError = SvOpenLockBytes::ReadAt(nPos, pBuffer, nTheCount,
- pRead);
- return !nCount || nTheCount == nCount || nError ? nError :
- ERRCODE_IO_PENDING;
- }
-}
-
-// virtual
-ErrCode SvAsyncLockBytes::WriteAt(sal_uInt64 const nPos, const void * pBuffer,
- sal_Size nCount, sal_Size * pWritten)
-{
- if (m_bTerminated)
- return SvOpenLockBytes::WriteAt(nPos, pBuffer, nCount, pWritten);
- else
- {
- sal_Size nTheCount =
- std::min<sal_Size>(nPos < m_nSize ? m_nSize - nPos : 0, nCount);
- ErrCode nError = SvOpenLockBytes::WriteAt(nPos, pBuffer, nTheCount,
- pWritten);
- return !nCount || nTheCount == nCount || nError ? nError :
- ERRCODE_IO_PENDING;
- }
-}
-
-// virtual
-ErrCode SvAsyncLockBytes::FillAppend(const void * pBuffer, sal_Size nCount,
- sal_Size * pWritten)
-{
- sal_Size nTheWritten(0);
- ErrCode nError = SvOpenLockBytes::WriteAt(m_nSize, pBuffer, nCount,
- &nTheWritten);
- if (!nError)
- m_nSize += nTheWritten;
- if (pWritten)
- *pWritten = nTheWritten;
- return nError;
-}
-
// class SvStream
sal_Size SvStream::GetData( void* pData, sal_Size nSize )