Tag: cws_src680_dba25
User: fs      
Date: 05/03/14 05:29:47

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

Log:
 RESYNC: (1.10-1.11); FILE MERGED

File Changes:

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

File [changed]: AppControllerGen.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerGen.cxx?r1=1.9.38.2&r2=1.9.38.3
Delta lines:  +43 -24
---------------------
--- AppControllerGen.cxx        8 Mar 2005 09:00:57 -0000       1.9.38.2
+++ AppControllerGen.cxx        14 Mar 2005 13:29:44 -0000      1.9.38.3
@@ -176,6 +176,7 @@
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::ucb;
 //........................................................................
+// 
-----------------------------------------------------------------------------
 void OApplicationController::convertToView(const ::rtl::OUString& _sName)
 {
        try
@@ -369,7 +370,7 @@
        }
 
        EventObject aEvt;
-       aEvt.Source = m_xDataSource;
+       aEvt.Source = m_xModel;
        modified(aEvt);
 }
 // 
-----------------------------------------------------------------------------
@@ -460,26 +461,19 @@
        }
 }
 // 
-----------------------------------------------------------------------------
-sal_Bool OApplicationController::suspendDocuments(sal_Bool bSuspend)
+sal_Bool OApplicationController::suspendDocument(const TDocuments::key_type& 
_xComponent,sal_Bool _bSuspend)
 {
-       sal_Bool bSubSuspended = sal_True;
-       Reference<XModel> xModel;
-       TDocuments::iterator aIter = m_aDocuments.begin();
-       TDocuments::iterator aEnd = m_aDocuments.end();
-       try
-       {
-               for (; aIter != aEnd && bSubSuspended; ++aIter)
-               {
+       sal_Bool bSuspended = sal_True;
                        Reference<XController> xController;
-                       xModel.set(aIter->first,UNO_QUERY);
+       Reference<XModel> xModel(_xComponent,UNO_QUERY);
                        if ( xModel.is() )
                                xController = xModel->getCurrentController();
                        else
                        {
-                               xController.set(aIter->first,UNO_QUERY);
+               xController.set(_xComponent,UNO_QUERY);
                                if ( !xController.is() )
                                {
-                                       Reference<XFrame> 
xFrame(aIter->first,UNO_QUERY);
+                       Reference<XFrame> xFrame(_xComponent,UNO_QUERY);
                                        if ( xFrame.is() )
                                                xController = 
xFrame->getController();
                                }
@@ -487,10 +481,22 @@
 
 
                        if ( xController.is() && xController != *this )
+               bSuspended = xController->suspend(_bSuspend);
+
+       return bSuspended;
+}
+// 
-----------------------------------------------------------------------------
+sal_Bool OApplicationController::suspendDocuments(sal_Bool bSuspend)
+{
+       sal_Bool bSubSuspended = sal_True;
+       Reference<XModel> xModel;
+       TDocuments::iterator aIter = m_aDocuments.begin();
+       TDocuments::iterator aEnd = m_aDocuments.end();
+       sal_Int32 nSuspendPos = 1;
+       try
                        {
-                               bSubSuspended = xController->suspend(bSuspend);
-                       }
-               }
+               for (; aIter != aEnd && bSubSuspended; ++aIter,++nSuspendPos)
+                       bSubSuspended = suspendDocument(aIter->first,bSuspend);
        }
        catch(Exception)
        {
@@ -547,6 +553,19 @@
                {
                }
                m_aDocuments.clear();
+       }
+       else // resuspend the documents again
+       {
+               aIter = m_aDocuments.begin();
+               aEnd = m_aDocuments.end();
+               try
+               {
+                       for (; aIter != aEnd && nSuspendPos ; 
++aIter,--nSuspendPos)
+                               suspendDocument(aIter->first,!bSuspend);
+               }
+               catch(Exception)
+               {
+               }
        }
 
        return bSubSuspended;




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

Reply via email to