Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
a6c1e418
Kaydet (Commit)
a6c1e418
authored
Kas 24, 2012
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
lp#527938: use new-style service and session installer in bibliography
Change-Id: Id06e64ffb6c63cfba2f9948579dc03a4f54b6d45
üst
db160a3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
bibload.cxx
extensions/source/bibliography/bibload.cxx
+23
-3
No files found.
extensions/source/bibliography/bibload.cxx
Dosyayı görüntüle @
a6c1e418
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbc/XRowSet.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/sdb/CommandType.hpp>
#include <com/sun/star/frame/XFrameLoader.hpp>
#include <com/sun/star/frame/XFrameLoader.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
...
@@ -43,6 +44,7 @@
...
@@ -43,6 +44,7 @@
#include <com/sun/star/form/XLoadListener.hpp>
#include <com/sun/star/form/XLoadListener.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/uno/XAggregation.hpp>
#include <com/sun/star/uno/XAggregation.hpp>
#include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <vcl/window.hxx>
#include <vcl/window.hxx>
#include <vcl/edit.hxx>
#include <vcl/edit.hxx>
...
@@ -239,9 +241,9 @@ namespace
...
@@ -239,9 +241,9 @@ namespace
{
{
try
try
{
{
Reference
<
XMultiServiceFactory
>
xMgr
=
comphelper
::
getProcessServiceFactory
();
// if we get com::sun::star::sdbc::DriverManager, libsdbc2 is there
Reference
<
XAggregation
>
xAggregate
=
Reference
<
XAggregation
>
(
xMgr
->
createInstance
(
C2U
(
"com.sun.star.sdb.RowSet"
)),
UNO_QUERY
);
// and the bibliography is assumed to work
return
xAggregate
.
is
();
return
com
::
sun
::
star
::
sdbc
::
DriverManager
::
create
(
comphelper
::
getProcessComponentContext
())
.
is
();
}
}
catch
(...)
catch
(...)
{
{
...
@@ -256,7 +258,25 @@ void BibliographyLoader::load(const Reference< XFrame > & rFrame, const rtl::OUS
...
@@ -256,7 +258,25 @@ void BibliographyLoader::load(const Reference< XFrame > & rFrame, const rtl::OUS
// lp#527938, debian#602953, fdo#33266, i#105408
// lp#527938, debian#602953, fdo#33266, i#105408
// make sure we actually can instanciate services from base first
// make sure we actually can instanciate services from base first
if
(
!
lcl_isBaseAvailable
())
if
(
!
lcl_isBaseAvailable
())
{
try
{
using
namespace
org
::
freedesktop
::
PackageKit
;
Reference
<
XSyncDbusSessionHelper
>
xSyncDbusSessionHelper
(
SyncDbusSessionHelper
::
create
(
comphelper
::
getProcessComponentContext
()),
UNO_QUERY
);
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
;
return
;
}
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment