[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source
Oliver-Rainer Wittmann
orw at apache.org
Fri Mar 21 09:07:33 PDT 2014
sw/source/core/unocore/unofield.cxx | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
New commits:
commit fc0c91c2d00157cb02cbe7b1d09cb950762e8145
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Fri Mar 21 12:32:09 2014 +0000
124474: on change of User Field via UNO-API trigger update to get dependent Input Fields updated.
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 423dd7c..ea9ef00 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -540,18 +540,29 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName,
}
}
}
- 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 &&
More information about the Libreoffice-commits
mailing list