loplugin:staticcall

Change-Id: I78895f3524086e1d00d9e8eafd52e505f786320b
This commit is contained in:
Stephan Bergmann 2014-06-13 17:49:30 +02:00
parent 2c90156b76
commit 529e7619c5
19 changed files with 30 additions and 30 deletions

View File

@ -532,7 +532,7 @@ Reference< XPropertySet > SAL_CALL ODBTableDecorator::createDataDescriptor( ) t
OSL_ENSURE( xFactory.is(), "ODBTableDecorator::createDataDescriptor: invalid table!" ); OSL_ENSURE( xFactory.is(), "ODBTableDecorator::createDataDescriptor: invalid table!" );
Reference< XColumnsSupplier > xColsSupp; Reference< XColumnsSupplier > xColsSupp;
if ( xFactory.is() ) if ( xFactory.is() )
xColsSupp = xColsSupp.query( xFactory->createDataDescriptor() ); xColsSupp.set(xFactory->createDataDescriptor(), css::uno::UNO_QUERY);
return new ODBTableDecorator( return new ODBTableDecorator(
m_xConnection, m_xConnection,

View File

@ -65,9 +65,9 @@ OResultSet::OResultSet(const ::com::sun::star::uno::Reference< ::com::sun::star:
try try
{ {
m_aStatement = _xStatement; m_aStatement = _xStatement;
m_xDelegatorResultSetUpdate = m_xDelegatorResultSetUpdate.query( m_xDelegatorResultSet ); m_xDelegatorResultSetUpdate.set(m_xDelegatorResultSet, css::uno::UNO_QUERY);
m_xDelegatorRow = m_xDelegatorRow.query( m_xDelegatorResultSet ); m_xDelegatorRow.set(m_xDelegatorResultSet, css::uno::UNO_QUERY);
m_xDelegatorRowUpdate = m_xDelegatorRowUpdate.query( m_xDelegatorResultSet ); m_xDelegatorRowUpdate.set(m_xDelegatorResultSet, css::uno::UNO_QUERY);
Reference< XPropertySet > xSet(m_xDelegatorResultSet, UNO_QUERY); Reference< XPropertySet > xSet(m_xDelegatorResultSet, UNO_QUERY);
xSet->getPropertyValue(PROPERTY_RESULTSETTYPE) >>= m_nResultSetType; xSet->getPropertyValue(PROPERTY_RESULTSETTYPE) >>= m_nResultSetType;

View File

@ -293,7 +293,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
} }
m_xTableUIProvider = m_xTableUIProvider.query( m_xMasterConnection ); m_xTableUIProvider.set(m_xMasterConnection, css::uno::UNO_QUERY);
try try
{ {

View File

@ -676,7 +676,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
xDriver, xDriver,
m_pImpl->m_sConnectURL, m_pImpl->m_sConnectURL,
m_pImpl->m_xSettings->getPropertyValues(), m_pImpl->m_xSettings->getPropertyValues(),
m_pImpl->getDefaultDataSourceSettings() dbaccess::ODatabaseModelImpl::getDefaultDataSourceSettings()
); );
if ( m_pImpl->isEmbeddedDatabase() ) if ( m_pImpl->isEmbeddedDatabase() )

View File

@ -371,7 +371,7 @@ OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const OUString& _
{ {
::comphelper::MimeConfigurationHelper aConfigHelper( _rContext ); ::comphelper::MimeConfigurationHelper aConfigHelper( _rContext );
sResult = aConfigHelper.GetDocServiceNameFromMediaType( _rMediaType ); sResult = aConfigHelper.GetDocServiceNameFromMediaType( _rMediaType );
_rClassId = aConfigHelper.GetSequenceClassIDRepresentation(aConfigHelper.GetExplicitlyRegisteredObjClassID( _rMediaType )); _rClassId = comphelper::MimeConfigurationHelper::GetSequenceClassIDRepresentation(aConfigHelper.GetExplicitlyRegisteredObjClassID( _rMediaType ));
if ( !_rClassId.getLength() && !sResult.isEmpty() ) if ( !_rClassId.getLength() && !sResult.isEmpty() )
{ {
Reference< XNameAccess > xObjConfig = aConfigHelper.GetObjConfiguration(); Reference< XNameAccess > xObjConfig = aConfigHelper.GetObjConfiguration();
@ -387,7 +387,7 @@ OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const OUString& _
&& ( xObjectProps->getByName("ObjectDocumentServiceName") >>= aEntryDocName ) && ( xObjectProps->getByName("ObjectDocumentServiceName") >>= aEntryDocName )
&& aEntryDocName.equals( sResult ) ) && aEntryDocName.equals( sResult ) )
{ {
_rClassId = aConfigHelper.GetSequenceClassIDRepresentation(aClassIDs[nInd]); _rClassId = comphelper::MimeConfigurationHelper::GetSequenceClassIDRepresentation(aClassIDs[nInd]);
break; break;
} }
} }

View File

@ -155,7 +155,7 @@ namespace dbaxml
::comphelper::MimeConfigurationHelper aHelper( m_xContext ); ::comphelper::MimeConfigurationHelper aHelper( m_xContext );
SvtModuleOptions aModuleOptions; SvtModuleOptions aModuleOptions;
uno::Reference< frame::XModel > xModel(xFrameLoad->loadComponentFromURL( uno::Reference< frame::XModel > xModel(xFrameLoad->loadComponentFromURL(
aModuleOptions.GetFactoryEmptyDocumentURL( aModuleOptions.ClassifyFactoryByServiceName( aHelper.GetDocServiceNameFromMediaType(MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET) )), aModuleOptions.GetFactoryEmptyDocumentURL( SvtModuleOptions::ClassifyFactoryByServiceName( aHelper.GetDocServiceNameFromMediaType(MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET) )),
OUString(), // empty frame name OUString(), // empty frame name
0, 0,
aArgs aArgs

View File

@ -616,7 +616,7 @@ void SbaXDataBrowserController::onStartLoading( const Reference< XLoadable >& _r
void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLExceptionInfo& _rError ) void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLExceptionInfo& _rError )
{ {
::connectivity::SQLError aError( getORB() ); ::connectivity::SQLError aError( getORB() );
::connectivity::ErrorCode nErrorCode( aError.getErrorCode( sdb::ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED ) ); ::connectivity::ErrorCode nErrorCode( connectivity::SQLError::getErrorCode( sdb::ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED ) );
if ( ((const SQLException*)_rError)->ErrorCode == nErrorCode ) if ( ((const SQLException*)_rError)->ErrorCode == nErrorCode )
{ {
m_bCannotSelectUnfiltered = true; m_bCannotSelectUnfiltered = true;

View File

@ -1137,7 +1137,7 @@ namespace
Reference< XFrame > xParentFrame; Reference< XFrame > xParentFrame;
if ( _rxFrame.is() ) if ( _rxFrame.is() )
xParentFrame = xParentFrame.query( _rxFrame->getCreator() ); xParentFrame.set(_rxFrame->getCreator(), css::uno::UNO_QUERY);
// did we find a parent frame? Which is no top-level frame? // did we find a parent frame? Which is no top-level frame?
if ( xParentFrame.is() && !_rxFrame->isTop() ) if ( xParentFrame.is() && !_rxFrame->isTop() )
// TODO: to prevent framework assertions, re-insert this "isTop" once 98303 is fixed // TODO: to prevent framework assertions, re-insert this "isTop" once 98303 is fixed

View File

@ -600,7 +600,7 @@ bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::star
Reference< XChild > xGridAsChild(xGrid, UNO_QUERY); Reference< XChild > xGridAsChild(xGrid, UNO_QUERY);
Reference< XLoadable > xFormAsLoadable; Reference< XLoadable > xFormAsLoadable;
if (xGridAsChild.is()) if (xGridAsChild.is())
xFormAsLoadable = xFormAsLoadable.query(xGridAsChild->getParent()); xFormAsLoadable.set(xGridAsChild->getParent(), css::uno::UNO_QUERY);
if (xFormAsLoadable.is() && xFormAsLoadable->isLoaded()) if (xFormAsLoadable.is() && xFormAsLoadable->isLoaded())
{ {
// set the formats from the table // set the formats from the table
@ -1530,7 +1530,7 @@ void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame:
Reference< XUIElement > xUI( Reference< XUIElement > xUI(
xLayouter->getElement( OUString( "private:resource/toolbar/toolbar" ) ), xLayouter->getElement( OUString( "private:resource/toolbar/toolbar" ) ),
UNO_SET_THROW ); UNO_SET_THROW );
m_xMainToolbar = m_xMainToolbar.query( xUI->getRealInterface() ); m_xMainToolbar.set(xUI->getRealInterface(), css::uno::UNO_QUERY);
OSL_ENSURE( m_xMainToolbar.is(), "SbaTableQueryBrowser::attachFrame: where's my toolbox?" ); OSL_ENSURE( m_xMainToolbar.is(), "SbaTableQueryBrowser::attachFrame: where's my toolbox?" );
} }
} }
@ -2648,7 +2648,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry )
Reference<XInterface> xObject; Reference<XInterface> xObject;
if(xNameAccess->getByName(sSimpleName) >>= xObject) // remember the table or query object if(xNameAccess->getByName(sSimpleName) >>= xObject) // remember the table or query object
{ {
pData->xObjectProperties = pData->xObjectProperties.query( xObject ); pData->xObjectProperties.set(xObject, css::uno::UNO_QUERY);
// if the query contains a parameterized statement and preview is enabled we won't get any data. // if the query contains a parameterized statement and preview is enabled we won't get any data.
if ( nCommandType == CommandType::QUERY && xObject.is() ) if ( nCommandType == CommandType::QUERY && xObject.is() )
{ {
@ -3200,7 +3200,7 @@ void SbaTableQueryBrowser::impl_initialize()
Reference< XChild > xChild( xConnection, UNO_QUERY ); Reference< XChild > xChild( xConnection, UNO_QUERY );
Reference< XPropertySet > xDataSourceProperties; Reference< XPropertySet > xDataSourceProperties;
if ( xChild.is() ) if ( xChild.is() )
xDataSourceProperties = xDataSourceProperties.query( xChild->getParent() ); xDataSourceProperties.set(xChild->getParent(), css::uno::UNO_QUERY);
if ( xDataSourceProperties.is() ) if ( xDataSourceProperties.is() )
{ {
try try

View File

@ -131,7 +131,7 @@ namespace dbaui
Reference< XUIConfigurationManager > xManager( xSupplier->getUIConfigurationManager( _rModuleName ) ); Reference< XUIConfigurationManager > xManager( xSupplier->getUIConfigurationManager( _rModuleName ) );
Reference< XImageManager > xImageManager; Reference< XImageManager > xImageManager;
if ( xManager.is() ) if ( xManager.is() )
xImageManager = xImageManager.query( xManager->getImageManager() ); xImageManager.set(xManager->getImageManager(), css::uno::UNO_QUERY);
if ( !xImageManager.is() ) if ( !xImageManager.is() )
break; break;
@ -203,8 +203,8 @@ namespace dbaui
Sequence< Sequence< PropertyValue> > aHistory = SvtHistoryOptions().GetList( ePICKLIST ); Sequence< Sequence< PropertyValue> > aHistory = SvtHistoryOptions().GetList( ePICKLIST );
Reference< XNameAccess > xFilterFactory; Reference< XNameAccess > xFilterFactory;
xFilterFactory = xFilterFactory.query( ::comphelper::getProcessServiceFactory()->createInstance( xFilterFactory.set(::comphelper::getProcessServiceFactory()->createInstance(
OUString( "com.sun.star.document.FilterFactory" ) ) ); OUString( "com.sun.star.document.FilterFactory" ) ), css::uno::UNO_QUERY);
sal_uInt32 nCount = aHistory.getLength(); sal_uInt32 nCount = aHistory.getLength();
for ( sal_uInt32 nItem = 0; nItem < nCount; ++nItem ) for ( sal_uInt32 nItem = 0; nItem < nCount; ++nItem )

View File

@ -153,7 +153,7 @@ namespace dbaui
} }
OUString OUserAdminDlg::getDatasourceType(const SfxItemSet& _rSet) const OUString OUserAdminDlg::getDatasourceType(const SfxItemSet& _rSet) const
{ {
return m_pImpl->getDatasourceType(_rSet); return dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(_rSet);
} }
void OUserAdminDlg::clearPassword() void OUserAdminDlg::clearPassword()
{ {

View File

@ -383,7 +383,7 @@ namespace dbaui
delete pExampleSet; delete pExampleSet;
pExampleSet = new SfxItemSet(*GetInputSetImpl()); pExampleSet = new SfxItemSet(*GetInputSetImpl());
const OUString eType = m_pImpl->getDatasourceType(*_pItems); const OUString eType = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(*_pItems);
DataSourceMetaData aMeta( eType ); DataSourceMetaData aMeta( eType );
const FeatureSet& rFeatures( aMeta.getFeatureSet() ); const FeatureSet& rFeatures( aMeta.getFeatureSet() );
@ -470,7 +470,7 @@ namespace dbaui
OUString AdvancedSettingsDialog::getDatasourceType(const SfxItemSet& _rSet) const OUString AdvancedSettingsDialog::getDatasourceType(const SfxItemSet& _rSet) const
{ {
return m_pImpl->getDatasourceType(_rSet); return dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(_rSet);
} }
void AdvancedSettingsDialog::clearPassword() void AdvancedSettingsDialog::clearPassword()

View File

@ -284,7 +284,7 @@ Reference< XDriver > ODbAdminDialog::getDriver()
OUString ODbAdminDialog::getDatasourceType(const SfxItemSet& _rSet) const OUString ODbAdminDialog::getDatasourceType(const SfxItemSet& _rSet) const
{ {
return m_pImpl->getDatasourceType(_rSet); return dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(_rSet);
} }
void ODbAdminDialog::clearPassword() void ODbAdminDialog::clearPassword()

View File

@ -80,7 +80,7 @@ ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent
m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() ); m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() );
m_pImpl->translateProperties(xDatasource, *m_pOutSet); m_pImpl->translateProperties(xDatasource, *m_pOutSet);
m_eType = m_pImpl->getDatasourceType(*m_pOutSet); m_eType = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(*m_pOutSet);
SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MAP_APPFONT)); SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MAP_APPFONT));
ShowButtonFixedLine(true); ShowButtonFixedLine(true);
@ -221,7 +221,7 @@ Reference< XDriver > ODbTypeWizDialog::getDriver()
OUString ODbTypeWizDialog::getDatasourceType(const SfxItemSet& _rSet) const OUString ODbTypeWizDialog::getDatasourceType(const SfxItemSet& _rSet) const
{ {
return m_pImpl->getDatasourceType(_rSet); return dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(_rSet);
} }
void ODbTypeWizDialog::clearPassword() void ODbTypeWizDialog::clearPassword()

View File

@ -443,7 +443,7 @@ Reference< XDriver > ODbTypeWizDialogSetup::getDriver()
OUString ODbTypeWizDialogSetup::getDatasourceType(const SfxItemSet& _rSet) const OUString ODbTypeWizDialogSetup::getDatasourceType(const SfxItemSet& _rSet) const
{ {
OUString sRet = m_pImpl->getDatasourceType(_rSet); OUString sRet = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(_rSet);
if (m_pMySQLIntroPage != NULL && m_pMySQLIntroPage->IsVisible() ) if (m_pMySQLIntroPage != NULL && m_pMySQLIntroPage->IsVisible() )
{ {
switch( m_pMySQLIntroPage->getMySQLMode() ) switch( m_pMySQLIntroPage->getMySQLMode() )
@ -623,7 +623,7 @@ IMPL_LINK(ODbTypeWizDialogSetup, OnSingleDocumentChosen, OGeneralPageWizard*, /*
void ODbTypeWizDialogSetup::enterState(WizardState _nState) void ODbTypeWizDialogSetup::enterState(WizardState _nState)
{ {
m_sURL = m_pImpl->getDatasourceType(*m_pOutSet); m_sURL = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(*m_pOutSet);
RoadmapWizard::enterState(_nState); RoadmapWizard::enterState(_nState);
switch(_nState) switch(_nState)
{ {

View File

@ -2149,7 +2149,7 @@ namespace
if ( SQL_ISRULE(pColumnRef,derived_column) ) if ( SQL_ISRULE(pColumnRef,derived_column) )
{ {
OUString aColumnAlias(rController.getParseIterator().getColumnAlias(pColumnRef)); // might be empty OUString aColumnAlias(connectivity::OSQLParseTreeIterator::getColumnAlias(pColumnRef)); // might be empty
pColumnRef = pColumnRef->getChild(0); pColumnRef = pColumnRef->getChild(0);
OTableFieldDescRef aInfo = new OTableFieldDesc(); OTableFieldDescRef aInfo = new OTableFieldDesc();

View File

@ -1493,7 +1493,7 @@ bool OQueryController::doSaveAsDoc(bool _bSaveAs)
{ {
Reference< XSingleServiceFactory > xSingleFac( xElements, UNO_QUERY ); Reference< XSingleServiceFactory > xSingleFac( xElements, UNO_QUERY );
if ( xSingleFac.is() ) if ( xSingleFac.is() )
xQuery = xQuery.query( xSingleFac->createInstance() ); xQuery.set(xSingleFac->createInstance(), css::uno::UNO_QUERY);
} }
} }
else else

View File

@ -105,7 +105,7 @@ namespace dbaui
{ // perhaps the composer can supply us with columns? This is necessary for cases { // perhaps the composer can supply us with columns? This is necessary for cases
// where the dialog is invoked for a rowset which is not yet loaded // where the dialog is invoked for a rowset which is not yet loaded
// #i22878# // #i22878#
xSuppColumns = xSuppColumns.query( m_xComposer ); xSuppColumns.set(m_xComposer, css::uno::UNO_QUERY);
if ( xSuppColumns.is() ) if ( xSuppColumns.is() )
xColumns = xSuppColumns->getColumns(); xColumns = xSuppColumns->getColumns();
} }

View File

@ -626,7 +626,7 @@ namespace
Reference< XDataSource > xDataSource; Reference< XDataSource > xDataSource;
Reference< XChild > xAsChild( _rxConnection, UNO_QUERY ); Reference< XChild > xAsChild( _rxConnection, UNO_QUERY );
if ( xAsChild.is() ) if ( xAsChild.is() )
xDataSource = xDataSource.query( xAsChild->getParent() ); xDataSource.set(xAsChild->getParent(), css::uno::UNO_QUERY);
if ( xDataSource.is() ) if ( xDataSource.is() )
return lcl_getInteractionHandler_throw( xDataSource, _rFallback ); return lcl_getInteractionHandler_throw( xDataSource, _rFallback );