make buildable on RHEL6

f41
Caolán McNamara 12 years ago
parent aca12bba3d
commit 5506cea973

@ -0,0 +1,138 @@
From 343a92f18cb4069acca547d455fcbd9ce42815e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.cz>
Date: Thu, 20 Dec 2012 15:35:29 +0100
Subject: [PATCH] Require icu 4.6 or later with system icu
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: I8c0da25a000e10d65479665a61be054fdb2486a5
Reviewed-on: https://gerrit.libreoffice.org/1453
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: Tomáš Chvátal <tchvatal@suse.cz>
---
config_host.mk.in | 1 -
configure.ac | 11 ++---------
i18npool/CustomTarget_breakiterator.mk | 2 +-
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/config_host.mk.in b/config_host.mk.in
index 4bab5d6..6ffd0fe 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -247,7 +247,6 @@ export ICECREAM_RUN=@ICECREAM_RUN@
export ICU_MAJOR=@ICU_MAJOR@
export ICU_MICRO=@ICU_MICRO@
export ICU_MINOR=@ICU_MINOR@
-export ICU_RECLASSIFIED_CLOSE_PARENTHESIS=@ICU_RECLASSIFIED_CLOSE_PARENTHESIS@
export ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER=@ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER@
export ICU_RECLASSIFIED_HEBREW_LETTER=@ICU_RECLASSIFIED_HEBREW_LETTER@
export ICU_RECLASSIFIED_PREPEND_SET_EMPTY=@ICU_RECLASSIFIED_PREPEND_SET_EMPTY@
diff --git a/configure.ac b/configure.ac
index 064a2e9..b028e39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8109,7 +8109,6 @@ SYSTEM_GENCMN=
ICU_MAJOR=49
ICU_MINOR=1
ICU_MICRO=1
-ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="YES"
ICU_RECLASSIFIED_HEBREW_LETTER="YES"
@@ -8134,10 +8133,10 @@ if test "$with_system_icu" = "yes"; then
ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
ICU_MICRO=`echo $ICU_VERSION | cut -d"." -f3`
- if test "$ICU_MAJOR" -ge "4"; then
+ if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "6" \); then
AC_MSG_RESULT([OK, $ICU_VERSION])
else
- AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])
+ AC_MSG_ERROR([not suitable, only >= 4.6 supported currently])
fi
if test "$cross_compiling" = "yes" -a \( "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" \); then
@@ -8172,11 +8171,6 @@ You can use --with-system-icu-for-build=force to use it anyway.])
if test -z "$SYSTEM_GENCMN"; then
AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
fi
- if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "4" \); then
- ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
- else
- ICU_RECLASSIFIED_CLOSE_PARENTHESIS="NO"
- fi
if test "$ICU_MAJOR" -ge "49"; then
ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
else
@@ -8203,7 +8197,6 @@ AC_SUBST(SYSTEM_GENCMN)
AC_SUBST(ICU_MAJOR)
AC_SUBST(ICU_MINOR)
AC_SUBST(ICU_MICRO)
-AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
AC_SUBST([ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER])
AC_SUBST([ICU_RECLASSIFIED_HEBREW_LETTER])
AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
diff --git a/i18npool/CustomTarget_breakiterator.mk b/i18npool/CustomTarget_breakiterator.mk
index f7df926..f12b94c 100644
--- a/i18npool/CustomTarget_breakiterator.mk
+++ b/i18npool/CustomTarget_breakiterator.mk
@@ -121,7 +121,7 @@ $(i18npool_BIDIR)/%.brk : $(i18npool_BIDIR)/%.txt $(i18npool_GENBRKTARGET)
$(i18npool_BIDIR)/%.txt : \
$(SRCDIR)/i18npool/source/breakiterator/data/%.txt | $(i18npool_BIDIR)/.dir
sed -e ': dummy' \
- $(if $(filter YES,$(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)),-e "s#\[:LineBreak = Close_Punctuation:\]#\[& \[:LineBreak = Close_Parenthesis:\]\]#") \
+ -e "s#\[:LineBreak = Close_Punctuation:\]#\[& \[:LineBreak = Close_Parenthesis:\]\]#" \
$(if $(filter-out YES,$(ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER)),\
-e '/\[:LineBreak = Conditional_Japanese_Starter:\]/d' \
-e 's# $$CJ##' \
--- libreoffice-4.0.0.3/i18nutil/source/utility/unicode.cxx
+++ libreoffice-4.0.0.3/i18nutil/source/utility/unicode.cxx
@@ -494,6 +494,12 @@
case USCRIPT_UNKNOWN:
sRet = "und";
break;
+ case USCRIPT_NABATAEAN: //no language with an assigned code yet
+ sRet = "mis";
+ break;
+ case USCRIPT_PALMYRENE: //no language with an assigned code yet
+ sRet = "mis";
+ break;
case USCRIPT_ARABIC:
sRet = "ar";
break;
@@ -736,6 +742,9 @@
case USCRIPT_LINEAR_A:
sRet = "ecr";
break;
+ case USCRIPT_MANDAIC:
+ sRet = "mic";
+ break;
case USCRIPT_MAYAN_HIEROGLYPHS:
sRet = "myn";
break;
@@ -853,16 +862,6 @@
case USCRIPT_TAI_VIET:
sRet = "blt";
break;
-#if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 4)
- case USCRIPT_NABATAEAN: //no language with an assigned code yet
- sRet = "mis";
- break;
- case USCRIPT_PALMYRENE: //no language with an assigned code yet
- sRet = "mis";
- break;
- case USCRIPT_MANDAIC:
- sRet = "mic";
- break;
case USCRIPT_BAMUM:
sRet = "bax";
break;
@@ -908,7 +907,6 @@
case USCRIPT_WARANG_CITI:
sRet = "hoc";
break;
-#endif
#if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 8)
case USCRIPT_AFAKA:
sRet = "djk";

@ -0,0 +1,30 @@
From 165a53f3a7f08e65055e08ecd4cfc068c5d353b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 8 Feb 2013 11:45:18 +0000
Subject: [PATCH] Resolves: fdo#60132 Error reading file after inserting
comment
Change-Id: Ib2b388c78c8f44a626267c2f8d3975b46ead3bd5
---
xmloff/source/text/txtfldi.cxx | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 4b7dc53..d97281a 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3782,6 +3782,11 @@ void XMLAnnotationImportContext::PrepareField(
while (xFields->hasMoreElements())
{
uno::Reference<beans::XPropertySet> xCurrField(xFields->nextElement(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySetInfo> xPropsInfo(xCurrField->getPropertySetInfo());
+
+ if (!xPropsInfo->hasPropertyByName(sPropertyName))
+ continue;
+
OUString aFieldName;
xCurrField->getPropertyValue(sPropertyName) >>= aFieldName;
if (aFieldName == aName)
--
1.8.1

@ -0,0 +1,975 @@
From e41d94885aeee12b9d00ad52611517901ff3d2c3 Mon Sep 17 00:00:00 2001
From: Caolán McNamara <caolanm@redhat.com>
Date: Thu, 7 Feb 2013 17:18:09 +0000
Subject: [PATCH] make evolution-3.6 work with address book
Change-Id: I04d2a4d7d1520567dd0eb929ffb5d9fa53d35dd4
---
connectivity/source/drivers/evoab2/EApi.cxx | 109 ++---
connectivity/source/drivers/evoab2/EApi.h | 25 ++
.../source/drivers/evoab2/NDatabaseMetaData.cxx | 136 +++++--
connectivity/source/drivers/evoab2/NResultSet.cxx | 441 ++++++++++++++-------
connectivity/source/drivers/evoab2/NResultSet.hxx | 24 +-
.../source/core/api/SingleSelectQueryComposer.cxx | 12 +
6 files changed, 510 insertions(+), 237 deletions(-)
diff --git a/connectivity/source/drivers/evoab2/EApi.cxx b/connectivity/source/drivers/evoab2/EApi.cxx
index 84701e1..608b1f9 100644
--- a/connectivity/source/drivers/evoab2/EApi.cxx
+++ b/connectivity/source/drivers/evoab2/EApi.cxx
@@ -22,6 +22,7 @@
#define DECLARE_FN_POINTERS 1
#include "EApi.h"
static const char *eBookLibNames[] = {
+ "libebook-1.2.so.14", // bumped again (evolution-3.6)
"libebook-1.2.so.13", // bumped again (evolution-3.4)
"libebook-1.2.so.12", // bumped again
"libebook-1.2.so.10", // bumped again
@@ -34,25 +35,23 @@ static const char *eBookLibNames[] = {
typedef void (*SymbolFunc) (void);
#define SYM_MAP(a) { #a, (SymbolFunc *)&a }
- static struct {
+struct ApiMap
+{
const char *sym_name;
SymbolFunc *ref_value;
- } aApiMap[] = {
+};
+
+static ApiMap aCommonApiMap[] =
+{
+ SYM_MAP( eds_check_version ),
SYM_MAP( e_contact_field_name ),
SYM_MAP( e_contact_get ),
SYM_MAP( e_contact_get_type ),
SYM_MAP( e_contact_field_id ),
- SYM_MAP( e_source_peek_name ),
- SYM_MAP( e_source_get_property ),
- SYM_MAP( e_source_list_peek_groups ),
- SYM_MAP( e_source_group_peek_sources ),
SYM_MAP( e_book_new ),
SYM_MAP( e_book_open ),
- SYM_MAP( e_book_get_uri ),
SYM_MAP( e_book_get_source ),
- SYM_MAP( e_book_get_addressbooks ),
SYM_MAP( e_book_get_contacts ),
- SYM_MAP( e_book_authenticate_user ),
SYM_MAP( e_book_query_field_test ),
SYM_MAP( e_book_query_and ),
SYM_MAP( e_book_query_or ),
@@ -61,26 +60,55 @@ typedef void (*SymbolFunc) (void);
SYM_MAP( e_book_query_unref ),
SYM_MAP( e_book_query_from_string ),
SYM_MAP( e_book_query_to_string ),
- SYM_MAP( e_book_query_field_exists ),
- SYM_MAP( e_source_group_peek_base_uri)
- };
+ SYM_MAP( e_book_query_field_exists )
+};
+
+//< 3-6 api
+static ApiMap aOldApiMap[] =
+{
+ SYM_MAP( e_book_get_addressbooks ),
+ SYM_MAP( e_book_get_uri ),
+ SYM_MAP( e_book_authenticate_user ),
+ SYM_MAP( e_source_group_peek_base_uri),
+ SYM_MAP( e_source_peek_name ),
+ SYM_MAP( e_source_get_property ),
+ SYM_MAP( e_source_list_peek_groups ),
+ SYM_MAP( e_source_group_peek_sources )
+};
+
+//>= 3-6 api
+static ApiMap aNewApiMap[] =
+{
+ SYM_MAP( e_source_registry_list_sources ),
+ SYM_MAP( e_source_registry_new_sync ),
+ SYM_MAP( e_source_has_extension ),
+ SYM_MAP( e_source_get_extension ),
+ SYM_MAP( e_source_backend_get_backend_name ),
+ SYM_MAP( e_source_get_display_name ),
+ SYM_MAP( e_source_get_uid ),
+ SYM_MAP( e_source_registry_ref_source),
+ SYM_MAP( e_book_client_new ),
+ SYM_MAP( e_client_open_sync ),
+ SYM_MAP( e_client_get_source ),
+ SYM_MAP( e_book_client_get_contacts_sync ),
+ SYM_MAP( e_client_util_free_object_slist )
+};
#undef SYM_MAP
static bool
-tryLink( oslModule &aModule, const char *pName )
+tryLink( oslModule &aModule, const char *pName, ApiMap *pMap, guint nEntries )
{
- for( guint i = 0; i < G_N_ELEMENTS( aApiMap ); i++ )
+ for (guint i = 0; i < nEntries; ++i)
{
- SymbolFunc aMethod;
- aMethod = (SymbolFunc) osl_getFunctionSymbol
- ( aModule, rtl::OUString::createFromAscii ( aApiMap[ i ].sym_name ).pData );
- if( !aMethod )
- {
- fprintf( stderr, "Warning: missing symbol '%s' in '%s'",
- aApiMap[ i ].sym_name, pName );
- return false;
- }
- * aApiMap[ i ].ref_value = aMethod;
+ SymbolFunc aMethod = (SymbolFunc)osl_getFunctionSymbol
+ (aModule, OUString::createFromAscii ( pMap[ i ].sym_name ).pData);
+ if( !aMethod )
+ {
+ fprintf( stderr, "Warning: missing symbol '%s' in '%s'\n",
+ pMap[ i ].sym_name, pName );
+ return false;
+ }
+ *pMap[ i ].ref_value = aMethod;
}
return true;
}
@@ -96,8 +124,18 @@ bool EApiInit()
SAL_LOADMODULE_DEFAULT );
if( aModule)
{
- if ( tryLink( aModule, eBookLibNames[ j ] ) )
- return true;
+ if (tryLink( aModule, eBookLibNames[ j ], aCommonApiMap, G_N_ELEMENTS(aCommonApiMap)))
+ {
+ if (eds_check_version(3, 6, 0) == NULL)
+ {
+ if (tryLink( aModule, eBookLibNames[ j ], aNewApiMap, G_N_ELEMENTS(aNewApiMap)))
+ return true;
+ }
+ else if (tryLink( aModule, eBookLibNames[ j ], aOldApiMap, G_N_ELEMENTS(aOldApiMap)))
+ {
+ return true;
+ }
+ }
osl_unloadModule( aModule );
}
}
@@ -105,23 +143,4 @@ bool EApiInit()
return false;
}
-#if 0
-// hjs: SOLARDEF does no longer exist please lookup the required
-// defines in a regular compile line
-/*
- * Test code - enable &
- *
- * Compile with ( after source LinuxIntelEnv.Set.sh )
- gcc $SOLARDEF -I $SOLARVER/$UPD/$INPATH/inc \
- -I. `pkg-config --cflags --libs gobject-2.0` \
- -L $SOLARVER/$UPD/$INPATH/lib -luno_sal -lstdc++ EApi.cxx
- */
-
-int main( int argc, char **argv)
-{
- return EApiInit();
-}
-
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab2/EApi.h b/connectivity/source/drivers/evoab2/EApi.h
index bf3a901..8d188a9 100644
--- a/connectivity/source/drivers/evoab2/EApi.h
+++ b/connectivity/source/drivers/evoab2/EApi.h
@@ -130,6 +130,31 @@ typedef struct {
char *code;
char *country;
} EContactAddress;
+
+#define E_SOURCE_EXTENSION_ADDRESS_BOOK "Address Book"
+typedef void ESourceRegistry;
+typedef void GCancellable;
+typedef void ESourceBackend;
+typedef void EClient;
+typedef EClient EBookClient;
+EAPI_EXTERN ESourceRegistry* (*e_source_registry_new_sync) (GCancellable *cancellable, GError **error);
+EAPI_EXTERN GList* (*e_source_registry_list_sources) (ESourceRegistry *registry, const gchar *extension_name);
+EAPI_EXTERN gboolean (*e_source_has_extension) (ESource *source, const gchar *extension_name);
+EAPI_EXTERN gpointer (*e_source_get_extension) (ESource *source, const gchar *extension_name);
+EAPI_EXTERN const gchar* (*e_source_backend_get_backend_name) (ESourceBackend *extension);
+EAPI_EXTERN const gchar* (*e_source_get_display_name) (ESource *source);
+EAPI_EXTERN const gchar* (*eds_check_version) (guint required_major, guint required_minor, guint required_micro);
+EAPI_EXTERN const gchar* (*e_source_get_uid) (ESource *source);
+EAPI_EXTERN ESource* (*e_source_registry_ref_source) (ESourceRegistry *registry, const gchar *uid);
+EAPI_EXTERN EBookClient* (*e_book_client_new) (ESource *source, GError **error);
+EAPI_EXTERN gboolean (*e_client_open_sync) (EClient *client, gboolean only_if_exists, GCancellable *cancellable, GError **error);
+EAPI_EXTERN ESource* (*e_client_get_source) (EClient *client);
+EAPI_EXTERN gboolean (*e_book_client_get_contacts_sync) (EBookClient *client, const gchar *sexp, GSList **contacts, GCancellable *cancellable, GError **error);
+EAPI_EXTERN void (*e_client_util_free_object_slist) (GSList *objects);
+
+ESourceRegistry *get_e_source_registry();
+bool isSourceBackend(ESource *pSource, const char *backendname);
+
G_END_DECLS
#endif
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index d0198e5..a83de24 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -1074,7 +1074,25 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns(
pResultSet->setRows( getColumnRows( columnNamePattern ) );
return xResultSet;
}
+
+ESourceRegistry *get_e_source_registry()
+{
+ static ESourceRegistry *theInstance;
+ if (!theInstance)
+ theInstance = e_source_registry_new_sync(NULL, NULL);
+ return theInstance;
+}
+
// -------------------------------------------------------------------------
+bool isSourceBackend(ESource *pSource, const char *backendname)
+{
+ if (!pSource || !e_source_has_extension (pSource, E_SOURCE_EXTENSION_ADDRESS_BOOK))
+ return false;
+
+ gpointer extension = e_source_get_extension (pSource, E_SOURCE_EXTENSION_ADDRESS_BOOK);
+ return extension && g_strcmp0 (e_source_backend_get_backend_name (extension), backendname) == 0;
+}
+
Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
const Any& /*catalog*/, const ::rtl::OUString& /*schemaPattern*/,
const ::rtl::OUString& /*tableNamePattern*/, const Sequence< ::rtl::OUString >& types ) throw(SQLException, RuntimeException)
@@ -1111,50 +1129,96 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
ODatabaseMetaDataResultSet::ORows aRows;
- ESourceList *pSourceList;
- if( !e_book_get_addressbooks (&pSourceList, NULL) )
- pSourceList = NULL;
-
- GSList *g;
- for( g = e_source_list_peek_groups( pSourceList ); g; g = g->next)
+ if (eds_check_version(3, 6, 0) == NULL)
{
- GSList *s;
- const char *p = e_source_group_peek_base_uri(E_SOURCE_GROUP(g->data));
-
- switch (m_pConnection->getSDBCAddressType()) {
- case SDBCAddress::EVO_GWISE:
- if ( !strncmp( "groupwise://", p, 11 ))
- break;
- else
- continue;
- case SDBCAddress::EVO_LOCAL:
- if ( !strncmp( "file://", p, 6 ) ||
- !strncmp( "local://", p, 6 ) )
- break;
- else
- continue;
- case SDBCAddress::EVO_LDAP:
- if ( !strncmp( "ldap://", p, 6 ))
- break;
- else
- continue;
- case SDBCAddress::Unknown:
- break;
- }
- for (s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data)); s; s = s->next)
- {
- ESource *pSource = E_SOURCE (s->data);
+ GList *pSources = e_source_registry_list_sources(get_e_source_registry(), E_SOURCE_EXTENSION_ADDRESS_BOOK);
- rtl::OUString aName = rtl::OStringToOUString( e_source_peek_name( pSource ),
- RTL_TEXTENCODING_UTF8 );
+ for (GList* liter = pSources; liter; liter = liter->next)
+ {
+ ESource *pSource = E_SOURCE (liter->data);
+ bool can = false;
+ switch (m_pConnection->getSDBCAddressType())
+ {
+ case SDBCAddress::EVO_GWISE:
+ can = isSourceBackend( pSource, "groupwise"); // not supported in evo/eds 3.6.x+, somehow
+ break;
+ case SDBCAddress::EVO_LOCAL:
+ can = isSourceBackend( pSource, "local");
+ break;
+ case SDBCAddress::EVO_LDAP:
+ can = isSourceBackend( pSource, "ldap");
+ break;
+ case SDBCAddress::Unknown:
+ can = true;
+ break;
+ }
+ if (!can)
+ continue;
ODatabaseMetaDataResultSet::ORow aRow(3);
aRow.reserve(6);
- aRow.push_back(new ORowSetValueDecorator(aName));
+ OUString aHumanName = OStringToOUString( e_source_get_display_name( pSource ),
+ RTL_TEXTENCODING_UTF8 );
+ aRow.push_back(new ORowSetValueDecorator(aHumanName)); //tablename
aRow.push_back(new ORowSetValueDecorator(aTable));
- aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
+ OUString aUID = OStringToOUString( e_source_get_uid( pSource ),
+ RTL_TEXTENCODING_UTF8 );
+ aRow.push_back(new ORowSetValueDecorator(aUID)); //comment
+ //I'd prefer to swap the comment and the human name and
+ //just use e_source_registry_ref_source(get_e_source_registry(), aUID);
+ //in open book rather than search for the name again
aRows.push_back(aRow);
}
+
+ g_list_free_full (pSources, g_object_unref);
+ }
+ else
+ {
+ ESourceList *pSourceList;
+ if( !e_book_get_addressbooks (&pSourceList, NULL) )
+ pSourceList = NULL;
+
+ GSList *g;
+ for( g = e_source_list_peek_groups( pSourceList ); g; g = g->next)
+ {
+ GSList *s;
+ const char *p = e_source_group_peek_base_uri(E_SOURCE_GROUP(g->data));
+
+ switch (m_pConnection->getSDBCAddressType()) {
+ case SDBCAddress::EVO_GWISE:
+ if ( !strncmp( "groupwise://", p, 11 ))
+ break;
+ else
+ continue;
+ case SDBCAddress::EVO_LOCAL:
+ if ( !strncmp( "file://", p, 6 ) ||
+ !strncmp( "local://", p, 6 ) )
+ break;
+ else
+ continue;
+ case SDBCAddress::EVO_LDAP:
+ if ( !strncmp( "ldap://", p, 6 ))
+ break;
+ else
+ continue;
+ case SDBCAddress::Unknown:
+ break;
+ }
+ for (s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data)); s; s = s->next)
+ {
+ ESource *pSource = E_SOURCE (s->data);
+
+ rtl::OUString aName = rtl::OStringToOUString( e_source_peek_name( pSource ),
+ RTL_TEXTENCODING_UTF8 );
+
+ ODatabaseMetaDataResultSet::ORow aRow(3);
+ aRow.reserve(6);
+ aRow.push_back(new ORowSetValueDecorator(aName));
+ aRow.push_back(new ORowSetValueDecorator(aTable));
+ aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
+ aRows.push_back(aRow);
+ }
+ }
}
pResult->setRows(aRows);
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index b5f4640..26690b1 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -87,109 +87,17 @@ sal_Bool SAL_CALL OEvoabResultSet::supportsService( const ::rtl::OUString& _rSer
return pSupported != pEnd;
}
-// -------------------------------------------------------------------------
-OEvoabResultSet::OEvoabResultSet( OCommonStatement* pStmt, OEvoabConnection *pConnection )
- :OResultSet_BASE(m_aMutex)
- ,::comphelper::OPropertyContainer( OResultSet_BASE::rBHelper )
- ,m_pStatement(pStmt)
- ,m_pConnection(pConnection)
- ,m_xMetaData(NULL)
- ,m_bWasNull(sal_True)
- ,m_nFetchSize(0)
- ,m_nResultSetType(ResultSetType::SCROLL_INSENSITIVE)
- ,m_nFetchDirection(FetchDirection::FORWARD)
- ,m_nResultSetConcurrency(ResultSetConcurrency::READ_ONLY)
- ,m_pContacts(NULL)
- ,m_nIndex(-1)
- ,m_nLength(0)
-{
- #define REGISTER_PROP( id, member ) \
- registerProperty( \
- OMetaConnection::getPropMap().getNameByIndex( id ), \
- id, \
- PropertyAttribute::READONLY, \
- &member, \
- ::getCppuType( &member ) \
- );
-
- REGISTER_PROP( PROPERTY_ID_FETCHSIZE, m_nFetchSize );
- REGISTER_PROP( PROPERTY_ID_RESULTSETTYPE, m_nResultSetType );
- REGISTER_PROP( PROPERTY_ID_FETCHDIRECTION, m_nFetchDirection );
- REGISTER_PROP( PROPERTY_ID_RESULTSETCONCURRENCY, m_nResultSetConcurrency );
-}
-
-// -------------------------------------------------------------------------
-OEvoabResultSet::~OEvoabResultSet()
-{
-}
-
-// -------------------------------------------------------------------------
-
-static ESource *
-findSource( const char *name )
+struct ComparisonData
{
- ESourceList *pSourceList = NULL;
+ const SortDescriptor& rSortOrder;
+ IntlWrapper aIntlWrapper;
- g_return_val_if_fail (name != NULL, NULL);
-
- if (!e_book_get_addressbooks (&pSourceList, NULL))
- pSourceList = NULL;
-
- for ( GSList *g = e_source_list_peek_groups (pSourceList); g; g = g->next)
+ ComparisonData( const SortDescriptor& _rSortOrder, const Reference< XComponentContext >& _rxContext )
+ :rSortOrder( _rSortOrder )
+ ,aIntlWrapper( _rxContext, SvtSysLocale().GetLanguageTag() )
{
- for (GSList *s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data)); s; s = s->next)
- {
- ESource *pSource = E_SOURCE (s->data);
- if (!strcmp (e_source_peek_name (pSource), name))
- return pSource;
- }
}
- return NULL;
-}
-
-static EBook *
-openBook( const char *abname )
-{
- ESource *pSource = findSource (abname);
- EBook *pBook = NULL;
- if (pSource)
- pBook = e_book_new (pSource, NULL);
-
- if (pBook && !e_book_open (pBook, TRUE, NULL))
- {
- g_object_unref (G_OBJECT (pBook));
- pBook = NULL;
- }
-
- return pBook;
-}
-
-static bool isLDAP( EBook *pBook )
-{
- return pBook && !strncmp( "ldap://", e_book_get_uri( pBook ), 6 );
-}
-
-static bool isLocal( EBook *pBook )
-{
- return pBook && ( !strncmp( "file://", e_book_get_uri( pBook ), 6 ) ||
- !strncmp( "local:", e_book_get_uri( pBook ), 6 ) );
-}
-
-static bool isAuthRequired( EBook *pBook )
-{
- return e_source_get_property( e_book_get_source( pBook ),
- "auth" ) != NULL;
-}
-
-static rtl::OString getUserName( EBook *pBook )
-{
- rtl::OString aName;
- if( isLDAP( pBook ) )
- aName = e_source_get_property( e_book_get_source( pBook ), "binddn" );
- else
- aName = e_source_get_property( e_book_get_source( pBook ), "user" );
- return aName;
-}
+};
static ::rtl::OUString
valueToOUString( GValue& _rValue )
@@ -209,29 +117,6 @@ valueToBool( GValue& _rValue )
return bResult;
}
-static bool
-executeQuery (EBook* pBook, EBookQuery* pQuery, GList **ppList,
- rtl::OString &rPassword, GError **pError)
-{
- ESource *pSource = e_book_get_source( pBook );
- bool bSuccess = false;
- bool bAuthSuccess = true;
-
- *ppList = NULL;
-
- if( isAuthRequired( pBook ) )
- {
- rtl::OString aUser( getUserName( pBook ) );
- const char *pAuth = e_source_get_property( pSource, "auth" );
- bAuthSuccess = e_book_authenticate_user( pBook, aUser.getStr(), rPassword.getStr(), pAuth, pError );
- }
-
- if (bAuthSuccess)
- bSuccess = e_book_get_contacts( pBook, pQuery, ppList, pError );
-
- return bSuccess;
-}
-
static int
whichAddress(int value)
{
@@ -368,6 +253,7 @@ handleSplitAddress( EContact *pContact,GValue *pStackValue, int value )
return false;
}
+
static bool
getValue( EContact* pContact, sal_Int32 nColumnNum, GType nType, GValue* pStackValue, bool& _out_rWasNull )
{
@@ -420,21 +306,6 @@ getValue( EContact* pContact, sal_Int32 nColumnNum, GType nType, GValue* pStackV
return true;
}
-namespace
-{
- struct ComparisonData
- {
- const SortDescriptor& rSortOrder;
- IntlWrapper aIntlWrapper;
-
- ComparisonData( const SortDescriptor& _rSortOrder, const Reference< XComponentContext >& _rxContext )
- :rSortOrder( _rSortOrder )
- ,aIntlWrapper( _rxContext, SvtSysLocale().GetLanguageTag() )
- {
- }
- };
-}
-
extern "C"
int CompareContacts( gconstpointer _lhs, gconstpointer _rhs, gpointer _userData )
{
@@ -493,13 +364,278 @@ int CompareContacts( gconstpointer _lhs, gconstpointer _rhs, gpointer _userData
return 0;
}
-static GList*
-sortContacts( GList* _pContactList, const ComparisonData& _rCompData )
+OString OEvoabVersionHelper::getUserName( EBook *pBook )
{
- OSL_ENSURE( !_rCompData.rSortOrder.empty(), "sortContacts: no need to call this without any sort order!" );
- ENSURE_OR_THROW( _rCompData.aIntlWrapper.getCaseCollator(), "no collator for comparing strings" );
+ OString aName;
+ if( isLDAP( pBook ) )
+ aName = e_source_get_property( e_book_get_source( pBook ), "binddn" );
+ else
+ aName = e_source_get_property( e_book_get_source( pBook ), "user" );
+ return aName;
+}
+
+class OEvoabVersion36Helper : public OEvoabVersionHelper
+{
+private:
+ GSList *m_pContacts;
+public:
+ OEvoabVersion36Helper()
+ : m_pContacts(NULL)
+ {
+ }
+
+ ~OEvoabVersion36Helper()
+ {
+ freeContacts();
+ }
+
+ virtual EBook* openBook(const char *abname)
+ {
+ //It would be better if here we had id to begin with, see
+ //NDatabaseMetaData.cxx
+ const char *id = NULL;
+ GList *pSources = e_source_registry_list_sources(get_e_source_registry(), E_SOURCE_EXTENSION_ADDRESS_BOOK);
+ for (GList* liter = pSources; liter; liter = liter->next)
+ {
+ ESource *pSource = E_SOURCE (liter->data);
- return g_list_sort_with_data( _pContactList, &CompareContacts, const_cast< gpointer >( static_cast< gconstpointer >( &_rCompData ) ) );
+ if (strcmp(abname, e_source_get_display_name( pSource )) == 0)
+ {
+ id = e_source_get_uid( pSource );
+ break;
+ }
+ }
+ g_list_free_full (pSources, g_object_unref);
+ if (!id)
+ return NULL;
+
+ ESource *pSource = e_source_registry_ref_source(get_e_source_registry(), id);
+ EBookClient *pBook = pSource ? e_book_client_new (pSource, NULL) : NULL;
+ if (pBook && !e_client_open_sync (pBook, TRUE, NULL, NULL))
+ {
+ g_object_unref (G_OBJECT (pBook));
+ pBook = NULL;
+ }
+ if (pSource)
+ g_object_unref (pSource);
+ return pBook;
+ }
+
+ bool isBookBackend( EBookClient *pBook, const char *backendname)
+ {
+ if (!pBook)
+ return false;
+ ESource *pSource = e_client_get_source ((EClient *) pBook);
+ return isSourceBackend(pSource, backendname);
+ }
+
+ virtual bool isLDAP( EBook *pBook )
+ {
+ return isBookBackend(pBook, "ldap");
+ }
+
+ virtual bool isLocal( EBook *pBook )
+ {
+ return isBookBackend(pBook, "local");
+ }
+
+ virtual void freeContacts()
+ {
+ e_client_util_free_object_slist(m_pContacts);
+ m_pContacts = NULL;
+ }
+
+ virtual bool executeQuery (EBook* pBook, EBookQuery* pQuery, OString &/*rPassword*/)
+ {
+ freeContacts();
+ char *sexp = e_book_query_to_string( pQuery );
+ bool bSuccess = e_book_client_get_contacts_sync( pBook, sexp, &m_pContacts, NULL, NULL );
+ g_free (sexp);
+ return bSuccess;
+ }
+
+ virtual EContact *getContact(sal_Int32 nIndex)
+ {
+ gpointer pData = g_slist_nth_data (m_pContacts, nIndex);
+ return pData ? E_CONTACT (pData) : NULL;
+ }
+
+ virtual sal_Int32 getNumContacts()
+ {
+ return g_slist_length( m_pContacts );
+ }
+
+ virtual bool hasContacts()
+ {
+ return m_pContacts != NULL;
+ }
+
+ virtual void sortContacts( const ComparisonData& _rCompData )
+ {
+ OSL_ENSURE( !_rCompData.rSortOrder.empty(), "sortContacts: no need to call this without any sort order!" );
+ ENSURE_OR_THROW( _rCompData.aIntlWrapper.getCaseCollator(), "no collator for comparing strings" );
+
+ m_pContacts = g_slist_sort_with_data( m_pContacts, &CompareContacts,
+ const_cast< gpointer >( static_cast< gconstpointer >( &_rCompData ) ) );
+ }
+};
+
+class OEvoabVersion35Helper : public OEvoabVersionHelper
+{
+private:
+ GList *m_pContacts;
+
+ ESource * findSource( const char *id )
+ {
+ ESourceList *pSourceList = NULL;
+
+ g_return_val_if_fail (id != NULL, NULL);
+
+ if (!e_book_get_addressbooks (&pSourceList, NULL))
+ pSourceList = NULL;
+
+ for ( GSList *g = e_source_list_peek_groups (pSourceList); g; g = g->next)
+ {
+ for (GSList *s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data)); s; s = s->next)
+ {
+ ESource *pSource = E_SOURCE (s->data);
+ if (!strcmp (e_source_peek_name (pSource), id))
+ return pSource;
+ }
+ }
+ return NULL;
+ }
+
+ bool isAuthRequired( EBook *pBook )
+ {
+ return e_source_get_property( e_book_get_source( pBook ),
+ "auth" ) != NULL;
+ }
+
+public:
+ OEvoabVersion35Helper()
+ : m_pContacts(NULL)
+ {
+ }
+
+ ~OEvoabVersion35Helper()
+ {
+ freeContacts();
+ }
+
+ virtual EBook* openBook(const char *abname)
+ {
+ ESource *pSource = findSource (abname);
+ EBook *pBook = pSource ? e_book_new (pSource, NULL) : NULL;
+ if (pBook && !e_book_open (pBook, TRUE, NULL))
+ {
+ g_object_unref (G_OBJECT (pBook));
+ pBook = NULL;
+ }
+ return pBook;
+ }
+
+ virtual bool isLDAP( EBook *pBook )
+ {
+ return pBook && !strncmp( "ldap://", e_book_get_uri( pBook ), 6 );
+ }
+
+ virtual bool isLocal( EBook *pBook )
+ {
+ return pBook && ( !strncmp( "file://", e_book_get_uri( pBook ), 6 ) ||
+ !strncmp( "local:", e_book_get_uri( pBook ), 6 ) );
+ }
+
+ virtual void freeContacts()
+ {
+ g_list_free(m_pContacts);
+ m_pContacts = NULL;
+ }
+
+ virtual bool executeQuery (EBook* pBook, EBookQuery* pQuery, OString &rPassword)
+ {
+ freeContacts();
+
+ ESource *pSource = e_book_get_source( pBook );
+ bool bSuccess = false;
+ bool bAuthSuccess = true;
+
+ if( isAuthRequired( pBook ) )
+ {
+ rtl::OString aUser( getUserName( pBook ) );
+ const char *pAuth = e_source_get_property( pSource, "auth" );
+ bAuthSuccess = e_book_authenticate_user( pBook, aUser.getStr(), rPassword.getStr(), pAuth, NULL );
+ }
+
+ if (bAuthSuccess)
+ bSuccess = e_book_get_contacts( pBook, pQuery, &m_pContacts, NULL );
+
+ return bSuccess;
+ }
+
+ virtual EContact *getContact(sal_Int32 nIndex)
+ {
+ gpointer pData = g_list_nth_data (m_pContacts, nIndex);
+ return pData ? E_CONTACT (pData) : NULL;
+ }
+
+ virtual sal_Int32 getNumContacts()
+ {
+ return g_list_length( m_pContacts );
+ }
+
+ virtual bool hasContacts()
+ {
+ return m_pContacts != NULL;
+ }
+
+ virtual void sortContacts( const ComparisonData& _rCompData )
+ {
+ OSL_ENSURE( !_rCompData.rSortOrder.empty(), "sortContacts: no need to call this without any sort order!" );
+ ENSURE_OR_THROW( _rCompData.aIntlWrapper.getCaseCollator(), "no collator for comparing strings" );
+
+ m_pContacts = g_list_sort_with_data( m_pContacts, &CompareContacts,
+ const_cast< gpointer >( static_cast< gconstpointer >( &_rCompData ) ) );
+ }
+};
+
+OEvoabResultSet::OEvoabResultSet( OCommonStatement* pStmt, OEvoabConnection *pConnection )
+ :OResultSet_BASE(m_aMutex)
+ ,::comphelper::OPropertyContainer( OResultSet_BASE::rBHelper )
+ ,m_pStatement(pStmt)
+ ,m_pConnection(pConnection)
+ ,m_xMetaData(NULL)
+ ,m_bWasNull(sal_True)
+ ,m_nFetchSize(0)
+ ,m_nResultSetType(ResultSetType::SCROLL_INSENSITIVE)
+ ,m_nFetchDirection(FetchDirection::FORWARD)
+ ,m_nResultSetConcurrency(ResultSetConcurrency::READ_ONLY)
+ ,m_nIndex(-1)
+ ,m_nLength(0)
+{
+ if (eds_check_version(3, 6, 0) == NULL)
+ m_pVersionHelper = new OEvoabVersion36Helper;
+ else
+ m_pVersionHelper = new OEvoabVersion35Helper;
+
+ #define REGISTER_PROP( id, member ) \
+ registerProperty( \
+ OMetaConnection::getPropMap().getNameByIndex( id ), \
+ id, \
+ PropertyAttribute::READONLY, \
+ &member, \
+ ::getCppuType( &member ) \
+ );
+
+ REGISTER_PROP( PROPERTY_ID_FETCHSIZE, m_nFetchSize );
+ REGISTER_PROP( PROPERTY_ID_RESULTSETTYPE, m_nResultSetType );
+ REGISTER_PROP( PROPERTY_ID_FETCHDIRECTION, m_nFetchDirection );
+ REGISTER_PROP( PROPERTY_ID_RESULTSETCONCURRENCY, m_nResultSetConcurrency );
+}
+
+// -------------------------------------------------------------------------
+OEvoabResultSet::~OEvoabResultSet()
+{
}
// -------------------------------------------------------------------------
@@ -507,17 +643,16 @@ void OEvoabResultSet::construct( const QueryData& _rData )
{
ENSURE_OR_THROW( _rData.getQuery(), "internal error: no EBookQuery" );
- EBook *pBook = openBook(::rtl::OUStringToOString(_rData.sTable, RTL_TEXTENCODING_UTF8).getStr());
+ EBook *pBook = m_pVersionHelper->openBook(OUStringToOString(_rData.sTable, RTL_TEXTENCODING_UTF8).getStr());
if ( !pBook )
m_pConnection->throwGenericSQLException( STR_CANNOT_OPEN_BOOK, *this );
- g_list_free(m_pContacts);
- m_pContacts = NULL;
+ m_pVersionHelper->freeContacts();
bool bExecuteQuery = true;
switch ( _rData.eFilterType )
{
case eFilterNone:
- if ( !isLocal( pBook ) )
+ if ( !m_pVersionHelper->isLocal( pBook ) )
{
SQLError aErrorFactory( m_pConnection->getDriver().getMSFactory() );
SQLException aAsException = aErrorFactory.getSQLException( ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED, *this );
@@ -541,16 +676,16 @@ void OEvoabResultSet::construct( const QueryData& _rData )
if ( bExecuteQuery )
{
rtl::OString aPassword = m_pConnection->getPassword();
- executeQuery( pBook, _rData.getQuery(), &m_pContacts, aPassword, NULL );
+ m_pVersionHelper->executeQuery(pBook, _rData.getQuery(), aPassword);
m_pConnection->setPassword( aPassword );
- if ( m_pContacts && !_rData.aSortOrder.empty() )
+ if ( m_pVersionHelper->hasContacts() && !_rData.aSortOrder.empty() )
{
ComparisonData aCompData( _rData.aSortOrder, comphelper::getComponentContext(getConnection()->getDriver().getMSFactory()) );
- m_pContacts = sortContacts( m_pContacts, aCompData );
+ m_pVersionHelper->sortContacts( aCompData );
}
}
- m_nLength = g_list_length( m_pContacts );
+ m_nLength = m_pVersionHelper->getNumContacts();
OSL_TRACE( "Query return %d records", m_nLength );
m_nIndex = -1;
@@ -567,10 +702,10 @@ void OEvoabResultSet::disposing(void)
::comphelper::OPropertyContainer::disposing();
::osl::MutexGuard aGuard(m_aMutex);
- g_list_free(m_pContacts);
- m_pContacts = NULL;
+ delete m_pVersionHelper;
+ m_pVersionHelper = NULL;
m_pStatement = NULL;
-m_xMetaData.clear();
+ m_xMetaData.clear();
}
// -------------------------------------------------------------------------
Any SAL_CALL OEvoabResultSet::queryInterface( const Type & rType ) throw(RuntimeException)
diff --git a/connectivity/source/drivers/evoab2/NResultSet.hxx b/connectivity/source/drivers/evoab2/NResultSet.hxx
index fd049fd..c3d7ab4 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.hxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.hxx
@@ -45,6 +45,24 @@ namespace connectivity
{
namespace evoab
{
+ class ComparisonData;
+
+ class OEvoabVersionHelper
+ {
+ public:
+ virtual EBook* openBook(const char *abname) = 0;
+ virtual bool executeQuery (EBook* pBook, EBookQuery* pQuery, OString &rPassword) = 0;
+ virtual void freeContacts() = 0;
+ virtual bool isLDAP( EBook *pBook ) = 0;
+ virtual bool isLocal( EBook *pBook ) = 0;
+ virtual EContact *getContact(sal_Int32 nIndex) = 0;
+ virtual sal_Int32 getNumContacts() = 0;
+ virtual bool hasContacts() = 0;
+ virtual void sortContacts( const ComparisonData& _rCompData ) = 0;
+ OString getUserName( EBook *pBook );
+ virtual ~OEvoabVersionHelper() {}
+ };
+
typedef ::cppu::WeakComponentImplHelper8 < ::com::sun::star::sdbc::XResultSet
, ::com::sun::star::sdbc::XRow
, ::com::sun::star::sdbc::XResultSetMetaDataSupplier
@@ -61,6 +79,8 @@ namespace connectivity
,public ::comphelper::OPropertyContainer
,public ::comphelper::OPropertyArrayUsageHelper<OEvoabResultSet>
{
+ private:
+ OEvoabVersionHelper *m_pVersionHelper;
protected:
@@ -79,13 +99,11 @@ namespace connectivity
// </properties>
// Data & iteration
- GList *m_pContacts;
sal_Int32 m_nIndex;
sal_Int32 m_nLength;
EContact *getCur()
{
- gpointer pData = g_list_nth_data (m_pContacts, m_nIndex);
- return pData ? E_CONTACT (pData) : NULL;
+ return m_pVersionHelper->getContact(m_nIndex);
}
// OPropertyArrayUsageHelper
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 837836d..ad68908 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -955,6 +955,18 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
} while ( false );
+ bool bMissingSomeColumnLabels = !aNames.empty() && aNames.size() != aSelectColumns->get().size();
+ SAL_WARN_IF(bMissingSomeColumnLabels, "dbaccess", "We have column labels for *some* columns but not all");
+ //^^this happens in the evolution address book where we have real column names of e.g.
+ //first_name, second_name and city. On parsing via
+ //OSQLParseTreeIterator::appendColumns it creates some labels using those real names
+ //but the evo address book gives them proper labels of First Name, Second Name and City
+ //the munge means that here we have e.g. just "City" as a label because it matches
+ //
+ //This is all a horrible mess
+ if (bMissingSomeColumnLabels)
+ aNames.clear();
+
if ( aNames.empty() )
m_aCurrentColumns[ SelectColumns ] = OPrivateColumns::createWithIntrinsicNames( aSelectColumns, bCase, *this, m_aMutex );
else
--
1.8.1

@ -0,0 +1,54 @@
From ecf6b9a9020d086ce411c26a1972811002d500a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 11 Feb 2013 15:58:42 +0000
Subject: [PATCH] no g_list_free_full in RHEL-6 glib
Change-Id: I213bb62c2a9318d98f0736cc23431dca3dfd4708
---
connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx | 3 ++-
connectivity/source/drivers/evoab2/NResultSet.cxx | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index a83de24..11742c1 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -1170,7 +1170,8 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
aRows.push_back(aRow);
}
- g_list_free_full (pSources, g_object_unref);
+ g_list_foreach (pSources, (GFunc)g_object_unref, NULL);
+ g_list_free (pSources);
}
else
{
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 4baf3ae..154db40 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -405,7 +405,8 @@ public:
break;
}
}
- g_list_free_full (pSources, g_object_unref);
+ g_list_foreach (pSources, (GFunc)g_object_unref, NULL);
+ g_list_free (pSources);
if (!id)
return NULL;
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index a33a558..63d066a 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -54,6 +54,10 @@ typedef XLIB_Window GdkNativeWindow;
#define gdk_window_foreign_new_for_display(a,b) gdk_x11_window_foreign_new_for_display(a,b)
#endif
+#if !(GLIB_MAJOR_VERSION > 2 || GLIB_MINOR_VERSION >= 26)
+ typedef void GDBusConnection;
+#endif
+
class GtkSalFrame : public SalFrame
{
static const int nMaxGraphics = 2;

@ -1,16 +1,21 @@
--- a/scp2/source/ooo/common_brand.scp.convert-java-XSL-transformer-into-extension.patch --- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp.convert-java-XSL-transformer-into-extension.patch +++ b/scp2/source/ooo/common_brand.scp
@@ -1256,11 +1256,9 @@ @@ -1252,6 +1252,7 @@
Section = "Bootstrap"; Section = "Bootstrap";
Key = "URE_MORE_JAVA_CLASSPATH_URLS"; Key = "URE_MORE_JAVA_CLASSPATH_URLS";
Value = ""; Value = "";
+ ValueList1 = "$ORIGIN/../ure-link/lib"; + ValueList1 = "$ORIGIN/../ure-link/lib";
#ifdef SYSTEM_HSQLDB #ifdef SYSTEM_HSQLDB
- ValueList1 = HSQLDB_JAR; ValueList1 = HSQLDB_JAR;
-#endif
-#ifdef SYSTEM_SAXON
- ValueList2 = SAXON_JAR;
+ ValueList2 = HSQLDB_JAR;
#endif #endif
End --- a/odk/pack/gendocu/makefile.mk
+++ b/odk/pack/gendocu/makefile.mk
@@ -59,7 +59,7 @@
$(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/OfficeConnection.java \
$(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/OfficeWindow.java
-JAVADOCPARAMS= -notimestamp -use -splitindex -windowtitle "Java UNO Runtime Reference" -header $(JAVADOCREFNAME) -d $(DESTDIRGENJAVAREF) -sourcepath $(JAVA_SRC_DIR) -classpath $(SOLARBINDIR)$/ridl.jar -linkoffline ../../common/ref ./uno -linkoffline http://java.sun.com/j2se/1.4.1/docs/api ./java $(JAVA_PACKAGES)
+JAVADOCPARAMS= -use -splitindex -windowtitle "Java UNO Runtime Reference" -header $(JAVADOCREFNAME) -d $(DESTDIRGENJAVAREF) -sourcepath $(JAVA_SRC_DIR) -classpath $(SOLARBINDIR)$/ridl.jar -linkoffline ../../common/ref ./uno -linkoffline http://java.sun.com/j2se/1.4.1/docs/api ./java $(JAVA_PACKAGES)
JAVADOCLOG = $(MISC)$/javadoc_log.txt

@ -0,0 +1,48 @@
--- a/shell/Module_shell.mk 2013-02-13 15:48:02.880128705 +0000
+++ b/shell/Module_shell.mk 2013-02-13 16:37:33.766353120 +0000
@@ -32,14 +32,6 @@
Library_localebe \
))
-ifeq ($(OS),LINUX)
-ifeq ($(ENABLE_GIO),TRUE)
-$(eval $(call gb_Module_add_targets,shell,\
- Library_losessioninstall \
-))
-endif
-endif
-
ifeq ($(ENABLE_GCONF),TRUE)
$(eval $(call gb_Module_add_targets,shell,\
Library_gconfbe \
--- a/scp2/source/gnome/file_gnome.scp 2013-02-13 16:38:19.475352623 +0000
+++ b/scp2/source/gnome/file_gnome.scp 2013-02-13 16:38:28.799352829 +0000
@@ -33,8 +33,6 @@
Dir = SCP2_OOO_BIN_DIR;
Name = STRING(CONCAT2(ucpgio1.uno,UNXSUFFIX));
End
-
-SPECIAL_COMPONENT_LIB_FILE(gid_File_Lib_Losessioninstall, losessioninstall.uno)
#endif
#ifdef ENABLE_GNOMEVFS
--- a/scp2/source/gnome/module_gnome.scp 2013-02-13 16:38:19.475352623 +0000
+++ b/scp2/source/gnome/module_gnome.scp 2013-02-13 16:38:41.308353064 +0000
@@ -55,7 +55,6 @@
#endif
#ifdef ENABLE_GIO
gid_File_Lib_GIO,
- gid_File_Lib_Losessioninstall,
#endif
#ifdef ENABLE_GCONF
gid_File_Lib_Gconfbe,
--- a/postprocess/packcomponents/makefile.mk 2013-02-15 11:29:08.647352823 +0000
+++ b/postprocess/packcomponents/makefile.mk 2013-02-15 11:29:13.594376055 +0000
@@ -246,7 +246,6 @@
.IF "$(ENABLE_GIO)" != ""
my_components += \
- component/shell/source/sessioninstall/losessioninstall \
component/ucb/source/ucp/gio/ucpgio
.END

@ -0,0 +1,10 @@
--- a/basic/source/classes/propacc.cxx 2013-02-11 12:23:01.571839617 +0000
+++ b/basic/source/classes/propacc.cxx 2013-02-11 12:23:04.808850284 +0000
@@ -22,6 +22,7 @@
#include <basic/sbstar.hxx>
#include <sbunoobj.hxx>
+#include <limits.h>
using com::sun::star::uno::Reference;
using namespace com::sun::star;

@ -1,6 +1,6 @@
--- a/configure.in 2011-11-10 13:22:02.062474990 +0000 --- a/configure.ac 2011-11-10 13:22:02.062474990 +0000
+++ b/configure.in 2011-11-10 13:22:35.072472880 +0000 +++ b/configure.ac 2011-11-10 13:22:35.072472880 +0000
@@ -6354,16 +6354,6 @@ @@ -9546,16 +9546,6 @@
AC_MSG_RESULT([external]) AC_MSG_RESULT([external])
SYSTEM_POPPLER=YES SYSTEM_POPPLER=YES
PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 ) PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
@ -14,9 +14,9 @@
- CXXFLAGS=$save_CXXFLAGS - CXXFLAGS=$save_CXXFLAGS
- CPPFLAGS=$save_CPPFLAGS - CPPFLAGS=$save_CPPFLAGS
- AC_LANG_POP([C++]) - AC_LANG_POP([C++])
libo_MINGW_CHECK_DLL([POPPLER], [libpoppler])
else else
AC_MSG_RESULT([internal]) AC_MSG_RESULT([internal])
SYSTEM_POPPLER=NO
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2011-11-10 13:22:11.949473646 +0000 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2011-11-10 13:22:11.949473646 +0000
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2011-11-10 13:23:24.889473889 +0000 +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2011-11-10 13:23:24.889473889 +0000
@@ -64,16 +64,7 @@ @@ -64,16 +64,7 @@

@ -47,7 +47,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice Name: libreoffice
Epoch: 1 Epoch: 1
Version: %{libo_version}.3 Version: %{libo_version}.3
Release: 4%{?libo_prerelease}%{?dist} Release: 5%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
Group: Applications/Productivity Group: Applications/Productivity
URL: http://www.documentfoundation.org/develop URL: http://www.documentfoundation.org/develop
@ -67,19 +67,23 @@ Source9: %{external_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
Source10: %{external_url}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip Source10: %{external_url}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
%if 0%{?rhel} && 0%{?rhel} < 7 %if 0%{?rhel} && 0%{?rhel} < 7
Source11: %{external_url}/9f9e15966b5624834157fe3d748312bc-mdds_0.6.1.tar.bz2 Source11: %{external_url}/9f9e15966b5624834157fe3d748312bc-mdds_0.6.1.tar.bz2
Source12: %{external_url}/e1e255dc43dbcbb34cb19e8a0eba90ae-mythes-1.2.2.tar.gz Source12: %{external_url}/46e92b68e31e858512b680b3b61dc4c1-mythes-1.2.3.tar.gz
Source13: %{external_url}/ca66e26082cab8bb817185a116db809b-redland-1.0.8.tar.gz Source13: %{external_url}/ca66e26082cab8bb817185a116db809b-redland-1.0.8.tar.gz
Source14: %{external_url}/284e768eeda0e2898b0d5bf7e26a016e-raptor-1.4.18.tar.gz Source14: %{external_url}/284e768eeda0e2898b0d5bf7e26a016e-raptor-1.4.18.tar.gz
Source15: %{external_url}/fca8706f2c4619e2fa3f8f42f8fc1e9d-rasqal-0.9.16.tar.gz Source15: %{external_url}/fca8706f2c4619e2fa3f8f42f8fc1e9d-rasqal-0.9.16.tar.gz
Source16: %{external_url}/6097739c841f671cb21332b9cc593ae7-libexttextcat-3.3.1.tar.bz2 Source16: %{external_url}/dc3d21a3921931096d6e80f6701f6763-libexttextcat-3.4.0.tar.bz2
Source17: %{external_url}/3c0037fb07dea2f0bbae8386fa7c6a9a-libcdr-0.0.9.tar.bz2 Source17: %{external_url}/libcdr-0.0.9.tar.bz2
Source18: %{external_url}/9d283e02441d8cebdcd1e5d9df227d67-libwpg-0.2.1.tar.bz2 Source18: %{external_url}/9d283e02441d8cebdcd1e5d9df227d67-libwpg-0.2.1.tar.bz2
Source19: %{external_url}/c01351d7db2b205de755d58769288224-libwpd-0.9.4.tar.bz2 Source19: %{external_url}/e7f84e3199dfee9122949448cab3823f-libwpd-0.9.6.tar.bz2
Source20: %{external_url}/d197bd6211669a2fa4ca648faf04bcb1-libwps-0.2.7.tar.bz2 Source20: %{external_url}/d197bd6211669a2fa4ca648faf04bcb1-libwps-0.2.7.tar.bz2
Source21: %{external_url}/b2371dc7cf4811c9d32146eec913d296-libcmis-0.3.0.tar.gz Source21: %{external_url}/b2371dc7cf4811c9d32146eec913d296-libcmis-0.3.0.tar.gz
Source22: %{external_url}/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz Source22: %{external_url}/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz
Source23: %{external_url}/94e7f271e38c976462558b4278590178-libvisio-0.0.19.tar.bz2 Source23: %{external_url}/libvisio-0.0.24.tar.bz2
Source24: %{external_url}/327348d67c979c88c2dec59a23a17d85-lcms2-2.3.tar.gz Source24: %{external_url}/861ef15fa0bc018f9ddc932c4ad8b6dd-lcms2-2.4.tar.gz
Source25: %{external_url}/libmspub-0.0.3.tar.bz2
Source26: %{external_url}/8755aac23317494a9028569374dc87b2-liborcus_0.3.0.tar.bz2
Source27: %{external_url}/54e578c91b1b68e69c72be22adcb2195-liblangtag-0.4.0.tar.bz2
Source28: %{external_url}/f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2
%endif %endif
# build tools # build tools
@ -103,8 +107,8 @@ BuildRequires: zip
# libs / headers # libs / headers
BuildRequires: GConf2-devel BuildRequires: GConf2-devel
BuildRequires: bluez-libs-devel BuildRequires: bluez-libs-devel
BuildRequires: boost-devel
%if 0%{?fedora} || 0%{?rhel} >= 7 %if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: boost-devel
BuildRequires: clucene-core-devel BuildRequires: clucene-core-devel
%endif %endif
BuildRequires: cppunit-devel BuildRequires: cppunit-devel
@ -142,15 +146,17 @@ BuildRequires: libexttextcat-devel
%endif %endif
BuildRequires: libicu-devel BuildRequires: libicu-devel
BuildRequires: libidn-devel BuildRequires: libidn-devel
%if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: libjpeg-turbo-devel BuildRequires: libjpeg-turbo-devel
BuildRequires: liblangtag-devel >= 0.4.0 BuildRequires: liblangtag-devel >= 0.4.0
BuildRequires: libmspub-devel BuildRequires: libmspub-devel
BuildRequires: liborcus-devel >= 0.3.0 BuildRequires: liborcus-devel >= 0.3.0
%if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: libvisio-devel BuildRequires: libvisio-devel
BuildRequires: libwpd-devel BuildRequires: libwpd-devel
BuildRequires: libwpg-devel BuildRequires: libwpg-devel
BuildRequires: libwps-devel BuildRequires: libwps-devel
%else
BuildRequires: libjpeg-devel
%endif %endif
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
BuildRequires: libxslt-devel BuildRequires: libxslt-devel
@ -192,9 +198,11 @@ BuildRequires: ant-apache-regexp
%if 0%{?rhel} && 0%{?rhel} < 7 %if 0%{?rhel} && 0%{?rhel} < 7
BuildRequires: jakarta-commons-codec BuildRequires: jakarta-commons-codec
BuildRequires: jakarta-commons-lang BuildRequires: jakarta-commons-lang
BuildRequires: apache-tomcat-apis
%else %else
BuildRequires: apache-commons-codec BuildRequires: apache-commons-codec
BuildRequires: apache-commons-lang BuildRequires: apache-commons-lang
BuildRequires: tomcat-servlet-3.0-api
%endif %endif
BuildRequires: bsh BuildRequires: bsh
%if 0%{?rhel} && 0%{?rhel} < 7 %if 0%{?rhel} && 0%{?rhel} < 7
@ -206,7 +214,6 @@ BuildRequires: java-devel
BuildRequires: junit BuildRequires: junit
%endif %endif
BuildRequires: pentaho-reporting-flow-engine BuildRequires: pentaho-reporting-flow-engine
BuildRequires: tomcat-servlet-3.0-api
# fonts needed for unit tests # fonts needed for unit tests
BuildRequires: liberation-mono-fonts >= 1.0 BuildRequires: liberation-mono-fonts >= 1.0
@ -234,11 +241,17 @@ Patch8: 0001-disable-failing-check.patch
Patch9: libreoffice-rhel6gcj.patch Patch9: libreoffice-rhel6gcj.patch
Patch10: libreoffice-rhel6poppler.patch Patch10: libreoffice-rhel6poppler.patch
Patch11: libreoffice-rhel6langs.patch Patch11: libreoffice-rhel6langs.patch
%endif Patch12: 0001-Require-icu-4.6-or-later-with-system-icu.patch
Patch12: 0001-temporarily-disable-failing-test.patch Patch13: libreoffice-rhel6limits.patch
Patch13: 0001-rhbz-760765-copy-custom-styles-on-copy-paste.patch Patch14: libreoffice-rhel6glib.patch
Patch14: 0001-fix-parser-errors-in-help-translations.patch %endif
Patch15: 0001-rhbz-908674-Adapt-rtl-Allocator-construct-to-C-11.patch Patch15: 0001-temporarily-disable-failing-test.patch
Patch16: 0001-rhbz-760765-copy-custom-styles-on-copy-paste.patch
Patch17: 0001-fix-parser-errors-in-help-translations.patch
Patch18: 0001-rhbz-908674-Adapt-rtl-Allocator-construct-to-C-11.patch
Patch19: 0001-make-evolution-3.6-work-with-address-book.patch
Patch20: 0001-Resolves-fdo-60132-Error-reading-file-after-insertin.patch
Patch21: 0001-no-g_list_free_full-in-RHEL-6-glib.patch
%define instdir %{_libdir} %define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice %define baseinstdir %{instdir}/libreoffice
@ -969,11 +982,17 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch9 -p1 -b .rhel6gcj.patch %patch9 -p1 -b .rhel6gcj.patch
%patch10 -p1 -b .rhel6poppler.patch %patch10 -p1 -b .rhel6poppler.patch
%patch11 -p1 -b .rhel6langs.patch %patch11 -p1 -b .rhel6langs.patch
%endif %patch12 -p1 -R -b .Require-icu-4.6-or-later-with-system-icu.patch
%patch12 -p1 -b .temporarily-disable-failing-test.patch %patch13 -p1 -b .rhel6limits.patch
%patch13 -p1 -b .rhbz-760765-copy-custom-styles-on-copy-paste.patch %patch14 -p1 -b .rhel6glib.patch
%patch14 -p1 -b .fix-parser-errors-in-help-translations.patch %endif
%patch15 -p1 -b .rhbz-908674-Adapt-rtl-Allocator-construct-to-C-11.patch %patch15 -p1 -b .temporarily-disable-failing-test.patch
%patch16 -p1 -b .rhbz-760765-copy-custom-styles-on-copy-paste.patch
%patch17 -p1 -b .fix-parser-errors-in-help-translations.patch
%patch18 -p1 -b .rhbz-908674-Adapt-rtl-Allocator-construct-to-C-11.patch
%patch19 -p1 -b .make-evolution-3.6-work-with-address-book.patch
%patch20 -p1 -b .fdo-60132-Error-reading-file-after-insertin.patch
%patch21 -p1 -b .no-g_list_free_full-in-RHEL-6-glib.patch
# TODO: check this # TODO: check this
# these are horribly incomplete--empty translations and copied english # these are horribly incomplete--empty translations and copied english
@ -1018,12 +1037,12 @@ export CXXFLAGS=$ARCH_FLAGS
%if 0%{?rhel} %if 0%{?rhel}
%if 0%{?rhel} < 7 %if 0%{?rhel} < 7
%define distrooptions --disable-graphite --without-system-mythes --without-system-mdds --without-junit --without-system-redland --disable-ext-mysql-connector --without-system-libexttextcat --without-system-libcdr --without-system-libwps --without-system-libwpd --without-system-libwpg --without-system-libcmis --without-system-clucene --without-system-libvisio --without-system-lcms2 --enable-gstreamer-0-10 --disable-gstreamer --disable-postgresql-sdbc %define distrooptions --disable-graphite --without-system-mythes --without-system-mdds --without-junit --without-system-redland --disable-ext-mysql-connector --without-system-libexttextcat --without-system-libcdr --without-system-libwps --without-system-libwpd --without-system-libwpg --without-system-libcmis --without-system-clucene --without-system-libvisio --without-system-lcms2 --without-system-libmspub --without-system-orcus --without-system-liblangtag --without-system-boost --enable-gstreamer-0-10 --disable-gstreamer --disable-postgresql-sdbc --with-servlet-api-jar=/usr/share/java/apache-tomcat-apis/tomcat-servlet2.5-api.jar --enable-python=system
%else %else
%define distrooptions --without-system-hsqldb --disable-gstreamer-0-10 --enable-gstreamer --with-system-mythes --enable-python=system %define distrooptions --without-system-hsqldb --disable-gstreamer-0-10 --enable-gstreamer --with-system-mythes --enable-python=system --with-servlet-api-jar=/usr/share/java/tomcat-servlet-api.jar
%endif %endif
%else %else
%define distrooptions --without-system-hsqldb --enable-kde4 --disable-gstreamer-0-10 --enable-gstreamer --with-system-mythes %define distrooptions --without-system-hsqldb --enable-kde4 --disable-gstreamer-0-10 --enable-gstreamer --with-system-mythes --with-servlet-api-jar=/usr/share/java/tomcat-servlet-api.jar
%endif %endif
%if ! 0%{libo_python3} %if ! 0%{libo_python3}
@ -1046,7 +1065,6 @@ touch autogen.lastrun
--enable-ext-wiki-publisher --enable-ext-report-builder \ --enable-ext-wiki-publisher --enable-ext-report-builder \
--enable-scripting-beanshell --enable-scripting-javascript \ --enable-scripting-beanshell --enable-scripting-javascript \
--with-system-jars --with-vba-package-format="builtin" \ --with-system-jars --with-vba-package-format="builtin" \
--with-servlet-api-jar=/usr/share/java/tomcat-servlet-api.jar \
--with-system-libs --with-system-headers --with-system-mozilla \ --with-system-libs --with-system-headers --with-system-mozilla \
--without-system-npapi-headers --with-system-dicts \ --without-system-npapi-headers --with-system-dicts \
--with-external-dict-dir=/usr/share/myspell \ --with-external-dict-dir=/usr/share/myspell \
@ -2037,6 +2055,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif %endif
%changelog %changelog
* Thu Feb 07 2013 Caolán McNamara <caolanm@redhat.com> - 1:4.0.0.3-5-UNBUILT
- make evolution 3.6 work with address book
* Fri Feb 15 2013 Stephan Bergmann <sbergman@redhat.com> - 1:4.0.0.3-4 * Fri Feb 15 2013 Stephan Bergmann <sbergman@redhat.com> - 1:4.0.0.3-4
- Resolves: fdo#60491 missing libemboleobj.so - Resolves: fdo#60491 missing libemboleobj.so
- Resolves: rhbz#908674 crash on start - Resolves: rhbz#908674 crash on start

Loading…
Cancel
Save