You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2014/03/21 13:32:09 UTC
svn commit: r1579934 -
/openoffice/trunk/main/sw/source/core/unocore/unofield.cxx
Author: orw
Date: Fri Mar 21 12:32:09 2014
New Revision: 1579934
URL: http://svn.apache.org/r1579934
Log:
124474: on change of User Field via UNO-API trigger update to get dependent Input Fields updated.
Modified:
openoffice/trunk/main/sw/source/core/unocore/unofield.cxx
Modified: openoffice/trunk/main/sw/source/core/unocore/unofield.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unofield.cxx?rev=1579934&r1=1579933&r2=1579934&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/unocore/unofield.cxx (original)
+++ openoffice/trunk/main/sw/source/core/unocore/unofield.cxx Fri Mar 21 12:32:09 2014
@@ -540,20 +540,31 @@ void SwXFieldMaster::setPropertyValue( c
}
}
}
- 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 ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- }
- }
+ {
+ throw beans::UnknownPropertyException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "Unknown property: " ) ) + rPropertyName,
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ }
+ }
else if(!pType && m_pDoc &&
( rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_NAME))) )
{