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

Michael Meeks michael at kemper.freedesktop.org
Fri Apr 1 07:56:54 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 c958f45987827e5892db6e669fb02566f414c599
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 5fa7050..5af4a68 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 f59a420..ce07135 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