Tag: cws_src680_rpt23fix01
User: oj      
Date: 2007-07-18 09:24:17+0000
Modified:
   dba/reportdesign/inc/UndoActions.hxx
   dba/reportdesign/source/core/sdr/UndoActions.cxx
   dba/reportdesign/source/ui/misc/Undo.cxx

Log:
 correct undo actions

File Changes:

Directory: /dba/reportdesign/inc/
=================================

File [changed]: UndoActions.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/inc/UndoActions.hxx?r1=1.2&r2=1.2.2.1
Delta lines:  +3 -2
-------------------
--- UndoActions.hxx     2007-07-09 11:56:02+0000        1.2
+++ UndoActions.hxx     2007-07-18 09:24:14+0000        1.2.2.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: UndoActions.hxx,v $
  *
- *  $Revision: 1.2 $
+ *  $Revision: 1.2.2.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/09 11:56:02 $
+ *  last change: $Author: oj $ $Date: 2007/07/18 09:24:14 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -170,6 +170,7 @@
         TYPEINFO();
                OCommentUndoAction(     SdrModel& rMod
                                                        ,USHORT nCommentID);
+        virtual ~OCommentUndoAction();
 
                virtual UniString       GetComment() const { return 
m_strComment; }
                virtual void            Undo();

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.2.1&r2=1.2.2.2
Delta lines:  +8 -14
--------------------
--- UndoActions.cxx     2007-07-16 19:37:35+0000        1.2.2.1
+++ UndoActions.cxx     2007-07-18 09:24:14+0000        1.2.2.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: UndoActions.cxx,v $
  *
- *  $Revision: 1.2.2.1 $
+ *  $Revision: 1.2.2.2 $
  *
- *  last change: $Author: fs $ $Date: 2007/07/16 19:37:35 $
+ *  last change: $Author: oj $ $Date: 2007/07/18 09:24:14 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -109,6 +109,9 @@
        if ( nCommentID )
         m_strComment = String(ModuleRes(nCommentID)); 
 }
+OCommentUndoAction::~OCommentUndoAction()
+{
+}
 //----------------------------------------------------------------------------
 void OCommentUndoAction::Undo()
 {
@@ -209,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
         {
@@ -241,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 )
@@ -266,7 +263,6 @@
         {
                OSL_ENSURE( sal_False, "OUndoContainerAction::Redo: caught an 
exception!" );
         }
-               //rEnv.UnLock();
        }
 }
 // 
-----------------------------------------------------------------------------
@@ -394,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 );

Directory: /dba/reportdesign/source/ui/misc/
============================================

File [changed]: Undo.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/misc/Undo.cxx?r1=1.2&r2=1.2.2.1
Delta lines:  +37 -58
---------------------
--- Undo.cxx    2007-07-09 11:56:32+0000        1.2
+++ Undo.cxx    2007-07-18 09:24:14+0000        1.2.2.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: Undo.cxx,v $
  *
- *  $Revision: 1.2 $
+ *  $Revision: 1.2.2.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/09 11:56:32 $
+ *  last change: $Author: oj $ $Date: 2007/07/18 09:24:14 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -179,8 +179,6 @@
 // 
-----------------------------------------------------------------------------
 void OSectionUndo::collectControls(const uno::Reference< report::XSection >& 
_xSection)
 {
-       OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
-    const OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
     m_aControls.clear();
        try
        { 
@@ -203,11 +201,6 @@
 //----------------------------------------------------------------------------
 void OSectionUndo::Undo()
 {
-       OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
-       if ( !rEnv.IsLocked() )
-       {
-        const OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
-               //rEnv.Lock();
         try
         {
                    switch ( m_eAction )
@@ -225,18 +218,10 @@
         {
                OSL_ENSURE( sal_False, "OSectionUndo::Undo: caught an 
exception!" );
         }
-               //rEnv.UnLock();
-       }
-       
 }
 //----------------------------------------------------------------------------
 void OSectionUndo::Redo()
 {
-       OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
-       if ( !rEnv.IsLocked() )
-       {
-        OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
-               //rEnv.Lock();
         try
         {
                switch ( m_eAction )
@@ -254,11 +239,9 @@
         {
                OSL_ENSURE( sal_False, "OSectionUndo::Redo: caught an 
exception!" );
         }
-               //rEnv.UnLock();
-       }       
 }
 //----------------------------------------------------------------------------
-TYPEINIT1( OReportSectionUndo,         OCommentUndoAction );
+TYPEINIT1( OReportSectionUndo,         OSectionUndo );
 //----------------------------------------------------------------------------
 OReportSectionUndo::OReportSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot
                                                                           
,::std::mem_fun_t< uno::Reference< report::XSection >
@@ -427,8 +410,6 @@
 //----------------------------------------------------------------------------
 void OGroupUndo::Undo()
 {
-    OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
-    const OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
        switch ( m_eAction )
        {
        case Inserted:
@@ -444,8 +425,6 @@
 //----------------------------------------------------------------------------
 void OGroupUndo::Redo()
 {
-    OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
-    const OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
        switch ( m_eAction )
        {
        case Inserted:




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

Reply via email to