[Libreoffice-commits] .: Branch 'libreoffice-3-3' - connectivity/source

Michael Meeks mmeeks at kemper.freedesktop.org
Fri Apr 1 08:04:37 PDT 2011


 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx |   13 +++++++------
 connectivity/source/drivers/evoab2/NResultSet.cxx        |    3 ++-
 2 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 2833c4cb4dc6c6def3d3cb3b134f22eda3a87207
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Apr 1 15:55:42 2011 +0100

    fix evolution local addressbook integration, which uses a new local: uri

diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index c6dc8bb..d868b2a 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -1147,19 +1147,20 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
 
         switch (m_pConnection->getSDBCAddressType()) {
         case SDBCAddress::EVO_GWISE:
-                    if (0==strncmp( "groupwise://", p, 11 ))
+                    if ( !strncmp( "groupwise://", p, 11 ))
                         break;
-                    else 
+                    else
                         continue;
         case SDBCAddress::EVO_LOCAL:
-                    if (0==strncmp( "file://", p, 6 ))
+                    if ( !strncmp( "file://", p, 6 ) ||
+                         !strncmp( "local://", p, 6 ) )
                         break;
                     else
                         continue;
-        case SDBCAddress::EVO_LDAP: 
-                    if (0==strncmp( "ldap://", p, 6 ))
+        case SDBCAddress::EVO_LDAP:
+                    if ( !strncmp( "ldap://", p, 6 ))
                         break;
-                    else 
+                    else
                         continue;
         case SDBCAddress::Unknown:
             break;
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 4bea08a..e16e459 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -182,7 +182,8 @@ static bool isLDAP( EBook *pBook )
 
 static bool isLocal( EBook *pBook )
 {
-    return pBook && !strncmp( "file://", e_book_get_uri( pBook ), 6 );
+    return pBook && ( !strncmp( "file://", e_book_get_uri( pBook ), 6 ) ||
+                      !strncmp( "local:", e_book_get_uri( pBook ), 6 ) );
 }
 
 static bool isAuthRequired( EBook *pBook )


More information about the Libreoffice-commits mailing list