[Libreoffice-commits] .: Branch 'feature/mork' - connectivity/source scp2/source

David Ostrovsky davido at kemper.freedesktop.org
Wed Jul 25 15:10:30 PDT 2012


 connectivity/source/drivers/mork/MConnection.cxx |   44 ++++++++++++++++++++---
 scp2/source/ooo/file_library_ooo.scp             |   15 +------
 scp2/source/ooo/module_hidden_ooo.scp            |   34 -----------------
 3 files changed, 44 insertions(+), 49 deletions(-)

New commits:
commit 0455098f73efbb26bacbc6b2c15d725932a0ae01
Author: David Ostrovsky <david at ostrovsky.org>
Date:   Thu Jul 26 00:10:06 2012 +0200

    mork driver: scp2 module added
    
    Change-Id: I3ca649a125af7a2533b4353815459179647a8a32

diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index 848ced5..2d1cde8 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -15,6 +15,8 @@
 #include <connectivity/dbexception.hxx>
 #include <connectivity/sqlerror.hxx>
 
+#include "resource/common_res.hrc"
+
 #include <com/sun/star/sdbc/ColumnValue.hpp>
 #include <com/sun/star/sdbc/XRow.hpp>
 #include <com/sun/star/sdbc/TransactionIsolation.hpp>
@@ -67,9 +69,43 @@ void SAL_CALL OConnection::release() throw()
 void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info)  throw(SQLException)
 {
     (void) info; // avoid warnings
-    OSL_TRACE("IN OConnection::construct()" );
+    SAL_INFO("mork", "IN OConnection::construct()" );
     //  open file
     setURL(url);
+    //
+    // Skip 'sdbc:mozab: part of URL
+    //
+    sal_Int32 nLen = url.indexOf(':');
+    nLen = url.indexOf(':',nLen+1);
+    OSL_ENSURE( url.copy( 0, nLen ) == "sdbc:address", "OConnection::construct: invalid start of the URI - should never have survived XDriver::acceptsURL!" );
+
+    ::rtl::OUString aAddrbookURI(url.copy(nLen+1));
+    // Get Scheme
+    nLen = aAddrbookURI.indexOf(':');
+    ::rtl::OUString aAddrbookScheme;
+    ::rtl::OUString sAdditionalInfo;
+    if ( nLen == -1 )
+    {
+        // There isn't any subschema: - but could be just subschema
+        if ( !aAddrbookURI.isEmpty() )
+        {
+            aAddrbookScheme= aAddrbookURI;
+        }
+        else
+        {
+            SAL_WARN("mork", "No subschema given!!!");
+            throwGenericSQLException( STR_URI_SYNTAX_ERROR, *this );
+        }
+    }
+    else
+    {
+        aAddrbookScheme = aAddrbookURI.copy(0, nLen);
+        sAdditionalInfo = aAddrbookURI.copy( nLen + 1 );
+    }
+
+    SAL_INFO("mork", "URI = " << ((OUtoCStr(aAddrbookURI)) ? (OUtoCStr(aAddrbookURI)):("NULL")) );
+    SAL_INFO("mork", "Scheme = " << ((OUtoCStr(aAddrbookScheme)) ?  (OUtoCStr(aAddrbookScheme)):("NULL")) );
+
 }
 // XServiceInfo
 // --------------------------------------------------------------------------------
@@ -94,7 +130,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const ::
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(OConnection_BASE::rBHelper.bDisposed);
 
-    OSL_TRACE("OConnection::prepareStatement( %s )", OUtoCStr( _sSql ) );
+    SAL_INFO("mork", "OConnection::prepareStatement( " << OUtoCStr( _sSql ) << " )");
     return NULL;
 }
 // --------------------------------------------------------------------------------
@@ -102,7 +138,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const ::rtl::
 {
     OSL_UNUSED( _sSql );
     ::dbtools::throwFeatureNotImplementedException( "XConnection::prepareCall", *this );
-    OSL_TRACE("OConnection::prepareCall( %s )", OUtoCStr( _sSql ) );
+    SAL_INFO("mork", "OConnection::prepareCall( " << OUtoCStr( _sSql ) << " )");
     return NULL;
 }
 // --------------------------------------------------------------------------------
@@ -110,7 +146,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const ::rtl::
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     // when you need to transform SQL92 to you driver specific you can do it here
-    OSL_TRACE("OConnection::nativeSQL( %s )", OUtoCStr( _sSql ) );
+    SAL_INFO("OConnection::nativeSQL( %s )", OUtoCStr( _sSql ) );
 
     return _sSql;
 }
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 0594120..58642f0 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -880,26 +880,17 @@ File gid_File_Lib_Mcnttype
   #endif
 End
 
-#if !defined(SYSTEM_MOZILLA) && !defined(WITHOUT_MOZILLA) && !defined(MACOSX)
-                                                                // #i91209#
-STD_LIB_FILE(gid_File_Lib_Mozab,mozab2)
-STD_LIB_FILE(gid_File_Lib_Mozabdrv,mozabdrv)
-
-#else
-
-File gid_File_Lib_Mozbootstrap
+File gid_File_Lib_Mork
     LIB_FILE_BODY;
     Styles = (PACKED);
     Dir = SCP2_OOO_BIN_DIR;
   #ifdef UNX
-    Name = STRING(CONCAT2(libmozbootstrap,UNXSUFFIX));
+    Name = STRING(CONCAT2(libmork,UNXSUFFIX));
   #else
-    Name = "mozbootstrap.dll";
+    Name = "mork.dll";
   #endif
 End
 
-#endif
-
 STD_LIB_FILE(gid_File_Lib_WpftWriter,wpftwriter)
 
 STD_LIB_FILE(gid_File_Lib_T602Filter,t602filter)
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index 8c64871..d6ee0f3 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -375,39 +375,7 @@ Module gid_Module_Root_Files_5
 	gid_File_Lib_Hsqldb_2,
 	gid_File_Lib_Jdbc,
 	gid_File_Lib_Mcnttype,
-	gid_File_Lib_Mozab_2,
-	gid_File_Lib_Mozabdrv,
-	gid_File_Lib_Mozbootstrap,
-	gid_File_Lib_Mysql,
-	gid_File_Lib_Odbc,
-	gid_File_Lib_Officebean,
-	gid_File_Lib_Openssl,
-	gid_File_Lib_Package2,
-	gid_File_Lib_Deployment,
-	gid_File_Lib_DeploymentGui,
-	gid_File_Lib_Expwrap_Uno,
-	gid_File_Lib_Fastsax_Uno,
-	gid_File_Lib_Slideshow,
-	gid_File_Lib_Recentfile,
-	gid_File_Lib_Scriptframe,
-	gid_File_Lib_Sdbc_2,
-	gid_File_Lib_Srtrs1,
-	gid_File_Lib_Bat,
-	gid_File_Lib_Tab,
-	gid_File_Lib_Tab2,
-	gid_File_Lib_Unoxml,
-	gid_File_Lib_Localebe,
-	gid_File_Lib_Migrationoo2,
-	gid_File_Lib_Migrationoo3,
-	gid_File_Lib_Syssh,
-	gid_File_Ucptdoc1,
-	gid_File_Ucpexpand1,
-	gid_File_Lib_Raptor,
-	gid_Unixlink_File_Lib_Raptor,
-	gid_File_Lib_Rasqal,
-	gid_Unixlink_File_Lib_Rasqal,
-	gid_File_Lib_Rdf,
-	gid_Unixlink_File_Lib_Rdf,
+        gid_File_Lib_Mork,
 	gid_File_Lib_Freebl3,
 	gid_File_Lib_Nss3,
 	gid_File_Lib_Nspr,


More information about the Libreoffice-commits mailing list