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
83235cac
Kaydet (Commit)
83235cac
authored
Ock 10, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, convert code to use new-style service constructor
Change-Id: I1b50f7ef6c01d13abd15ba3a76bd683a0151a914
üst
4ce614f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
28 deletions
+21
-28
ConnectionHelper.cxx
dbaccess/source/ui/dlg/ConnectionHelper.cxx
+21
-28
No files found.
dbaccess/source/ui/dlg/ConnectionHelper.cxx
Dosyayı görüntüle @
83235cac
...
...
@@ -49,6 +49,7 @@
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/mozilla/MozillaBootstrap.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/ucb/XProgressHandler.hpp>
#include "UITools.hxx"
...
...
@@ -290,42 +291,34 @@ DBG_NAME(OConnectionHelper)
if
(
eType
==
::
dbaccess
::
DST_THUNDERBIRD
)
profileType
=
MozillaProductType_Thunderbird
;
Reference
<
X
MultiServiceFactory
>
xFactory
=
::
comphelper
::
getProcessServiceFactory
();
OSL_ENSURE
(
xFactory
.
is
(),
"can't get service factory"
);
Reference
<
X
ComponentContext
>
xContext
=
::
comphelper
::
getProcessComponentContext
();
Reference
<
XMozillaBootstrap
>
xMozillaBootstrap
=
MozillaBootstrap
::
create
(
xContext
);
Reference
<
XInterface
>
xInstance
=
xFactory
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.mozilla.MozillaBootstrap"
))
);
OSL_ENSURE
(
xInstance
.
is
(),
"failed to create instance"
);
Reference
<
XMozillaBootstrap
>
xMozillaBootstrap
=
Reference
<
XMozillaBootstrap
>
(
xInstance
,
UNO_QUERY
);
OSL_ENSURE
(
xMozillaBootstrap
.
is
(),
"failed to create instance"
);
// collect all Mozilla Profiles
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
list
;
if
(
xMozillaBootstrap
.
is
())
{
// collect all Mozilla Profiles
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
list
;
xMozillaBootstrap
->
getProfileList
(
profileType
,
list
);
const
::
rtl
::
OUString
*
pArray
=
list
.
getConstArray
();
xMozillaBootstrap
->
getProfileList
(
profileType
,
list
);
const
::
rtl
::
OUString
*
pArray
=
list
.
getConstArray
();
sal_Int32
count
=
list
.
getLength
();
sal_Int32
count
=
list
.
getLength
();
StringBag
aProfiles
;
for
(
sal_Int32
index
=
0
;
index
<
count
;
index
++
)
aProfiles
.
insert
(
pArray
[
index
]);
StringBag
aProfiles
;
for
(
sal_Int32
index
=
0
;
index
<
count
;
index
++
)
aProfiles
.
insert
(
pArray
[
index
]);
// execute the select dialog
ODatasourceSelectDialog
aSelector
(
GetParent
(),
aProfiles
);
::
rtl
::
OUString
sOldProfile
=
getURLNoPrefix
();
// execute the select dialog
ODatasourceSelectDialog
aSelector
(
GetParent
(),
aProfiles
);
::
rtl
::
OUString
sOldProfile
=
getURLNoPrefix
();
if
(
!
sOldProfile
.
isEmpty
())
aSelector
.
Select
(
sOldProfile
);
else
aSelector
.
Select
(
xMozillaBootstrap
->
getDefaultProfile
(
profileType
));
if
(
!
sOldProfile
.
isEmpty
())
aSelector
.
Select
(
sOldProfile
);
else
aSelector
.
Select
(
xMozillaBootstrap
->
getDefaultProfile
(
profileType
));
if
(
RET_OK
==
aSelector
.
Execute
()
)
setURLNoPrefix
(
aSelector
.
GetSelected
());
break
;
}
if
(
RET_OK
==
aSelector
.
Execute
()
)
setURLNoPrefix
(
aSelector
.
GetSelected
());
break
;
}
default
:
break
;
...
...
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