Kaydet (Commit) 66ccfcd2 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Stephan Bergmann

remove use of tryPropertyValue Any specialisation

change return value of getCurrentMultiValue from Any<Sequence<Any> >
to Sequence<Any>.
return value of getCurrentSingleValue (Any of connectivity::ORowSetValue)
can't be changed to use tryPropertyValue.
inline functionality

Change-Id: I3180cf5b9e63a3da9257b03ba02967a2d5402ec3
Reviewed-on: https://gerrit.libreoffice.org/30091Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 728c9a0d
...@@ -271,7 +271,7 @@ namespace frm ...@@ -271,7 +271,7 @@ namespace frm
break; break;
case PROPERTY_ID_SELECT_VALUE_SEQ: case PROPERTY_ID_SELECT_VALUE_SEQ:
_rValue = getCurrentMultiValue(); _rValue <<= getCurrentMultiValue();
break; break;
case PROPERTY_ID_SELECT_VALUE: case PROPERTY_ID_SELECT_VALUE:
...@@ -416,9 +416,17 @@ namespace frm ...@@ -416,9 +416,17 @@ namespace frm
break; break;
case PROPERTY_ID_SELECT_VALUE : case PROPERTY_ID_SELECT_VALUE :
bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, getCurrentSingleValue()); {
// Any from connectivity::ORowSetValue
Any _rCurrentValue = getCurrentSingleValue();
if (_rCurrentValue != _rValue)
{
_rOldValue = _rValue;
_rConvertedValue = _rCurrentValue;
bModified = true;
}
break; break;
}
case PROPERTY_ID_DEFAULT_SELECT_SEQ : case PROPERTY_ID_DEFAULT_SELECT_SEQ :
bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_aDefaultSelectSeq); bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_aDefaultSelectSeq);
break; break;
...@@ -1517,7 +1525,7 @@ namespace frm ...@@ -1517,7 +1525,7 @@ namespace frm
} }
Any lcl_getMultiSelectedEntriesAny( const Sequence< sal_Int16 >& _rSelectSequence, const ValueList& _rStringList ) Sequence< Any > lcl_getMultiSelectedEntriesAny( const Sequence< sal_Int16 >& _rSelectSequence, const ValueList& _rStringList )
{ {
Sequence< Any > aSelectedEntriesValues( _rSelectSequence.getLength() ); Sequence< Any > aSelectedEntriesValues( _rSelectSequence.getLength() );
::std::transform( ::std::transform(
...@@ -1526,7 +1534,7 @@ namespace frm ...@@ -1526,7 +1534,7 @@ namespace frm
aSelectedEntriesValues.getArray(), aSelectedEntriesValues.getArray(),
ExtractAnyFromValueList_Safe( _rStringList ) ExtractAnyFromValueList_Safe( _rStringList )
); );
return makeAny( aSelectedEntriesValues ); return aSelectedEntriesValues;
} }
} }
...@@ -1542,7 +1550,7 @@ namespace frm ...@@ -1542,7 +1550,7 @@ namespace frm
switch ( lcl_getCurrentExchangeType( getExternalValueType() ) ) switch ( lcl_getCurrentExchangeType( getExternalValueType() ) )
{ {
case eValueList: case eValueList:
aReturn = getCurrentMultiValue(); aReturn <<= getCurrentMultiValue();
break; break;
case eValue: case eValue:
...@@ -1613,9 +1621,9 @@ namespace frm ...@@ -1613,9 +1621,9 @@ namespace frm
return aCurrentValue; return aCurrentValue;
} }
Any OListBoxModel::getCurrentMultiValue() const Sequence< Any > OListBoxModel::getCurrentMultiValue() const
{ {
Any aCurrentValue; Sequence< Any > aCurrentValue;
try try
{ {
...@@ -1648,7 +1656,7 @@ namespace frm ...@@ -1648,7 +1656,7 @@ namespace frm
OSL_VERIFY( const_cast< OListBoxModel* >( this )->getPropertyValue( PROPERTY_MULTISELECTION ) >>= bMultiSelection ); OSL_VERIFY( const_cast< OListBoxModel* >( this )->getPropertyValue( PROPERTY_MULTISELECTION ) >>= bMultiSelection );
if ( bMultiSelection ) if ( bMultiSelection )
aCurrentValue = getCurrentMultiValue(); aCurrentValue <<= getCurrentMultiValue();
else else
aCurrentValue = getCurrentSingleValue(); aCurrentValue = getCurrentSingleValue();
} }
......
...@@ -209,7 +209,7 @@ protected: ...@@ -209,7 +209,7 @@ protected:
void init(); void init();
css::uno::Any getCurrentSingleValue() const; css::uno::Any getCurrentSingleValue() const;
css::uno::Any getCurrentMultiValue() const; css::uno::Sequence<css::uno::Any> getCurrentMultiValue() const;
css::uno::Sequence< sal_Int16 > translateBindingValuesToControlValue( css::uno::Sequence< sal_Int16 > translateBindingValuesToControlValue(
const css::uno::Sequence< const css::uno::Any > &i_aValues) const css::uno::Sequence< const css::uno::Any > &i_aValues)
const; const;
......
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