Tag: cws_dev300_odbmacros3
User: fs      
Date: 2008-08-25 09:39:39+0000
Modified:
   dba/dbaccess/source/core/dataaccess/ModelImpl.cxx
   dba/dbaccess/source/core/dataaccess/datasource.cxx
   dba/dbaccess/source/core/dataaccess/documentdefinition.cxx
   dba/dbaccess/source/core/dataaccess/documentdefinition.hxx
   dba/dbaccess/source/filter/xml/dbloader2.cxx
   dba/dbaccess/source/filter/xml/xmlExport.cxx
   dba/dbaccess/source/ui/app/AppController.cxx
   dba/dbaccess/source/ui/app/AppController.hxx
   dba/dbaccess/source/ui/app/AppControllerDnD.cxx
   dba/dbaccess/source/ui/browser/sbagrid.cxx
   dba/dbaccess/source/ui/browser/unodatbr.cxx
   dba/dbaccess/source/ui/dlg/dbwizsetup.cxx
   dba/dbaccess/source/ui/inc/brwctrlr.hxx
   dba/dbaccess/source/ui/misc/dsmeta.cxx
   dba/dbaccess/source/ui/misc/linkeddocuments.cxx
   dba/dbaccess/source/ui/querydesign/QueryDesignView.cxx

Log:
 RESYNC: (1.31-1.32); 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.25.6.10&r2=1.25.6.11
Delta lines:  +4 -3
-------------------
--- ModelImpl.cxx       2008-07-29 08:22:34+0000        1.25.6.10
+++ ModelImpl.cxx       2008-08-25 09:38:22+0000        1.25.6.11
@@ -1123,6 +1123,7 @@
         AsciiPropertyValue( "EscapeDateTime",             makeAny( 
(sal_Bool)sal_True ) ),
         AsciiPropertyValue( "IgnoreCurrency",             makeAny( 
(sal_Bool)sal_False ) ),
         AsciiPropertyValue( "TypeInfoSettings",           makeAny( Sequence< 
Any >()) ),
+        AsciiPropertyValue( "LocalSocket",                makeAny( 
::rtl::OUString() ) ),
 
         AsciiPropertyValue( NULL, Any() )
     };

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

File [changed]: datasource.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/datasource.cxx?r1=1.79.4.4&r2=1.79.4.5
Delta lines:  +56 -82
---------------------
--- datasource.cxx      2008-07-29 08:23:45+0000        1.79.4.4
+++ datasource.cxx      2008-08-25 09:38:27+0000        1.79.4.5
@@ -42,91 +42,41 @@
 #include "SharedConnection.hxx"
 #include "databasedocument.hxx"
 
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
-#include <tools/diagnose_ex.h>
-#endif
-#ifndef _URLOBJ_HXX
-#include <tools/urlobj.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
-#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_SEQSTREAM_HXX
-#include <comphelper/seqstream.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
-#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
-#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
-#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDRIVERACCESS_HPP_
-#include <com/sun/star/sdbc/XDriverAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
-#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDRIVERMANAGER_HPP_
-#include <com/sun/star/sdbc/XDriverManager.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
-#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XINTERACTIONSUPPLYAUTHENTICATION_HPP_
-#include <com/sun/star/ucb/XInteractionSupplyAuthentication.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_AUTHENTICATIONREQUEST_HPP_
-#include <com/sun/star/ucb/AuthenticationRequest.hpp>
-#endif
-#ifndef _COM_SUN_STAR_REFLECTION_XPROXYFACTORY_HPP_
-#include <com/sun/star/reflection/XProxyFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPP_
+/** === begin UNO includes === **/
 #include <com/sun/star/beans/NamedValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCONTAINER_HPP_
-#include <com/sun/star/beans/XPropertyContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
 #include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_
 #include <com/sun/star/beans/PropertyState.hpp>
-#endif
-#ifndef _TYPELIB_TYPEDESCRIPTION_HXX_
-#include <typelib/typedescription.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
-#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _COMPHELPER_INTERACTION_HXX_
-#include <comphelper/interaction.hxx>
-#endif
-#ifndef _COMPHELPER_GUARDING_HXX_
-#include <comphelper/guarding.hxx>
-#endif
-#ifndef UNOTOOLS_INC_SHAREDUNOCOMPONENT_HXX
-#include <unotools/sharedunocomponent.hxx>
-#endif
-#ifndef _RTL_DIGEST_H_
-#include <rtl/digest.h>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_XTRANSACTEDOBJECT_HPP_
-#include <com/sun/star/embed/XTransactedObject.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTSUBSTORAGESUPPLIER_HPP_
+#include <com/sun/star/beans/XPropertyContainer.hpp>
 #include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
-#endif
-
 #include <com/sun/star/document/XEventBroadcaster.hpp>
-#include <com/sun/star/view/XPrintable.hpp>
+#include <com/sun/star/embed/XTransactedObject.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <com/sun/star/sdbc/XDriverAccess.hpp>
+#include <com/sun/star/sdbc/XDriverManager.hpp>
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#include <com/sun/star/ucb/AuthenticationRequest.hpp>
+#include <com/sun/star/ucb/XInteractionSupplyAuthentication.hpp>
 #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/view/XPrintable.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/extract.hxx>
+#include <comphelper/guarding.hxx>
+#include <comphelper/interaction.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/property.hxx>
+#include <comphelper/seqstream.hxx>
+#include <comphelper/sequence.hxx>
+#include <connectivity/dbexception.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <rtl/digest.h>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/urlobj.hxx>
+#include <typelib/typedescription.hxx>
+#include <unotools/confignode.hxx>
+#include <unotools/sharedunocomponent.hxx>
 
 #include <algorithm>
 
@@ -828,6 +778,8 @@
                 m_pImpl->getDefaultDataSourceSettings()
             );
 
+            impl_insertJavaDriverClassPath_nothrow(aDriverInfo);
+
                        if ( m_pImpl->isEmbeddedDatabase() )
                        {
                                sal_Int32 nCount = aDriverInfo.getLength();
@@ -1503,6 +1455,28 @@
     return *const_cast< ODatabaseSource* >( this );
 }
 // 
-----------------------------------------------------------------------------
+void ODatabaseSource::impl_insertJavaDriverClassPath_nothrow(Sequence< 
PropertyValue >& _rDriverInfo)
+{
+    Reference< XPropertySet > xPropertySet( m_pImpl->m_xSettings, 
UNO_QUERY_THROW );
+    ::rtl::OUString sJavaDriverClass;
+    
xPropertySet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClass")))
 >>= sJavaDriverClass;
+    if ( sJavaDriverClass.getLength() )
+    {
+        static const ::rtl::OUString 
s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess/JDBC/DriverClassPaths"));
+        ::utl::OConfigurationTreeRoot aNamesRoot = 
::utl::OConfigurationTreeRoot::createWithServiceFactory(
+            m_pImpl->m_aContext.getLegacyServiceFactory(), s_sNodeName, -1, 
::utl::OConfigurationTreeRoot::CM_READONLY);
+        if ( aNamesRoot.isValid() && aNamesRoot.hasByName( sJavaDriverClass ) )
+        {
+            ::utl::OConfigurationNode aRegisterObj = aNamesRoot.openNode( 
sJavaDriverClass );
+            ::rtl::OUString sURL;
+            OSL_VERIFY( aRegisterObj.getNodeValue( "Path" ) >>= sURL );
+
+            ::comphelper::NamedValueCollection aDriverSettings( _rDriverInfo );
+            aDriverSettings.put( "JavaDriverClassPath", sURL );
+               aDriverSettings >>= _rDriverInfo;
+        }
+    }
+}
 //........................................................................
 }      // namespace dbaccess
 //........................................................................

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.56.6.8&r2=1.56.6.9
Delta lines:  +135 -15
----------------------
--- documentdefinition.cxx      2008-07-23 10:06:01+0000        1.56.6.8
+++ documentdefinition.cxx      2008-08-25 09:38:30+0000        1.56.6.9
@@ -233,6 +233,7 @@
 #ifndef _CPPUHELPER_COMPBASE1_HXX_
 #include <cppuhelper/compbase1.hxx>
 #endif
+#include <cppuhelper/exc_hlp.hxx>
 #ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
 #include <com/sun/star/frame/FrameSearchFlag.hpp>
 #endif
@@ -249,6 +250,8 @@
 #include <com/sun/star/container/XContentEnumerationAccess.hpp>
 #endif
 #include <com/sun/star/io/WrongFormatException.hpp>
+#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
+#include <com/sun/star/sdb/application/DatabaseObject.hpp>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::view;
@@ -274,6 +277,9 @@
 using namespace ::cppu;
 namespace css = ::com::sun::star;
 
+using ::com::sun::star::sdb::application::XDatabaseDocumentUI;
+namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
+
 
 #define DEFAULT_WIDTH  10000
 #define DEFAULT_HEIGHT  7500
@@ -1148,24 +1154,13 @@
                 ||  ( aCommand.Name.compareToAscii( "store" ) == 0 )
                 )
         {
-                   Reference<XEmbedPersist> 
xPersist(m_xEmbeddedObject,UNO_QUERY);
-                   if ( xPersist.is() )
-                   {
-                           xPersist->storeOwn();
-                           notifyDataSourceModified();
-                   }
+            impl_store_throw();
         }
         else if (   ( aCommand.Name.compareToAscii( "shutdown" ) == 0 ) // 
compatibility
                 ||  ( aCommand.Name.compareToAscii( "close" ) == 0 )
                 )
         {
-            bool bSuccess = prepareClose();
-            if ( bSuccess && m_xEmbeddedObject.is() )
-            {
-                m_xEmbeddedObject->changeState( EmbedStates::LOADED );
-                bSuccess = m_xEmbeddedObject->getCurrentState() == 
EmbedStates::LOADED;
-            }
-            aRet <<= bSuccess;
+            aRet <<= impl_close_throw();
                }
            else
         {
@@ -1840,6 +1835,131 @@
        }
        return xComp;
 }
+
+// 
-----------------------------------------------------------------------------
+namespace
+{
+    Reference< XDatabaseDocumentUI > lcl_getDatabaseDocumentUI( 
ODatabaseModelImpl& _rModelImpl )
+    {
+        Reference< XDatabaseDocumentUI > xUI;
+
+        Reference< XModel > xModel( _rModelImpl.getModel_noCreate() );
+        if ( xModel.is() )
+            xUI.set( xModel->getCurrentController(), UNO_QUERY );
+        return xUI;
+    }
+}
+
+// 
-----------------------------------------------------------------------------
+Reference< XComponent > ODocumentDefinition::impl_openUI_nolck_throw( bool 
_bForEditing )
+{
+    ::osl::ClearableMutexGuard aGuard( m_aMutex );
+    if ( !m_pImpl || !m_pImpl->m_pDataSource )
+        throw DisposedException();
+
+    Reference< XDatabaseDocumentUI > xUI( lcl_getDatabaseDocumentUI( 
*m_pImpl->m_pDataSource ) );
+    if ( !xUI.is() )
+    {
+        // no XDatabaseDocumentUI -> just execute the respective command
+        m_bOpenInDesign = _bForEditing;
+        Any aComponent;
+        onCommandOpenSomething( Any(), true, NULL, aComponent, aGuard );
+        Reference< XComponent > xComponent;
+        OSL_VERIFY( aComponent >>= xComponent );
+        return xComponent;
+    }
+
+    Reference< XComponent > xComponent;
+    try
+    {
+        ::rtl::OUString sName( m_pImpl->m_aProps.aTitle );
+        sal_Int32 nObjectType = m_bForm ? DatabaseObject::FORM : 
DatabaseObject::REPORT;
+        aGuard.clear();
+
+        xComponent = xUI->loadComponent(
+            nObjectType, sName, _bForEditing
+        );
+    }
+    catch( RuntimeException& ) { throw; }
+    catch( const Exception& )
+    {
+        throw WrappedTargetException(
+            ::rtl::OUString(), *this, ::cppu::getCaughtException() );
+    }
+    return xComponent;
+}
+
+// 
-----------------------------------------------------------------------------
+void ODocumentDefinition::impl_store_throw()
+{
+    Reference<XEmbedPersist> xPersist( m_xEmbeddedObject, UNO_QUERY );
+    if ( xPersist.is() )
+    {
+        xPersist->storeOwn();
+        notifyDataSourceModified();
+    }
+}
+
+// 
-----------------------------------------------------------------------------
+bool ODocumentDefinition::impl_close_throw()
+{
+    bool bSuccess = prepareClose();
+    if ( bSuccess && m_xEmbeddedObject.is() )
+    {
+        m_xEmbeddedObject->changeState( EmbedStates::LOADED );
+        bSuccess = m_xEmbeddedObject->getCurrentState() == EmbedStates::LOADED;
+    }
+    return bSuccess;
+}
+
+// 
-----------------------------------------------------------------------------
+Reference< XComponent > SAL_CALL ODocumentDefinition::open(  ) throw 
(WrappedTargetException, RuntimeException)
+{
+    return impl_openUI_nolck_throw( false );
+}
+
+// 
-----------------------------------------------------------------------------
+Reference< XComponent > SAL_CALL ODocumentDefinition::openDesign(  ) throw 
(WrappedTargetException, RuntimeException)
+{
+    return impl_openUI_nolck_throw( true );
+}
+
+// 
-----------------------------------------------------------------------------
+void SAL_CALL ODocumentDefinition::store(  ) throw (WrappedTargetException, 
RuntimeException)
+{
+    ::osl::MutexGuard aGuard( m_aMutex );
+    try
+    {
+        impl_store_throw();
+    }
+    catch( RuntimeException& ) { throw; }
+    catch( const Exception& )
+    {
+        throw WrappedTargetException(
+            ::rtl::OUString(), *this, ::cppu::getCaughtException() );
+    }
+}
+
+// 
-----------------------------------------------------------------------------
+::sal_Bool SAL_CALL ODocumentDefinition::close(  ) throw 
(WrappedTargetException, RuntimeException)
+{
+    ::osl::MutexGuard aGuard( m_aMutex );
+
+    sal_Bool bSuccess = sal_False;
+    try
+    {
+        bSuccess = impl_close_throw();
+    }
+    catch( RuntimeException& ) { throw; }
+    catch( const Exception& )
+    {
+        throw WrappedTargetException(
+            ::rtl::OUString(), *this, ::cppu::getCaughtException() );
+    }
+    return bSuccess;
+}
+
+
 // 
-----------------------------------------------------------------------------
 void SAL_CALL ODocumentDefinition::rename( const ::rtl::OUString& _rNewName ) 
throw (SQLException, ElementExistException, RuntimeException)
 {

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

File [changed]: documentdefinition.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/documentdefinition.hxx?r1=1.28.6.3&r2=1.28.6.4
Delta lines:  +32 -8
--------------------
--- documentdefinition.hxx      2008-07-01 07:39:28+0000        1.28.6.3
+++ documentdefinition.hxx      2008-08-25 09:38:33+0000        1.28.6.4
@@ -34,8 +34,8 @@
 #ifndef _CPPUHELPER_PROPSHLP_HXX
 #include <cppuhelper/propshlp.hxx>
 #endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
-#include <cppuhelper/implbase1.hxx>
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
 #endif
 #ifndef DBA_CONTENTHELPER_HXX
 #include "ContentHelper.hxx"
@@ -64,6 +64,7 @@
 #ifndef _COM_SUN_STAR_EMBED_XSTATECHANGELISTENER_HPP_
 #include <com/sun/star/embed/XStateChangeListener.hpp>
 #endif
+#include <com/sun/star/sdb/XSubDocument.hpp>
 
 //........................................................................
 namespace dbaccess
@@ -77,7 +78,8 @@
 //=                                      document
 //==========================================================================
 
-typedef ::cppu::ImplHelper1 <   ::com::sun::star::embed::XComponentSupplier
+typedef ::cppu::ImplHelper2 <   ::com::sun::star::embed::XComponentSupplier
+                            ,   ::com::sun::star::sdb::XSubDocument
                             >   ODocumentDefinition_Base;
 
 class ODocumentDefinition
@@ -126,6 +128,12 @@
        // XComponentSupplier
        virtual ::com::sun::star::uno::Reference< 
::com::sun::star::util::XCloseable > SAL_CALL getComponent(  ) throw 
(::com::sun::star::uno::RuntimeException);
 
+    // XSubDocument
+    virtual ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XComponent > SAL_CALL open(  ) throw 
(::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XComponent > SAL_CALL openDesign(  ) throw 
(::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL store(  ) throw 
(::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL close(  ) throw 
(::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException);
+
 // OPropertySetHelper
        virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
 
@@ -160,6 +168,13 @@
 
     static ::com::sun::star::uno::Sequence< sal_Int8 > 
getDefaultDocumentTypeClassId();
 
+    static ::rtl::OUString GetDocumentServiceFromMediaType( const 
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage
+                                                                               
                        ,const ::rtl::OUString& sEntName 
+                                                                               
                        ,const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _xORB
+                                                    
,::com::sun::star::uno::Sequence< sal_Int8 >& _rClassId
+                                                                               
                        );
+
+private:
     /** does necessary initializations after our embedded object has been 
switched to ACTIVE
         @param _bOpenedInDesignMode
             determines whether the embedded object has been opened for 
designing it or for data display
@@ -181,11 +196,20 @@
     */
     void impl_removeFrameFromDesktop_throw( const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
 
-    static ::rtl::OUString GetDocumentServiceFromMediaType( const 
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage
-                                                                               
                        ,const ::rtl::OUString& sEntName 
-                                                                               
                        ,const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _xORB
-                                                    
,::com::sun::star::uno::Sequence< sal_Int8 >& _rClassId
-                                                                               
                        );
+    /** opens the UI for this sub document
+    */
+    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
+        impl_openUI_nolck_throw( bool _bForEditing );
+
+    /** stores our document, if it's already loaded
+    */
+    void
+        impl_store_throw();
+
+    /** closes our document, if it's open
+    */
+    bool
+        impl_close_throw();
 
 protected:
        // OPropertyArrayUsageHelper

Directory: /dba/dbaccess/source/filter/xml/
===========================================

File [changed]: dbloader2.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/filter/xml/dbloader2.cxx?r1=1.32.28.11&r2=1.32.28.12
Delta lines:  +3 -3
-------------------
--- dbloader2.cxx       2008-07-30 20:47:56+0000        1.32.28.11
+++ dbloader2.cxx       2008-08-25 09:38:37+0000        1.32.28.12
@@ -225,7 +225,7 @@
     ::comphelper::ComponentContext      m_aContext;
        Reference< XFrameLoader >                       m_xMySelf;
        ::rtl::OUString                                         m_sCurrentURL;
-       sal_Int32                                                       
m_nStartWizard;
+       ULONG                                                           
m_nStartWizard;
 
        DECL_LINK( OnStartTableWizard, void* );
 public:

Directory: /dba/dbaccess/source/filter/xml/
===========================================

File [changed]: xmlExport.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/filter/xml/xmlExport.cxx?r1=1.21.14.1&r2=1.21.14.2
Delta lines:  +18 -2
--------------------
--- xmlExport.cxx       2008-07-19 21:03:10+0000        1.21.14.1
+++ xmlExport.cxx       2008-08-25 09:38:40+0000        1.21.14.2
@@ -655,6 +655,22 @@
                         
AddAttribute(XML_NAMESPACE_DB,XML_PORT,::rtl::OUString::valueOf(nPort));
                     if ( sDatabaseName.Len() )
                         
AddAttribute(XML_NAMESPACE_DB,XML_DATABASE_NAME,sDatabaseName);
+
+                    Reference< XPropertySet > xDataSourceSettings;
+                           OSL_VERIFY( xProp->getPropertyValue( 
PROPERTY_SETTINGS ) >>= xDataSourceSettings );
+                    Reference< XPropertyState > xSettingsState( 
xDataSourceSettings, UNO_QUERY );
+                    Reference< XPropertySetInfo > xSettingsInfo;
+                    if ( xDataSourceSettings.is() )
+                        xSettingsInfo = 
xDataSourceSettings->getPropertySetInfo();
+                    static const ::rtl::OUString 
s_sLocalSocket(RTL_CONSTASCII_USTRINGPARAM("LocalSocket"));
+                    if ( xSettingsInfo.is() && 
xSettingsInfo->hasPropertyByName(s_sLocalSocket) )
+                    {
+                        ::rtl::OUString sSocket;
+                        if ( ( 
xDataSourceSettings->getPropertyValue(s_sLocalSocket) >>= sSocket ) && 
sSocket.getLength() )
+                            
AddAttribute(XML_NAMESPACE_DB,XML_LOCAL_SOCKET,sSocket);
+
+                    }
+        
                     SvXMLElementExport aServerDB(*this,XML_NAMESPACE_DB, 
XML_SERVER_DATABASE, sal_True, sal_True);
                 }
             }

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.56.6.10&r2=1.56.6.11
Delta lines:  +57 -39
---------------------
--- AppController.cxx   2008-08-02 11:49:00+0000        1.56.6.10
+++ AppController.cxx   2008-08-25 09:38:45+0000        1.56.6.11
@@ -2093,12 +2093,15 @@
                case E_REPORT:
                        {
                                ::std::auto_ptr<OLinkedDocumentsAccess> aHelper 
= getDocumentsAccess(_eType);
+                if ( aHelper->isConnected() )
+                {
                                Reference< XComponent > xComponent,xDefinition;
                 sal_Int32 nCommandType = -1;
                 const ::rtl::OUString 
sName(getCurrentlySelectedName(nCommandType));
                 xComponent = aHelper->newDocument(_eType == E_FORM ? 
ID_FORM_NEW_TEXT : ID_REPORT_NEW_TEXT,xDefinition,nCommandType,sName);
                                addDocumentListener(xComponent,xDefinition);
                        }
+                       }
                        break;
                case E_QUERY:
                case E_TABLE:
@@ -3089,12 +3092,27 @@
             }
             break;
         } // if ( aFind->second.first.first == _nKind && 
aFind->second.first.second == _eOpenMode )
-    } // while ( aFind != m_aSpecialSubFrames.end() )
+    }
     return bFound;
 }
-
+// 
-----------------------------------------------------------------------------
+void OApplicationController::impl_deActivateSubFrame_throw(const 
::rtl::OUString& _sName,const sal_Int32 _nKind)
+{
+    TFrames aCopy = m_aSpecialSubFrames;
+    TFrames::iterator aFind = aCopy.find(_sName);
+    for(;aFind != aCopy.end();++aFind)
+    {
+        if ( aFind->second.first.first == _nKind )
+        {
+            Reference< XFrame> xFrame(aFind->second.second,UNO_QUERY);
+            if ( xFrame.is() )
+            {
+                ::comphelper::disposeComponent(xFrame);
+            }
+        } // if ( aFind->second.first.first == _nKind && 
aFind->second.first.second == _eOpenMode )
+    }
+}
 //........................................................................
 }      // namespace dbaui
 //........................................................................
 
-

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

File [changed]: AppController.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.hxx?r1=1.27.2.3&r2=1.27.2.4
Delta lines:  +8 -14
--------------------
--- AppController.hxx   2008-07-01 07:39:47+0000        1.27.2.3
+++ AppController.hxx   2008-08-25 09:38:48+0000        1.27.2.4
@@ -137,7 +137,7 @@
                TransferableClipboardListener*
                                                                
m_pClipbordNotifier;            // notifier for changes in the clipboard
                mutable ::rtl::OUString m_sDatabaseName;
-               sal_Int32                               m_nAsyncDrop;
+               ULONG                                   m_nAsyncDrop;
         OAsyncronousLink        m_aControllerConnectedEvent;
         OAsyncronousLink        m_aSelectContainerEvent;
                PreviewMode                             m_ePreviewMode;         
                // the mode of the preview
@@ -160,6 +160,13 @@
             @param  _nKind  the kind of the component
         */
         bool impl_activateSubFrame_throw(const ::rtl::OUString& _sName,const 
sal_Int32 _nKind,const ElementOpenMode _eOpenMode) const;
+
+        /** deactivates the current table or query  frame when existing
+            @param  _sName  the name of the component
+            @param  _nKind  the kind of the component
+        */
+        void impl_deActivateSubFrame_throw(const ::rtl::OUString& _sName,const 
sal_Int32 _nKind);
+
                /** returns the database name
                        @return
                                the database name
@@ -256,19 +263,6 @@
                                                        const ::std::vector< 
::rtl::OUString>& _rList,
                             bool _bConfirm );
 
-               /** deletes multiple elements from the given container
-                       @param  _rxNames
-                               the object container
-                       @param  _rList
-                               The names of the elements to delete
-                       @param  _bConfirm
-                               determines whether the user must confirm the 
deletion
-               */
-        void deleteObjects(    const ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNameContainer>& _rxNames,
-                                                       const ::std::vector< 
::rtl::OUString>& _rList,
-                            bool _bConfirm );
-
-
                /** deletes tables.
                        @param  _rList
                                The list of tables.

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

File [changed]: AppControllerDnD.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerDnD.cxx?r1=1.26.6.3&r2=1.26.6.4
Delta lines:  +9 -11
--------------------
--- AppControllerDnD.cxx        2008-05-09 09:27:05+0000        1.26.6.3
+++ AppControllerDnD.cxx        2008-08-25 09:38:51+0000        1.26.6.4
@@ -286,6 +286,7 @@
                                                                }
                                                        }
                                                }
+                        impl_deActivateSubFrame_throw(sTableName,E_TABLE);
                                        }
                                        catch(SQLContext& e) { aErrorInfo = e; }
                                        catch(SQLWarning& e) { aErrorInfo = e; }
@@ -324,14 +325,9 @@
 // 
-----------------------------------------------------------------------------
 void OApplicationController::deleteObjects( ElementType _eType, const 
::std::vector< ::rtl::OUString>& _rList, bool _bConfirm )
 {
-    deleteObjects( Reference< XNameContainer >( getElements( _eType ), 
UNO_QUERY ), _rList, _bConfirm );
-}
-
-// 
-----------------------------------------------------------------------------
-void OApplicationController::deleteObjects( const Reference< XNameContainer>& 
_rxNames, const ::std::vector< ::rtl::OUString>& _rList, bool _bConfirm )
-{
-       Reference< XHierarchicalNameContainer > xHierarchyName( _rxNames, 
UNO_QUERY );
-       if ( _rxNames.is() )
+    Reference< XNameContainer > xNames( getElements( _eType ), UNO_QUERY );
+       Reference< XHierarchicalNameContainer > xHierarchyName( xNames, 
UNO_QUERY );
+       if ( xNames.is() )
        {
                ByteString sDialogPosition;
                svtools::QueryDeleteResult_Impl eResult = _bConfirm ? 
svtools::QUERYDELETE_YES : svtools::QUERYDELETE_ALL;
@@ -382,7 +378,10 @@
                                        if ( xHierarchyName.is() )
                                                
xHierarchyName->removeByHierarchicalName( *aThisRound );
                                        else
-                                               _rxNames->removeByName( 
*aThisRound );
+                                               xNames->removeByName( 
*aThisRound );
+
+                    if ( _eType == E_QUERY )
+                        impl_deActivateSubFrame_throw(*aThisRound,_eType);
 
                     bSuccess = true;
 
@@ -902,8 +901,7 @@
                        if ( nIndex != -1 )
                        {
                                aList.push_back(sName.copy(sErase.getLength() + 
1));
-                               Reference<XNameContainer> 
xNames(getElements(m_aAsyncDrop.nType), UNO_QUERY);
-                               deleteObjects( xNames, aList, false );
+                               deleteObjects( m_aAsyncDrop.nType, aList, false 
);
                        }
                }
        }

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

File [changed]: sbagrid.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/sbagrid.cxx?r1=1.83.6.2&r2=1.83.6.3
Delta lines:  +5 -13
--------------------
--- sbagrid.cxx 2008-04-15 13:12:06+0000        1.83.6.2
+++ sbagrid.cxx 2008-08-25 09:38:56+0000        1.83.6.3
@@ -939,8 +939,6 @@
        :FmGridControl(_rM,pParent, _pPeer, nBits)
        ,m_pMasterListener(NULL)
        ,m_nAsyncDropEvent(0)
-       ,m_nLastColId((USHORT)-1)
-       ,m_nLastRowId(-1)
        ,m_nCurrentActionColId((USHORT)-1)
        ,m_bActivatingForDrop(sal_False)
 {
@@ -1168,13 +1166,6 @@
 void SbaGridControl::CursorMoved()
 {
        FmGridControl::CursorMoved();
-       if (m_nLastRowId != GetCurRow())
-               RowChanged();
-       if (m_nLastColId != GetCurColumnId())
-               ColChanged();
-
-       m_nLastColId = GetCurColumnId();
-       m_nLastRowId = (sal_uInt16)GetCurRow();
 }
 
 
//---------------------------------------------------------------------------------------
@@ -1194,18 +1185,19 @@
 }
 
 
//---------------------------------------------------------------------------------------
-void SbaGridControl::RowChanged()
+void SbaGridControl::onRowChange()
 {
-       if (m_pMasterListener)
+       if ( m_pMasterListener )
                m_pMasterListener->RowChanged();
 }
 
 
//---------------------------------------------------------------------------------------
-void SbaGridControl::ColChanged()
+void SbaGridControl::onColumnChange()
 {
-       if (m_pMasterListener)
+       if ( m_pMasterListener )
                m_pMasterListener->ColumnChanged();
 }
+
 
//---------------------------------------------------------------------------------------
 void SbaGridControl::BeforeDrop()
 {

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.6.5&r2=1.196.6.6
Delta lines:  +4 -0
-------------------
--- unodatbr.cxx        2008-07-01 07:40:28+0000        1.196.6.5
+++ unodatbr.cxx        2008-08-25 09:39:02+0000        1.196.6.6
@@ -1525,6 +1525,10 @@
 
        switch ( nId )
        {
+        case ID_TREE_ADMINISTRATE:
+                       aReturn.bEnabled = true;
+                       return aReturn;
+
                case ID_BROWSER_CLOSE:
                        // the close button should always be enabled
                        aReturn.bEnabled = !m_bEnableBrowser;

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

File [changed]: dbwizsetup.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/dbwizsetup.cxx?r1=1.34.4.1&r2=1.34.4.2
Delta lines:  +4 -2
-------------------
--- dbwizsetup.cxx      2008-07-23 10:04:21+0000        1.34.4.1
+++ dbwizsetup.cxx      2008-08-25 09:39:08+0000        1.34.4.2
@@ -521,6 +521,7 @@
             { DST_EVOLUTION_GROUPWISE, EVOLUTION_PATH_GROUPWISE },
             { DST_EVOLUTION_LDAP, EVOLUTION_PATH_LDAP },
             { DST_KAB,          KAB_PATH            },
+            { DST_MACAB,        MACAB_PATH          },
             { DST_USERDEFINE1,  USERDEFINED_PATH    },
                    { DST_USERDEFINE2,  USERDEFINED_PATH    },
                    { DST_USERDEFINE3,  USERDEFINED_PATH    },
@@ -591,6 +592,7 @@
        switch ( m_eType )
     {
                case DST_KAB:
+        case DST_MACAB:
         case DST_EVOLUTION:
         case DST_EVOLUTION_GROUPWISE:
         case DST_EVOLUTION_LDAP:

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

File [changed]: brwctrlr.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/brwctrlr.hxx?r1=1.40.6.2&r2=1.40.6.3
Delta lines:  +1 -1
-------------------
--- brwctrlr.hxx        2008-04-15 13:12:54+0000        1.40.6.2
+++ brwctrlr.hxx        2008-08-25 09:39:11+0000        1.40.6.3
@@ -118,7 +118,7 @@
                ::vos::OThread*                 m_pLoadThread;                  
// the thread wherein the form is loaded
                FormControllerImpl*             m_pFormControllerImpl;  // 
implementing the XFormController
 
-               sal_uInt32                              m_nPendingLoadFinished; 
                // the event used to tell ourself that the load is finished
+               ULONG                                   m_nPendingLoadFinished; 
                // the event used to tell ourself that the load is finished
                sal_uInt16                              
m_nFormActionNestingLevel;              // see enter-/leaveFormAction
 
                sal_Bool                                m_bLoadCanceled : 1;    
                // the load was canceled somehow

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

File [changed]: dsmeta.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/dsmeta.cxx?r1=1.7.2.1&r2=1.7.2.2
Delta lines:  +4 -2
-------------------
--- dsmeta.cxx  2008-07-19 21:04:28+0000        1.7.2.1
+++ dsmeta.cxx  2008-08-25 09:39:15+0000        1.7.2.2
@@ -138,6 +138,7 @@
             s_aSupport[ DST_EVOLUTION_GROUPWISE ] = InitAdvanced( 
InitAdvanced::None );
             s_aSupport[ DST_EVOLUTION_LDAP      ] = InitAdvanced( 
InitAdvanced::None );
             s_aSupport[ DST_KAB                 ] = InitAdvanced( 
InitAdvanced::None );
+            s_aSupport[ DST_MACAB               ] = InitAdvanced( 
InitAdvanced::None );
             s_aSupport[ DST_MSACCESS_2007       ] = InitAdvanced( 0, 1, 1, 0, 
1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0 );
             s_aSupport[ DST_EMBEDDED_HSQLDB     ] = InitAdvanced( 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 );
             s_aSupport[ DST_USERDEFINE1         ] = InitAdvanced( 
InitAdvanced::AllButIgnoreCurrency );
@@ -183,6 +184,7 @@
             s_aSupport[ DST_EVOLUTION_GROUPWISE ] = FeatureSupport( AuthNone   
 );
             s_aSupport[ DST_EVOLUTION_LDAP      ] = FeatureSupport( AuthNone   
 );
             s_aSupport[ DST_KAB                 ] = FeatureSupport( AuthNone   
 );
+            s_aSupport[ DST_MACAB               ] = FeatureSupport( AuthNone   
 );
             s_aSupport[ DST_MSACCESS_2007       ] = FeatureSupport( AuthNone   
 );
             s_aSupport[ DST_EMBEDDED_HSQLDB     ] = FeatureSupport( AuthNone   
 );
             s_aSupport[ DST_USERDEFINE1         ] = FeatureSupport( 
AuthUserPwd );

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

File [changed]: linkeddocuments.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/linkeddocuments.cxx?r1=1.27.32.4&r2=1.27.32.5
Delta lines:  +1 -6
-------------------
--- linkeddocuments.cxx 2008-07-01 07:40:45+0000        1.27.32.4
+++ linkeddocuments.cxx 2008-08-25 09:39:19+0000        1.27.32.5
@@ -474,8 +474,7 @@
         {
             Any aAny = ::cppu::getCaughtException();
             com::sun::star::sdbc::SQLException a;
-            if ((aAny >>= a) &&
-                (a.ErrorCode != dbtools::ParameterInteractionCancelled))
+            if ( !(aAny >>= a) || (a.ErrorCode != 
dbtools::ParameterInteractionCancelled) )
             {
                 com::sun::star::sdbc::SQLException aSQLException;
                 aSQLException.Message = e.Message;
@@ -488,10 +487,6 @@
                 String sMessage = 
String(ModuleRes(STR_COULDNOTOPEN_LINKEDDOC));
                 sMessage.SearchAndReplaceAscii("$file$",_rLinkName);
                 aInfo.prepend(sMessage);
-                
-                // sMessage.SearchAndReplaceAscii("$file$",_rLinkName);
-                // ErrorBox aError(m_pDialogParent, WB_OK, sMessage);
-                // aError.Execute();
             }
         }
         if (aInfo.isValid())

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

File [changed]: QueryDesignView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/QueryDesignView.cxx?r1=1.90.32.4&r2=1.90.32.5
Delta lines:  +5 -2
-------------------
--- QueryDesignView.cxx 2008-07-01 07:40:56+0000        1.90.32.4
+++ QueryDesignView.cxx 2008-08-25 09:39:23+0000        1.90.32.5
@@ -312,7 +312,7 @@
                        const ::connectivity::OSQLParseNode* pParseNode = 
pTableRefList->getChild(i);
                        const ::connectivity::OSQLParseNode* pJoinNode = NULL;
 
-                       if ( SQL_ISRULEOR2(pParseNode , 
qualified_join,cross_union) )
+                       if ( SQL_ISRULE( pParseNode, qualified_join ) || 
SQL_ISRULE( pParseNode, joined_table ) || SQL_ISRULE( pParseNode, cross_union ) 
)
                                pJoinNode = pParseNode;
                        else if(        SQL_ISRULE(pParseNode,table_ref)
                                        &&      pParseNode->count() == 4 ) // 
'{' SQL_TOKEN_OJ joined_table '}'
@@ -1923,9 +1923,12 @@
        sal_Bool InsertJoin(const OQueryDesignView* _pView,
                                                const 
::connectivity::OSQLParseNode *pNode)
        {
-               DBG_ASSERT(SQL_ISRULE(pNode, qualified_join) || 
SQL_ISRULE(pNode, cross_union),
+               DBG_ASSERT( SQL_ISRULE( pNode, qualified_join ) || SQL_ISRULE( 
pNode, joined_table ) || SQL_ISRULE( pNode, cross_union ),
                        "OQueryDesignView::InsertJoin: Fehler im Parse Tree");
 
+        if (SQL_ISRULE(pNode,joined_table))
+            return InsertJoin(_pView,pNode->getChild(1));
+
                // first check the left and right side
         const ::connectivity::OSQLParseNode* pRightTableRef = 
pNode->getChild(3); // table_ref
         if ( SQL_ISRULE(pNode, qualified_join) && 
SQL_ISTOKEN(pNode->getChild(1),NATURAL) )




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

Reply via email to