Kaydet (Commit) 0b21dd25 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix datasource choices offered by the Address Book wizard

...as at least on Linux, availability of Mozilla/Thunderbird is independend of
WITH_MOZILLA/--enable-mozilla now.  This fix might not be perfect yet, see the
TODO comment in the code.

Change-Id: Ie5343a23187648f5e56d82753b6c222e6da7ec54
üst e860c78e
...@@ -38,6 +38,7 @@ $(eval $(call gb_Library_set_include,abp,\ ...@@ -38,6 +38,7 @@ $(eval $(call gb_Library_set_include,abp,\
-I$(SRCDIR)/extensions/source/inc \ -I$(SRCDIR)/extensions/source/inc \
)) ))
ifeq ($(OS),WNT)
ifneq ($(WITH_MOZILLA),NO) ifneq ($(WITH_MOZILLA),NO)
ifneq ($(SYSTEM_MOZILLA),YES) ifneq ($(SYSTEM_MOZILLA),YES)
$(eval $(call gb_Library_add_defs,abp,\ $(eval $(call gb_Library_add_defs,abp,\
...@@ -45,6 +46,7 @@ $(eval $(call gb_Library_add_defs,abp,\ ...@@ -45,6 +46,7 @@ $(eval $(call gb_Library_add_defs,abp,\
)) ))
endif endif
endif endif
endif
$(eval $(call gb_Library_add_defs,abp,\ $(eval $(call gb_Library_add_defs,abp,\
-DCOMPMOD_NAMESPACE=abp \ -DCOMPMOD_NAMESPACE=abp \
......
...@@ -57,16 +57,47 @@ namespace abp ...@@ -57,16 +57,47 @@ namespace abp
Size aItemSize( LogicToPixel( Size( 0, 8 ), MAP_APPFONT ) ); Size aItemSize( LogicToPixel( Size( 0, 8 ), MAP_APPFONT ) );
aItemSize.Width() = GetOutputSizePixel().Width() - 30; aItemSize.Width() = GetOutputSizePixel().Width() - 30;
bool bWithMozilla = true, bUnx = true; //TODO: For now, try to keep offering the same choices like before the
// Mozilla/MORK cleanup, even if the status of what driver actually
// provides which functionality is somewhat unclear, see the discussions
// of fdo#57285 "Address Book Data Source Wizard lists 'Mac OS X address
// book' on Linux" and fdo#57322 "Moz-free LDAP Address Book driver."
// In accordance with ancient OOo 3.3, this is as follows:
//
// On Linux:
// - EVOLUTION, EVOLUTION_GROUPWISE, EVOLUTION_LDAP (if applicable)
// - MORK (via mork driver, which is built unconditionally)
// - THUNDERBIRD (via mork driver?, which is built unconditionally)
// - KAB (if applicable)
// - LDAP (via mork driver?, which is built unconditionally)
// - OTHER
//
// On Mac OS X:
// - MACAB (if applicable)
// - OTHER
//
// On Windows:
// - MORK, THUNDERBIRD, LDAP, OUTLOOK, OUTLOOKEXPRESS (via mozab driver,
// if WITH_MOZILLA)
// - OTHER
bool bWithMozilla = false, bWindows = false;
bool bHaveEvolution = false, bHaveKab = false; bool bHaveEvolution = false, bHaveKab = false;
bool bHaveMacab = false; bool bHaveMacab = false;
#if !defined WITH_MOZILLA || defined MACOSX #if defined WNT
bWithMozilla = false;
#if defined WITH_MOZILLA
bWithMozilla = true;
#endif #endif
#ifndef UNX bWindows = true;
bUnx = false;
#else #else
#if !defined MACOSX
bWithMozilla = true;
#endif
Reference< XDriverAccess> xManager(_pParent->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.DriverManager"))), UNO_QUERY); Reference< XDriverAccess> xManager(_pParent->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.DriverManager"))), UNO_QUERY);
try try
...@@ -101,6 +132,7 @@ namespace abp ...@@ -101,6 +132,7 @@ namespace abp
catch(...) catch(...)
{ {
} }
#endif #endif
// Items are displayed in list order // Items are displayed in list order
...@@ -112,8 +144,8 @@ namespace abp ...@@ -112,8 +144,8 @@ namespace abp
m_aAllTypes.push_back( ButtonItem( &m_aKab, AST_KAB, bHaveKab ) ); m_aAllTypes.push_back( ButtonItem( &m_aKab, AST_KAB, bHaveKab ) );
m_aAllTypes.push_back( ButtonItem( &m_aMacab, AST_MACAB, bHaveMacab ) ); m_aAllTypes.push_back( ButtonItem( &m_aMacab, AST_MACAB, bHaveMacab ) );
m_aAllTypes.push_back( ButtonItem( &m_aLDAP, AST_LDAP, bWithMozilla ) ); m_aAllTypes.push_back( ButtonItem( &m_aLDAP, AST_LDAP, bWithMozilla ) );
m_aAllTypes.push_back( ButtonItem( &m_aOutlook, AST_OUTLOOK, bWithMozilla && !bUnx ) ); m_aAllTypes.push_back( ButtonItem( &m_aOutlook, AST_OUTLOOK, bWithMozilla && bWindows ) );
m_aAllTypes.push_back( ButtonItem( &m_aOE, AST_OE, bWithMozilla && !bUnx ) ); m_aAllTypes.push_back( ButtonItem( &m_aOE, AST_OE, bWithMozilla && bWindows ) );
m_aAllTypes.push_back( ButtonItem( &m_aOther, AST_OTHER, true ) ); m_aAllTypes.push_back( ButtonItem( &m_aOther, AST_OTHER, true ) );
Link aTypeSelectionHandler = LINK(this, TypeSelectionPage, OnTypeSelected ); Link aTypeSelectionHandler = LINK(this, TypeSelectionPage, OnTypeSelected );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment