loplugin: unused return values in desktop
Change-Id: Iec7a150c6bdb3b25fe24d711e3e453e1d8a5d26e
This commit is contained in:
@@ -255,7 +255,7 @@ for d in definitionSet:
|
||||
if d[0] == "void":
|
||||
continue
|
||||
# ignore UNO constructor method entrypoints
|
||||
if "_get_implementation" in d[1]:
|
||||
if "_get_implementation" in d[1] or "_getFactory" in d[1]:
|
||||
continue
|
||||
# the plugin can't see calls to these
|
||||
if "operator new" in d[1]:
|
||||
|
@@ -138,7 +138,7 @@ static OString decodeString( const sal_Char* pEncChars, int nLen)
|
||||
return aDecStr.makeStringAndClear();
|
||||
}
|
||||
|
||||
bool PersistentMap::open()
|
||||
void PersistentMap::open()
|
||||
{
|
||||
// open the existing file
|
||||
sal_uInt32 nOpenFlags = osl_File_OpenFlag_Read;
|
||||
@@ -152,9 +152,9 @@ bool PersistentMap::open()
|
||||
m_bToBeCreated &= (rcOpen == osl::File::E_NOENT) && !m_bIsOpen;
|
||||
|
||||
if( !m_bIsOpen)
|
||||
return m_bToBeCreated;
|
||||
return;
|
||||
|
||||
return readAll();
|
||||
readAll();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -747,7 +747,7 @@ void ExtMgrDialog::setGetExtensionsURL( const OUString &rURL )
|
||||
}
|
||||
|
||||
|
||||
long ExtMgrDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
|
||||
void ExtMgrDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
|
||||
bool bLicenseMissing )
|
||||
{
|
||||
|
||||
@@ -758,20 +758,19 @@ long ExtMgrDialog::addPackageToList( const uno::Reference< deployment::XPackage
|
||||
|
||||
if (m_pBundledCbx->IsChecked() && (xPackage->getRepositoryName() == BUNDLED_PACKAGE_MANAGER) )
|
||||
{
|
||||
return m_pExtensionBox->addEntry( xPackage, bLicenseMissing );
|
||||
m_pExtensionBox->addEntry( xPackage, bLicenseMissing );
|
||||
}
|
||||
else if (m_pSharedCbx->IsChecked() && (xPackage->getRepositoryName() == SHARED_PACKAGE_MANAGER) )
|
||||
{
|
||||
return m_pExtensionBox->addEntry( xPackage, bLicenseMissing );
|
||||
m_pExtensionBox->addEntry( xPackage, bLicenseMissing );
|
||||
}
|
||||
else if (m_pUserCbx->IsChecked() && (xPackage->getRepositoryName() == USER_PACKAGE_MANAGER ))
|
||||
{
|
||||
return m_pExtensionBox->addEntry( xPackage, bLicenseMissing );
|
||||
m_pExtensionBox->addEntry( xPackage, bLicenseMissing );
|
||||
}
|
||||
else
|
||||
{
|
||||
//OSL_FAIL("Package will not be displayed");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1221,7 +1220,7 @@ void UpdateRequiredDialog::dispose()
|
||||
ModalDialog::dispose();
|
||||
}
|
||||
|
||||
long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
|
||||
void UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
|
||||
bool bLicenseMissing )
|
||||
{
|
||||
// We will only add entries to the list with unsatisfied dependencies
|
||||
@@ -1230,9 +1229,8 @@ long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::X
|
||||
m_bHasLockedEntries |= m_pManager->isReadOnly( xPackage );
|
||||
const SolarMutexGuard aGuard;
|
||||
m_pUpdateBtn->Enable();
|
||||
return m_pExtensionBox->addEntry( xPackage );
|
||||
m_pExtensionBox->addEntry( xPackage );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1255,12 +1253,10 @@ void UpdateRequiredDialog::checkEntries()
|
||||
}
|
||||
|
||||
|
||||
bool UpdateRequiredDialog::enablePackage( const uno::Reference< deployment::XPackage > &xPackage,
|
||||
void UpdateRequiredDialog::enablePackage( const uno::Reference< deployment::XPackage > &xPackage,
|
||||
bool bEnable )
|
||||
{
|
||||
m_pManager->getCmdQueue()->enableExtension( xPackage, bEnable );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
virtual void updateProgress( const long nProgress ) = 0;
|
||||
|
||||
virtual void updatePackageInfo( const css::uno::Reference< css::deployment::XPackage > &xPackage ) = 0;
|
||||
virtual long addPackageToList( const css::uno::Reference< css::deployment::XPackage > &xPackage,
|
||||
virtual void addPackageToList( const css::uno::Reference< css::deployment::XPackage > &xPackage,
|
||||
bool bLicenseMissing = false ) = 0;
|
||||
|
||||
virtual void prepareChecking() = 0;
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
virtual void updatePackageInfo( const css::uno::Reference< css::deployment::XPackage > &xPackage ) override;
|
||||
|
||||
void setGetExtensionsURL( const OUString &rURL );
|
||||
virtual long addPackageToList( const css::uno::Reference< css::deployment::XPackage > &,
|
||||
virtual void addPackageToList( const css::uno::Reference< css::deployment::XPackage > &,
|
||||
bool bLicenseMissing = false ) override;
|
||||
bool enablePackage(const css::uno::Reference< css::deployment::XPackage > &xPackage,
|
||||
bool bEnable );
|
||||
@@ -224,9 +224,9 @@ public:
|
||||
|
||||
virtual void updatePackageInfo( const css::uno::Reference< css::deployment::XPackage > &xPackage ) override;
|
||||
|
||||
virtual long addPackageToList( const css::uno::Reference< css::deployment::XPackage > &,
|
||||
virtual void addPackageToList( const css::uno::Reference< css::deployment::XPackage > &,
|
||||
bool bLicenseMissing = false ) override;
|
||||
bool enablePackage( const css::uno::Reference< css::deployment::XPackage > &xPackage, bool bEnable );
|
||||
void enablePackage( const css::uno::Reference< css::deployment::XPackage > &xPackage, bool bEnable );
|
||||
|
||||
virtual void prepareChecking() override;
|
||||
virtual void checkEntries() override;
|
||||
|
@@ -189,7 +189,7 @@ bool TheExtensionManager::isVisible()
|
||||
}
|
||||
|
||||
|
||||
bool TheExtensionManager::checkUpdates( bool /* bShowUpdateOnly */, bool /*bParentVisible*/ )
|
||||
void TheExtensionManager::checkUpdates( bool /* bShowUpdateOnly */, bool /*bParentVisible*/ )
|
||||
{
|
||||
std::vector< uno::Reference< deployment::XPackage > > vEntries;
|
||||
uno::Sequence< uno::Sequence< uno::Reference< deployment::XPackage > > > xAllPackages;
|
||||
@@ -198,11 +198,11 @@ bool TheExtensionManager::checkUpdates( bool /* bShowUpdateOnly */, bool /*bPare
|
||||
xAllPackages = m_xExtensionManager->getAllExtensions( uno::Reference< task::XAbortChannel >(),
|
||||
uno::Reference< ucb::XCommandEnvironment >() );
|
||||
} catch ( const deployment::DeploymentException & ) {
|
||||
return false;
|
||||
return;
|
||||
} catch ( const ucb::CommandFailedException & ) {
|
||||
return false;
|
||||
return;
|
||||
} catch ( const ucb::CommandAbortedException & ) {
|
||||
return false;
|
||||
return;
|
||||
} catch ( const lang::IllegalArgumentException & e ) {
|
||||
throw uno::RuntimeException( e.Message, e.Context );
|
||||
}
|
||||
@@ -218,7 +218,6 @@ bool TheExtensionManager::checkUpdates( bool /* bShowUpdateOnly */, bool /*bPare
|
||||
}
|
||||
|
||||
m_pExecuteCmdQueue->checkForUpdates( vEntries );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -90,7 +90,7 @@ public:
|
||||
bool isVisible();
|
||||
|
||||
|
||||
bool checkUpdates( bool showUpdateOnly, bool parentVisible );
|
||||
void checkUpdates( bool showUpdateOnly, bool parentVisible );
|
||||
bool installPackage( const OUString &rPackageURL, bool bWarnUser = false );
|
||||
void createPackageList();
|
||||
|
||||
|
@@ -54,7 +54,7 @@ public:
|
||||
bool erase( OString const & key, bool flush_immediately = true );
|
||||
|
||||
protected:
|
||||
bool open();
|
||||
void open();
|
||||
bool readAll();
|
||||
void add( OString const & key, OString const & value );
|
||||
void flush();
|
||||
|
@@ -310,9 +310,9 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
|
||||
OUString const & id, Reference<XInterface> const & xObject );
|
||||
void releaseObject( OUString const & id );
|
||||
|
||||
bool addToUnoRc( RcItem kind, OUString const & url,
|
||||
void addToUnoRc( RcItem kind, OUString const & url,
|
||||
Reference<XCommandEnvironment> const & xCmdEnv );
|
||||
bool removeFromUnoRc( RcItem kind, OUString const & url,
|
||||
void removeFromUnoRc( RcItem kind, OUString const & url,
|
||||
Reference<XCommandEnvironment> const & xCmdEnv );
|
||||
bool hasInUnoRc( RcItem kind, OUString const & url );
|
||||
|
||||
@@ -992,7 +992,7 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv )
|
||||
}
|
||||
|
||||
|
||||
bool BackendImpl::addToUnoRc( RcItem kind, OUString const & url_,
|
||||
void BackendImpl::addToUnoRc( RcItem kind, OUString const & url_,
|
||||
Reference<XCommandEnvironment> const & xCmdEnv )
|
||||
{
|
||||
const OUString rcterm( dp_misc::makeRcTerm(url_) );
|
||||
@@ -1004,14 +1004,11 @@ bool BackendImpl::addToUnoRc( RcItem kind, OUString const & url_,
|
||||
// write immediately:
|
||||
m_unorc_modified = true;
|
||||
unorc_flush( xCmdEnv );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool BackendImpl::removeFromUnoRc(
|
||||
void BackendImpl::removeFromUnoRc(
|
||||
RcItem kind, OUString const & url_,
|
||||
Reference<XCommandEnvironment> const & xCmdEnv )
|
||||
{
|
||||
@@ -1022,7 +1019,6 @@ bool BackendImpl::removeFromUnoRc(
|
||||
// write immediately:
|
||||
m_unorc_modified = true;
|
||||
unorc_flush( xCmdEnv );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -131,7 +131,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
|
||||
value from the backend db. This entry already contains the path as it
|
||||
is used in the configmgr.ini.
|
||||
*/
|
||||
bool addToConfigmgrIni( bool isSchema, bool isURL, OUString const & url,
|
||||
void addToConfigmgrIni( bool isSchema, bool isURL, OUString const & url,
|
||||
Reference<XCommandEnvironment> const & xCmdEnv );
|
||||
bool removeFromConfigmgrIni( bool isSchema, OUString const & url,
|
||||
Reference<XCommandEnvironment> const & xCmdEnv );
|
||||
@@ -471,7 +471,7 @@ void BackendImpl::configmgrini_flush(
|
||||
}
|
||||
|
||||
|
||||
bool BackendImpl::addToConfigmgrIni( bool isSchema, bool isURL, OUString const & url_,
|
||||
void BackendImpl::addToConfigmgrIni( bool isSchema, bool isURL, OUString const & url_,
|
||||
Reference<XCommandEnvironment> const & xCmdEnv )
|
||||
{
|
||||
const OUString rcterm( isURL ? dp_misc::makeRcTerm(url_) : url_ );
|
||||
@@ -483,10 +483,7 @@ bool BackendImpl::addToConfigmgrIni( bool isSchema, bool isURL, OUString const &
|
||||
// write immediately:
|
||||
m_configmgrini_modified = true;
|
||||
configmgrini_flush( xCmdEnv );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -106,7 +106,7 @@ namespace migration
|
||||
|
||||
|
||||
|
||||
::osl::FileBase::RC BasicMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
|
||||
void BasicMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
|
||||
{
|
||||
::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
|
||||
if ( aResult == ::osl::FileBase::E_NOENT )
|
||||
@@ -114,11 +114,7 @@ namespace migration
|
||||
INetURLObject aBaseURL( rDirURL );
|
||||
aBaseURL.removeSegment();
|
||||
checkAndCreateDirectory( aBaseURL );
|
||||
return ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return aResult;
|
||||
::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,7 @@ namespace migration
|
||||
OUString m_sSourceDir;
|
||||
|
||||
TStringVectorPtr getFiles( const OUString& rBaseURL ) const;
|
||||
::osl::FileBase::RC checkAndCreateDirectory( INetURLObject& rDirURL );
|
||||
void checkAndCreateDirectory( INetURLObject& rDirURL );
|
||||
void copyFiles();
|
||||
|
||||
public:
|
||||
|
@@ -80,7 +80,7 @@ OO3ExtensionMigration::~OO3ExtensionMigration()
|
||||
{
|
||||
}
|
||||
|
||||
::osl::FileBase::RC OO3ExtensionMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
|
||||
void OO3ExtensionMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
|
||||
{
|
||||
::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
|
||||
if ( aResult == ::osl::FileBase::E_NOENT )
|
||||
@@ -88,11 +88,7 @@ OO3ExtensionMigration::~OO3ExtensionMigration()
|
||||
INetURLObject aBaseURL( rDirURL );
|
||||
aBaseURL.removeSegment();
|
||||
checkAndCreateDirectory( aBaseURL );
|
||||
return ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return aResult;
|
||||
::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -79,7 +79,7 @@ namespace migration
|
||||
SCANRESULT_DONTMIGRATE_EXTENSION
|
||||
};
|
||||
|
||||
::osl::FileBase::RC checkAndCreateDirectory( INetURLObject& rDirURL );
|
||||
void checkAndCreateDirectory( INetURLObject& rDirURL );
|
||||
ScanResult scanExtensionFolder( const OUString& sExtFolder );
|
||||
void scanUserExtensions( const OUString& sSourceDir, TStringVector& aMigrateExtensions );
|
||||
bool scanDescriptionXml( const OUString& sDescriptionXmlFilePath );
|
||||
|
@@ -106,7 +106,7 @@ namespace migration
|
||||
|
||||
|
||||
|
||||
::osl::FileBase::RC WordbookMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
|
||||
void WordbookMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
|
||||
{
|
||||
::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
|
||||
if ( aResult == ::osl::FileBase::E_NOENT )
|
||||
@@ -114,11 +114,7 @@ namespace migration
|
||||
INetURLObject aBaseURL( rDirURL );
|
||||
aBaseURL.removeSegment();
|
||||
checkAndCreateDirectory( aBaseURL );
|
||||
return ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return aResult;
|
||||
::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,7 @@ namespace migration
|
||||
OUString m_sSourceDir;
|
||||
|
||||
TStringVectorPtr getFiles( const OUString& rBaseURL ) const;
|
||||
::osl::FileBase::RC checkAndCreateDirectory( INetURLObject& rDirURL );
|
||||
void checkAndCreateDirectory( INetURLObject& rDirURL );
|
||||
void copyFiles();
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user