Kaydet (Commit) 6f4ad52d authored tarafından Noel Grandin's avatar Noel Grandin

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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 334644ba
......@@ -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;
}
......
......@@ -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");
......
......@@ -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( );
};
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment