summaryrefslogtreecommitdiffstats
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-20 12:38:10 +0200
committerNoel Grandin <noel@peralex.com>2015-01-26 08:42:28 +0200
commitb44cbb26efe1d0b0950b1e1613e131b506dc3876 (patch)
tree9b4d5d99e5dad0971079b997a02a6d96536709ca /unotools
parentconvert to use std random instead of boost (diff)
downloadcore-b44cbb26efe1d0b0950b1e1613e131b506dc3876.tar.gz
core-b44cbb26efe1d0b0950b1e1613e131b506dc3876.zip
new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx26
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.hxx2
2 files changed, 6 insertions, 22 deletions
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index fa6a7668ba21..271b80c63059 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -843,8 +843,7 @@ static bool _UCBOpenContentSync(
const Command& rArg,
Reference < XInterface > xSink,
Reference < XInteractionHandler > xInteract,
- Reference < XProgressHandler > xProgress,
- UcbLockBytesHandlerRef xHandler );
+ Reference < XProgressHandler > xProgress );
static bool UCBOpenContentSync(
UcbLockBytesRef xLockBytes,
@@ -852,8 +851,7 @@ static bool UCBOpenContentSync(
const Command& rArg,
Reference < XInterface > xSink,
Reference < XInteractionHandler > xInteract,
- Reference < XProgressHandler > xProgress,
- UcbLockBytesHandlerRef xHandler )
+ Reference < XProgressHandler > xProgress )
{
// http protocol must be handled in a special way:
// during the opening process the input stream may change
@@ -873,7 +871,7 @@ static bool UCBOpenContentSync(
! aScheme.equalsIgnoreAsciiCase("vnd.sun.star.webdav") &&
! aScheme.equalsIgnoreAsciiCase("ftp"))
return _UCBOpenContentSync(
- xLockBytes,xContent,rArg,xSink,xInteract,xProgress,xHandler);
+ xLockBytes,xContent,rArg,xSink,xInteract,xProgress);
if ( !aScheme.equalsIgnoreAsciiCase( "http" ) &&
!aScheme.equalsIgnoreAsciiCase( "https" ) )
@@ -1067,9 +1065,6 @@ static bool UCBOpenContentSync(
if ( bAborted || bException )
{
- if( xHandler.Is() )
- xHandler->Handle( UcbLockBytesHandler::CANCEL, xLockBytes );
-
Reference < XActiveDataSink > xActiveSink( xSink, UNO_QUERY );
if ( xActiveSink.is() )
xActiveSink->setInputStream( Reference < XInputStream >() );
@@ -1100,8 +1095,7 @@ static bool _UCBOpenContentSync(
const Command& rArg,
Reference < XInterface > xSink,
Reference < XInteractionHandler > xInteract,
- Reference < XProgressHandler > xProgress,
- UcbLockBytesHandlerRef xHandler )
+ Reference < XProgressHandler > xProgress )
{
::ucbhelper::Content aContent(
xContent, new UcbTaskEnvironment( xInteract, xProgress ),
@@ -1162,9 +1156,6 @@ static bool _UCBOpenContentSync(
if ( bAborted || bException )
{
- if( xHandler.Is() )
- xHandler->Handle( UcbLockBytesHandler::CANCEL, xLockBytes );
-
Reference < XActiveDataSink > xActiveSink( xSink, UNO_QUERY );
if ( xActiveSink.is() )
xActiveSink->setInputStream( Reference < XInputStream >() );
@@ -1313,9 +1304,6 @@ void UcbLockBytes::terminate_Impl()
OSL_FAIL("No InputStream, but no error set!" );
SetError( ERRCODE_IO_NOTEXISTS );
}
-
- if ( m_xHandler.Is() )
- m_xHandler->Handle( UcbLockBytesHandler::DONE, this );
}
void UcbLockBytes::SetSynchronMode (bool bSynchron)
@@ -1519,9 +1507,6 @@ ErrCode UcbLockBytes::Stat( SvLockBytesStat *pStat, SvLockBytesStatFlag) const
IMPL_LINK_NOARG(UcbLockBytes, DataAvailHdl)
{
- if ( hasInputStream_Impl() && m_xHandler.Is() )
- m_xHandler->Handle( UcbLockBytesHandler::DATA_AVAILABLE, this );
-
return 0;
}
@@ -1588,8 +1573,7 @@ UcbLockBytesRef UcbLockBytes::CreateLockBytes( const Reference < XContent >& xCo
aCommand,
xSink,
xInteractionHandler,
- xProgressHdl,
- pHandler );
+ xProgressHdl );
if ( xLockBytes->GetError() == ERRCODE_NONE && ( bError || !xLockBytes->getInputStream().is() ) )
{
diff --git a/unotools/source/ucbhelper/ucblockbytes.hxx b/unotools/source/ucbhelper/ucblockbytes.hxx
index abf8c5b0b77e..7126dfc371cc 100644
--- a/unotools/source/ucbhelper/ucblockbytes.hxx
+++ b/unotools/source/ucbhelper/ucblockbytes.hxx
@@ -82,7 +82,7 @@ public:
: m_bActive( true )
{}
- virtual void Handle( LoadHandlerItem nWhich, UcbLockBytesRef xLockBytes ) = 0;
+ ;
void Activate( bool bActivate = true ) { m_bActive = bActivate; }
bool IsActive() const { return m_bActive; }
};