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; ++ return !m_bValue;
++} ++}
++// ----------------------------------------------------------------------------- ++// -----------------------------------------------------------------------------
++sal_Bool KabConditionConstant::eval(const ::KABC::Addressee &) const ++sal_Bool KabConditionConstant::eval(const ::TDEABC::Addressee &) const
++{ ++{
++ return m_bValue; ++ 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); ++ 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); ++ 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); ++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++// Timestamps should not be compared according to their string value ++// 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); ++ 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); ++ 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(); ++ 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 ++ // We avoid evaluating terms as much as we can
++ if (m_pLeft->isAlwaysTrue() || m_pRight->isAlwaysTrue()) return sal_True; ++ 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(); ++ 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 ++ // We avoid evaluating terms as much as we can
++ if (m_pLeft->isAlwaysFalse() || m_pRight->isAlwaysFalse()) return sal_False; ++ 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 ~KabCondition();
++ virtual sal_Bool isAlwaysTrue() const = 0; ++ virtual sal_Bool isAlwaysTrue() const = 0;
++ virtual sal_Bool isAlwaysFalse() 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 ++class KabConditionConstant : public KabCondition
@ -950,7 +950,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionConstant(const sal_Bool bValue); ++ KabConditionConstant(const sal_Bool bValue);
++ virtual sal_Bool isAlwaysTrue() const; ++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() 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 ++class KabConditionColumn : public KabCondition
@ -958,7 +958,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ protected: ++ protected:
++ sal_Int32 m_nFieldNumber; ++ sal_Int32 m_nFieldNumber;
++ ++
++ TQString value(const ::KABC::Addressee &aAddressee) const; ++ TQString value(const ::TDEABC::Addressee &aAddressee) const;
++ ++
++ public: ++ public:
++ KabConditionColumn( ++ KabConditionColumn(
@ -972,7 +972,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ public: ++ public:
++ KabConditionNull( ++ KabConditionNull(
++ const ::rtl::OUString &sColumnName) throw(::com::sun::star::sdbc::SQLException); ++ 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 ++class KabConditionNotNull : public KabConditionColumn
@ -980,7 +980,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ public: ++ public:
++ KabConditionNotNull( ++ KabConditionNotNull(
++ const ::rtl::OUString &sColumnName) throw(::com::sun::star::sdbc::SQLException); ++ 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 ++class KabConditionCompare : public KabConditionColumn
@ -1000,7 +1000,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionEqual( ++ KabConditionEqual(
++ const ::rtl::OUString &sColumnName, ++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException); ++ 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 ++class KabConditionDifferent : public KabConditionCompare
@ -1009,7 +1009,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionDifferent( ++ KabConditionDifferent(
++ const ::rtl::OUString &sColumnName, ++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException); ++ 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 ++class KabConditionSimilar : public KabConditionCompare
@ -1018,7 +1018,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionSimilar( ++ KabConditionSimilar(
++ const ::rtl::OUString &sColumnName, ++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException); ++ 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 ++class KabConditionBoolean : public KabCondition
@ -1037,7 +1037,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionOr(KabCondition *pLeft, KabCondition *pRight); ++ KabConditionOr(KabCondition *pLeft, KabCondition *pRight);
++ virtual sal_Bool isAlwaysTrue() const; ++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() 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 ++class KabConditionAnd : public KabConditionBoolean
@ -1046,7 +1046,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionAnd(KabCondition *pLeft, KabCondition *pRight); ++ KabConditionAnd(KabCondition *pLeft, KabCondition *pRight);
++ virtual sal_Bool isAlwaysTrue() const; ++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() 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 ); ++ osl_incrementInterlockedCount( &m_refCount );
++ ++
++ // create a TDE address book object ++ // create a TDE address book object
++ m_pAddressBook = KABC::StdAddressBook::self(); ++ m_pAddressBook = TDEABC::StdAddressBook::self();
++ m_pAddressBook->setAutomaticSave(false); ++ m_pAddressBook->setAutomaticSave(false);
++// perharps we should analyze the URL to know whether the addressbook is local, over LDAP, etc... ++// 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 ++// 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; ++ return xTab;
++} ++}
++// ----------------------------------------------------------------------------- ++// -----------------------------------------------------------------------------
++::KABC::AddressBook* KabConnection::getAddressBook() const ++::TDEABC::AddressBook* KabConnection::getAddressBook() const
++{ ++{
++ return m_pAddressBook; ++ return m_pAddressBook;
++} ++}
@ -1437,7 +1437,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++#include <comphelper/broadcasthelper.hxx> ++#include <comphelper/broadcasthelper.hxx>
++#include <cppuhelper/compbase3.hxx> ++#include <cppuhelper/compbase3.hxx>
++ ++
++namespace KABC ++namespace TDEABC
++{ ++{
++ class StdAddressBook; ++ class StdAddressBook;
++ class AddressBook; ++ 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 ++ OWeakRefArray m_aStatements; // vector containing a list of all the Statement objects
++ // for this Connection ++ // 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 ++ KabDriver* m_pDriver; // pointer to the owning driver object
++ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier> ++ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier>
++ m_xCatalog; // needed for the SQL interpreter ++ m_xCatalog; // needed for the SQL interpreter
@ -1529,7 +1529,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ ++
++ // accessors ++ // accessors
++ inline KabDriver* getDriver() const { return m_pDriver;} ++ 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; ++ TQString aQtName;
++ ::rtl::OUString sName; ++ ::rtl::OUString sName;
++ ++
++ aQtName = ::KABC::Addressee::revisionLabel(); ++ aQtName = ::TDEABC::Addressee::revisionLabel();
++ sName = (const sal_Unicode *) aQtName.ucs2(); ++ sName = (const sal_Unicode *) aQtName.ucs2();
++ if (match(columnNamePattern, sName, '\0')) ++ if (match(columnNamePattern, sName, '\0'))
++ { ++ {
@ -2448,8 +2448,8 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ aRows.push_back(aRow); ++ aRows.push_back(aRow);
++ } ++ }
++ ++
++ ::KABC::Field::List aFields = ::KABC::Field::allFields(); ++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ ::KABC::Field::List::iterator aField; ++ ::TDEABC::Field::List::iterator aField;
++ ++
++ for ( aField = aFields.begin(); ++ for ( aField = aFields.begin();
++ aField != aFields.end(); ++ aField != aFields.end();
@ -2550,7 +2550,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ if (table == getAddressBookTableName()) ++ if (table == getAddressBookTableName())
++ { ++ {
++ ODatabaseMetaDataResultSet::ORow aRow( 9 ); ++ ODatabaseMetaDataResultSet::ORow aRow( 9 );
++ TQString aQtName = ::KABC::Addressee::revisionLabel(); ++ TQString aQtName = ::TDEABC::Addressee::revisionLabel();
++ ::rtl::OUString sName = (const sal_Unicode *) aQtName.ucs2(); ++ ::rtl::OUString sName = (const sal_Unicode *) aQtName.ucs2();
++ ++
++ aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); ++ 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 ++// 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) ++ switch (nFieldNumber)
++ { ++ {
++ case KAB_FIELD_REVISION: ++ case KAB_FIELD_REVISION:
++ return aAddressee.revision().toString("yyyy-MM-dd hh:mm:ss"); ++ return aAddressee.revision().toString("yyyy-MM-dd hh:mm:ss");
++ default: ++ default:
++ ::KABC::Field::List aFields = ::KABC::Field::allFields(); ++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ return aFields[nFieldNumber - KAB_DATA_FIELDS]->value(aAddressee); ++ 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; ++ TQString aQtName;
++ ::rtl::OUString aName; ++ ::rtl::OUString aName;
++ ++
++ aQtName = KABC::Addressee::revisionLabel(); ++ aQtName = TDEABC::Addressee::revisionLabel();
++ aName = ::rtl::OUString((const sal_Unicode *) aQtName.ucs2()); ++ aName = ::rtl::OUString((const sal_Unicode *) aQtName.ucs2());
++ if (columnName == aName) ++ if (columnName == aName)
++ return KAB_FIELD_REVISION; ++ return KAB_FIELD_REVISION;
++ ++
++ ::KABC::Field::List aFields = ::KABC::Field::allFields(); ++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ ::KABC::Field::List::iterator aField; ++ ::TDEABC::Field::List::iterator aField;
++ sal_uInt32 nResult; ++ sal_uInt32 nResult;
++ ++
++ for ( aField = aFields.begin(), nResult = KAB_DATA_FIELDS; ++ 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 ++ 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); ++ 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; ++ sal_Int32 result;
++ ++
@ -3797,7 +3797,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ m_aOrders.push_back(pOrder); ++ 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++) ++ 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: ++ public:
++ virtual ~KabOrder(); ++ 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 ++ class KabSimpleOrder : public KabOrder
@ -3868,11 +3868,11 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ sal_Int32 m_nFieldNumber; ++ sal_Int32 m_nFieldNumber;
++ sal_Bool m_bAscending; ++ sal_Bool m_bAscending;
++ ++
++ TQString value(const ::KABC::Addressee &aAddressee) const; ++ TQString value(const ::TDEABC::Addressee &aAddressee) const;
++ public: ++ public:
++ KabSimpleOrder(::rtl::OUString &sColumnName, sal_Bool bAscending); ++ 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 ++ class KabComplexOrder : public KabOrder
@ -3884,7 +3884,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ virtual ~KabComplexOrder(); ++ virtual ~KabComplexOrder();
++ ++
++ void addOrder(KabOrder *pOrder); ++ 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() ++void KabResultSet::allKabAddressees()
++{ ++{
++ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get()); ++ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get());
++ KABC::AddressBook* pAddressBook = pConnection->getAddressBook(); ++ TDEABC::AddressBook* pAddressBook = pConnection->getAddressBook();
++ ++
++ m_aKabAddressees = pAddressBook->allAddressees(); ++ 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) ++void KabResultSet::someKabAddressees(const KabCondition *pCondition)
++{ ++{
++ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get()); ++ 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(); ++ for (iterator = pAddressBook->begin();
++ iterator != pAddressBook->end(); ++ 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 ++ // 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. ++ // 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(), ++ begin = m_aKabAddressees.begin(),
++ end = m_aKabAddressees.end(), ++ end = m_aKabAddressees.end(),
++ iterator; ++ iterator;
@ -4617,7 +4617,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ ++
++ ::rtl::OUString aRet; ++ ::rtl::OUString aRet;
++ sal_Int32 nAddressees = m_aKabAddressees.size(); ++ 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()) ++ 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: ++ protected:
++ ::rtl::Reference< KabCommonStatement > m_xStatement; // the statement that has created this result set ++ ::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 ++ ::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_Int32 m_nRowPos; // the current row within the result set
++ sal_Bool m_bWasNull; // last entry retrieved from this result set was NULL ++ 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) ++::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnName(sal_Int32 column) throw(SQLException, RuntimeException)
++{ ++{
++ sal_uInt32 nFieldNumber = m_aKabFields[column - 1]; ++ sal_uInt32 nFieldNumber = m_aKabFields[column - 1];
++ ::KABC::Field::List aFields = ::KABC::Field::allFields(); ++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ TQString aQtName; ++ TQString aQtName;
++ ++
++ switch (nFieldNumber) ++ switch (nFieldNumber)
++ { ++ {
++ case KAB_FIELD_REVISION: ++ case KAB_FIELD_REVISION:
++ aQtName = KABC::Addressee::revisionLabel(); ++ aQtName = TDEABC::Addressee::revisionLabel();
++ break; ++ break;
++ default: ++ default:
++ aQtName = aFields[nFieldNumber - KAB_DATA_FIELDS]->label(); ++ 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; ++ return !m_bValue;
++} ++}
++// ----------------------------------------------------------------------------- ++// -----------------------------------------------------------------------------
++sal_Bool KabConditionConstant::eval(const ::KABC::Addressee &) const ++sal_Bool KabConditionConstant::eval(const ::TDEABC::Addressee &) const
++{ ++{
++ return m_bValue; ++ 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); ++ 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); ++ 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); ++ TQString aQtName = valueOfKabField(aAddressee, m_nFieldNumber);
++// Timestamps should not be compared according to their string value ++// 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); ++ 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); ++ 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(); ++ 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 ++ // We avoid evaluating terms as much as we can
++ if (m_pLeft->isAlwaysTrue() || m_pRight->isAlwaysTrue()) return sal_True; ++ 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(); ++ 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 ++ // We avoid evaluating terms as much as we can
++ if (m_pLeft->isAlwaysFalse() || m_pRight->isAlwaysFalse()) return sal_False; ++ 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 ~KabCondition();
++ virtual sal_Bool isAlwaysTrue() const = 0; ++ virtual sal_Bool isAlwaysTrue() const = 0;
++ virtual sal_Bool isAlwaysFalse() 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 ++class KabConditionConstant : public KabCondition
@ -950,7 +950,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionConstant(const sal_Bool bValue); ++ KabConditionConstant(const sal_Bool bValue);
++ virtual sal_Bool isAlwaysTrue() const; ++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() 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 ++class KabConditionColumn : public KabCondition
@ -958,7 +958,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ protected: ++ protected:
++ sal_Int32 m_nFieldNumber; ++ sal_Int32 m_nFieldNumber;
++ ++
++ TQString value(const ::KABC::Addressee &aAddressee) const; ++ TQString value(const ::TDEABC::Addressee &aAddressee) const;
++ ++
++ public: ++ public:
++ KabConditionColumn( ++ KabConditionColumn(
@ -972,7 +972,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ public: ++ public:
++ KabConditionNull( ++ KabConditionNull(
++ const ::rtl::OUString &sColumnName) throw(::com::sun::star::sdbc::SQLException); ++ 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 ++class KabConditionNotNull : public KabConditionColumn
@ -980,7 +980,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ public: ++ public:
++ KabConditionNotNull( ++ KabConditionNotNull(
++ const ::rtl::OUString &sColumnName) throw(::com::sun::star::sdbc::SQLException); ++ 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 ++class KabConditionCompare : public KabConditionColumn
@ -1000,7 +1000,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionEqual( ++ KabConditionEqual(
++ const ::rtl::OUString &sColumnName, ++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException); ++ 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 ++class KabConditionDifferent : public KabConditionCompare
@ -1009,7 +1009,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionDifferent( ++ KabConditionDifferent(
++ const ::rtl::OUString &sColumnName, ++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException); ++ 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 ++class KabConditionSimilar : public KabConditionCompare
@ -1018,7 +1018,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionSimilar( ++ KabConditionSimilar(
++ const ::rtl::OUString &sColumnName, ++ const ::rtl::OUString &sColumnName,
++ const ::rtl::OUString &sMatchString) throw(::com::sun::star::sdbc::SQLException); ++ 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 ++class KabConditionBoolean : public KabCondition
@ -1037,7 +1037,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionOr(KabCondition *pLeft, KabCondition *pRight); ++ KabConditionOr(KabCondition *pLeft, KabCondition *pRight);
++ virtual sal_Bool isAlwaysTrue() const; ++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() 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 ++class KabConditionAnd : public KabConditionBoolean
@ -1046,7 +1046,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ KabConditionAnd(KabCondition *pLeft, KabCondition *pRight); ++ KabConditionAnd(KabCondition *pLeft, KabCondition *pRight);
++ virtual sal_Bool isAlwaysTrue() const; ++ virtual sal_Bool isAlwaysTrue() const;
++ virtual sal_Bool isAlwaysFalse() 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 ); ++ osl_incrementInterlockedCount( &m_refCount );
++ ++
++ // create a TDE address book object ++ // create a TDE address book object
++ m_pAddressBook = KABC::StdAddressBook::self(); ++ m_pAddressBook = TDEABC::StdAddressBook::self();
++ m_pAddressBook->setAutomaticSave(false); ++ m_pAddressBook->setAutomaticSave(false);
++// perharps we should analyze the URL to know whether the addressbook is local, over LDAP, etc... ++// 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 ++// 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; ++ return xTab;
++} ++}
++// ----------------------------------------------------------------------------- ++// -----------------------------------------------------------------------------
++::KABC::AddressBook* KabConnection::getAddressBook() const ++::TDEABC::AddressBook* KabConnection::getAddressBook() const
++{ ++{
++ return m_pAddressBook; ++ return m_pAddressBook;
++} ++}
@ -1437,7 +1437,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++#include <comphelper/broadcasthelper.hxx> ++#include <comphelper/broadcasthelper.hxx>
++#include <cppuhelper/compbase3.hxx> ++#include <cppuhelper/compbase3.hxx>
++ ++
++namespace KABC ++namespace TDEABC
++{ ++{
++ class StdAddressBook; ++ class StdAddressBook;
++ class AddressBook; ++ 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 ++ OWeakRefArray m_aStatements; // vector containing a list of all the Statement objects
++ // for this Connection ++ // 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 ++ KabDriver* m_pDriver; // pointer to the owning driver object
++ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier> ++ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier>
++ m_xCatalog; // needed for the SQL interpreter ++ m_xCatalog; // needed for the SQL interpreter
@ -1529,7 +1529,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ ++
++ // accessors ++ // accessors
++ inline KabDriver* getDriver() const { return m_pDriver;} ++ 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; ++ TQString aQtName;
++ ::rtl::OUString sName; ++ ::rtl::OUString sName;
++ ++
++ aQtName = ::KABC::Addressee::revisionLabel(); ++ aQtName = ::TDEABC::Addressee::revisionLabel();
++ sName = (const sal_Unicode *) aQtName.ucs2(); ++ sName = (const sal_Unicode *) aQtName.ucs2();
++ if (match(columnNamePattern, sName, '\0')) ++ if (match(columnNamePattern, sName, '\0'))
++ { ++ {
@ -2448,8 +2448,8 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ aRows.push_back(aRow); ++ aRows.push_back(aRow);
++ } ++ }
++ ++
++ ::KABC::Field::List aFields = ::KABC::Field::allFields(); ++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ ::KABC::Field::List::iterator aField; ++ ::TDEABC::Field::List::iterator aField;
++ ++
++ for ( aField = aFields.begin(); ++ for ( aField = aFields.begin();
++ aField != aFields.end(); ++ aField != aFields.end();
@ -2550,7 +2550,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ if (table == getAddressBookTableName()) ++ if (table == getAddressBookTableName())
++ { ++ {
++ ODatabaseMetaDataResultSet::ORow aRow( 9 ); ++ ODatabaseMetaDataResultSet::ORow aRow( 9 );
++ TQString aQtName = ::KABC::Addressee::revisionLabel(); ++ TQString aQtName = ::TDEABC::Addressee::revisionLabel();
++ ::rtl::OUString sName = (const sal_Unicode *) aQtName.ucs2(); ++ ::rtl::OUString sName = (const sal_Unicode *) aQtName.ucs2();
++ ++
++ aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); ++ 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 ++// 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) ++ switch (nFieldNumber)
++ { ++ {
++ case KAB_FIELD_REVISION: ++ case KAB_FIELD_REVISION:
++ return aAddressee.revision().toString("yyyy-MM-dd hh:mm:ss"); ++ return aAddressee.revision().toString("yyyy-MM-dd hh:mm:ss");
++ default: ++ default:
++ ::KABC::Field::List aFields = ::KABC::Field::allFields(); ++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ return aFields[nFieldNumber - KAB_DATA_FIELDS]->value(aAddressee); ++ 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; ++ TQString aQtName;
++ ::rtl::OUString aName; ++ ::rtl::OUString aName;
++ ++
++ aQtName = KABC::Addressee::revisionLabel(); ++ aQtName = TDEABC::Addressee::revisionLabel();
++ aName = ::rtl::OUString((const sal_Unicode *) aQtName.ucs2()); ++ aName = ::rtl::OUString((const sal_Unicode *) aQtName.ucs2());
++ if (columnName == aName) ++ if (columnName == aName)
++ return KAB_FIELD_REVISION; ++ return KAB_FIELD_REVISION;
++ ++
++ ::KABC::Field::List aFields = ::KABC::Field::allFields(); ++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ ::KABC::Field::List::iterator aField; ++ ::TDEABC::Field::List::iterator aField;
++ sal_uInt32 nResult; ++ sal_uInt32 nResult;
++ ++
++ for ( aField = aFields.begin(), nResult = KAB_DATA_FIELDS; ++ 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 ++ 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); ++ 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; ++ sal_Int32 result;
++ ++
@ -3797,7 +3797,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ m_aOrders.push_back(pOrder); ++ 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++) ++ 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: ++ public:
++ virtual ~KabOrder(); ++ 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 ++ class KabSimpleOrder : public KabOrder
@ -3868,11 +3868,11 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ sal_Int32 m_nFieldNumber; ++ sal_Int32 m_nFieldNumber;
++ sal_Bool m_bAscending; ++ sal_Bool m_bAscending;
++ ++
++ TQString value(const ::KABC::Addressee &aAddressee) const; ++ TQString value(const ::TDEABC::Addressee &aAddressee) const;
++ public: ++ public:
++ KabSimpleOrder(::rtl::OUString &sColumnName, sal_Bool bAscending); ++ 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 ++ class KabComplexOrder : public KabOrder
@ -3884,7 +3884,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ virtual ~KabComplexOrder(); ++ virtual ~KabComplexOrder();
++ ++
++ void addOrder(KabOrder *pOrder); ++ 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() ++void KabResultSet::allKabAddressees()
++{ ++{
++ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get()); ++ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get());
++ KABC::AddressBook* pAddressBook = pConnection->getAddressBook(); ++ TDEABC::AddressBook* pAddressBook = pConnection->getAddressBook();
++ ++
++ m_aKabAddressees = pAddressBook->allAddressees(); ++ 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) ++void KabResultSet::someKabAddressees(const KabCondition *pCondition)
++{ ++{
++ KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get()); ++ 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(); ++ for (iterator = pAddressBook->begin();
++ iterator != pAddressBook->end(); ++ 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 ++ // 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. ++ // 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(), ++ begin = m_aKabAddressees.begin(),
++ end = m_aKabAddressees.end(), ++ end = m_aKabAddressees.end(),
++ iterator; ++ iterator;
@ -4617,7 +4617,7 @@ diff -urN libreoffice-build/patches/dev300/trinity-modules.diff libreoffice-buil
++ ++
++ ::rtl::OUString aRet; ++ ::rtl::OUString aRet;
++ sal_Int32 nAddressees = m_aKabAddressees.size(); ++ 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()) ++ 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: ++ protected:
++ ::rtl::Reference< KabCommonStatement > m_xStatement; // the statement that has created this result set ++ ::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 ++ ::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_Int32 m_nRowPos; // the current row within the result set
++ sal_Bool m_bWasNull; // last entry retrieved from this result set was NULL ++ 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) ++::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnName(sal_Int32 column) throw(SQLException, RuntimeException)
++{ ++{
++ sal_uInt32 nFieldNumber = m_aKabFields[column - 1]; ++ sal_uInt32 nFieldNumber = m_aKabFields[column - 1];
++ ::KABC::Field::List aFields = ::KABC::Field::allFields(); ++ ::TDEABC::Field::List aFields = ::TDEABC::Field::allFields();
++ TQString aQtName; ++ TQString aQtName;
++ ++
++ switch (nFieldNumber) ++ switch (nFieldNumber)
++ { ++ {
++ case KAB_FIELD_REVISION: ++ case KAB_FIELD_REVISION:
++ aQtName = KABC::Addressee::revisionLabel(); ++ aQtName = TDEABC::Addressee::revisionLabel();
++ break; ++ break;
++ default: ++ default:
++ aQtName = aFields[nFieldNumber - KAB_DATA_FIELDS]->label(); ++ aQtName = aFields[nFieldNumber - KAB_DATA_FIELDS]->label();

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