Tag: cws_src680_dba201
User: oj      
Date: 05/05/20 05:48:10

Modified:
 /dba/dbaccess/source/core/dataaccess/
  documentdefinition.cxx, documentdefinition.hxx

Log:
 #i49339# entry guard for execute

File Changes:

Directory: /dba/dbaccess/source/core/dataaccess/
================================================

File [changed]: documentdefinition.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/documentdefinition.cxx?r1=1.25.20.3&r2=1.25.20.4
Delta lines:  +296 -284
-----------------------
--- documentdefinition.cxx      9 May 2005 12:50:56 -0000       1.25.20.3
+++ documentdefinition.cxx      20 May 2005 12:48:07 -0000      1.25.20.4
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: documentdefinition.cxx,v $
  *
- *  $Revision: 1.25.20.3 $
+ *  $Revision: 1.25.20.4 $
  *
- *  last change: $Author: oj $ $Date: 2005/05/09 12:50:56 $
+ *  last change: $Author: oj $ $Date: 2005/05/20 12:48:07 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -479,6 +479,7 @@
        ,m_pClientHelper(NULL)
        ,m_bForm(_bForm)
        ,m_bOpenInDesign(sal_False)
+    ,m_bInExecute(sal_False)
 {
        DBG_CTOR(ODocumentDefinition, NULL);
        registerProperties();
@@ -573,11 +574,21 @@
        describeProperties(aProps);
        return new OPropertyArrayHelper(aProps);
 }
+class OExecuteImpl
+{
+    sal_Bool& m_rbSet;
+public:
+    OExecuteImpl(sal_Bool& _rbSet) : m_rbSet(_rbSet){ m_rbSet=sal_True; }
+    ~OExecuteImpl(){ m_rbSet = sal_False; }
+};
 // 
-----------------------------------------------------------------------------
 Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 
CommandId, const Reference< XCommandEnvironment >& Environment ) throw 
(Exception, CommandAbortedException, RuntimeException)
 {
        Any aRet;
        ::osl::MutexGuard aGuard(m_aMutex);
+    if ( !m_bInExecute )
+    {
+        OExecuteImpl aExecuteGuard(m_bInExecute);
        sal_Bool bOpenInDesign = aCommand.Name.equalsAscii("openDesign");
        sal_Bool bOpenForMail = aCommand.Name.equalsAscii("openForMail");
        if ( aCommand.Name.compareToAscii( "open" ) == 0 || bOpenInDesign || 
bOpenForMail )
@@ -864,6 +875,7 @@
        }
        else
                aRet = OContentHelper::execute(aCommand,CommandId,Environment);
+    }
        return aRet;
 }
 // 
-----------------------------------------------------------------------------

File [changed]: documentdefinition.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/documentdefinition.hxx?r1=1.12.20.1&r2=1.12.20.2
Delta lines:  +4 -3
-------------------
--- documentdefinition.hxx      9 May 2005 12:50:56 -0000       1.12.20.1
+++ documentdefinition.hxx      20 May 2005 12:48:07 -0000      1.12.20.2
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: documentdefinition.hxx,v $
  *
- *  $Revision: 1.12.20.1 $
+ *  $Revision: 1.12.20.2 $
  *
- *  last change: $Author: oj $ $Date: 2005/05/09 12:50:56 $
+ *  last change: $Author: oj $ $Date: 2005/05/20 12:48:07 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -128,6 +128,7 @@
        OInterceptor*                                                           
                                                                                
m_pInterceptor;
        sal_Bool                                                                
                                                                                
        m_bForm; // <TRUE/> if it is a form
        sal_Bool                                                                
                                                                                
        m_bOpenInDesign;
+    sal_Bool                                                                   
                                                                                
m_bInExecute;
        OEmbeddedClientHelper*                                                  
                                                                        
m_pClientHelper;
 
 private:




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

Reply via email to