summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-22 11:09:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-22 18:02:28 +0100
commit6f4ad52d4cad5093e72120decea31066a419665f (patch)
treed4c973cb771b1e5de56844fc7997664cc0a2d6be /sot
parent334644bad9e325d5b23b4416cdc3d22dce5141bf (diff)
loplugin:unusedfields in sot
and simplify, the ErrorLink functionality in StgIo is actually unused Change-Id: I6fb73ebebce2e1b144bd7a75d37323299fd73581 Reviewed-on: https://gerrit.libreoffice.org/68200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stg.cxx2
-rw-r--r--sot/source/sdstor/stgio.cxx15
-rw-r--r--sot/source/sdstor/stgio.hxx7
-rw-r--r--sot/source/sdstor/ucbstorage.cxx7
4 files changed, 3 insertions, 28 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index d22bbbe6a465..2bf3ac2d8113 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -880,9 +880,7 @@ OUString Storage::GetUserName()
bool Storage::ValidateFAT()
{
- Link<StgLinkArg&,void> aLink = StgIo::GetErrorLink();
FatError nErr = pIo->ValidateFATs();
- StgIo::SetErrorLink( aLink );
return nErr == FatError::Ok;
}
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index 2a82c0731b52..8ec356d20699 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -355,18 +355,6 @@ FatError Validator::FindUnrefedChains() const
return FatError::Ok;
}
-namespace { struct ErrorLink : public rtl::Static<Link<StgLinkArg&,void>, ErrorLink > {}; }
-
-void StgIo::SetErrorLink( const Link<StgLinkArg&,void>& rLink )
-{
- ErrorLink::get() = rLink;
-}
-
-const Link<StgLinkArg&,void>& StgIo::GetErrorLink()
-{
- return ErrorLink::get();
-}
-
FatError StgIo::ValidateFATs()
{
if( m_bFile )
@@ -395,9 +383,6 @@ FatError StgIo::ValidateFATs()
else nErr = bRet1 ? FatError::Ok : FatError::BothError;
if( nErr != FatError::Ok && !m_bCopied )
{
- StgLinkArg aArg;
- aArg.aFile = pFileStrm->GetFileName();
- ErrorLink::get().Call( aArg );
m_bCopied = true;
}
// DBG_ASSERT( nErr == FatError::Ok ,"Storage broken");
diff --git a/sot/source/sdstor/stgio.hxx b/sot/source/sdstor/stgio.hxx
index d73db29cfb01..8e09c6ae1c09 100644
--- a/sot/source/sdstor/stgio.hxx
+++ b/sot/source/sdstor/stgio.hxx
@@ -41,11 +41,6 @@ enum class FatError
BothError
};
-struct StgLinkArg
-{
- OUString aFile;
-};
-
class StgIo : public StgCache {
void SetupStreams(); // load all internal streams
bool m_bCopied;
@@ -62,8 +57,6 @@ public:
bool Init(); // set up an empty file
bool CommitAll(); // commit everything (root commit)
- static void SetErrorLink( const Link<StgLinkArg&,void>& );
- static const Link<StgLinkArg&,void>& GetErrorLink();
FatError ValidateFATs( );
};
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 0f76afcfafca..59b9f97f1e85 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -450,7 +450,6 @@ class UCBStorage_Impl : public SvRefBase
public:
UCBStorage* m_pAntiImpl; // only valid if external references exists
- OUString m_aOriginalName;// the original name before accessing the storage
OUString m_aName; // the actual name ( changed with a Rename command at the parent )
OUString m_aURL; // the full path name to create the content
OUString m_aContentType;
@@ -1463,7 +1462,7 @@ UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const OU
DBG_ASSERT( m_bIsRoot, "SubStorage must have a name!" );
m_pTempFile.reset(new ::utl::TempFile);
m_pTempFile->EnableKillingFile();
- m_aName = m_aOriginalName = aName = m_pTempFile->GetURL();
+ m_aName = aName = m_pTempFile->GetURL();
}
m_aURL = rName;
@@ -1492,7 +1491,7 @@ UCBStorage_Impl::UCBStorage_Impl( const OUString& rName, StreamMode nMode, UCBSt
DBG_ASSERT( m_bIsRoot, "SubStorage must have a name!" );
m_pTempFile.reset(new ::utl::TempFile);
m_pTempFile->EnableKillingFile();
- m_aName = m_aOriginalName = aName = m_pTempFile->GetURL();
+ m_aName = aName = m_pTempFile->GetURL();
}
if ( m_bIsRoot )
@@ -1568,7 +1567,7 @@ void UCBStorage_Impl::Init()
INetURLObject aObj( m_aURL );
if ( m_aName.isEmpty() )
// if the name was not already set to a temp name
- m_aName = m_aOriginalName = aObj.GetLastName();
+ m_aName = aObj.GetLastName();
if ( !m_pContent )
CreateContent();