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
3475d91b
Kaydet (Commit)
3475d91b
authored
Mar 08, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, cleanup some usage of getProcessServiceFactory()
Change-Id: Id97ae7a16141b5c5df380f5838bba11cb08c9223
üst
286a8622
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
73 deletions
+68
-73
mailconfigpage.cxx
sw/source/ui/config/mailconfigpage.cxx
+67
-71
addresslistdialog.cxx
sw/source/ui/dbui/addresslistdialog.cxx
+1
-1
dbinsdlg.cxx
sw/source/ui/dbui/dbinsdlg.cxx
+0
-1
No files found.
sw/source/ui/config/mailconfigpage.cxx
Dosyayı görüntüle @
3475d91b
...
@@ -318,90 +318,86 @@ IMPL_STATIC_LINK(SwTestAccountSettingsDialog, TestHdl, void*, EMPTYARG)
...
@@ -318,90 +318,86 @@ IMPL_STATIC_LINK(SwTestAccountSettingsDialog, TestHdl, void*, EMPTYARG)
void
SwTestAccountSettingsDialog
::
Test
()
void
SwTestAccountSettingsDialog
::
Test
()
{
{
uno
::
Reference
<
XMultiServiceFactory
>
rMgr
=
::
comphelper
::
getProcessServiceFactory
();
uno
::
Reference
<
uno
::
XComponentContext
>
xContext
=
::
comphelper
::
getProcessComponentContext
();
rtl
::
OUString
sException
;
rtl
::
OUString
sException
;
bool
bIsLoggedIn
=
false
;
bool
bIsLoggedIn
=
false
;
bool
bIsServer
=
false
;
bool
bIsServer
=
false
;
if
(
rMgr
.
is
())
try
{
{
try
uno
::
Reference
<
mail
::
XMailService
>
xInMailService
;
uno
::
Reference
<
mail
::
XMailServiceProvider
>
xMailServiceProvider
(
mail
::
MailServiceProvider
::
create
(
xContext
)
);
uno
::
Reference
<
mail
::
XMailService
>
xMailService
=
xMailServiceProvider
->
create
(
mail
::
MailServiceType_SMTP
);
if
(
m_bStop
)
return
;
uno
::
Reference
<
XConnectionListener
>
xConnectionListener
(
new
SwConnectionListener
());
if
(
m_pParent
->
m_pConfigItem
->
IsAuthentication
()
&&
m_pParent
->
m_pConfigItem
->
IsSMTPAfterPOP
())
{
{
uno
::
Reference
<
mail
::
XMailService
>
xInMailService
;
xInMailService
=
xMailServiceProvider
->
create
(
uno
::
Reference
<
mail
::
XMailServiceProvider
>
xMailServiceProvider
(
m_pParent
->
m_pConfigItem
->
IsInServerPOP
()
?
mail
::
MailServiceProvider
::
create
(
mail
::
MailServiceType_POP3
:
mail
::
MailServiceType_IMAP
);
comphelper
::
getComponentContext
(
rMgr
)));
uno
::
Reference
<
mail
::
XMailService
>
xMailService
=
xMailServiceProvider
->
create
(
mail
::
MailServiceType_SMTP
);
if
(
m_bStop
)
if
(
m_bStop
)
return
;
return
;
uno
::
Reference
<
XConnectionListener
>
xConnectionListener
(
new
SwConnectionListener
());
//authenticate at the POP or IMAP server first
uno
::
Reference
<
XAuthenticator
>
xAuthenticator
=
if
(
m_pParent
->
m_pConfigItem
->
IsAuthentication
()
&&
new
SwAuthenticator
(
m_pParent
->
m_pConfigItem
->
IsSMTPAfterPOP
())
m_pParent
->
m_pConfigItem
->
GetInServerUserName
(),
{
m_pParent
->
m_pConfigItem
->
GetInServerPassword
(),
xInMailService
=
xMailServiceProvider
->
create
(
this
);
m_pParent
->
m_pConfigItem
->
IsInServerPOP
()
?
mail
::
MailServiceType_POP3
:
mail
::
MailServiceType_IMAP
);
xInMailService
->
addConnectionListener
(
xConnectionListener
);
if
(
m_bStop
)
return
;
//authenticate at the POP or IMAP server first
uno
::
Reference
<
XAuthenticator
>
xAuthenticator
=
new
SwAuthenticator
(
m_pParent
->
m_pConfigItem
->
GetInServerUserName
(),
m_pParent
->
m_pConfigItem
->
GetInServerPassword
(),
this
);
xInMailService
->
addConnectionListener
(
xConnectionListener
);
//check connection
uno
::
Reference
<
uno
::
XCurrentContext
>
xConnectionContext
=
new
SwConnectionContext
(
m_pParent
->
m_pConfigItem
->
GetInServerName
(),
m_pParent
->
m_pConfigItem
->
GetInServerPort
(),
::
rtl
::
OUString
(
"Insecure"
));
xInMailService
->
connect
(
xConnectionContext
,
xAuthenticator
);
}
if
(
m_bStop
)
return
;
uno
::
Reference
<
XAuthenticator
>
xAuthenticator
;
if
(
m_pParent
->
m_pConfigItem
->
IsAuthentication
()
&&
!
m_pParent
->
m_pConfigItem
->
IsSMTPAfterPOP
()
&&
!
m_pParent
->
m_pConfigItem
->
GetMailUserName
().
isEmpty
())
xAuthenticator
=
new
SwAuthenticator
(
m_pParent
->
m_pConfigItem
->
GetMailUserName
(),
m_pParent
->
m_pConfigItem
->
GetMailPassword
(),
this
);
else
xAuthenticator
=
new
SwAuthenticator
();
xMailService
->
addConnectionListener
(
xConnectionListener
);
if
(
m_bStop
)
return
;
//just to check if the server exists
xMailService
->
getSupportedConnectionTypes
();
if
(
m_bStop
)
return
;
bIsServer
=
true
;
//check connection
//check connection
uno
::
Reference
<
uno
::
XCurrentContext
>
xConnectionContext
=
uno
::
Reference
<
uno
::
XCurrentContext
>
xConnectionContext
=
new
SwConnectionContext
(
new
SwConnectionContext
(
m_pParent
->
m_aServerED
.
GetText
(),
m_pParent
->
m_pConfigItem
->
GetInServerName
(),
sal
::
static_int_cast
<
sal_Int16
,
sal_Int64
>
(
m_pParent
->
m_aPortNF
.
GetValue
()),
m_pParent
->
m_pConfigItem
->
GetInServerPort
(),
m_pParent
->
m_aSecureCB
.
IsChecked
()
?
OUString
(
"Ssl"
)
:
OUString
(
"Insecure"
));
::
rtl
::
OUString
(
"Insecure"
));
xMailService
->
connect
(
xConnectionContext
,
xAuthenticator
);
xInMailService
->
connect
(
xConnectionContext
,
xAuthenticator
);
bIsLoggedIn
=
xMailService
->
isConnected
();
if
(
xInMailService
.
is
()
)
xInMailService
->
disconnect
();
if
(
xMailService
->
isConnected
())
xMailService
->
disconnect
();
}
catch
(
const
uno
::
Exception
&
e
)
{
sException
=
e
.
Message
;
}
}
if
(
m_bStop
)
return
;
uno
::
Reference
<
XAuthenticator
>
xAuthenticator
;
if
(
m_pParent
->
m_pConfigItem
->
IsAuthentication
()
&&
!
m_pParent
->
m_pConfigItem
->
IsSMTPAfterPOP
()
&&
!
m_pParent
->
m_pConfigItem
->
GetMailUserName
().
isEmpty
())
xAuthenticator
=
new
SwAuthenticator
(
m_pParent
->
m_pConfigItem
->
GetMailUserName
(),
m_pParent
->
m_pConfigItem
->
GetMailPassword
(),
this
);
else
xAuthenticator
=
new
SwAuthenticator
();
xMailService
->
addConnectionListener
(
xConnectionListener
);
if
(
m_bStop
)
return
;
//just to check if the server exists
xMailService
->
getSupportedConnectionTypes
();
if
(
m_bStop
)
return
;
bIsServer
=
true
;
//check connection
uno
::
Reference
<
uno
::
XCurrentContext
>
xConnectionContext
=
new
SwConnectionContext
(
m_pParent
->
m_aServerED
.
GetText
(),
sal
::
static_int_cast
<
sal_Int16
,
sal_Int64
>
(
m_pParent
->
m_aPortNF
.
GetValue
()),
m_pParent
->
m_aSecureCB
.
IsChecked
()
?
OUString
(
"Ssl"
)
:
OUString
(
"Insecure"
));
xMailService
->
connect
(
xConnectionContext
,
xAuthenticator
);
bIsLoggedIn
=
xMailService
->
isConnected
();
if
(
xInMailService
.
is
()
)
xInMailService
->
disconnect
();
if
(
xMailService
->
isConnected
())
xMailService
->
disconnect
();
}
catch
(
const
uno
::
Exception
&
e
)
{
sException
=
e
.
Message
;
}
}
Image
aFailedImg
=
m_aImageList
.
GetImage
(
FN_FORMULA_CANCEL
);
Image
aFailedImg
=
m_aImageList
.
GetImage
(
FN_FORMULA_CANCEL
);
...
...
sw/source/ui/dbui/addresslistdialog.cxx
Dosyayı görüntüle @
3475d91b
...
@@ -276,7 +276,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl)
...
@@ -276,7 +276,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl)
{
{
SvTreeListEntry
*
pSelect
=
m_aListLB
.
FirstSelected
();
SvTreeListEntry
*
pSelect
=
m_aListLB
.
FirstSelected
();
uno
::
Reference
<
XMultiServiceFactory
>
xMgr
(
::
comphelper
::
getProcessServiceFactory
()
);
uno
::
Reference
<
XMultiServiceFactory
>
xMgr
(
::
comphelper
::
getProcessServiceFactory
()
);
if
(
pSelect
&&
xMgr
.
is
()
)
if
(
pSelect
)
{
{
String
sCommand
=
m_aListLB
.
GetEntryText
(
pSelect
,
ITEMID_TABLE
-
1
);
String
sCommand
=
m_aListLB
.
GetEntryText
(
pSelect
,
ITEMID_TABLE
-
1
);
if
(
!
sCommand
.
Len
()
)
if
(
!
sCommand
.
Len
()
)
...
...
sw/source/ui/dbui/dbinsdlg.cxx
Dosyayı görüntüle @
3475d91b
...
@@ -1215,7 +1215,6 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
...
@@ -1215,7 +1215,6 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
// for adding as fields -> insert a "NextField" after
// for adding as fields -> insert a "NextField" after
// every data set
// every data set
SwDBFormatData
aDBFormatData
;
SwDBFormatData
aDBFormatData
;
Reference
<
XMultiServiceFactory
>
xMgr
(
::
comphelper
::
getProcessServiceFactory
()
);
Reference
<
XComponentContext
>
xContext
(
::
comphelper
::
getProcessComponentContext
()
);
Reference
<
XComponentContext
>
xContext
(
::
comphelper
::
getProcessComponentContext
()
);
aDBFormatData
.
xFormatter
=
Reference
<
util
::
XNumberFormatter
>
(
util
::
NumberFormatter
::
create
(
xContext
),
UNO_QUERY_THROW
)
;
aDBFormatData
.
xFormatter
=
Reference
<
util
::
XNumberFormatter
>
(
util
::
NumberFormatter
::
create
(
xContext
),
UNO_QUERY_THROW
)
;
...
...
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