summaryrefslogtreecommitdiffstats
path: root/forms/source/component
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-02 07:38:44 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-02 06:17:21 +0000
commit1b41208608f472df8dd5879c27dca45cc2ea7740 (patch)
treeb779c5d0da8994d6e838e1667f3f3d011be2e634 /forms/source/component
parentandroid: don't crash in LO when SurfaceView layout is 0 width (diff)
downloadcore-1b41208608f472df8dd5879c27dca45cc2ea7740.tar.gz
core-1b41208608f472df8dd5879c27dca45cc2ea7740.zip
use uno::Reference::set method instead of assignment
Change-Id: I3d94c94a9829161663a7ed18421ace38ce95a659 Reviewed-on: https://gerrit.libreoffice.org/19733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'forms/source/component')
-rw-r--r--forms/source/component/ComboBox.cxx2
-rw-r--r--forms/source/component/DatabaseForm.cxx2
-rw-r--r--forms/source/component/FormComponent.cxx6
-rw-r--r--forms/source/component/FormattedFieldWrapper.cxx16
-rw-r--r--forms/source/component/ListBox.cxx2
5 files changed, 14 insertions, 14 deletions
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 2893d52eca0e..19916a4c2cf1 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -609,7 +609,7 @@ void OComboBoxModel::loadData( bool _bForce )
Reference<XIndexAccess> xColumns;
if (xSupplyCols.is())
{
- xColumns = Reference<XIndexAccess>(xSupplyCols->getColumns(), UNO_QUERY);
+ xColumns.set(xSupplyCols->getColumns(), UNO_QUERY);
DBG_ASSERT(xColumns.is(), "OComboBoxModel::loadData : no columns supplied by the row set !");
}
Reference< XPropertySet > xDataField;
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index bc46d588493f..31005fc39bac 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -392,7 +392,7 @@ void ODatabaseForm::impl_construct()
// aggregate a row set
osl_atomic_increment(&m_refCount);
{
- m_xAggregate = Reference< XAggregation >( m_xContext->getServiceManager()->createInstanceWithContext(SRV_SDB_ROWSET, m_xContext), UNO_QUERY_THROW );
+ m_xAggregate.set( m_xContext->getServiceManager()->createInstanceWithContext(SRV_SDB_ROWSET, m_xContext), UNO_QUERY_THROW );
m_xAggregateAsRowSet.set( m_xAggregate, UNO_QUERY_THROW );
setAggregation( m_xAggregate );
}
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index f9e67b9c4c04..9f0bceb66622 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -518,7 +518,7 @@ OControlModel::OControlModel(
{
osl_atomic_increment(&m_refCount);
{
- m_xAggregate = Reference<XAggregation>(m_xContext->getServiceManager()->createInstanceWithContext(_rUnoControlModelTypeName, m_xContext), UNO_QUERY);
+ m_xAggregate.set(m_xContext->getServiceManager()->createInstanceWithContext(_rUnoControlModelTypeName, m_xContext), UNO_QUERY);
setAggregation(m_xAggregate);
if ( m_xAggregateSet.is() )
@@ -1971,8 +1971,8 @@ bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
m_nFieldType = nFieldType;
// listen to changing values
m_xField->addPropertyChangeListener( PROPERTY_VALUE, this );
- m_xColumnUpdate = Reference< XColumnUpdate >( m_xField, UNO_QUERY );
- m_xColumn = Reference< XColumn >( m_xField, UNO_QUERY );
+ m_xColumnUpdate.set( m_xField, UNO_QUERY );
+ m_xColumn.set( m_xField, UNO_QUERY );
sal_Int32 nNullableFlag = ColumnValue::NO_NULLS;
m_xField->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullableFlag;
m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag);
diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx
index b35160ab0bd8..e7c8f0622b8a 100644
--- a/forms/source/component/FormattedFieldWrapper.cxx
+++ b/forms/source/component/FormattedFieldWrapper.cxx
@@ -61,12 +61,12 @@ css::uno::Reference<css::uno::XInterface> OFormattedFieldWrapper::createFormatte
css::uno::Reference<css::uno::XInterface> xFormattedModel(
static_cast<XWeak*>(pModel), css::uno::UNO_QUERY);
- pRef->m_xAggregate = Reference<XAggregation> (xFormattedModel, UNO_QUERY);
+ pRef->m_xAggregate.set(xFormattedModel, UNO_QUERY);
OSL_ENSURE(pRef->m_xAggregate.is(), "the OFormattedModel didn't have an XAggregation interface !");
// _before_ setting the delegator, give it to the member references
pRef->m_xFormattedPart.set(xFormattedModel, css::uno::UNO_QUERY);
- pRef->m_pEditPart = rtl::Reference< OEditModel >(new OEditModel(pRef->m_xContext));
+ pRef->m_pEditPart.set(new OEditModel(pRef->m_xContext));
}
osl_atomic_increment(&pRef->m_refCount);
@@ -95,7 +95,7 @@ Reference< XCloneable > SAL_CALL OFormattedFieldWrapper::createClone() throw (Ru
if ( xCloneAccess.is() )
{
Reference< XCloneable > xClone = xCloneAccess->createClone();
- xRef->m_xAggregate = Reference< XAggregation >(xClone, UNO_QUERY);
+ xRef->m_xAggregate.set(xClone, UNO_QUERY);
OSL_ENSURE(xRef->m_xAggregate.is(), "invalid aggregate cloned !");
xRef->m_xFormattedPart.set(
@@ -103,7 +103,7 @@ Reference< XCloneable > SAL_CALL OFormattedFieldWrapper::createClone() throw (Ru
if ( m_pEditPart.is() )
{
- xRef->m_pEditPart = rtl::Reference< OEditModel >( new OEditModel(m_pEditPart.get(), m_xContext));
+ xRef->m_pEditPart.set( new OEditModel(m_pEditPart.get(), m_xContext) );
}
}
else
@@ -284,15 +284,15 @@ void SAL_CALL OFormattedFieldWrapper::read(const Reference<XObjectInputStream>&
if (!pBasicReader->lastReadWasFormattedFake())
{
// yes -> all fine
- m_xAggregate = Reference< XAggregation >( pBasicReader.get() );
+ m_xAggregate.set( pBasicReader.get() );
}
else
{ // no -> substitute it with a formatted model
// let the formmatted model do the reading
- m_xFormattedPart = Reference< XPersistObject >(new OFormattedModel(m_xContext));
+ m_xFormattedPart.set(new OFormattedModel(m_xContext));
m_xFormattedPart->read(_rxInStream);
m_pEditPart = pBasicReader;
- m_xAggregate = Reference< XAggregation >( m_xFormattedPart, UNO_QUERY );
+ m_xAggregate.set( m_xFormattedPart, UNO_QUERY );
}
}
@@ -321,7 +321,7 @@ void OFormattedFieldWrapper::ensureAggregate()
xEditModel.set(static_cast<XWeak*>(pModel), css::uno::UNO_QUERY);
}
- m_xAggregate = Reference<XAggregation> (xEditModel, UNO_QUERY);
+ m_xAggregate.set(xEditModel, UNO_QUERY);
DBG_ASSERT(m_xAggregate.is(), "OFormattedFieldWrapper::ensureAggregate : the OEditModel didn't have an XAggregation interface !");
{
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 24e456ffa61e..ca1cb8b6b236 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -868,7 +868,7 @@ namespace frm
Reference<XIndexAccess> xColumns;
if (xSupplyCols.is())
{
- xColumns = Reference<XIndexAccess>(xSupplyCols->getColumns(), UNO_QUERY);
+ xColumns.set(xSupplyCols->getColumns(), UNO_QUERY);
DBG_ASSERT(xColumns.is(), "OListBoxModel::loadData : no columns supplied by the row set !");
}