[Libreoffice-commits] .: Branch 'libreoffice-3-6' - extensions/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Jun 26 05:42:45 PDT 2012
extensions/source/abpilot/typeselectionpage.cxx | 49 +++++++++++++++---------
1 file changed, 32 insertions(+), 17 deletions(-)
New commits:
commit a8687f47793afbf4b6a837e769ef2de31c3f0b36
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 26 13:31:16 2012 +0100
Resolves: fdo#50967 Address DataSource dialog fails on throws
e.g. kde3 address book support is built in, but loaded
on system without kde3 libs
Change-Id: I0be27eeab3fce8f26fca203d61c67693b880fb3b
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx
index aee5219..065c11b 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -67,34 +67,49 @@ namespace abp
aItemSize.Width() = GetOutputSizePixel().Width() - 30;
bool bWithMozilla = true, bUnx = true;
- bool bHaveEvolution = true, bHaveKab = true;
- bool bHaveMacab = true;
+ bool bHaveEvolution = false, bHaveKab = false;
+ bool bHaveMacab = false;
#if !defined WITH_MOZILLA || defined MACOSX
bWithMozilla = false;
#endif
#ifndef UNX
bUnx = false;
- bHaveEvolution = false;
- bHaveKab = false;
- bHaveMacab = false;
#else
Reference< XDriverAccess> xManager(_pParent->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.DriverManager"))), UNO_QUERY);
- // check whether Evolution is available
- Reference< XDriver > xDriver( xManager->getDriverByURL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:evolution:local"))) );
- if ( !xDriver.is() )
- bHaveEvolution = false;
+ try
+ {
+ // check whether Evolution is available
+ Reference< XDriver > xDriver( xManager->getDriverByURL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:evolution:local"))) );
+ if ( xDriver.is() )
+ bHaveEvolution = true;
+ }
+ catch (...)
+ {
+ }
// check whether KDE address book is available
- xDriver = xManager->getDriverByURL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:kab")));
- if ( !xDriver.is() )
- bHaveKab = false;
-
- // check whether Mac OS X address book is available
- xDriver = xManager->getDriverByURL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:macab")));
- if ( !xDriver.is() )
- bHaveMacab = false;
+ try
+ {
+ Reference< XDriver > xDriver( xManager->getDriverByURL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:kab"))) );
+ if ( xDriver.is() )
+ bHaveKab = true;
+ }
+ catch (...)
+ {
+ }
+
+ try
+ {
+ // check whether Mac OS X address book is available
+ Reference< XDriver > xDriver( xManager->getDriverByURL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:macab"))) );
+ if ( xDriver.is() )
+ bHaveMacab = true;
+ }
+ catch(...)
+ {
+ }
#endif
// Items are displayed in list order
More information about the Libreoffice-commits
mailing list