Rename KABC namespace

r14.0.x
Timothy Pearson 11 years ago
parent c7883621f1
commit ad953094a6

@ -713,7 +713,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ return !m_bValue;
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionConstant::eval(const ::KABC::Addressee &) const
++sal_Bool KabConditionConstant::eval(const ::TDEABC::Addressee &) const
++{
++ return m_bValue;
++}
@ -741,7 +741,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionNull::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionNull::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++
@ -755,7 +755,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionNotNull::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionNotNull::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++
@ -775,7 +775,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionEqual::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionEqual::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++// Timestamps should not be compared according to their string value
@ -794,7 +794,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionDifferent::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionDifferent::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++
@ -809,7 +809,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionSimilar::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionSimilar::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++
@ -847,7 +847,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ return m_pLeft->isAlwaysFalse() && m_pRight->isAlwaysFalse();
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionOr::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionOr::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ // We avoid evaluating terms as much as we can
++ if (m_pLeft->isAlwaysTrue() || m_pRight->isAlwaysTrue()) return sal_True;
@ -874,7 +874,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ return m_pLeft->isAlwaysFalse() || m_pRight->isAlwaysFalse();
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionAnd::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionAnd::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ // We avoid evaluating terms as much as we can
++ if (m_pLeft->isAlwaysFalse() || m_pRight->isAlwaysFalse()) return sal_False;
@ -938,7 +938,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ virtual ~KabCondition();
++ virtual sal_Bool isAlwaysTrue() const = 0;
++ virtual sal_Bool isAlwaysFalse() const = 0;
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const = 0;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const = 0;
++};
++// -----------------------------------------------------------------------------
++class KabConditionConstant : public KabCondition
@ -950,7 +950,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionConstant(const sal_Bool bValue);
++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() const;
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionColumn : public KabCondition
@ -958,7 +958,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ protected:
++ sal_Int32 m_nFieldNumber;
++
++ TQString value(const ::KABC::Addressee &aAddressee) const;
++ TQString value(const ::TDEABC::Addressee &aAddressee) const;
++
++ public:
++ KabConditionColumn(
@ -972,7 +972,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ public:
++ KabConditionNull(
++ const ::rtl::OUString &sColumnName) throw(::com::sun::star::sdbc::SQLException);
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionNotNull : public KabConditionColumn
@ -980,7 +980,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ public:
++ KabConditionNotNull(
++ const ::rtl::OUString &sColumnName) throw(::com::sun::star::sdbc::SQLException);
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionCompare : public KabConditionColumn
@ -1000,7 +1000,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionEqual(
++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException);
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionDifferent : public KabConditionCompare
@ -1009,7 +1009,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionDifferent(
++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException);
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionSimilar : public KabConditionCompare
@ -1018,7 +1018,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionSimilar(
++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException);
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionBoolean : public KabCondition
@ -1037,7 +1037,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionOr(KabCondition *pLeft, KabCondition *pRight);
++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() const;
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionAnd : public KabConditionBoolean
@ -1046,7 +1046,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionAnd(KabCondition *pLeft, KabCondition *pRight);
++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() const;
++ virtual sal_Bool eval(const ::KABC::Addressee &addressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &addressee) const;
++};
++// -----------------------------------------------------------------------------
++ }
@ -1139,7 +1139,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ osl_incrementInterlockedCount( &m_refCount );
++
++ // create a TDE address book object
++ m_pAddressBook = KABC::StdAddressBook::self();
++ m_pAddressBook = TDEABC::StdAddressBook::self();
++ m_pAddressBook->setAutomaticSave(false);
++// perharps we should analyze the URL to know whether the addressbook is local, over LDAP, etc...
++// perharps we should get some user and password information from "info" properties
@ -1377,7 +1377,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ return xTab;
++}
++// -----------------------------------------------------------------------------
++::KABC::AddressBook* KabConnection::getAddressBook() const
++::TDEABC::AddressBook* KabConnection::getAddressBook() const
++{
++ return m_pAddressBook;
++}
@ -1437,7 +1437,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++#include <comphelper/broadcasthelper.hxx>
++#include <cppuhelper/compbase3.hxx>
++
++namespace KABC
++namespace TDEABC
++{
++ class StdAddressBook;
++ class AddressBook;
@ -1475,7 +1475,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ OWeakRefArray m_aStatements; // vector containing a list of all the Statement objects
++ // for this Connection
++
++ ::KABC::StdAddressBook* m_pAddressBook; // the address book
++ ::TDEABC::StdAddressBook* m_pAddressBook; // the address book
++ KabDriver* m_pDriver; // pointer to the owning driver object
++ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier>
++ m_xCatalog; // needed for the SQL interpreter
@ -1529,7 +1529,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++
++ // accessors
++ inline KabDriver* getDriver() const { return m_pDriver;}
++ ::KABC::AddressBook* getAddressBook() const;
++ ::TDEABC::AddressBook* getAddressBook() const;
++ };
++ }
++}
@ -2437,7 +2437,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ TQString aQtName;
++ ::rtl::OUString sName;
++
++ aQtName = ::KABC::Addressee::revisionLabel();
++ aQtName = ::TDEABC::Addressee::revisionLabel();
++ sName = (const sal_Unicode *) aQtName.ucs2();
++ if (match(columnNamePattern, sName, '\0'))
++ {
@ -2448,8 +2448,8 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ aRows.push_back(aRow);
++ }
++
++ ::KABC::Field::List aFields = ::KABC::Field::allFields();
++ ::KABC::Field::List::iterator aField;
++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ ::TDEABC::Field::List::iterator aField;
++
++ for ( aField = aFields.begin();
++ aField != aFields.end();
@ -2550,7 +2550,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ if (table == getAddressBookTableName())
++ {
++ ODatabaseMetaDataResultSet::ORow aRow( 9 );
++ TQString aQtName = ::KABC::Addressee::revisionLabel();
++ TQString aQtName = ::TDEABC::Addressee::revisionLabel();
++ ::rtl::OUString sName = (const sal_Unicode *) aQtName.ucs2();
++
++ aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
@ -3606,14 +3606,14 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ {
++// -----------------------------------------------------------------------------
++// return the value of a TDE address book field, given an addressee and a field number
++TQString valueOfKabField(const ::KABC::Addressee &aAddressee, sal_Int32 nFieldNumber)
++TQString valueOfKabField(const ::TDEABC::Addressee &aAddressee, sal_Int32 nFieldNumber)
++{
++ switch (nFieldNumber)
++ {
++ case KAB_FIELD_REVISION:
++ return aAddressee.revision().toString("yyyy-MM-dd hh:mm:ss");
++ default:
++ ::KABC::Field::List aFields = ::KABC::Field::allFields();
++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ return aFields[nFieldNumber - KAB_DATA_FIELDS]->value(aAddressee);
++ }
++}
@ -3624,13 +3624,13 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ TQString aQtName;
++ ::rtl::OUString aName;
++
++ aQtName = KABC::Addressee::revisionLabel();
++ aQtName = TDEABC::Addressee::revisionLabel();
++ aName = ::rtl::OUString((const sal_Unicode *) aQtName.ucs2());
++ if (columnName == aName)
++ return KAB_FIELD_REVISION;
++
++ ::KABC::Field::List aFields = ::KABC::Field::allFields();
++ ::KABC::Field::List::iterator aField;
++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ ::TDEABC::Field::List::iterator aField;
++ sal_uInt32 nResult;
++
++ for ( aField = aFields.begin(), nResult = KAB_DATA_FIELDS;
@ -3706,7 +3706,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++ namespace kab
++ {
++ TQString valueOfKabField(const ::KABC::Addressee &aAddressee, sal_Int32 nFieldNumber);
++ TQString valueOfKabField(const ::TDEABC::Addressee &aAddressee, sal_Int32 nFieldNumber);
++ sal_uInt32 findKabField(const ::rtl::OUString& columnName) throw(::com::sun::star::sdbc::SQLException);
++ }
++}
@ -3766,7 +3766,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Int32 KabSimpleOrder::compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const
++sal_Int32 KabSimpleOrder::compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const
++{
++ sal_Int32 result;
++
@ -3797,7 +3797,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ m_aOrders.push_back(pOrder);
++}
++// -----------------------------------------------------------------------------
++sal_Int32 KabComplexOrder::compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const
++sal_Int32 KabComplexOrder::compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const
++{
++ for (sal_uInt32 i = 0; i < m_aOrders.size(); i++)
++ {
@ -3860,7 +3860,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ public:
++ virtual ~KabOrder();
++
++ virtual sal_Int32 compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const = 0;
++ virtual sal_Int32 compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const = 0;
++ };
++
++ class KabSimpleOrder : public KabOrder
@ -3868,11 +3868,11 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ sal_Int32 m_nFieldNumber;
++ sal_Bool m_bAscending;
++
++ TQString value(const ::KABC::Addressee &aAddressee) const;
++ TQString value(const ::TDEABC::Addressee &aAddressee) const;
++ public:
++ KabSimpleOrder(::rtl::OUString &sColumnName, sal_Bool bAscending);
++
++ virtual sal_Int32 compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const;
++ virtual sal_Int32 compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const;
++ };
++
++ class KabComplexOrder : public KabOrder
@ -3884,7 +3884,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ virtual ~KabComplexOrder();
++
++ void addOrder(KabOrder *pOrder);
++ virtual sal_Int32 compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const;
++ virtual sal_Int32 compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const;
++ };
++ }
++}
@ -4496,7 +4496,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++void KabResultSet::allKabAddressees()
++{
++ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get());
++ KABC::AddressBook* pAddressBook = pConnection->getAddressBook();
++ TDEABC::AddressBook* pAddressBook = pConnection->getAddressBook();
++
++ m_aKabAddressees = pAddressBook->allAddressees();
++}
@ -4504,9 +4504,9 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++void KabResultSet::someKabAddressees(const KabCondition *pCondition)
++{
++ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get());
++ KABC::AddressBook* pAddressBook = pConnection->getAddressBook();
++ TDEABC::AddressBook* pAddressBook = pConnection->getAddressBook();
++
++ KABC::AddressBook::Iterator iterator;
++ TDEABC::AddressBook::Iterator iterator;
++
++ for (iterator = pAddressBook->begin();
++ iterator != pAddressBook->end();
@ -4523,7 +4523,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ // it uses templates. It would expand to more or less the same code as the one
++ // which follows, but it would need not be called in a much less convenient way.
++
++ KABC::Addressee::List::Iterator
++ TDEABC::Addressee::List::Iterator
++ begin = m_aKabAddressees.begin(),
++ end = m_aKabAddressees.end(),
++ iterator;
@ -4617,7 +4617,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++
++ ::rtl::OUString aRet;
++ sal_Int32 nAddressees = m_aKabAddressees.size();
++ ::KABC::Field::List aFields = ::KABC::Field::allFields();
++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++
++ if (m_nRowPos != -1 && m_nRowPos != nAddressees && m_xMetaData.is())
++ {
@ -5488,7 +5488,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ protected:
++ ::rtl::Reference< KabCommonStatement > m_xStatement; // the statement that has created this result set
++ ::rtl::Reference< KabResultSetMetaData > m_xMetaData; // the description of the columns in this result set
++ ::KABC::Addressee::List m_aKabAddressees; // address book entries matching the query
++ ::TDEABC::Addressee::List m_aKabAddressees; // address book entries matching the query
++ sal_Int32 m_nRowPos; // the current row within the result set
++ sal_Bool m_bWasNull; // last entry retrieved from this result set was NULL
++
@ -5744,13 +5744,13 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnName(sal_Int32 column) throw(SQLException, RuntimeException)
++{
++ sal_uInt32 nFieldNumber = m_aKabFields[column - 1];
++ ::KABC::Field::List aFields = ::KABC::Field::allFields();
++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ TQString aQtName;
++
++ switch (nFieldNumber)
++ {
++ case KAB_FIELD_REVISION:
++ aQtName = KABC::Addressee::revisionLabel();
++ aQtName = TDEABC::Addressee::revisionLabel();
++ break;
++ default:
++ aQtName = aFields[nFieldNumber - KAB_DATA_FIELDS]->label();

@ -713,7 +713,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ return !m_bValue;
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionConstant::eval(const ::KABC::Addressee &) const
++sal_Bool KabConditionConstant::eval(const ::TDEABC::Addressee &) const
++{
++ return m_bValue;
++}
@ -741,7 +741,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionNull::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionNull::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++
@ -755,7 +755,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionNotNull::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionNotNull::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++
@ -775,7 +775,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionEqual::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionEqual::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++// Timestamps should not be compared according to their string value
@ -794,7 +794,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionDifferent::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionDifferent::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++
@ -809,7 +809,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionSimilar::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionSimilar::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++
@ -847,7 +847,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ return m_pLeft->isAlwaysFalse() && m_pRight->isAlwaysFalse();
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionOr::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionOr::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ // We avoid evaluating terms as much as we can
++ if (m_pLeft->isAlwaysTrue() || m_pRight->isAlwaysTrue()) return sal_True;
@ -874,7 +874,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ return m_pLeft->isAlwaysFalse() || m_pRight->isAlwaysFalse();
++}
++// -----------------------------------------------------------------------------
++sal_Bool KabConditionAnd::eval(const ::KABC::Addressee &aAddressee) const
++sal_Bool KabConditionAnd::eval(const ::TDEABC::Addressee &aAddressee) const
++{
++ // We avoid evaluating terms as much as we can
++ if (m_pLeft->isAlwaysFalse() || m_pRight->isAlwaysFalse()) return sal_False;
@ -938,7 +938,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ virtual ~KabCondition();
++ virtual sal_Bool isAlwaysTrue() const = 0;
++ virtual sal_Bool isAlwaysFalse() const = 0;
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const = 0;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const = 0;
++};
++// -----------------------------------------------------------------------------
++class KabConditionConstant : public KabCondition
@ -950,7 +950,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionConstant(const sal_Bool bValue);
++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() const;
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionColumn : public KabCondition
@ -958,7 +958,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ protected:
++ sal_Int32 m_nFieldNumber;
++
++ TQString value(const ::KABC::Addressee &aAddressee) const;
++ TQString value(const ::TDEABC::Addressee &aAddressee) const;
++
++ public:
++ KabConditionColumn(
@ -972,7 +972,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ public:
++ KabConditionNull(
++ const ::rtl::OUString &sColumnName) throw(::com::sun::star::sdbc::SQLException);
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionNotNull : public KabConditionColumn
@ -980,7 +980,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ public:
++ KabConditionNotNull(
++ const ::rtl::OUString &sColumnName) throw(::com::sun::star::sdbc::SQLException);
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionCompare : public KabConditionColumn
@ -1000,7 +1000,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionEqual(
++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException);
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionDifferent : public KabConditionCompare
@ -1009,7 +1009,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionDifferent(
++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException);
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionSimilar : public KabConditionCompare
@ -1018,7 +1018,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionSimilar(
++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException);
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionBoolean : public KabCondition
@ -1037,7 +1037,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionOr(KabCondition *pLeft, KabCondition *pRight);
++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() const;
++ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
++};
++// -----------------------------------------------------------------------------
++class KabConditionAnd : public KabConditionBoolean
@ -1046,7 +1046,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionAnd(KabCondition *pLeft, KabCondition *pRight);
++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() const;
++ virtual sal_Bool eval(const ::KABC::Addressee &addressee) const;
++ virtual sal_Bool eval(const ::TDEABC::Addressee &addressee) const;
++};
++// -----------------------------------------------------------------------------
++ }
@ -1139,7 +1139,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ osl_incrementInterlockedCount( &m_refCount );
++
++ // create a TDE address book object
++ m_pAddressBook = KABC::StdAddressBook::self();
++ m_pAddressBook = TDEABC::StdAddressBook::self();
++ m_pAddressBook->setAutomaticSave(false);
++// perharps we should analyze the URL to know whether the addressbook is local, over LDAP, etc...
++// perharps we should get some user and password information from "info" properties
@ -1377,7 +1377,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ return xTab;
++}
++// -----------------------------------------------------------------------------
++::KABC::AddressBook* KabConnection::getAddressBook() const
++::TDEABC::AddressBook* KabConnection::getAddressBook() const
++{
++ return m_pAddressBook;
++}
@ -1437,7 +1437,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++#include <comphelper/broadcasthelper.hxx>
++#include <cppuhelper/compbase3.hxx>
++
++namespace KABC
++namespace TDEABC
++{
++ class StdAddressBook;
++ class AddressBook;
@ -1475,7 +1475,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ OWeakRefArray m_aStatements; // vector containing a list of all the Statement objects
++ // for this Connection
++
++ ::KABC::StdAddressBook* m_pAddressBook; // the address book
++ ::TDEABC::StdAddressBook* m_pAddressBook; // the address book
++ KabDriver* m_pDriver; // pointer to the owning driver object
++ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier>
++ m_xCatalog; // needed for the SQL interpreter
@ -1529,7 +1529,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++
++ // accessors
++ inline KabDriver* getDriver() const { return m_pDriver;}
++ ::KABC::AddressBook* getAddressBook() const;
++ ::TDEABC::AddressBook* getAddressBook() const;
++ };
++ }
++}
@ -2437,7 +2437,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ TQString aQtName;
++ ::rtl::OUString sName;
++
++ aQtName = ::KABC::Addressee::revisionLabel();
++ aQtName = ::TDEABC::Addressee::revisionLabel();
++ sName = (const sal_Unicode *) aQtName.ucs2();
++ if (match(columnNamePattern, sName, '\0'))
++ {
@ -2448,8 +2448,8 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ aRows.push_back(aRow);
++ }
++
++ ::KABC::Field::List aFields = ::KABC::Field::allFields();
++ ::KABC::Field::List::iterator aField;
++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ ::TDEABC::Field::List::iterator aField;
++
++ for ( aField = aFields.begin();
++ aField != aFields.end();
@ -2550,7 +2550,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ if (table == getAddressBookTableName())
++ {
++ ODatabaseMetaDataResultSet::ORow aRow( 9 );
++ TQString aQtName = ::KABC::Addressee::revisionLabel();
++ TQString aQtName = ::TDEABC::Addressee::revisionLabel();
++ ::rtl::OUString sName = (const sal_Unicode *) aQtName.ucs2();
++
++ aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
@ -3606,14 +3606,14 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ {
++// -----------------------------------------------------------------------------
++// return the value of a TDE address book field, given an addressee and a field number
++TQString valueOfKabField(const ::KABC::Addressee &aAddressee, sal_Int32 nFieldNumber)
++TQString valueOfKabField(const ::TDEABC::Addressee &aAddressee, sal_Int32 nFieldNumber)
++{
++ switch (nFieldNumber)
++ {
++ case KAB_FIELD_REVISION:
++ return aAddressee.revision().toString("yyyy-MM-dd hh:mm:ss");
++ default:
++ ::KABC::Field::List aFields = ::KABC::Field::allFields();
++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ return aFields[nFieldNumber - KAB_DATA_FIELDS]->value(aAddressee);
++ }
++}
@ -3624,13 +3624,13 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ TQString aQtName;
++ ::rtl::OUString aName;
++
++ aQtName = KABC::Addressee::revisionLabel();
++ aQtName = TDEABC::Addressee::revisionLabel();
++ aName = ::rtl::OUString((const sal_Unicode *) aQtName.ucs2());
++ if (columnName == aName)
++ return KAB_FIELD_REVISION;
++
++ ::KABC::Field::List aFields = ::KABC::Field::allFields();
++ ::KABC::Field::List::iterator aField;
++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ ::TDEABC::Field::List::iterator aField;
++ sal_uInt32 nResult;
++
++ for ( aField = aFields.begin(), nResult = KAB_DATA_FIELDS;
@ -3706,7 +3706,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++ namespace kab
++ {
++ TQString valueOfKabField(const ::KABC::Addressee &aAddressee, sal_Int32 nFieldNumber);
++ TQString valueOfKabField(const ::TDEABC::Addressee &aAddressee, sal_Int32 nFieldNumber);
++ sal_uInt32 findKabField(const ::rtl::OUString& columnName) throw(::com::sun::star::sdbc::SQLException);
++ }
++}
@ -3766,7 +3766,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++{
++}
++// -----------------------------------------------------------------------------
++sal_Int32 KabSimpleOrder::compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const
++sal_Int32 KabSimpleOrder::compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const
++{
++ sal_Int32 result;
++
@ -3797,7 +3797,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ m_aOrders.push_back(pOrder);
++}
++// -----------------------------------------------------------------------------
++sal_Int32 KabComplexOrder::compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const
++sal_Int32 KabComplexOrder::compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const
++{
++ for (sal_uInt32 i = 0; i < m_aOrders.size(); i++)
++ {
@ -3860,7 +3860,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ public:
++ virtual ~KabOrder();
++
++ virtual sal_Int32 compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const = 0;
++ virtual sal_Int32 compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const = 0;
++ };
++
++ class KabSimpleOrder : public KabOrder
@ -3868,11 +3868,11 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ sal_Int32 m_nFieldNumber;
++ sal_Bool m_bAscending;
++
++ TQString value(const ::KABC::Addressee &aAddressee) const;
++ TQString value(const ::TDEABC::Addressee &aAddressee) const;
++ public:
++ KabSimpleOrder(::rtl::OUString &sColumnName, sal_Bool bAscending);
++
++ virtual sal_Int32 compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const;
++ virtual sal_Int32 compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const;
++ };
++
++ class KabComplexOrder : public KabOrder
@ -3884,7 +3884,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ virtual ~KabComplexOrder();
++
++ void addOrder(KabOrder *pOrder);
++ virtual sal_Int32 compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const;
++ virtual sal_Int32 compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const;
++ };
++ }
++}
@ -4496,7 +4496,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++void KabResultSet::allKabAddressees()
++{
++ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get());
++ KABC::AddressBook* pAddressBook = pConnection->getAddressBook();
++ TDEABC::AddressBook* pAddressBook = pConnection->getAddressBook();
++
++ m_aKabAddressees = pAddressBook->allAddressees();
++}
@ -4504,9 +4504,9 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++void KabResultSet::someKabAddressees(const KabCondition *pCondition)
++{
++ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get());
++ KABC::AddressBook* pAddressBook = pConnection->getAddressBook();
++ TDEABC::AddressBook* pAddressBook = pConnection->getAddressBook();
++
++ KABC::AddressBook::Iterator iterator;
++ TDEABC::AddressBook::Iterator iterator;
++
++ for (iterator = pAddressBook->begin();
++ iterator != pAddressBook->end();
@ -4523,7 +4523,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ // it uses templates. It would expand to more or less the same code as the one
++ // which follows, but it would need not be called in a much less convenient way.
++
++ KABC::Addressee::List::Iterator
++ TDEABC::Addressee::List::Iterator
++ begin = m_aKabAddressees.begin(),
++ end = m_aKabAddressees.end(),
++ iterator;
@ -4617,7 +4617,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++
++ ::rtl::OUString aRet;
++ sal_Int32 nAddressees = m_aKabAddressees.size();
++ ::KABC::Field::List aFields = ::KABC::Field::allFields();
++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++
++ if (m_nRowPos != -1 && m_nRowPos != nAddressees && m_xMetaData.is())
++ {
@ -5488,7 +5488,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ protected:
++ ::rtl::Reference< KabCommonStatement > m_xStatement; // the statement that has created this result set
++ ::rtl::Reference< KabResultSetMetaData > m_xMetaData; // the description of the columns in this result set
++ ::KABC::Addressee::List m_aKabAddressees; // address book entries matching the query
++ ::TDEABC::Addressee::List m_aKabAddressees; // address book entries matching the query
++ sal_Int32 m_nRowPos; // the current row within the result set
++ sal_Bool m_bWasNull; // last entry retrieved from this result set was NULL
++
@ -5744,13 +5744,13 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnName(sal_Int32 column) throw(SQLException, RuntimeException)
++{
++ sal_uInt32 nFieldNumber = m_aKabFields[column - 1];
++ ::KABC::Field::List aFields = ::KABC::Field::allFields();
++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ TQString aQtName;
++
++ switch (nFieldNumber)
++ {
++ case KAB_FIELD_REVISION:
++ aQtName = KABC::Addressee::revisionLabel();
++ aQtName = TDEABC::Addressee::revisionLabel();
++ break;
++ default:
++ aQtName = aFields[nFieldNumber - KAB_DATA_FIELDS]->label();

@ -779,7 +779,7 @@ index 0000000..26824bf
+ osl_incrementInterlockedCount( &m_refCount );
+
+ // create a TDE address book object
+ m_pAddressBook = KABC::StdAddressBook::self();
+ m_pAddressBook = TDEABC::StdAddressBook::self();
+ m_pAddressBook->setAutomaticSave(false);
+// perharps we should analyze the URL to know whether the addressbook is local, over LDAP, etc...
+// perharps we should get some user and password information from "info" properties
@ -1017,7 +1017,7 @@ index 0000000..26824bf
+ return xTab;
+}
+// -----------------------------------------------------------------------------
+::KABC::AddressBook* KabConnection::getAddressBook() const
+::TDEABC::AddressBook* KabConnection::getAddressBook() const
+{
+ return m_pAddressBook;
+}
@ -1079,7 +1079,7 @@ index 0000000..66b75d4
+#include <comphelper/broadcasthelper.hxx>
+#include <cppuhelper/compbase3.hxx>
+
+namespace KABC
+namespace TDEABC
+{
+ class StdAddressBook;
+ class AddressBook;
@ -1117,7 +1117,7 @@ index 0000000..66b75d4
+ OWeakRefArray m_aStatements; // vector containing a list of all the Statement objects
+ // for this Connection
+
+ ::KABC::StdAddressBook* m_pAddressBook; // the address book
+ ::TDEABC::StdAddressBook* m_pAddressBook; // the address book
+ KabDriver* m_pDriver; // pointer to the owning driver object
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier>
+ m_xCatalog; // needed for the SQL interpreter
@ -1171,7 +1171,7 @@ index 0000000..66b75d4
+
+ // accessors
+ inline KabDriver* getDriver() const { return m_pDriver;}
+ ::KABC::AddressBook* getAddressBook() const;
+ ::TDEABC::AddressBook* getAddressBook() const;
+ };
+ }
+}
@ -2081,7 +2081,7 @@ index 0000000..1bff0ea
+ TQString aQtName;
+ ::rtl::OUString sName;
+
+ aQtName = ::KABC::Addressee::revisionLabel();
+ aQtName = ::TDEABC::Addressee::revisionLabel();
+ sName = (const sal_Unicode *) aQtName.ucs2();
+ if (match(columnNamePattern, sName, '\0'))
+ {
@ -2092,8 +2092,8 @@ index 0000000..1bff0ea
+ aRows.push_back(aRow);
+ }
+
+ ::KABC::Field::List aFields = ::KABC::Field::allFields();
+ ::KABC::Field::List::iterator aField;
+ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
+ ::TDEABC::Field::List::iterator aField;
+
+ for ( aField = aFields.begin();
+ aField != aFields.end();
@ -2194,7 +2194,7 @@ index 0000000..1bff0ea
+ if (table == getAddressBookTableName())
+ {
+ ODatabaseMetaDataResultSet::ORow aRow( 9 );
+ TQString aQtName = ::KABC::Addressee::revisionLabel();
+ TQString aQtName = ::TDEABC::Addressee::revisionLabel();
+ ::rtl::OUString sName = (const sal_Unicode *) aQtName.ucs2();
+
+ aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
@ -3817,7 +3817,7 @@ index 0000000..a0d6b07
+void KabResultSet::allKabAddressees()
+{
+ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get());
+ KABC::AddressBook* pAddressBook = pConnection->getAddressBook();
+ TDEABC::AddressBook* pAddressBook = pConnection->getAddressBook();
+
+ m_aKabAddressees = pAddressBook->allAddressees();
+}
@ -3825,9 +3825,9 @@ index 0000000..a0d6b07
+void KabResultSet::someKabAddressees(const KabCondition *pCondition)
+{
+ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get());
+ KABC::AddressBook* pAddressBook = pConnection->getAddressBook();
+ TDEABC::AddressBook* pAddressBook = pConnection->getAddressBook();
+
+ KABC::AddressBook::Iterator iterator;
+ TDEABC::AddressBook::Iterator iterator;
+
+ for (iterator = pAddressBook->begin();
+ iterator != pAddressBook->end();
@ -3844,7 +3844,7 @@ index 0000000..a0d6b07
+ // it uses templates. It would expand to more or less the same code as the one
+ // which follows, but it would need not be called in a much less convenient way.
+
+ KABC::Addressee::List::Iterator
+ TDEABC::Addressee::List::Iterator
+ begin = m_aKabAddressees.begin(),
+ end = m_aKabAddressees.end(),
+ iterator;
@ -3938,7 +3938,7 @@ index 0000000..a0d6b07
+
+ ::rtl::OUString aRet;
+ sal_Int32 nAddressees = m_aKabAddressees.size();
+ ::KABC::Field::List aFields = ::KABC::Field::allFields();
+ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
+
+ if (m_nRowPos != -1 && m_nRowPos != nAddressees && m_xMetaData.is())
+ {
@ -4811,7 +4811,7 @@ index 0000000..d68f676
+ protected:
+ ::rtl::Reference< KabCommonStatement > m_xStatement; // the statement that has created this result set
+ ::rtl::Reference< KabResultSetMetaData > m_xMetaData; // the description of the columns in this result set
+ ::KABC::Addressee::List m_aKabAddressees; // address book entries matching the query
+ ::TDEABC::Addressee::List m_aKabAddressees; // address book entries matching the query
+ sal_Int32 m_nRowPos; // the current row within the result set
+ sal_Bool m_bWasNull; // last entry retrieved from this result set was NULL
+
@ -5069,13 +5069,13 @@ index 0000000..08dfb05
+::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnName(sal_Int32 column) throw(SQLException, RuntimeException)
+{
+ sal_uInt32 nFieldNumber = m_aKabFields[column - 1];
+ ::KABC::Field::List aFields = ::KABC::Field::allFields();
+ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
+ TQString aQtName;
+
+ switch (nFieldNumber)
+ {
+ case KAB_FIELD_REVISION:
+ aQtName = KABC::Addressee::revisionLabel();
+ aQtName = TDEABC::Addressee::revisionLabel();
+ break;
+ default:
+ aQtName = aFields[nFieldNumber - KAB_DATA_FIELDS]->label();
@ -6871,7 +6871,7 @@ index 0000000..57d2745
+ return !m_bValue;
+}
+// -----------------------------------------------------------------------------
+sal_Bool KabConditionConstant::eval(const ::KABC::Addressee &) const
+sal_Bool KabConditionConstant::eval(const ::TDEABC::Addressee &) const
+{
+ return m_bValue;
+}
@ -6899,7 +6899,7 @@ index 0000000..57d2745
+{
+}
+// -----------------------------------------------------------------------------
+sal_Bool KabConditionNull::eval(const ::KABC::Addressee &aAddressee) const
+sal_Bool KabConditionNull::eval(const ::TDEABC::Addressee &aAddressee) const
+{
+ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
+
@ -6913,7 +6913,7 @@ index 0000000..57d2745
+{
+}
+// -----------------------------------------------------------------------------
+sal_Bool KabConditionNotNull::eval(const ::KABC::Addressee &aAddressee) const
+sal_Bool KabConditionNotNull::eval(const ::TDEABC::Addressee &aAddressee) const
+{
+ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
+
@ -6933,7 +6933,7 @@ index 0000000..57d2745
+{
+}
+// -----------------------------------------------------------------------------
+sal_Bool KabConditionEqual::eval(const ::KABC::Addressee &aAddressee) const
+sal_Bool KabConditionEqual::eval(const ::TDEABC::Addressee &aAddressee) const
+{
+ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
+// Timestamps should not be compared according to their string value
@ -6952,7 +6952,7 @@ index 0000000..57d2745
+{
+}
+// -----------------------------------------------------------------------------
+sal_Bool KabConditionDifferent::eval(const ::KABC::Addressee &aAddressee) const
+sal_Bool KabConditionDifferent::eval(const ::TDEABC::Addressee &aAddressee) const
+{
+ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
+
@ -6967,7 +6967,7 @@ index 0000000..57d2745
+{
+}
+// -----------------------------------------------------------------------------
+sal_Bool KabConditionSimilar::eval(const ::KABC::Addressee &aAddressee) const
+sal_Bool KabConditionSimilar::eval(const ::TDEABC::Addressee &aAddressee) const
+{
+ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
+
@ -7005,7 +7005,7 @@ index 0000000..57d2745
+ return m_pLeft->isAlwaysFalse() && m_pRight->isAlwaysFalse();
+}
+// -----------------------------------------------------------------------------
+sal_Bool KabConditionOr::eval(const ::KABC::Addressee &aAddressee) const
+sal_Bool KabConditionOr::eval(const ::TDEABC::Addressee &aAddressee) const
+{
+ // We avoid evaluating terms as much as we can
+ if (m_pLeft->isAlwaysTrue() || m_pRight->isAlwaysTrue()) return sal_True;
@ -7032,7 +7032,7 @@ index 0000000..57d2745
+ return m_pLeft->isAlwaysFalse() || m_pRight->isAlwaysFalse();
+}
+// -----------------------------------------------------------------------------
+sal_Bool KabConditionAnd::eval(const ::KABC::Addressee &aAddressee) const
+sal_Bool KabConditionAnd::eval(const ::TDEABC::Addressee &aAddressee) const
+{
+ // We avoid evaluating terms as much as we can
+ if (m_pLeft->isAlwaysFalse() || m_pRight->isAlwaysFalse()) return sal_False;
@ -7098,7 +7098,7 @@ index 0000000..a8b729f
+ virtual ~KabCondition();
+ virtual sal_Bool isAlwaysTrue() const = 0;
+ virtual sal_Bool isAlwaysFalse() const = 0;
+ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const = 0;
+ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const = 0;
+};
+// -----------------------------------------------------------------------------
+class KabConditionConstant : public KabCondition
@ -7110,7 +7110,7 @@ index 0000000..a8b729f
+ KabConditionConstant(const sal_Bool bValue);
+ virtual sal_Bool isAlwaysTrue() const;
+ virtual sal_Bool isAlwaysFalse() const;
+ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
+ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
+};
+// -----------------------------------------------------------------------------
+class KabConditionColumn : public KabCondition
@ -7118,7 +7118,7 @@ index 0000000..a8b729f
+ protected:
+ sal_Int32 m_nFieldNumber;
+
+ TQString value(const ::KABC::Addressee &aAddressee) const;
+ TQString value(const ::TDEABC::Addressee &aAddressee) const;
+
+ public:
+ KabConditionColumn(
@ -7132,7 +7132,7 @@ index 0000000..a8b729f
+ public:
+ KabConditionNull(
+ const ::rtl::OUString &sColumnName) throw(::com::sun::star::sdbc::SQLException);
+ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
+ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
+};
+// -----------------------------------------------------------------------------
+class KabConditionNotNull : public KabConditionColumn
@ -7140,7 +7140,7 @@ index 0000000..a8b729f
+ public:
+ KabConditionNotNull(
+ const ::rtl::OUString &sColumnName) throw(::com::sun::star::sdbc::SQLException);
+ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
+ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
+};
+// -----------------------------------------------------------------------------
+class KabConditionCompare : public KabConditionColumn
@ -7160,7 +7160,7 @@ index 0000000..a8b729f
+ KabConditionEqual(
+ const ::rtl::OUString &sColumnName,
+ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException);
+ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
+ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
+};
+// -----------------------------------------------------------------------------
+class KabConditionDifferent : public KabConditionCompare
@ -7169,7 +7169,7 @@ index 0000000..a8b729f
+ KabConditionDifferent(
+ const ::rtl::OUString &sColumnName,
+ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException);
+ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
+ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
+};
+// -----------------------------------------------------------------------------
+class KabConditionSimilar : public KabConditionCompare
@ -7178,7 +7178,7 @@ index 0000000..a8b729f
+ KabConditionSimilar(
+ const ::rtl::OUString &sColumnName,
+ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException);
+ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
+ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
+};
+// -----------------------------------------------------------------------------
+class KabConditionBoolean : public KabCondition
@ -7197,7 +7197,7 @@ index 0000000..a8b729f
+ KabConditionOr(KabCondition *pLeft, KabCondition *pRight);
+ virtual sal_Bool isAlwaysTrue() const;
+ virtual sal_Bool isAlwaysFalse() const;
+ virtual sal_Bool eval(const ::KABC::Addressee &aAddressee) const;
+ virtual sal_Bool eval(const ::TDEABC::Addressee &aAddressee) const;
+};
+// -----------------------------------------------------------------------------
+class KabConditionAnd : public KabConditionBoolean
@ -7206,7 +7206,7 @@ index 0000000..a8b729f
+ KabConditionAnd(KabCondition *pLeft, KabCondition *pRight);
+ virtual sal_Bool isAlwaysTrue() const;
+ virtual sal_Bool isAlwaysFalse() const;
+ virtual sal_Bool eval(const ::KABC::Addressee &addressee) const;
+ virtual sal_Bool eval(const ::TDEABC::Addressee &addressee) const;
+};
+// -----------------------------------------------------------------------------
+ }
@ -7266,14 +7266,14 @@ index 0000000..2d375d7
+ {
+// -----------------------------------------------------------------------------
+// return the value of a TDE address book field, given an addressee and a field number
+TQString valueOfKabField(const ::KABC::Addressee &aAddressee, sal_Int32 nFieldNumber)
+TQString valueOfKabField(const ::TDEABC::Addressee &aAddressee, sal_Int32 nFieldNumber)
+{
+ switch (nFieldNumber)
+ {
+ case KAB_FIELD_REVISION:
+ return aAddressee.revision().toString("yyyy-MM-dd hh:mm:ss");
+ default:
+ ::KABC::Field::List aFields = ::KABC::Field::allFields();
+ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
+ return aFields[nFieldNumber - KAB_DATA_FIELDS]->value(aAddressee);
+ }
+}
@ -7284,13 +7284,13 @@ index 0000000..2d375d7
+ TQString aQtName;
+ ::rtl::OUString aName;
+
+ aQtName = KABC::Addressee::revisionLabel();
+ aQtName = TDEABC::Addressee::revisionLabel();
+ aName = ::rtl::OUString((const sal_Unicode *) aQtName.ucs2());
+ if (columnName == aName)
+ return KAB_FIELD_REVISION;
+
+ ::KABC::Field::List aFields = ::KABC::Field::allFields();
+ ::KABC::Field::List::iterator aField;
+ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
+ ::TDEABC::Field::List::iterator aField;
+ sal_uInt32 nResult;
+
+ for ( aField = aFields.begin(), nResult = KAB_DATA_FIELDS;
@ -7368,7 +7368,7 @@ index 0000000..2c5c63b
+{
+ namespace kab
+ {
+ TQString valueOfKabField(const ::KABC::Addressee &aAddressee, sal_Int32 nFieldNumber);
+ TQString valueOfKabField(const ::TDEABC::Addressee &aAddressee, sal_Int32 nFieldNumber);
+ sal_uInt32 findKabField(const ::rtl::OUString& columnName) throw(::com::sun::star::sdbc::SQLException);
+ }
+}
@ -7430,7 +7430,7 @@ index 0000000..994c41f
+{
+}
+// -----------------------------------------------------------------------------
+sal_Int32 KabSimpleOrder::compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const
+sal_Int32 KabSimpleOrder::compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const
+{
+ sal_Int32 result;
+
@ -7461,7 +7461,7 @@ index 0000000..994c41f
+ m_aOrders.push_back(pOrder);
+}
+// -----------------------------------------------------------------------------
+sal_Int32 KabComplexOrder::compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const
+sal_Int32 KabComplexOrder::compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const
+{
+ for (sal_uInt32 i = 0; i < m_aOrders.size(); i++)
+ {
@ -7526,7 +7526,7 @@ index 0000000..8e62b79
+ public:
+ virtual ~KabOrder();
+
+ virtual sal_Int32 compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const = 0;
+ virtual sal_Int32 compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const = 0;
+ };
+
+ class KabSimpleOrder : public KabOrder
@ -7534,11 +7534,11 @@ index 0000000..8e62b79
+ sal_Int32 m_nFieldNumber;
+ sal_Bool m_bAscending;
+
+ TQString value(const ::KABC::Addressee &aAddressee) const;
+ TQString value(const ::TDEABC::Addressee &aAddressee) const;
+ public:
+ KabSimpleOrder(::rtl::OUString &sColumnName, sal_Bool bAscending);
+
+ virtual sal_Int32 compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const;
+ virtual sal_Int32 compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const;
+ };
+
+ class KabComplexOrder : public KabOrder
@ -7550,7 +7550,7 @@ index 0000000..8e62b79
+ virtual ~KabComplexOrder();
+
+ void addOrder(KabOrder *pOrder);
+ virtual sal_Int32 compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const;
+ virtual sal_Int32 compare(const ::TDEABC::Addressee &aAddressee1, const ::TDEABC::Addressee &aAddressee2) const;
+ };
+ }
+}

Loading…
Cancel
Save