summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/unocontrolbase.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2007-02-14 14:34:36 +0000
committerKurt Zenker <kz@openoffice.org>2007-02-14 14:34:36 +0000
commit378127cf8dd6e2b7d0922ea5c2ca77f314f93302 (patch)
tree936e016859d344fa586799fde1b295c05299a8b5 /toolkit/source/controls/unocontrolbase.cxx
parentfcf477e03f7010d96575847623dc945806ee98bb (diff)
INTEGRATION: CWS fmtfield_SRC680 (1.8.28); FILE MERGED
2007/02/12 14:30:02 fs 1.8.28.1: #i74443# +ImplSetPropertyValues
Diffstat (limited to 'toolkit/source/controls/unocontrolbase.cxx')
-rw-r--r--toolkit/source/controls/unocontrolbase.cxx45
1 files changed, 37 insertions, 8 deletions
diff --git a/toolkit/source/controls/unocontrolbase.cxx b/toolkit/source/controls/unocontrolbase.cxx
index 4004c4e77327..3367b1f55a00 100644
--- a/toolkit/source/controls/unocontrolbase.cxx
+++ b/toolkit/source/controls/unocontrolbase.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: unocontrolbase.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: hr $ $Date: 2007-01-02 15:35:18 $
+ * last change: $Author: kz $ $Date: 2007-02-14 15:34:36 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -70,6 +70,37 @@ sal_Bool UnoControlBase::ImplHasProperty( const ::rtl::OUString& aPropertyName )
return xInfo->hasPropertyByName( aPropertyName );
}
+void UnoControlBase::ImplSetPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues, sal_Bool bUpdateThis )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > xMPS( mxModel, ::com::sun::star::uno::UNO_QUERY );
+ if ( !mxModel.is() )
+ return;
+
+ DBG_ASSERT( xMPS.is(), "UnoControlBase::ImplSetPropertyValues: no multi property set interface!" );
+ if ( xMPS.is() )
+ {
+ if ( !bUpdateThis )
+ ImplLockPropertyChangeNotifications( aPropertyNames, true );
+
+ try
+ {
+ xMPS->setPropertyValues( aPropertyNames, aValues );
+ }
+ catch( const ::com::sun::star::uno::Exception& )
+ {
+ if ( !bUpdateThis )
+ ImplLockPropertyChangeNotifications( aPropertyNames, false );
+ }
+ if ( !bUpdateThis )
+ ImplLockPropertyChangeNotifications( aPropertyNames, false );
+ }
+ else
+ {
+ int dummy = 0;
+ (void)dummy;
+ }
+}
+
void UnoControlBase::ImplSetPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue, sal_Bool bUpdateThis )
{
// Model ggf. schon abgemeldet, aber ein Event schlaegt noch zu...
@@ -77,10 +108,8 @@ void UnoControlBase::ImplSetPropertyValue( const ::rtl::OUString& aPropertyName,
{
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPSet( mxModel, ::com::sun::star::uno::UNO_QUERY );
if ( !bUpdateThis )
- {
- DBG_ASSERT( msPropertyCurrentlyUpdating.getLength() == 0, "UnoControlBase::ImplSetPropertyValue: recursive calls not allowed!" );
- msPropertyCurrentlyUpdating = aPropertyName;
- }
+ ImplLockPropertyChangeNotification( aPropertyName, true );
+
try
{
xPSet->setPropertyValue( aPropertyName, aValue );
@@ -88,11 +117,11 @@ void UnoControlBase::ImplSetPropertyValue( const ::rtl::OUString& aPropertyName,
catch( const com::sun::star::uno::Exception& )
{
if ( !bUpdateThis )
- msPropertyCurrentlyUpdating = ::rtl::OUString();
+ ImplLockPropertyChangeNotification( aPropertyName, false );
throw;
}
if ( !bUpdateThis )
- msPropertyCurrentlyUpdating = ::rtl::OUString();
+ ImplLockPropertyChangeNotification( aPropertyName, false );
}
}