Tag: cws_src680_dba29
User: fs      
Date: 05/03/31 05:19:56

Modified:
 /dba/dbaccess/source/ui/app/
  AppController.cxx

Log:
 #i46396# suspend: do not remember the suspended state if suspension was not 
successful

File Changes:

Directory: /dba/dbaccess/source/ui/app/
=======================================

File [changed]: AppController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.18.6.1&r2=1.18.6.2
Delta lines:  +13 -8
--------------------
--- AppController.cxx   30 Mar 2005 10:20:30 -0000      1.18.6.1
+++ AppController.cxx   31 Mar 2005 13:19:53 -0000      1.18.6.2
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.18.6.1 $
+ *  $Revision: 1.18.6.2 $
  *
- *  last change: $Author: fs $ $Date: 2005/03/30 10:20:30 $
+ *  last change: $Author: fs $ $Date: 2005/03/31 13:19:53 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -578,17 +578,18 @@
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::MutexGuard aGuard(m_aMutex);
-    sal_Bool bCheck = sal_True;
+    sal_Bool bCanSuspend = sal_True;
+
     if ( m_bSuspended != bSuspend )
     {
-           m_bSuspended = bSuspend;
            if ( bSuspend && !suspendDocuments( bSuspend ))
                    return sal_False;
            
            Reference<XModifiable> xModi(m_xModel,UNO_QUERY);
         Reference<XStorable> xStor(getModel(),UNO_QUERY);
         
-           if  (   xStor.is()
+           if  (   bSuspend
+            &&  xStor.is()
             &&  !xStor->isReadonly()
             &&  (   m_bCurrentlyModified
                 ||  (   xModi.is()
@@ -601,17 +602,21 @@
                    {
                            case RET_YES:
                                    
Execute(ID_BROWSER_SAVEDOC,Sequence<PropertyValue>());
-                                   bCheck = !xModi->isModified(); // when we 
save the table this must be false else some press cancel
+                                   bCanSuspend = !xModi->isModified();
+                    // when we save the document this must be false else some 
press cancel
                                    break;
                            case RET_CANCEL:
-                                   bCheck = sal_False;
+                                   bCanSuspend = sal_False;
                            default:
                                    break;
                    }
            }
     }
 
-       return bCheck;
+    if ( bCanSuspend )
+           m_bSuspended = bSuspend;
+
+       return bCanSuspend;
 }
 // 
-----------------------------------------------------------------------------
 FeatureState OApplicationController::GetState(sal_uInt16 _nId) const




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

Reply via email to