Tag: cws_dev300_dba30c
User: oj      
Date: 2008-05-09 08:25:51+0000
Modified:
   dba/dbaccess/source/core/dataaccess/ModelImpl.cxx
   dba/dbaccess/source/core/dataaccess/ModelImpl.hxx
   dba/dbaccess/source/core/dataaccess/databasecontext.cxx
   dba/dbaccess/source/core/dataaccess/documentdefinition.cxx
   dba/dbaccess/source/ui/browser/unodatbr.cxx
   dba/dbaccess/source/ui/misc/TokenWriter.cxx
   dba/dbaccess/source/ui/misc/UITools.cxx
   dba/dbaccess/source/ui/misc/singledoccontroller.cxx
   dba/dbaccess/source/ui/relationdesign/RelationController.cxx
   dba/dbaccess/source/ui/tabledesign/TableController.cxx

Log:
 RESYNC: (1.26-1.28); FILE MERGED

File Changes:

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

File [changed]: ModelImpl.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/ModelImpl.cxx?r1=1.26.4.2&r2=1.26.4.3
Delta lines:  +15 -12
---------------------
--- ModelImpl.cxx       2008-05-08 21:22:10+0000        1.26.4.2
+++ ModelImpl.cxx       2008-05-09 08:23:53+0000        1.26.4.3
@@ -321,6 +321,7 @@
             ,m_aContainer(4)
             ,m_aStorages()
             ,m_aMacroMode( *this )
+                       ,m_nImposedMacroExecMode( MacroExecMode::NEVER_EXECUTE )
             ,m_bHasAnyObjectWithMacros( false )
             ,m_bModificationLock( false )
                        ,m_aContext( _rxFactory )
@@ -357,6 +358,7 @@
             ,m_aContainer(4)
             ,m_aStorages()
             ,m_aMacroMode( *this )
+                       ,m_nImposedMacroExecMode( MacroExecMode::NEVER_EXECUTE )
             ,m_bHasAnyObjectWithMacros( false )
             ,m_bModificationLock( false )
                        ,m_aContext( _rxFactory )
@@ -1149,7 +1151,7 @@
 // 
-----------------------------------------------------------------------------
 namespace
 {
-    void lcl_modifyListening( ::osl::Mutex& _rMutex, 
::sfx2::IModifiableDocument& _rDocument,
+    void lcl_modifyListening( ::sfx2::IModifiableDocument& _rDocument,
         const Reference< XStorage >& _rxStorage, ::rtl::Reference< 
::sfx2::DocumentStorageModifyListener >& _inout_rListener,
         bool _bListen )
     {
@@ -1169,7 +1171,8 @@
 
         if ( xModify.is() && _bListen )
         {
-            _inout_rListener = new ::sfx2::DocumentStorageModifyListener( 
_rMutex, _rDocument );
+            // the listener from sfx2 uses SolarMutex internally
+            _inout_rListener = new ::sfx2::DocumentStorageModifyListener( 
_rDocument );
             xModify->addModifyListener( _inout_rListener.get() );
         }
     }
@@ -1179,13 +1182,13 @@
 Reference< XStorage > ODatabaseModelImpl::impl_switchToStorage_throw( const 
Reference< XStorage >& _rxNewRootStorage )
 {
     // stop listening for modifications at the old storage
-    lcl_modifyListening( m_xMutex->getMutex(), *this, 
m_xDocumentStorage.getTyped(), m_pStorageModifyListener, false );
+    lcl_modifyListening( *this, m_xDocumentStorage.getTyped(), 
m_pStorageModifyListener, false );
 
     // set new storage
     m_xDocumentStorage.reset( _rxNewRootStorage, SharedStorage::TakeOwnership 
);
 
     // start listening for modifications
-    lcl_modifyListening( m_xMutex->getMutex(), *this, 
m_xDocumentStorage.getTyped(), m_pStorageModifyListener, true );
+    lcl_modifyListening( *this, m_xDocumentStorage.getTyped(), 
m_pStorageModifyListener, true );
 
     // forward new storage to Basic and Dialog library containers
     if ( m_xBasicLibraries.is() )
@@ -1243,23 +1246,23 @@
 }
 
 // 
-----------------------------------------------------------------------------
-sal_Int16 ODatabaseModelImpl::getImposedMacroExecMode() const
+sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const
 {
-    sal_Int16 nMacroExecMode( MacroExecMode::USE_CONFIG );
+    sal_Int16 nCurrentMode = MacroExecMode::NEVER_EXECUTE;
     try
     {
         ::comphelper::NamedValueCollection aArgs( m_aArgs );
-        nMacroExecMode = aArgs.getOrDefault( "MacroExecutionMode", 
nMacroExecMode );
+        nCurrentMode = aArgs.getOrDefault( "MacroExecutionMode", nCurrentMode 
);
     }
     catch( const Exception& )
     {
        DBG_UNHANDLED_EXCEPTION();
     }
-    return nMacroExecMode;
+    return nCurrentMode;
 }
 
 // 
-----------------------------------------------------------------------------
-sal_Bool ODatabaseModelImpl::setImposedMacroExecMode( sal_uInt16 nMacroMode )
+sal_Bool ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
 {
     try
     {

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

File [changed]: ModelImpl.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/ModelImpl.hxx?r1=1.21.6.1&r2=1.21.6.2
Delta lines:  +16 -4
--------------------
--- ModelImpl.hxx       2008-05-08 13:09:40+0000        1.21.6.1
+++ ModelImpl.hxx       2008-05-09 08:23:58+0000        1.21.6.2
@@ -159,6 +159,7 @@
        ::std::vector< TContentPtr >                                            
    m_aContainer;   // one for each ObjectType
     TStorages                                                                  
                    m_aStorages;
     ::sfx2::DocumentMacroMode                                                  
 m_aMacroMode;
+    sal_Int16                                                                  
 m_nImposedMacroExecMode;
 
     ::com::sun::star::uno::Reference< 
::com::sun::star::script::XStorageBasedLibraryContainer > m_xBasicLibraries;
     ::com::sun::star::uno::Reference< 
::com::sun::star::script::XStorageBasedLibraryContainer > m_xDialogLibraries;
@@ -446,10 +447,21 @@
                 const ::rtl::OUString& _rDocumentURL
             );
 
+    /** returns the macro mode imposed by an external instance, by passing it 
to attachResource
+    */
+    sal_Int16       getImposedMacroExecMode() const
+    {
+        return m_nImposedMacroExecMode;
+    }
+    void            setImposedMacroExecMode( const sal_Int16 _nMacroMode )
+    {
+        m_nImposedMacroExecMode = _nMacroMode;
+    }
+
 public:
     // IMacroDocumentAccess overridables
-    virtual sal_Int16 getImposedMacroExecMode() const;
-    virtual sal_Bool setImposedMacroExecMode( sal_uInt16 );
+    virtual sal_Int16 getCurrentMacroExecMode() const;
+    virtual sal_Bool setCurrentMacroExecMode( sal_uInt16 );
     virtual ::rtl::OUString getDocumentLocation() const;
     virtual ::com::sun::star::uno::Reference< 
::com::sun::star::embed::XStorage > getLastCommitDocumentStorage();
     virtual sal_Bool documentStorageHasMacros() const;

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

File [changed]: databasecontext.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasecontext.cxx?r1=1.38.16.3&r2=1.38.16.4
Delta lines:  +18 -6
--------------------
--- databasecontext.cxx 2008-05-08 13:14:00+0000        1.38.16.3
+++ databasecontext.cxx 2008-05-09 08:24:03+0000        1.38.16.4
@@ -342,6 +342,7 @@
            Reference< XModel > xModel = 
pExistent->createNewModel_deliverOwnership();
         DBG_ASSERT( xModel.is(), "ODatabaseContext::loadObjectFromURL: no 
model?" );
 
+        // calls registerPrivate in attachResource
         xModel->attachResource( _sURL, aArgs.getPropertyValues() );
 
         ::utl::CloseableComponent aEnsureClose( xModel );
@@ -476,7 +477,10 @@
            m_aDatasourceProperties[ _rModelImpl.m_sName ] = 
aRememberProps.getPropertyValues();
     }
     else
-        OSL_ENSURE( false, "ODatabaseContext::storeTransientProperties: don't 
know this data source!s" );
+    {
+        OSL_ENSURE( ( sDocumentURL.getLength() == 0 ) && ( 
_rModelImpl.m_sName.getLength() == 0 ),
+            "ODatabaseContext::storeTransientProperties: a non-empty data 
source which I do not know?!" );
+    }
 }
 
 
//------------------------------------------------------------------------------
@@ -692,9 +696,17 @@
 // 
-----------------------------------------------------------------------------
 void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& 
_rxForDocument, BasicManager& _rBasicManager )
 {
-    // if it's a database document whose BasicManager has just been created, 
add the global
-    // DatabaseDocument variable to its scope.
+    // if it's a database document ...
     Reference< XOfficeDatabaseDocument > xDatabaseDocument( _rxForDocument, 
UNO_QUERY );
+    // ... or a sub document of a database document ...
+    if ( !xDatabaseDocument.is() )
+    {
+        Reference< XChild > xDocAsChild( _rxForDocument, UNO_QUERY );
+        if ( xDocAsChild.is() )
+            xDatabaseDocument.set( xDocAsChild->getParent(), UNO_QUERY );
+    }
+
+    // ... whose BasicManager has just been created, then add the global 
DatabaseDocument variable to its scope.
     if ( xDatabaseDocument.is() )
         _rBasicManager.SetGlobalUNOConstant( "ThisDatabaseDocument", makeAny( 
xDatabaseDocument ) );
 }

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.59.4.1&r2=1.59.4.2
Delta lines:  +83 -60
---------------------
--- documentdefinition.cxx      2008-05-08 13:11:12+0000        1.59.4.1
+++ documentdefinition.cxx      2008-05-09 08:24:09+0000        1.59.4.2
@@ -912,11 +912,11 @@
 
     // allow the command arguments to downgrade the macro execution mode, but 
not to upgrade
     // it
-    if  (   ( nImposedMacroExecMode == MacroExecMode::USE_CONFIG )
+    if  (   ( m_pImpl->m_pDataSource->getImposedMacroExecMode() == 
MacroExecMode::USE_CONFIG )
         &&  bExecuteDBDocMacros
         )
     {
-        // while loading the whole database document, USE_CONFIG, or *no* 
macro exec mode was passed.
+        // while loading the whole database document, USE_CONFIG, was passed.
         // Additionally, *by now* executing macros from the DB doc is allowed 
(this is what bExecuteDBDocMacros
         // indicates). This means either one of:
         // 1. The DB doc or one of the sub docs contained macros and
@@ -976,24 +976,31 @@
         DBG_ERROR( "unreachable" );
        }
 
-       Reference<XModel> xModel;
-       if ( m_pImpl->m_aProps.sPersistentName.getLength() )
-       {
-        Sequence< PropertyValue > aLoadArgs;
-        aDocumentArgs >>= aLoadArgs;
-               loadEmbeddedObject( xConnection, Sequence< sal_Int8 >(), 
aLoadArgs, false, !m_bOpenInDesign );
-               if ( m_xEmbeddedObject.is() )
-               {
-                       xModel.set(getComponent(),UNO_QUERY);
+    OSL_ENSURE( m_pImpl->m_aProps.sPersistentName.getLength(),
+        "ODocumentDefinition::onCommandOpenSomething: no persistent name - 
cannot load!" );
+       if ( !m_pImpl->m_aProps.sPersistentName.getLength() )
+        return;
+
+    // embedded objects themself do not support the hidden flag. We implement 
support for
+    // it by changing the STATE to RUNNING only, instead of ACTIVE.
+    bool bOpenHidden = aDocumentArgs.getOrDefault( "Hidden", false );
+    aDocumentArgs.remove( "Hidden" );
+
+       loadEmbeddedObject( xConnection, Sequence< sal_Int8 >(), 
aDocumentArgs.getPropertyValues(), false, !m_bOpenInDesign );
+    OSL_ENSURE( m_xEmbeddedObject.is(), 
"ODocumentDefinition::onCommandOpenSomething: what's this?" );
+       if ( !m_xEmbeddedObject.is() )
+        return;
+
+       Reference< XModel > xModel( getComponent(), UNO_QUERY );
             Reference< report::XReportDefinition > 
xReportDefinition(xModel,UNO_QUERY);
 
-            Reference< XModule> xModule(xModel,UNO_QUERY);
+    Reference< XModule > xModule( xModel, UNO_QUERY );
             if ( xModule.is() )
             {
                 if ( m_bForm )
-                    
xModule->setIdentifier(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.FormDesign")));
+            xModule->setIdentifier( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.FormDesign" ) ) );
                                else if ( !xReportDefinition.is() )
-                    
xModule->setIdentifier(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.TextReportDesign")));
+            xModule->setIdentifier( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.TextReportDesign" ) ) );
 
                 updateDocumentTitle();
             }
@@ -1011,7 +1018,7 @@
                 return;            
             }
 
-            if ( _bActivate )
+    if ( _bActivate && !bOpenHidden )
                        {
                                m_xEmbeddedObject->changeState( 
EmbedStates::ACTIVE );
                 impl_onActivateEmbeddedObject();
@@ -1019,8 +1026,6 @@
 
                        fillReportData();
                        _out_rComponent <<= xModel;
-               }
-       }
 }
 
 // 
-----------------------------------------------------------------------------
@@ -1035,8 +1040,15 @@
            sal_Bool bOpenForMail = aCommand.Name.equalsAscii( "openForMail" );
            if ( bOpen || bOpenInDesign || bOpenForMail )
            {
-            m_bOpenInDesign = bOpenInDesign;
-            onCommandOpenSomething( aCommand.Argument, !bOpenForMail, 
Environment, aRet );
+            bool bActivateObject = true;
+            if ( bOpenForMail )
+            {
+                OSL_ENSURE( false, "ODocumentDefinition::execute: 
'openForMail' should not be used anymore - use the 'Hidden' parameter instead!" 
);
+                bActivateObject = false;
+            }
+
+            m_bOpenInDesign = bOpenInDesign || bOpenForMail;
+            onCommandOpenSomething( aCommand.Argument, bActivateObject, 
Environment, aRet );
         }
            else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"copyTo" ) ) )
            {
@@ -1056,7 +1068,7 @@
                    Reference< XStorage> xStorage(aIni[0],UNO_QUERY);
                    ::rtl::OUString sPersistentName;
                    aIni[1] >>= sPersistentName;
-            loadEmbeddedObject();
+            loadEmbeddedObject( true );
                    Reference<XEmbedPersist> 
xPersist(m_xEmbeddedObject,UNO_QUERY);
                    if ( xPersist.is() )
                    {
@@ -1090,7 +1102,9 @@
                    aIni[0] >>= sURL;
                    onCommandInsert( sURL, Environment );
            }
-           else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"getdocumentinfo" ) ) )
+           else if (   aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"getdocumentinfo" ) )   // compatibility
+                ||  aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"getDocumentInfo" ) )
+                )
            {
                    onCommandGetDocumentProperties( aRet );
            }
@@ -1115,12 +1129,17 @@
                            notifyDataSourceModified();
                    }
         }
-        else if ( aCommand.Name.compareToAscii( "shutdown" ) == 0 )
+        else if (   ( aCommand.Name.compareToAscii( "shutdown" ) == 0 ) // 
compatibility
+                ||  ( aCommand.Name.compareToAscii( "close" ) == 0 )
+                )
         {
-            bool bClose = prepareClose();
-            if ( bClose && m_xEmbeddedObject.is() )
-                m_xEmbeddedObject->changeState(EmbedStates::LOADED);
-            aRet <<= bClose;
+            bool bSuccess = prepareClose();
+            if ( bSuccess && m_xEmbeddedObject.is() )
+            {
+                m_xEmbeddedObject->changeState( EmbedStates::LOADED );
+                bSuccess = m_xEmbeddedObject->getCurrentState() == 
EmbedStates::LOADED;
+            }
+            aRet <<= bSuccess;
         }
            else
                    aRet = 
OContentHelper::execute(aCommand,CommandId,Environment);
@@ -1684,6 +1703,7 @@
                     // don't put _bSuppressMacros and _bReadOnly here - if the 
document was already
                     // loaded, we should not tamper with its settings.
                     // #i88977# / 2008-05-05 / [EMAIL PROTECTED]
+                    // #i86872# / 2008-03-13 / [EMAIL PROTECTED]
 
                        aMediaDesc >>= aArgs;
                        xModel->attachResource( xModel->getURL(), aArgs );
@@ -1847,8 +1867,8 @@
 
     try
     {
-        // suspend the controller. Embedded objects are not allowed to rais
-        // own UI on their own decision, instead, this has always to be 
triggered
+        // suspend the controller. Embedded objects are not allowed to raise
+        // own UI at their own discretion, instead, this has always to be 
triggered
         // by the embedding component. Thus, we do the suspend call here.
         // #i49370# / 2005-06-09 / [EMAIL PROTECTED]
 
@@ -1856,9 +1876,12 @@
         Reference< XController > xController;
         if ( xModel.is() )
             xController = xModel->getCurrentController();
-        OSL_ENSURE( xController.is(), "ODocumentDefinition::prepareClose: no 
controller!" );
+
+        OSL_ENSURE( xController.is() || ( m_xEmbeddedObject->getCurrentState() 
< EmbedStates::ACTIVE ),
+            "ODocumentDefinition::prepareClose: no controller!" );
         if ( !xController.is() )
-            return sal_False;
+            // document has not yet been activated, i.e. has no UI, yet
+            return true;
         
         sal_Bool bCouldSuspend = xController->suspend( sal_True );
         if ( !bCouldSuspend )

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

File [changed]: unodatbr.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.196.16.2&r2=1.196.16.3
Delta lines:  +47 -44
---------------------
--- unodatbr.cxx        2008-04-16 06:51:33+0000        1.196.16.2
+++ unodatbr.cxx        2008-05-09 08:24:18+0000        1.196.16.3
@@ -43,7 +43,6 @@
 #include "dlgsave.hxx"
 #include "HtmlReader.hxx"
 #include "imageprovider.hxx"
-#include "linkeddocuments.hxx"
 #include "listviewitems.hxx"
 #include "QEnumTypes.hxx"
 #include "RtfReader.hxx"
@@ -98,6 +97,7 @@
 #include <com/sun/star/util/XFlushable.hpp>
 #include <com/sun/star/sdb/XDocumentDataSource.hpp>
 #include <com/sun/star/document/MacroExecMode.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
 /** === end UNO includes === **/
 
 #include <comphelper/extract.hxx>
@@ -352,8 +352,9 @@
                Reference< XContainer > 
xDatasourceContainer(m_xDatabaseContext, UNO_QUERY);
                if (xDatasourceContainer.is())
                        xDatasourceContainer->addContainerListener(this);
-               else
+               else {
                        DBG_ERROR("SbaTableQueryBrowser::Construct: the 
DatabaseContext should allow us to be a listener!");
+        }
 
                // the collator for the string compares
                m_xCollator = Reference< XCollator 
>(getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.i18n.Collator")),
 UNO_QUERY);
@@ -766,9 +767,9 @@
                                                
xProp->setPropertyValue(PROPERTY_ALIGN,makeAny(::com::sun::star::awt::TextAlign::LEFT));
                                }
                        }
-                       catch(Exception&)
+            catch( const Exception& )
                        {
-                               OSL_ENSURE(sal_False, 
"SbaTableQueryBrowser::propertyChange: caught an exception!");
+                DBG_UNHANDLED_EXCEPTION();
                        }
                }
 
@@ -814,9 +815,9 @@
                        transferChangedControlProperty(evt.PropertyName, 
evt.NewValue);
                }
        }
-       catch(Exception&)
+    catch( const Exception& )
        {
-               DBG_ERROR("SbaTableQueryBrowser::propertyChange: caught an 
exception!");
+        DBG_UNHANDLED_EXCEPTION();
        }
 }
 
@@ -1139,9 +1140,9 @@
                                {
                                        
feature->second.xDispatcher->addStatusListener( this, feature->second.aURL );
                                }
-                               catch(Exception&)
+                catch( const Exception& )
                                {
-                    OSL_ENSURE( 0, 
"SbaTableQueryBrowser::connectExternalDispatches: caught an exception while 
attaching a status listener!!" );
+                    DBG_UNHANDLED_EXCEPTION();
                                }
                        }
 
@@ -1306,9 +1307,9 @@
                        aReturn <<= aDescriptor.createPropertyValueSequence();
                }
        }
-       catch(const Exception&)
+    catch( const Exception& )
        {
-               OSL_ENSURE(sal_False, "SbaTableQueryBrowser::getSelection: 
caught an exception while retrieving the selection!");
+        DBG_UNHANDLED_EXCEPTION();
        }
 
        return aReturn;
@@ -1592,9 +1593,9 @@
                                {
                                        OSL_ENSURE(sal_False, 
"SbaTableQueryBrowser::GetState: object already disposed!");
                                }
-                               catch(Exception&)
+                catch( const Exception& )
                                {
-                                       OSL_ENSURE(sal_False, 
"SbaTableQueryBrowser::GetState: caught a strange exception!!");
+                    DBG_UNHANDLED_EXCEPTION();
                                }
 
                        }
@@ -1798,9 +1799,9 @@
 
                                                xDispatch->dispatch(aParentUrl, 
aDescriptor.createPropertyValueSequence());
                                        }
-                                       catch(Exception&)
+                    catch( const Exception& )
                                        {
-                                               
DBG_ERROR("SbaTableQueryBrowser::Execute(ID_BROWSER_?): could not dispatch the 
slot (caught an exception)!");
+                        DBG_UNHANDLED_EXCEPTION();
                                        }
                                }
                        }
@@ -2025,9 +2026,9 @@
                                else
                                        OSL_ENSURE(sal_False, 
"SbaTableQueryBrowser::OnExpandEntry: something strange happended!");
                        }
-                       catch(const Exception&)
+            catch( const Exception& )
                        {
-                               OSL_ENSURE(sal_False, "SbaTableQueryBrowser, 
OnExpandEntry: caught an unknown exception while populating the tables!");
+                DBG_UNHANDLED_EXCEPTION();
                        }
                        if (aInfo.isValid())
                                showError(aInfo);
@@ -2089,12 +2090,13 @@
                                        pEntryData->xContainer = xQueryDefs;
                     bSuccess = pEntryData->xContainer.is();
                                }
-                               else
+                               else {
                                        
DBG_ERROR("SbaTableQueryBrowser::ensureEntryObject: no 
XQueryDefinitionsSupplier interface!");
                        }
-                       catch(Exception&)
+                       }
+            catch( const Exception& )
                        {
-                               
DBG_ERROR("SbaTableQueryBrowser::ensureEntryObject: caught an exception while 
retrieving the queries container!");
+                DBG_UNHANDLED_EXCEPTION();
                        }
                    break;
 
@@ -2614,8 +2616,9 @@
                        delete pData;
                        m_pTreeModel->Remove(pDSLoop);
                }
-               else
+               else {
                        DBG_ERROR("SbaTableQueryBrowser::elementRemoved: 
unknown datasource name!");
+        }
 
                // maybe the object which is part of the document data source 
has been removed
                checkDocumentDataSource();
@@ -3268,9 +3271,9 @@
                        }
                }
        }
-       catch(::com::sun::star::uno::Exception&)
+    catch( const Exception& )
        {
-               DBG_ERROR("SbaTableQueryBrowser::implAdministrate: caught an 
exception while creating/executing the dialog!");
+        DBG_UNHANDLED_EXCEPTION();
        }
 }
 
@@ -3468,7 +3471,7 @@
        }
        catch( const Exception& )
        {
-               OSL_ENSURE( sal_False, 
"SbaTableQueryBrowser::implGetQuerySignature: caught an exception!" );
+        DBG_UNHANDLED_EXCEPTION();
        }
 
        return sal_False;

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

File [changed]: TokenWriter.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/TokenWriter.cxx?r1=1.37.4.1&r2=1.37.4.2
Delta lines:  +9 -6
-------------------
--- TokenWriter.cxx     2008-05-07 12:50:20+0000        1.37.4.1
+++ TokenWriter.cxx     2008-05-09 08:24:24+0000        1.37.4.2
@@ -36,6 +36,9 @@
 #ifndef _TOOLS_DEBUG_HXX
 #include <tools/debug.hxx>
 #endif
+#ifndef TOOLS_DIAGNOSE_EX_H
+#include <tools/diagnose_ex.h>
+#endif
 #ifndef DBAUI_RTFREADER_HXX
 #include "RtfReader.hxx"
 #endif
@@ -974,9 +977,9 @@
                                                        aValue = sValue;
                                                }
                                        }
-                                       catch ( Exception& )
+                    catch( const Exception& )
                                        {
-                                               OSL_ENSURE(sal_False, 
"OHTMLImportExport::WriteTables: caught an exception!");
+                        DBG_UNHANDLED_EXCEPTION();
                                        }
                                        
WriteCell(pFormat[i-1],pColWidth[i-1],nHeight,pHorJustify[i-1],aValue,sHTML_tabledata);
                                }

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

File [changed]: UITools.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/UITools.cxx?r1=1.78.4.1&r2=1.78.4.2
Delta lines:  +12 -12
---------------------
--- UITools.cxx 2008-05-05 11:13:37+0000        1.78.4.1
+++ UITools.cxx 2008-05-09 08:24:29+0000        1.78.4.2
@@ -442,9 +442,9 @@
                 aError = e.TargetException;
         }
        }
-       catch(const Exception&)
+    catch( const Exception& )
        {
-        DBG_ERROR( "getDataSourceByName_displayError: caught an unexpected 
exception!" );
+        DBG_UNHANDLED_EXCEPTION();
        }
 
        if ( xDatasource.is() )
@@ -1088,7 +1088,7 @@
                }
                catch( const Exception& )
                {
-                       DBG_ERROR( "::callColumnFormatDialog: caught an 
exception!" );
+            DBG_UNHANDLED_EXCEPTION();
                }
        }
 }
@@ -1925,9 +1925,9 @@
                                
xFormatter->attachNumberFormatsSupplier(xSupplier);
                }
        }
-       catch(Exception&)
+       catch(const Exception&)
        {
-               OSL_ENSURE(0,"Exception catched!");
+        DBG_UNHANDLED_EXCEPTION();
        }
        return xFormatter;
 }

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

File [changed]: singledoccontroller.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/singledoccontroller.cxx?r1=1.27.4.2&r2=1.27.4.3
Delta lines:  +6 -6
-------------------
--- singledoccontroller.cxx     2008-04-23 11:10:11+0000        1.27.4.2
+++ singledoccontroller.cxx     2008-05-09 08:24:33+0000        1.27.4.3
@@ -307,7 +307,7 @@
                }
                catch( const Exception& )
                {
-                       DBG_ERROR( 
"OSingleDocumentController::initializeConnection: caught an exception!" );
+            DBG_UNHANDLED_EXCEPTION();
                }
        }
 

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

File [changed]: RelationController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/relationdesign/RelationController.cxx?r1=1.53.4.1&r2=1.53.4.2
Delta lines:  +11 -8
--------------------
--- RelationController.cxx      2008-05-05 11:13:38+0000        1.53.4.1
+++ RelationController.cxx      2008-05-09 08:24:39+0000        1.53.4.2
@@ -151,6 +151,9 @@
 #ifndef _TOOLS_DEBUG_HXX
 #include <tools/debug.hxx>
 #endif
+#ifndef TOOLS_DIAGNOSE_EX_H
+#include <tools/diagnose_ex.h>
+#endif
 #ifndef _SV_WAITOBJ_HXX
 #include <vcl/waitobj.hxx>
 #endif
@@ -328,9 +331,9 @@
                if(m_vTableData.empty())
                        Execute(ID_BROWSER_ADDTABLE,Sequence<PropertyValue>());
        }
-       catch(Exception&)
+    catch( const Exception& )
        {
-               OSL_ENSURE(sal_False, "ORelationController::initialize: caught 
an exception!");
+        DBG_UNHANDLED_EXCEPTION();
        }
        
 }
@@ -404,9 +407,9 @@
        {
                showError(SQLExceptionInfo(e));
        }
-       catch(Exception&)
+       catch(const Exception&)
        {
-               OSL_ENSURE(0,"Exception catched!");
+        DBG_UNHANDLED_EXCEPTION();
        }       
 }
 // 
-----------------------------------------------------------------------------

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

File [changed]: TableController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/tabledesign/TableController.cxx?r1=1.119.4.1&r2=1.119.4.2
Delta lines:  +30 -30
---------------------
--- TableController.cxx 2008-05-05 12:50:46+0000        1.119.4.1
+++ TableController.cxx 2008-05-09 08:24:44+0000        1.119.4.2
@@ -521,10 +521,10 @@
                aDlg.Execute();
                bError = sal_True;
        }
-       catch(Exception&)
+    catch( const Exception& )
        {
                bError = sal_True;
-               OSL_ENSURE(sal_False, "OTableController::doSaveDoc: table could 
not be inserted (caught a generic exception)!");
+        DBG_UNHANDLED_EXCEPTION();
        }
 
     if ( aInfo.isValid() )
@@ -585,9 +585,9 @@
                                aFieldNames = xCols->getElementNames();
                }
        }
-       catch(Exception&)
+    catch( const Exception& )
        {
-               OSL_ENSURE(sal_False, "OTableController::doEditIndexes: caught 
an exception while retrieving the indexes/columns!");
+        DBG_UNHANDLED_EXCEPTION();
        }
 
        if (!xIndexes.is())
@@ -615,9 +615,9 @@
 
                assignTable();
        }
-       catch(const SQLException&)
+    catch( const Exception& )
        {
-               OSL_ENSURE(sal_False, "OTableController::initialize: caught an 
exception!");
+        DBG_UNHANDLED_EXCEPTION();
        }
        
        try
@@ -637,9 +637,9 @@
                getUndoMgr()->Clear();          // clear all undo redo things
                setModified(sal_False);         // and we are not modified yet
        }
-       catch(const SQLException&)
+    catch( const Exception& )
        {
-               OSL_ENSURE(sal_False, "OTableController::initialize: caught an 
exception!");
+        DBG_UNHANDLED_EXCEPTION();
        }
 }
 // 
-----------------------------------------------------------------------------
@@ -845,13 +845,13 @@
                        }
                }
        }
-       catch(SQLException& e)
+       catch(const SQLException& )
        {
-               showError(SQLExceptionInfo(e));
+        showError( SQLExceptionInfo( ::cppu::getCaughtException() ) );
        }
-       catch(Exception&)
+    catch( const Exception& )
        {
-               OSL_ENSURE(sal_False, "OTableController::appendColumns: caught 
an exception!");
+        DBG_UNHANDLED_EXCEPTION();
        }
 }
 // 
-----------------------------------------------------------------------------
@@ -1264,7 +1264,7 @@
                                                throw;
                                        }
                                }
-                               // exceptions are catched outside
+                               // exceptions are caught outside
                                xNewColumn = NULL;
                                if(xColumns->hasByName(pField->GetName()))
                                        xColumns->getByName(pField->GetName()) 
>>= xColumn;
@@ -1496,9 +1496,9 @@
                    }
            }
     }
-    catch(Exception&)
+    catch( const Exception& )
     {
-        OSL_ENSURE(0,"Exception caught!");
+        DBG_UNHANDLED_EXCEPTION();
     }
 
 }
@@ -1644,9 +1644,9 @@
             sTitle += ::rtl::OUString::valueOf(getCurrentStartNumber());
                }
        }
-       catch(Exception)
+       catch( const Exception& )
        {
-               OSL_ENSURE(0,"Exception catched while setting the title!");
+        DBG_UNHANDLED_EXCEPTION();
        }
     return sTitle;
 }




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

Reply via email to