diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-10 15:26:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-11 07:00:18 +0000 |
commit | f31d98f63c4ad11897e0a961fb378fdf7989f4d3 (patch) | |
tree | d54843c13bef0cd2b9b7a5e234e3df0d2b7f8a6d /basic | |
parent | 22d0d2455f9aa699fac95c450da725c603333132 (diff) |
loplugin:expandablemethods in avmedia..canvas
Change-Id: Ic230f1ef6b1dbe796ac7862a1a7e6a718f9e4e54
Reviewed-on: https://gerrit.libreoffice.org/30753
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 7 | ||||
-rw-r--r-- | basic/source/inc/namecont.hxx | 3 | ||||
-rw-r--r-- | basic/source/uno/namecont.cxx | 21 |
3 files changed, 6 insertions, 25 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index e34daa01fb75..b4e21a4c6e71 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1362,7 +1362,7 @@ bool StarBASIC::Call( const OUString& rName, SbxArray* pParam ) SbxBase::ResetError(); if( eErr != ERRCODE_SBX_OK ) { - RTError( (SbError)eErr, 0, 0, 0 ); + RTError( (SbError)eErr, OUString(), 0, 0, 0 ); } } return bRes; @@ -1680,11 +1680,6 @@ bool StarBASIC::CError( SbError code, const OUString& rMsg, return bRet; } -void StarBASIC::RTError( SbError code, sal_Int32 l, sal_Int32 c1, sal_Int32 c2 ) -{ - RTError( code, OUString(), l, c1, c2 ); -} - bool StarBASIC::RTError( SbError code, const OUString& rMsg, sal_Int32 l, sal_Int32 c1, sal_Int32 c2 ) { SolarMutexGuard aSolarGuard; diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index a09639f82179..fd0e9e341ba2 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -355,7 +355,6 @@ protected: const css::uno::Reference< css::embed::XStorage >& xStorage, bool bComplete ); - void SAL_CALL initializeFromDocumentURL( const OUString& _rInitialDocumentURL ); void SAL_CALL initializeFromDocument( const css::uno::Reference< css::document::XStorageBasedDocument >& _rxDocument ); // OEventListenerAdapter @@ -382,8 +381,6 @@ public: void enterMethod(); static void leaveMethod(); - bool isDisposed() const { return rBHelper.bInDispose || rBHelper.bDisposed; } - void checkDisposed() const; // Methods XElementAccess virtual css::uno::Type SAL_CALL getElementType() diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 5e0b56e72fa7..7c9965e09627 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -404,19 +404,13 @@ SfxLibraryContainer::~SfxLibraryContainer() } } -void SfxLibraryContainer::checkDisposed() const -{ - if ( isDisposed() ) - { - throw DisposedException( OUString(), - *const_cast< SfxLibraryContainer* >( this ) ); - } -} - void SfxLibraryContainer::enterMethod() { Application::GetSolarMutex().acquire(); - checkDisposed(); + if ( rBHelper.bInDispose || rBHelper.bDisposed ) + { + throw DisposedException( OUString(), *this ); + } } void SfxLibraryContainer::leaveMethod() @@ -2710,7 +2704,7 @@ void SAL_CALL SfxLibraryContainer::initialize( const Sequence< Any >& _rArgument Reference< XStorageBasedDocument > xDocument; if ( _rArguments[0] >>= sInitialDocumentURL ) { - initializeFromDocumentURL( sInitialDocumentURL ); + init( sInitialDocumentURL, nullptr ); return; } @@ -2724,11 +2718,6 @@ void SAL_CALL SfxLibraryContainer::initialize( const Sequence< Any >& _rArgument throw IllegalArgumentException(); } -void SAL_CALL SfxLibraryContainer::initializeFromDocumentURL( const OUString& _rInitialDocumentURL ) -{ - init( _rInitialDocumentURL, nullptr ); -} - void SAL_CALL SfxLibraryContainer::initializeFromDocument( const Reference< XStorageBasedDocument >& _rxDocument ) { // check whether this is a valid OfficeDocument, and obtain the document's root storage |