Tag: cws_src680_kaddrbook
User: ebischoff
Date: 05/11/22 04:34:12

Modified:
 /dba/connectivity/source/drivers/kab/
  KDatabaseMetaData.cxx, KDatabaseMetaData.hxx, KResultSetMetaData.cxx

Log:
 Putting table name in only one place as recommanded by Frank

File Changes:

Directory: /dba/connectivity/source/drivers/kab/
================================================

File [changed]: KDatabaseMetaData.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KDatabaseMetaData.cxx?r1=1.1.2.7&r2=1.1.2.8
Delta lines:  +9 -7
-------------------
--- KDatabaseMetaData.cxx       11 Oct 2005 15:43:29 -0000      1.1.2.7
+++ KDatabaseMetaData.cxx       22 Nov 2005 12:34:08 -0000      1.1.2.8
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: KDatabaseMetaData.cxx,v $
  *
- *  $Revision: 1.1.2.7 $
+ *  $Revision: 1.1.2.8 $
  *
- *  last change: $Author: ebischoff $ $Date: 2005/10/11 15:43:29 $
+ *  last change: $Author: ebischoff $ $Date: 2005/11/22 12:34:08 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -60,6 +60,7 @@
  ************************************************************************/
 
 #include "KDatabaseMetaData.hxx"
+
 #ifndef _CONNECTIVITY_KAB_FIELDS_HXX_
 #include "kfields.hxx"
 #endif
@@ -87,6 +88,9 @@
 using namespace com::sun::star::beans;
 using namespace com::sun::star::sdbc;
 
+const ::rtl::OUString KabDatabaseMetaData::m_aAddressBookTableName
+       (::rtl::OUString::createFromAscii("KDE Address Book"));
+// -------------------------------------------------------------------------
 KabDatabaseMetaData::KabDatabaseMetaData(KabConnection* _pCon) 
                : m_xConnection(_pCon),
                  m_bUseCatalog(sal_True)
@@ -910,16 +914,15 @@
        pResult->setColumnsMap();
 
        ODatabaseMetaDataResultSet::ORows aRows;
-       static const ::rtl::OUString 
aAddresses(::rtl::OUString::createFromAscii("addresses"));
 
-       if (match(tableNamePattern, aAddresses, '\0'))
+       if (match(tableNamePattern, m_aAddressBookTableName, '\0'))
        {
                ODatabaseMetaDataResultSet::ORow aRow(19);
 
                aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
                aRow[1] = ODatabaseMetaDataResultSet::getEmptyValue();
                aRow[2] = ODatabaseMetaDataResultSet::getEmptyValue();
-               aRow[3] = new ORowSetValueDecorator(aAddresses);
+               aRow[3] = new ORowSetValueDecorator(m_aAddressBookTableName);
                aRow[8] = ODatabaseMetaDataResultSet::getEmptyValue();
                aRow[9] = ODatabaseMetaDataResultSet::get0Value();
                aRow[10] = new ORowSetValueDecorator((sal_Int32) 10);
@@ -1019,7 +1022,6 @@
                return xRef;
 
        static ODatabaseMetaDataResultSet::ORows aRows;
-       static const ::rtl::OUString 
aAddresses(::rtl::OUString::createFromAscii("addresses"));
 
        if (aRows.empty())
        {
@@ -1028,7 +1030,7 @@
                aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
                aRow[1] = ODatabaseMetaDataResultSet::getEmptyValue();
                aRow[2] = ODatabaseMetaDataResultSet::getEmptyValue();
-               aRow[3] = new ORowSetValueDecorator(aAddresses);
+               aRow[3] = new ORowSetValueDecorator(m_aAddressBookTableName);
                aRow[4] = new ORowSetValueDecorator(aTable);
                aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue();
                aRows.push_back(aRow);

File [changed]: KDatabaseMetaData.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KDatabaseMetaData.hxx?r1=1.1.2.2&r2=1.1.2.3
Delta lines:  +6 -4
-------------------
--- KDatabaseMetaData.hxx       2 Sep 2005 15:57:11 -0000       1.1.2.2
+++ KDatabaseMetaData.hxx       22 Nov 2005 12:34:09 -0000      1.1.2.3
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: KDatabaseMetaData.hxx,v $
  *
- *  $Revision: 1.1.2.2 $
+ *  $Revision: 1.1.2.3 $
  *
- *  last change: $Author: ebischoff $ $Date: 2005/09/02 15:57:11 $
+ *  last change: $Author: ebischoff $ $Date: 2005/11/22 12:34:09 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -87,10 +87,12 @@
                {
                        ::com::sun::star::uno::Reference< KabConnection > 
m_xConnection;
                        sal_Bool                m_bUseCatalog;
+                       static const ::rtl::OUString                            
                m_aAddressBookTableName;
 
                public:
 
                        inline KabConnection* getOwnConnection() const { return 
m_xConnection.get(); }
+                       inline static const ::rtl::OUString & 
getAddressBookTableName() { return m_aAddressBookTableName; }
 
                        KabDatabaseMetaData(KabConnection* _pCon);
                        virtual ~KabDatabaseMetaData();

File [changed]: KResultSetMetaData.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KResultSetMetaData.cxx?r1=1.1.2.2&r2=1.1.2.3
Delta lines:  +6 -5
-------------------
--- KResultSetMetaData.cxx      13 Sep 2005 18:20:41 -0000      1.1.2.2
+++ KResultSetMetaData.cxx      22 Nov 2005 12:34:09 -0000      1.1.2.3
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: KResultSetMetaData.cxx,v $
  *
- *  $Revision: 1.1.2.2 $
+ *  $Revision: 1.1.2.3 $
  *
- *  last change: $Author: ebischoff $ $Date: 2005/09/13 18:20:41 $
+ *  last change: $Author: ebischoff $ $Date: 2005/11/22 12:34:09 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -64,6 +64,9 @@
 #ifndef _CONNECTIVITY_KAB_FIELDS_HXX_
 #include "kfields.hxx"
 #endif
+#ifndef _CONNECTIVITY_KAB_DATABASEMETADATA_HXX_
+#include "KDatabaseMetaData.hxx"
+#endif
 
 #ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
 #include <com/sun/star/sdbc/DataType.hpp>
@@ -149,9 +152,7 @@
 // -------------------------------------------------------------------------
 ::rtl::OUString SAL_CALL KabResultSetMetaData::getTableName(sal_Int32 column) 
throw(SQLException, RuntimeException)
 {
-       static const ::rtl::OUString 
aAddresses(::rtl::OUString::createFromAscii("addresses"));
-
-       return aAddresses;
+       return KabDatabaseMetaData::getAddressBookTableName();
 }
 // -------------------------------------------------------------------------
 ::rtl::OUString SAL_CALL KabResultSetMetaData::getCatalogName(sal_Int32 
column) throw(SQLException, RuntimeException)




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

Reply via email to