diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2014-03-21 12:32:09 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-03-21 22:59:02 +0100 |
commit | 3d53b2730eeabd06dfd6ad183c1d12b15836b777 (patch) | |
tree | 29f04607e0b7dc3627506f61fc3a197203bb7546 | |
parent | fc70d91713332676dd2b8aa77d67684258493b15 (diff) |
Resolves: fdo#75728 #i124474# on change of User Field via UNO-API...
trigger update to get dependent Input Fields updated.
(cherry picked from commit 40c8121fbeb89403418a90c77b88d13ad268d347)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0ead765729c93992103baca53924b7a127936b38
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index f49595cea806..ccca8f4a0146 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -583,18 +583,29 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } } } - if( bSetValue ) + if ( bSetValue ) { // nothing special to be done here for the properties // UNO_NAME_DATA_BASE_NAME and UNO_NAME_DATA_BASE_URL. // We just call PutValue (empty string is allowed). // Thus the last property set will be used as Data Source. - sal_uInt16 nMId = GetFieldTypeMId( rPropertyName, *pType ); - if( USHRT_MAX != nMId ) - pType->PutValue( rValue, nMId ); + const sal_uInt16 nMemberValueId = GetFieldTypeMId( rPropertyName, *pType ); + if ( USHRT_MAX != nMemberValueId ) + { + pType->PutValue( rValue, nMemberValueId ); + if ( pType->Which() == RES_USERFLD ) + { + // trigger update of User field in order to get depending Input Fields updated. + pType->UpdateFlds(); + } + } else - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + { + throw beans::UnknownPropertyException( + OUString( "Unknown property: " ) + rPropertyName, + static_cast< cppu::OWeakObject * >( this ) ); + } } } else if (!pType && m_pImpl->m_pDoc && |