Tag: cws_dev300_odbmacros3
User: fs      
Date: 2008-08-03 21:17:22+0000
Modified:
   dba/dbaccess/source/core/dataaccess/databasedocument.cxx

Log:
 don't be confused by framework's BreakMacrosignature hack

File Changes:

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

File [changed]: databasedocument.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasedocument.cxx?r1=1.40.6.18&r2=1.40.6.19
Delta lines:  +14 -2
--------------------
--- databasedocument.cxx        2008-08-02 11:48:01+0000        1.40.6.18
+++ databasedocument.cxx        2008-08-03 21:17:20+0000        1.40.6.19
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: databasedocument.cxx,v $
- * $Revision: 1.40.6.18 $
+ * $Revision: 1.40.6.19 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -444,6 +444,18 @@
 sal_Bool SAL_CALL ODatabaseDocument::attachResource( const ::rtl::OUString& 
_rURL, const Sequence< PropertyValue >& _rArguments ) throw (RuntimeException)
 {
     DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
+
+    if  (   ( _rURL == getURL() )
+        &&  ( _rArguments.getLength() == 1 )
+        &&  ( _rArguments[0].Name.compareToAscii( "BreakMacroSignature" ) == 0 
)
+        )
+    {
+        // this is a BAD hack of the Basic importer code ... there should be a 
dedicated API for this,
+        // not this bad mis-using of existing interfaces
+        return sal_False;
+            // (we do not support macro signatures, so we can ignore this call)
+    }
+
     m_pImpl->attachResource( _rURL, _rArguments );
 
     if ( impl_isInitializing() )
@@ -1444,7 +1456,7 @@
 // 
-----------------------------------------------------------------------------
 Reference< XStorageBasedLibraryContainer > SAL_CALL 
ODatabaseDocument::getBasicLibraries() throw (RuntimeException)
 {
-    DocumentGuard aGuard( *this );
+    DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
     return m_pImpl->getLibraryContainer( true );
 }
 




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

Reply via email to