User: hr      
Date: 2007-08-02 14:32:39+0000
Modified:
   dba/reportdesign/source/core/sdr/UndoActions.cxx

Log:
 INTEGRATION: CWS rpt23fix01 (1.2.2); FILE MERGED
 2007/07/18 09:24:14 oj 1.2.2.2: correct undo actions
 2007/07/16 19:37:35 fs 1.2.2.1: #i77800# +m_aConditionUpdater

File Changes:

Directory: /dba/reportdesign/source/core/sdr/
=============================================

File [changed]: UndoActions.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/sdr/UndoActions.cxx?r1=1.2&r2=1.3
Delta lines:  +15 -17
---------------------
--- UndoActions.cxx     2007-07-09 11:56:16+0000        1.2
+++ UndoActions.cxx     2007-08-02 14:32:37+0000        1.3
@@ -35,6 +35,7 @@
 #include "UndoActions.hxx"
 #include "UndoEnv.hxx"
 #include "formatnormalizer.hxx"
+#include "conditionupdater.hxx"
 #include "corestrings.hrc"
 #include "rptui_slotid.hrc"
 #include "RptDef.hxx"
@@ -108,6 +109,9 @@
        if ( nCommentID )
         m_strComment = String(ModuleRes(nCommentID)); 
 }
+OCommentUndoAction::~OCommentUndoAction()
+{
+}
 //----------------------------------------------------------------------------
 void OCommentUndoAction::Undo()
 {
@@ -208,11 +212,8 @@
 
//------------------------------------------------------------------------------
 void OUndoContainerAction::Undo()
 {
-       OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
-
-       if ( !rEnv.IsLocked() && m_xElement.is() )
+       if ( m_xElement.is() )
        {
-               OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
         // prevents that an undo action will be created for elementInserted
         try
         {
@@ -240,11 +241,8 @@
 
//------------------------------------------------------------------------------
 void OUndoContainerAction::Redo()
 {
-       OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
-       if ( !rEnv.IsLocked() && m_xElement.is() )
+       if ( m_xElement.is() )
        {
-               //rEnv.Lock(); // redo doesn't work when locked
-        OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
         try
         {
                switch ( m_eAction )
@@ -265,7 +263,6 @@
         {
                OSL_ENSURE( sal_False, "OUndoContainerAction::Redo: caught an 
exception!" );
         }
-               //rEnv.UnLock();
        }
 }
 // 
-----------------------------------------------------------------------------
@@ -393,12 +390,10 @@
 // 
-----------------------------------------------------------------------------
 void ORptUndoPropertyAction::setProperty(sal_Bool _bOld)
 {
-    OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
     Reference< XPropertySet> xObj = getObject();
 
-       if (xObj.is() && !rEnv.IsLocked())
+       if (xObj.is() )
        {
-               OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
         try
         {
             xObj->setPropertyValue( m_aPropertyName, _bOld ? m_aOldValue : 
m_aNewValue );
@@ -462,6 +457,7 @@
     OReportModel&                                       m_rModel;
     PropertySetInfoCache                                m_aPropertySetCache;
     FormatNormalizer                                    m_aFormatNormalizer;
+    ConditionUpdater                                    m_aConditionUpdater;
        ::osl::Mutex                                        m_aMutex;
        ::std::vector< uno::Reference< container::XChild> > m_aSections;
     oslInterlockedCount                                 m_nLocks;
@@ -472,6 +468,7 @@
 
 OXUndoEnvironmentImpl::OXUndoEnvironmentImpl(OReportModel& _rModel) : 
m_rModel(_rModel)
         ,m_aFormatNormalizer( _rModel )
+        ,m_aConditionUpdater()
         ,m_nLocks(0)
                ,m_bReadOnly(sal_False)
 {
@@ -650,8 +647,9 @@
        if ( aPropertyPos->second )
         return;
 
-    // give our format normalizer a chance
+    // give components with sub responsibilities a chance
     m_pImpl->m_aFormatNormalizer.notifyPropertyChange( _rEvent );
+    m_pImpl->m_aConditionUpdater.notifyPropertyChange( _rEvent );
 
     aGuard.clear();
        // TODO: this is a potential race condition: two threads here could in 
theory




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to