User: hr      
Date: 05/09/23 05:06:56

Modified:
 /dba/dbaccess/source/core/dataaccess/
  intercept.cxx

Log:
 INTEGRATION: CWS dba201b (1.3.58); FILE MERGED
 2005/09/21 07:03:41 oj 1.3.58.3: RESYNC: (1.3-1.4); FILE MERGED
 2005/07/11 13:37:02 fs 1.3.58.2: merging CWS dba201 into CWS dba201b
 2005/06/09 08:55:16 fs 1.3.58.1: #i49370# do a prepareClose/suspend when a 
close-command is intercepted

File Changes:

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

File [changed]: intercept.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/intercept.cxx?r1=1.4&r2=1.5
Delta lines:  +66 -55
---------------------
--- intercept.cxx       8 Sep 2005 13:30:40 -0000       1.4
+++ intercept.cxx       23 Sep 2005 12:06:53 -0000      1.5
@@ -52,6 +52,9 @@
 #include "intercept.hxx"
 #endif
 #include "dbastrings.hrc"
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
 
 
 namespace dbaccess
@@ -129,6 +132,7 @@
 }
 
 
+DBG_NAME(OInterceptor)
 
 OInterceptor::OInterceptor( ODocumentDefinition* _pContentHolder,sal_Bool 
_bAllowEditDoc )
        : m_pContentHolder( _pContentHolder )
@@ -137,6 +141,8 @@
          ,m_aInterceptedURL(7)
          ,m_bAllowEditDoc(_bAllowEditDoc)
 {
+    DBG_CTOR(OInterceptor,NULL);
+
        OSL_ENSURE(DISPATCH_RELOAD < m_aInterceptedURL.getLength(),"Illegal 
size.");
 
        m_aInterceptedURL[DISPATCH_SAVEAS]              = 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SaveAs"));
@@ -155,6 +161,8 @@
 
        if(m_pStatCL)
                delete m_pStatCL;
+
+    DBG_DTOR(OInterceptor,NULL);
 }
 
 
@@ -209,17 +217,20 @@
                                || _URL.Complete == 
m_aInterceptedURL[DISPATCH_CLOSEFRAME]
                                )
                {
-                       if ( m_pContentHolder->isModified() )
+            if ( m_pContentHolder->prepareClose() )
                        {
-                               if ( !m_pContentHolder->save(sal_True) )
-                                       return;
-                       }
-
                        Reference< XDispatch > xDispatch = 
m_xSlaveDispatchProvider->queryDispatch(
                                _URL, ::rtl::OUString::createFromAscii( "_self" 
), 0 );
                        if ( xDispatch.is() )
+                {
+                    Reference< ::com::sun::star::document::XEventBroadcaster> 
xEvtB(m_pContentHolder->getComponent(),UNO_QUERY);
+                    if ( xEvtB.is() )
+                        xEvtB->removeEventListener(this);
+
                                xDispatch->dispatch( _URL, Arguments );
                }
+                       }
+               }
 }
 
 void SAL_CALL




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

Reply via email to