summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-10-21 09:36:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-11-21 14:36:11 +0000
commit66ccfcd2908445b8194c364c89778056374b02af (patch)
treea2fce28a0c988385c228cdedb9cc6868ef19a0cb /forms
parent728c9a0d47b83910c5a9e38ac5c80f34fe3dfe54 (diff)
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/30091 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/ListBox.cxx26
-rw-r--r--forms/source/component/ListBox.hxx2
2 files changed, 18 insertions, 10 deletions
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 840d2a4b1d08..00e1e7afafb7 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -271,7 +271,7 @@ namespace frm
break;
case PROPERTY_ID_SELECT_VALUE_SEQ:
- _rValue = getCurrentMultiValue();
+ _rValue <<= getCurrentMultiValue();
break;
case PROPERTY_ID_SELECT_VALUE:
@@ -416,9 +416,17 @@ namespace frm
break;
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;
-
+ }
case PROPERTY_ID_DEFAULT_SELECT_SEQ :
bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_aDefaultSelectSeq);
break;
@@ -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() );
::std::transform(
@@ -1526,7 +1534,7 @@ namespace frm
aSelectedEntriesValues.getArray(),
ExtractAnyFromValueList_Safe( _rStringList )
);
- return makeAny( aSelectedEntriesValues );
+ return aSelectedEntriesValues;
}
}
@@ -1542,7 +1550,7 @@ namespace frm
switch ( lcl_getCurrentExchangeType( getExternalValueType() ) )
{
case eValueList:
- aReturn = getCurrentMultiValue();
+ aReturn <<= getCurrentMultiValue();
break;
case eValue:
@@ -1613,9 +1621,9 @@ namespace frm
return aCurrentValue;
}
- Any OListBoxModel::getCurrentMultiValue() const
+ Sequence< Any > OListBoxModel::getCurrentMultiValue() const
{
- Any aCurrentValue;
+ Sequence< Any > aCurrentValue;
try
{
@@ -1648,7 +1656,7 @@ namespace frm
OSL_VERIFY( const_cast< OListBoxModel* >( this )->getPropertyValue( PROPERTY_MULTISELECTION ) >>= bMultiSelection );
if ( bMultiSelection )
- aCurrentValue = getCurrentMultiValue();
+ aCurrentValue <<= getCurrentMultiValue();
else
aCurrentValue = getCurrentSingleValue();
}
diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx
index e1977fe0cf08..3946d33edfb4 100644
--- a/forms/source/component/ListBox.hxx
+++ b/forms/source/component/ListBox.hxx
@@ -209,7 +209,7 @@ protected:
void init();
css::uno::Any getCurrentSingleValue() const;
- css::uno::Any getCurrentMultiValue() const;
+ css::uno::Sequence<css::uno::Any> getCurrentMultiValue() const;
css::uno::Sequence< sal_Int16 > translateBindingValuesToControlValue(
const css::uno::Sequence< const css::uno::Any > &i_aValues)
const;