From 6d2ca57e72ac7422a4458296bafa2b4c20616c79 Mon Sep 17 00:00:00 2001
From: Kai Sommerfeld <kso@openoffice.org>
Date: Thu, 22 Feb 2001 09:57:52 +0000
Subject: #83832# - Fixed Content::setPropertyValues(...). Generated          
 PropertyChangeEvent.OldValue contained the new property value!

---
 ucbhelper/workben/myucp/myucp_content.cxx | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

(limited to 'ucbhelper')

diff --git a/ucbhelper/workben/myucp/myucp_content.cxx b/ucbhelper/workben/myucp/myucp_content.cxx
index 6f0019d875e7..a50d94c1690f 100644
--- a/ucbhelper/workben/myucp/myucp_content.cxx
+++ b/ucbhelper/workben/myucp/myucp_content.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: myucp_content.cxx,v $
  *
- *  $Revision: 1.2 $
+ *  $Revision: 1.3 $
  *
- *  last change: $Author: kso $ $Date: 2000-11-17 15:38:10 $
+ *  last change: $Author: kso $ $Date: 2001-02-22 10:51:47 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -429,11 +429,10 @@ Any SAL_CALL Content::execute( const Command& aCommand,
     else
     {
         //////////////////////////////////////////////////////////////////
-        // Unknown command
+        // Unsupported command
         //////////////////////////////////////////////////////////////////
 
-        VOS_ENSURE( sal_False,
-                    "Content::execute - unknown command!" );
+        VOS_ENSURE( sal_False, "Content::execute - unsupported command!" );
         throw CommandAbortedException();
     }
 
@@ -659,16 +658,15 @@ void Content::setPropertyValues( const Sequence< PropertyValue >& rValues )
             {
                 if ( aNewValue != m_aProps.aTitle )
                 {
-                    osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
-                    m_aProps.aTitle = aNewValue;
-
-                    aGuard.clear();
+                    osl::Guard< osl::Mutex > aGuard( m_aMutex );
 
                     aEvent.PropertyName = rValue.Name;
                     aEvent.OldValue     = makeAny( m_aProps.aTitle );
                     aEvent.NewValue     = makeAny( aNewValue );
 
                     aChanges.getArray()[ nChanged ] = aEvent;
+
+                    m_aProps.aTitle = aNewValue;
                     nChanged++;
                 }
             }
@@ -703,11 +701,11 @@ void Content::setPropertyValues( const Sequence< PropertyValue >& rValues )
                 {
                     Any aOldValue = xAdditionalPropSet->getPropertyValue(
                                                                 rValue.Name );
-                    xAdditionalPropSet->setPropertyValue(
-                                                rValue.Name, rValue.Value );
-
                     if ( aOldValue != rValue.Value )
                     {
+                        xAdditionalPropSet->setPropertyValue(
+                                                rValue.Name, rValue.Value );
+
                         aEvent.PropertyName = rValue.Name;
                         aEvent.OldValue     = aOldValue;
                         aEvent.NewValue     = rValue.Value;
-- 
cgit