summaryrefslogtreecommitdiffstats
path: root/forms/source/component/ComboBox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/component/ComboBox.cxx')
-rw-r--r--forms/source/component/ComboBox.cxx30
1 files changed, 14 insertions, 16 deletions
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 7bf52797a98a..4bd7c8e998de 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -36,7 +36,7 @@
#include <comphelper/property.hxx>
#include <connectivity/dbtools.hxx>
#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <unotools/sharedunocomponent.hxx>
#include <limits.h>
@@ -53,11 +53,9 @@ using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::form;
-using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::form::binding;
Sequence<Type> OComboBoxModel::_getTypes()
@@ -413,7 +411,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<css::io::XObjectInputStream>&
m_aListSource.clear();
css::uno::Sequence<OUString> aListSource;
_rxInStream >> aListSource;
- for (const OUString& rToken : std::as_const(aListSource))
+ for (const OUString& rToken : aListSource)
m_aListSource += rToken;
}
@@ -444,8 +442,8 @@ void SAL_CALL OComboBoxModel::read(const Reference<css::io::XObjectInputStream>&
&& !hasExternalListSource()
)
{
- setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( css::uno::Sequence<OUString>() ) );
- setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, makeAny( css::uno::Sequence<css::uno::Any>() ) );
+ setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, Any( css::uno::Sequence<OUString>() ) );
+ setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, Any( css::uno::Sequence<css::uno::Any>() ) );
}
if (nVersion > 0x0004)
@@ -662,9 +660,9 @@ void OComboBoxModel::loadData( bool _bForce )
}
// Set String-Sequence at ListBox
- setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( comphelper::containerToSequence(aStringList) ) );
+ setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, Any( comphelper::containerToSequence(aStringList) ) );
// Reset TypedItemList, no matching data.
- setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, makeAny( css::uno::Sequence<css::uno::Any>() ) );
+ setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, Any( css::uno::Sequence<css::uno::Any>() ) );
}
@@ -687,7 +685,7 @@ void OComboBoxModel::onDisconnectedDbColumn()
// reset the string item list
if ( !hasExternalListSource() )
- setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( m_aDesignModeStringItems ) );
+ setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, Any( m_aDesignModeStringItems ) );
m_aListRowSet.dispose();
}
@@ -763,7 +761,7 @@ bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset )
return true;
bool bFound = false;
- for (const OUString& rStringItem : std::as_const(aStringItemList))
+ for (const OUString& rStringItem : aStringItemList)
{
if ( (bFound = rStringItem == sNewValue) )
break;
@@ -776,8 +774,8 @@ bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset )
aStringItemList.realloc( nOldLen + 1 );
aStringItemList.getArray()[ nOldLen ] = sNewValue;
- setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( aStringItemList ) );
- setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, makeAny( css::uno::Sequence<css::uno::Any>() ) );
+ setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, Any( aStringItemList ) );
+ setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, Any( css::uno::Sequence<css::uno::Any>() ) );
}
return true;
@@ -808,14 +806,14 @@ Any OComboBoxModel::translateDbColumnToControlValue()
else
m_aLastKnownValue.clear();
- return m_aLastKnownValue.hasValue() ? m_aLastKnownValue : makeAny( OUString() );
+ return m_aLastKnownValue.hasValue() ? m_aLastKnownValue : Any( OUString() );
// (m_aLastKnownValue is allowed to be VOID, the control value isn't)
}
Any OComboBoxModel::getDefaultForReset() const
{
- return makeAny( m_aDefaultText );
+ return Any( m_aDefaultText );
}
@@ -823,8 +821,8 @@ void OComboBoxModel::stringItemListChanged( ControlModelLock& /*_rInstanceLock*/
{
if ( m_xAggregateSet.is() )
{
- m_xAggregateSet->setPropertyValue( PROPERTY_STRINGITEMLIST, makeAny( comphelper::containerToSequence(getStringItemList()) ) );
- m_xAggregateSet->setPropertyValue( PROPERTY_TYPEDITEMLIST, makeAny( getTypedItemList()) ) ;
+ m_xAggregateSet->setPropertyValue( PROPERTY_STRINGITEMLIST, Any( comphelper::containerToSequence(getStringItemList()) ) );
+ m_xAggregateSet->setPropertyValue( PROPERTY_TYPEDITEMLIST, Any( getTypedItemList()) ) ;
}
}