diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-11-30 19:37:07 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2012-12-03 13:34:53 +0000 |
commit | 8efb69e260ecbcde5ee67ab41ed7a9630783c29a (patch) | |
tree | 06874b87d5cf1a88d0450dcaeeb0fc88916eaa2a /extensions | |
parent | 847455f935dfdccf52cd786ea95b445cc6d02b36 (diff) |
move base check for bibliography to sfx2
- in the libbiblio component the frame is already created, and a frame
that is loading is vetoing a terminate
- thus move check to sfx2
- use the fancy svtools::RestartDialog
Change-Id: I500aaeac44d52969575f50f6b79d0c07a08c977e
Reviewed-on: https://gerrit.libreoffice.org/1207
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/bibliography/bibload.cxx | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index 24367917fbf7..537010ef3962 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -32,7 +32,6 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/sdbc/XRowSet.hpp> -#include <com/sun/star/sdbc/DriverManager.hpp> #include <com/sun/star/sdb/CommandType.hpp> #include <com/sun/star/frame/XFrameLoader.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -44,7 +43,6 @@ #include <com/sun/star/form/XLoadListener.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/uno/XAggregation.hpp> -#include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp> #include <toolkit/awt/vclxwindow.hxx> #include <vcl/window.hxx> #include <vcl/edit.hxx> @@ -233,53 +231,10 @@ void BibliographyLoader::cancel(void) throw (::com::sun::star::uno::RuntimeExcep //! } -// ----------------------------------------------------------------------- -namespace -{ - // lp#527938, debian#602953, fdo#33266, i#105408 - static bool lcl_isBaseAvailable() - { - try - { - // if we get com::sun::star::sdbc::DriverManager, libsdbc2 is there - // and the bibliography is assumed to work - return com::sun::star::sdbc::DriverManager::create(comphelper::getProcessComponentContext()).is(); - } - catch (Exception & e) - { - SAL_INFO( - "extensions.bibliography", - "assuming Base to be missing; caught " << e.Message); - return false; - } - } -} void BibliographyLoader::load(const Reference< XFrame > & rFrame, const rtl::OUString& rURL, const Sequence< PropertyValue >& rArgs, const Reference< XLoadEventListener > & rListener) throw (::com::sun::star::uno::RuntimeException) { - // lp#527938, debian#602953, fdo#33266, i#105408 - // make sure we actually can instanciate services from base first - if(!lcl_isBaseAvailable()) - { - try - { - using namespace org::freedesktop::PackageKit; - Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext())); - Sequence< ::rtl::OUString > vPackages(1); - vPackages[0] = "libreoffice-base"; - ::rtl::OUString sInteraction; - xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, sInteraction); - // FIXME: notify user to restart here - } - catch (Exception & e) - { - SAL_INFO( - "extensions.bibliography", - "trying to install LibreOffice Base, caught " << e.Message); - } - return; - } SolarMutexGuard aGuard; |