Kaydet (Commit) 2c4494df authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:staticcall

Change-Id: Ib8bbba8d6e3364f7474643ddb60a469497437616
üst e4536682
......@@ -372,7 +372,7 @@ namespace abp
Reference< XDocumentDataSource > xDocAccess( m_pImpl->xDataSource, UNO_QUERY );
Reference< XStorable > xStorable;
if ( xDocAccess.is() )
xStorable = xStorable.query( xDocAccess->getDatabaseDocument() );
xStorable.set(xDocAccess->getDatabaseDocument(), css::uno::UNO_QUERY);
OSL_ENSURE( xStorable.is(),"DataSource is no XStorable!" );
if ( xStorable.is() )
xStorable->storeAsURL(m_pImpl->sName,Sequence<PropertyValue>());
......
......@@ -84,7 +84,7 @@ namespace pcr
{
OSL_ENSURE( m_xControlModel.is(), "CellBindingHelper::CellBindingHelper: invalid control model!" );
m_xDocument = m_xDocument.query( _rxContextDocument );
m_xDocument.set(_rxContextDocument, css::uno::UNO_QUERY);
OSL_ENSURE( m_xDocument.is(), "CellBindingHelper::CellBindingHelper: This is no spreadsheet document!" );
OSL_ENSURE( isSpreadsheetDocumentWhichSupplies( SERVICE_ADDRESS_CONVERSION ),
......@@ -109,14 +109,14 @@ namespace pcr
// the object belongs to. This is the first object up the hierarchy which is
// *no* XForm (and, well, no XGridColumnFactory)
Reference< XChild > xCheck( m_xControlModel, UNO_QUERY );
Reference< XForm > xParentAsForm; if ( xCheck.is() ) xParentAsForm = xParentAsForm.query( xCheck->getParent() );
Reference< XGridColumnFactory > xParentAsGrid; if ( xCheck.is() ) xParentAsGrid = xParentAsGrid.query( xCheck->getParent() );
Reference< XForm > xParentAsForm; if ( xCheck.is() ) xParentAsForm.set(xCheck->getParent(), css::uno::UNO_QUERY);
Reference< XGridColumnFactory > xParentAsGrid; if ( xCheck.is() ) xParentAsGrid.set(xCheck->getParent(), css::uno::UNO_QUERY);
while ( ( xParentAsForm.is() || xParentAsGrid.is() ) && xCheck.is() )
{
xCheck = xCheck.query( xCheck->getParent() );
xParentAsForm = xParentAsForm.query( xCheck.is() ? xCheck->getParent() : (Reference< XInterface >) Reference< XForm >() );
xParentAsGrid = xParentAsGrid.query( xCheck.is() ? xCheck->getParent() : (Reference< XInterface >) Reference< XGridColumnFactory >() );
xCheck.set(xCheck->getParent(), css::uno::UNO_QUERY);
xParentAsForm.set(xCheck.is() ? xCheck->getParent() : (Reference< XInterface >) Reference< XForm >(), css::uno::UNO_QUERY);
xParentAsGrid.set(xCheck.is() ? xCheck->getParent() : (Reference< XInterface >) Reference< XGridColumnFactory >(), css::uno::UNO_QUERY);
}
Reference< XInterface > xFormsCollection( xCheck.is() ? xCheck->getParent() : Reference< XInterface >() );
......@@ -247,11 +247,11 @@ namespace pcr
return xSource;
// create a range object for this address
xSource = xSource.query( createDocumentDependentInstance(
xSource.set(createDocumentDependentInstance(
SERVICE_SHEET_CELLRANGE_LISTSOURCE,
PROPERTY_LIST_CELL_RANGE,
makeAny( aRangeAddress )
) );
), css::uno::UNO_QUERY);
return xSource;
}
......
......@@ -76,9 +76,9 @@ namespace pcr
,m_aPropertyListeners( _rMutex )
{
OSL_ENSURE( _rxControlModel.is(), "EFormsHelper::EFormsHelper: invalid control model!" );
m_xBindableControl = m_xBindableControl.query( _rxControlModel );
m_xBindableControl.set(_rxControlModel, css::uno::UNO_QUERY);
m_xDocument = m_xDocument.query( _rxContextDocument );
m_xDocument.set(_rxContextDocument, css::uno::UNO_QUERY);
OSL_ENSURE( m_xDocument.is(), "EFormsHelper::EFormsHelper: invalid document!" );
}
......@@ -216,7 +216,7 @@ namespace pcr
{
Reference< XPropertySet > xBindingProps;
if ( m_xBindableControl.is() )
xBindingProps = xBindingProps.query( m_xBindableControl->getValueBinding() );
xBindingProps.set(m_xBindableControl->getValueBinding(), css::uno::UNO_QUERY);
if ( !xBindingProps.is() )
return;
......@@ -411,7 +411,7 @@ namespace pcr
try
{
if ( m_xBindableControl.is() )
xBinding = xBinding.query( m_xBindableControl->getValueBinding() );
xBinding.set(m_xBindableControl->getValueBinding(), css::uno::UNO_QUERY);
}
catch( const Exception& )
{
......@@ -673,7 +673,7 @@ namespace pcr
Reference< XIndexAccess > xElements;
if ( xModel.is() )
xElements = xElements.query( ( _eType == Submission ) ? xModel->getSubmissions() : xModel->getBindings() );
xElements.set(( _eType == Submission ) ? xModel->getSubmissions() : xModel->getBindings(), css::uno::UNO_QUERY);
if ( !xElements.is() )
break;
......
......@@ -2053,7 +2053,7 @@ namespace pcr
Reference< XForm > xAsForm( m_xComponent, UNO_QUERY );
if ( xAsForm.is() )
{
Reference< XForm > xFormsParent = xFormsParent.query( xAsForm->getParent() );
Reference< XForm > xFormsParent( xAsForm->getParent(), css::uno::UNO_QUERY );
m_bComponentIsSubForm = xFormsParent.is();
}
......
......@@ -520,9 +520,9 @@ namespace pcr
continue;
xKeyColumns.clear();
xKeyColSupp = xKeyColSupp.query( xKey );
xKeyColSupp.set(xKey, css::uno::UNO_QUERY);
if ( xKeyColSupp.is() )
xKeyColumns = xKeyColumns.query( xKeyColSupp->getColumns() );
xKeyColumns.set(xKeyColSupp->getColumns(), css::uno::UNO_QUERY);
OSL_ENSURE( xKeyColumns.is(), "FormLinkDialog::getExistingRelation: could not obtain the columns for the key!" );
if ( !xKeyColumns.is() )
......
......@@ -345,7 +345,7 @@ namespace pcr
m_xComponent = Reference< XPropertySet >( xIntrospectionAccess->queryAdapter( cppu::UnoType<XPropertySet>::get() ), UNO_QUERY_THROW );
// now that we survived so far, remember m_xComponentIntrospectionAccess
m_xComponentIntrospectionAccess = xIntrospectionAccess;
m_xPropertyState = m_xPropertyState.query( m_xComponent );
m_xPropertyState.set(m_xComponent, css::uno::UNO_QUERY);
m_bPropertyMapInitialized = false;
m_aProperties.clear();
......
......@@ -1454,9 +1454,9 @@ namespace pcr
if ( _rFactoryDescriptor >>= sServiceName )
xHandler.set( _rContext->getServiceManager()->createInstanceWithContext( sServiceName, _rContext ), UNO_QUERY );
else if ( _rFactoryDescriptor >>= xServiceFac )
xHandler = xHandler.query( xServiceFac->createInstance() );
xHandler.set(xServiceFac->createInstance(), css::uno::UNO_QUERY);
else if ( _rFactoryDescriptor >>= xComponentFac )
xHandler = xHandler.query( xComponentFac->createInstanceWithContext( _rContext ) );
xHandler.set(xComponentFac->createInstanceWithContext( _rContext ), css::uno::UNO_QUERY);
OSL_ENSURE(xHandler.is(),"lcl_createHandler: Can not create handler");
return xHandler;
}
......
......@@ -254,7 +254,7 @@ namespace pcr
);
// remember this newly loaded component - we need to care for it e.g. when we're suspended
m_xDesigner = m_xDesigner.query( xQueryDesign );
m_xDesigner.set(xQueryDesign, css::uno::UNO_QUERY);
OSL_ENSURE( m_xDesigner.is() || !xQueryDesign.is(), "SQLCommandDesigner::impl_doOpenDesignerFrame_nothrow: the component is expected to be a controller!" );
if ( m_xDesigner.is() )
{
......
......@@ -482,7 +482,7 @@ namespace pcr
,m_eValueUnit( FUNIT_NONE )
,m_nFieldToUNOValueFactor( 1 )
{
getTypedControlWindow()->SetDefaultUnit( FUNIT_NONE );
MetricField::SetDefaultUnit( FUNIT_NONE );
getTypedControlWindow()->EnableEmptyFieldValue( true );
getTypedControlWindow()->SetStrictFormat( true );
......
......@@ -249,7 +249,7 @@ namespace pcr
OUString sOldDataTypeName;
OSL_VERIFY( xBinding->getPropertyValue( PROPERTY_XSD_DATA_TYPE ) >>= sOldDataTypeName );
Reference< XPropertySet > xOldType;
try { xOldType = xOldType.query( getDataType( sOldDataTypeName ) ); } catch( const Exception& ) { }
try { xOldType.set(getDataType( sOldDataTypeName ), css::uno::UNO_QUERY); } catch( const Exception& ) { }
// set the new data type name
xBinding->setPropertyValue( PROPERTY_XSD_DATA_TYPE, makeAny( _rName ) );
......@@ -347,7 +347,7 @@ namespace pcr
Reference< XNumberFormatTypes > xFormatTypes;
OSL_VERIFY( m_xControlModel->getPropertyValue( PROPERTY_FORMATSSUPPLIER ) >>= xSupplier );
if ( xSupplier.is() )
xFormatTypes = xFormatTypes.query( xSupplier->getNumberFormats() );
xFormatTypes.set(xSupplier->getNumberFormats(), css::uno::UNO_QUERY);
OSL_ENSURE( xFormatTypes.is(), "XSDValidationHelper::findDefaultFormatForIntrospectee: no number formats for the introspectee!" );
if ( !xFormatTypes.is() )
return;
......
......@@ -425,7 +425,7 @@ UpdateCheckThread::runCheck( bool & rbExtensionsChecked )
if( checkForUpdates(aInfo, m_xContext, aController->getInteractionHandler(), createProvider()) )
{
aController->setUpdateInfo(aInfo);
eUIState = aController->getUIState(aInfo);
eUIState = UpdateCheck::getUIState(aInfo);
ret = true;
}
else
......
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