summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-14 11:45:08 +0200
committerNoel Grandin <noel@peralex.com>2016-01-14 11:45:22 +0200
commitac91a81b7b47fc9eba24455d34e2168309ea51d1 (patch)
tree4efeba0225a5de4182cc694e0ea1e82675811098 /sot
parent21595018cd22345ef15dc13d0ccf9cc5a89660fe (diff)
loplugin:unusedmethods unused return value in sot
Change-Id: Icb5382a411a1cb035581f0cef5f6fae60bfb4940
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgelem.cxx3
-rw-r--r--sot/source/sdstor/stgelem.hxx2
-rw-r--r--sot/source/sdstor/ucbstorage.cxx23
3 files changed, 10 insertions, 18 deletions
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index 356edc5393e9..b0b7ac0ee23f 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -258,7 +258,7 @@ void StgHeader::SetMasters( sal_Int32 n )
///////////////////////////// class StgEntry
-bool StgEntry::Init()
+void StgEntry::Init()
{
memset( m_nName, 0, sizeof( m_nName ) );
m_nNameLen = 0;
@@ -279,7 +279,6 @@ bool StgEntry::Init()
SetLeaf( STG_RIGHT, STG_FREE );
SetLeaf( STG_CHILD, STG_FREE );
SetLeaf( STG_DATA, STG_EOF );
- return true;
}
static OUString ToUpperUnicode( const OUString & rStr )
diff --git a/sot/source/sdstor/stgelem.hxx b/sot/source/sdstor/stgelem.hxx
index 790fadd6625c..4ae47314fefb 100644
--- a/sot/source/sdstor/stgelem.hxx
+++ b/sot/source/sdstor/stgelem.hxx
@@ -124,7 +124,7 @@ class StgEntry
sal_Int32 m_nUnknown; // 7C unknown
OUString m_aName; // Name as Compare String (ascii, upper)
public:
- bool Init(); // initialize the data
+ void Init(); // initialize the data
bool SetName( const OUString& ); // store a name (ASCII, up to 32 chars)
void GetName( OUString& rName ) const;
// fill in the name
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index a8586fd82402..6c1f90876c80 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -443,7 +443,7 @@ public:
bool Init();
bool Clear();
sal_Int16 Commit(); // if modified and committed: transfer an XInputStream to the content
- bool Revert(); // discard all changes
+ void Revert(); // discard all changes
BaseStorage* CreateStorage();// create an OLE Storage on the UCBStorageStream
sal_uLong GetSize();
@@ -451,7 +451,7 @@ public:
// no seeking is produced
sal_uLong ReadSourceWriteTemporary(); // read source till the end and copy to temporary,
- sal_uLong CopySourceToTemporary(); // same as ReadSourceWriteToTemporary()
+ void CopySourceToTemporary(); // same as ReadSourceWriteToTemporary()
// but the writing is done at the end of temporary
// pointer position is not changed
using SvStream::SetError;
@@ -507,7 +507,7 @@ public:
bool Revert();
bool Insert( ::ucbhelper::Content *pContent );
UCBStorage_Impl* OpenStorage( UCBStorageElement_Impl* pElement, StreamMode nMode, bool bDirect );
- UCBStorageStream_Impl* OpenStream( UCBStorageElement_Impl*, StreamMode, bool, const OString* pKey=nullptr );
+ void OpenStream( UCBStorageElement_Impl*, StreamMode, bool, const OString* pKey=nullptr );
void SetProps( const Sequence < Sequence < PropertyValue > >& rSequence, const OUString& );
void GetProps( sal_Int32&, Sequence < Sequence < PropertyValue > >& rSequence, const OUString& );
sal_Int32 GetObjectCount();
@@ -862,21 +862,16 @@ sal_uInt64 UCBStorageStream_Impl::ReadSourceWriteTemporary(sal_uInt64 aLength)
return aResult;
}
-sal_uLong UCBStorageStream_Impl::CopySourceToTemporary()
+void UCBStorageStream_Impl::CopySourceToTemporary()
{
// current position of the temporary stream is not changed
- sal_uLong aResult = 0;
-
if( m_bSourceRead )
{
sal_uLong aPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
- aResult = ReadSourceWriteTemporary();
+ ReadSourceWriteTemporary();
m_pStream->Seek( aPos );
}
-
- return aResult;
-
}
// UCBStorageStream_Impl must have a SvStream interface, because it then can be used as underlying stream
@@ -1151,13 +1146,13 @@ sal_Int16 UCBStorageStream_Impl::Commit()
return COMMIT_RESULT_NOTHING_TO_DO;
}
-bool UCBStorageStream_Impl::Revert()
+void UCBStorageStream_Impl::Revert()
{
// if an OLEStorage is created on this stream, no "revert" is necessary because OLEStorages do nothing on "Revert" !
if ( m_bCommited )
{
OSL_FAIL("Revert while commit is in progress!" );
- return false; // ???
+ return; // ???
}
Free();
@@ -1200,7 +1195,6 @@ bool UCBStorageStream_Impl::Revert()
m_bModified = false;
m_aName = m_aOriginalName;
m_aContentType = m_aOriginalContentType;
- return ( GetError() == ERRCODE_NONE );
}
bool UCBStorageStream_Impl::Clear()
@@ -2708,13 +2702,12 @@ BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode
return nullptr;
}
-UCBStorageStream_Impl* UCBStorage_Impl::OpenStream( UCBStorageElement_Impl* pElement, StreamMode nMode, bool bDirect, const OString* pKey )
+void UCBStorage_Impl::OpenStream( UCBStorageElement_Impl* pElement, StreamMode nMode, bool bDirect, const OString* pKey )
{
OUString aName( m_aURL );
aName += "/";
aName += pElement->m_aOriginalName;
pElement->m_xStream = new UCBStorageStream_Impl( aName, nMode, nullptr, bDirect, pKey, m_bRepairPackage, m_xProgressHandler );
- return pElement->m_xStream;
}
BaseStorage* UCBStorage::OpenUCBStorage( const OUString& rEleName, StreamMode nMode, bool bDirect )