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
4481f5d4
Kaydet (Commit)
4481f5d4
authored
May 13, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, Replace some XMultiServiceFactory with XComponentContext
Change-Id: Ifbf8041ef9ffbecb88dacc9757895d777805372f
üst
357e1c0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
46 deletions
+27
-46
insdlg.cxx
cui/source/dialogs/insdlg.cxx
+19
-32
certpath.cxx
cui/source/options/certpath.cxx
+2
-5
optlingu.cxx
cui/source/options/optlingu.cxx
+6
-9
No files found.
cui/source/dialogs/insdlg.cxx
Dosyayı görüntüle @
4481f5d4
...
@@ -355,40 +355,27 @@ IMPL_LINK_NOARG(SvInsertPlugInDialog, BrowseHdl)
...
@@ -355,40 +355,27 @@ IMPL_LINK_NOARG(SvInsertPlugInDialog, BrowseHdl)
void
fillNetscapePluginFilters
(
Sequence
<
OUString
>&
rNames
,
Sequence
<
OUString
>&
rTypes
);
void
fillNetscapePluginFilters
(
Sequence
<
OUString
>&
rNames
,
Sequence
<
OUString
>&
rTypes
);
fillNetscapePluginFilters
(
aFilterNames
,
aFilterTypes
);
fillNetscapePluginFilters
(
aFilterNames
,
aFilterTypes
);
Reference
<
XMultiServiceFactory
>
xFactory
(
::
comphelper
::
getProcessServiceFactory
()
);
Reference
<
XComponentContext
>
xContext
(
::
comphelper
::
getProcessComponentContext
()
);
if
(
xFactory
.
is
()
)
Reference
<
XFilePicker3
>
xFilePicker
=
ui
::
dialogs
::
FilePicker
::
createWithMode
(
xContext
,
ui
::
dialogs
::
TemplateDescription
::
FILEOPEN_SIMPLE
);
{
Reference
<
XFilePicker
>
xFilePicker
(
xFactory
->
createInstance
(
"com.sun.star.ui.dialogs.FilePicker"
),
UNO_QUERY
);
DBG_ASSERT
(
xFilePicker
.
is
(),
"could not get FilePicker service"
);
Reference
<
XInitialization
>
xInit
(
xFilePicker
,
UNO_QUERY
);
Reference
<
XFilterManager
>
xFilterMgr
(
xFilePicker
,
UNO_QUERY
);
if
(
xInit
.
is
()
&&
xFilePicker
.
is
()
&&
xFilterMgr
.
is
()
)
{
Sequence
<
Any
>
aServiceType
(
1
);
aServiceType
[
0
]
<<=
TemplateDescription
::
FILEOPEN_SIMPLE
;
xInit
->
initialize
(
aServiceType
);
// add the filters
// add the filters
try
try
{
{
const
OUString
*
pNames
=
aFilterNames
.
getConstArray
();
const
OUString
*
pNames
=
aFilterNames
.
getConstArray
();
const
OUString
*
pTypes
=
aFilterTypes
.
getConstArray
();
const
OUString
*
pTypes
=
aFilterTypes
.
getConstArray
();
for
(
int
i
=
0
;
i
<
aFilterNames
.
getLength
();
i
++
)
for
(
int
i
=
0
;
i
<
aFilterNames
.
getLength
();
i
++
)
xFilterMg
r
->
appendFilter
(
pNames
[
i
],
pTypes
[
i
]
);
xFilePicke
r
->
appendFilter
(
pNames
[
i
],
pTypes
[
i
]
);
}
}
catch
(
IllegalArgumentException
&
)
catch
(
IllegalArgumentException
&
)
{
{
DBG_ASSERT
(
0
,
"caught IllegalArgumentException when registering filter
\n
"
);
DBG_ASSERT
(
0
,
"caught IllegalArgumentException when registering filter
\n
"
);
}
}
if
(
xFilePicker
->
execute
()
==
ExecutableDialogResults
::
OK
)
if
(
xFilePicker
->
execute
()
==
ExecutableDialogResults
::
OK
)
{
{
Sequence
<
OUString
>
aPathSeq
(
xFilePicker
->
getFiles
()
);
Sequence
<
OUString
>
aPathSeq
(
xFilePicker
->
getFiles
()
);
INetURLObject
aObj
(
aPathSeq
[
0
]
);
INetURLObject
aObj
(
aPathSeq
[
0
]
);
m_pEdFileurl
->
SetText
(
aObj
.
PathToFileName
());
m_pEdFileurl
->
SetText
(
aObj
.
PathToFileName
());
}
}
}
}
return
0
;
return
0
;
...
...
cui/source/options/certpath.cxx
Dosyayı görüntüle @
4481f5d4
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
#include "certpath.hrc"
#include "certpath.hrc"
#include "dialmgr.hxx"
#include "dialmgr.hxx"
#include <com/sun/star/mozilla/
X
MozillaBootstrap.hpp>
#include <com/sun/star/mozilla/MozillaBootstrap.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/processfactory.hxx>
...
@@ -71,10 +71,7 @@ CertPathDialog::CertPathDialog( Window* pParent ) :
...
@@ -71,10 +71,7 @@ CertPathDialog::CertPathDialog( Window* pParent ) :
"mozilla"
};
"mozilla"
};
sal_Int32
nProduct
=
SAL_N_ELEMENTS
(
productTypes
);
sal_Int32
nProduct
=
SAL_N_ELEMENTS
(
productTypes
);
uno
::
Reference
<
uno
::
XInterface
>
xInstance
=
comphelper
::
getProcessServiceFactory
()
->
createInstance
(
uno
::
Reference
<
mozilla
::
XMozillaBootstrap
>
xMozillaBootstrap
=
mozilla
::
MozillaBootstrap
::
create
(
comphelper
::
getProcessComponentContext
()
);
"com.sun.star.mozilla.MozillaBootstrap"
);
uno
::
Reference
<
mozilla
::
XMozillaBootstrap
>
xMozillaBootstrap
(
xInstance
,
uno
::
UNO_QUERY_THROW
);
for
(
sal_Int32
i
=
0
;
i
<
nProduct
;
++
i
)
for
(
sal_Int32
i
=
0
;
i
<
nProduct
;
++
i
)
{
{
...
...
cui/source/options/optlingu.cxx
Dosyayı görüntüle @
4481f5d4
...
@@ -517,7 +517,6 @@ class SvxLinguData_Impl
...
@@ -517,7 +517,6 @@ class SvxLinguData_Impl
LangImplNameTable
aCfgHyphTable
;
LangImplNameTable
aCfgHyphTable
;
LangImplNameTable
aCfgThesTable
;
LangImplNameTable
aCfgThesTable
;
LangImplNameTable
aCfgGrammarTable
;
LangImplNameTable
aCfgGrammarTable
;
uno
::
Reference
<
XMultiServiceFactory
>
xMSF
;
uno
::
Reference
<
XLinguServiceManager2
>
xLinguSrvcMgr
;
uno
::
Reference
<
XLinguServiceManager2
>
xLinguSrvcMgr
;
...
@@ -730,8 +729,8 @@ static void lcl_MergeDisplayArray(
...
@@ -730,8 +729,8 @@ static void lcl_MergeDisplayArray(
SvxLinguData_Impl
::
SvxLinguData_Impl
()
:
SvxLinguData_Impl
::
SvxLinguData_Impl
()
:
nDisplayServices
(
0
)
nDisplayServices
(
0
)
{
{
xMSF
=
::
comphelper
::
getProcessServiceFactory
();
uno
::
Reference
<
XComponentContext
>
xContext
=
::
comphelper
::
getProcessComponentContext
();
xLinguSrvcMgr
=
LinguServiceManager
::
create
(
comphelper
::
getComponentContext
(
xMSF
)
);
xLinguSrvcMgr
=
LinguServiceManager
::
create
(
xContext
);
const
Locale
&
rCurrentLocale
=
Application
::
GetSettings
().
GetLanguageTag
().
getLocale
();
const
Locale
&
rCurrentLocale
=
Application
::
GetSettings
().
GetLanguageTag
().
getLocale
();
Sequence
<
Any
>
aArgs
(
2
);
//second arguments has to be empty!
Sequence
<
Any
>
aArgs
(
2
);
//second arguments has to be empty!
...
@@ -748,7 +747,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
...
@@ -748,7 +747,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
ServiceInfo_Impl
aInfo
;
ServiceInfo_Impl
aInfo
;
aInfo
.
sSpellImplName
=
pSpellNames
[
nIdx
];
aInfo
.
sSpellImplName
=
pSpellNames
[
nIdx
];
aInfo
.
xSpell
=
uno
::
Reference
<
XSpellChecker
>
(
aInfo
.
xSpell
=
uno
::
Reference
<
XSpellChecker
>
(
x
MSF
->
createInstanceWithArguments
(
aInfo
.
sSpellImplName
,
aArgs
),
UNO_QUERY
);
x
Context
->
getServiceManager
()
->
createInstanceWithArgumentsAndContext
(
aInfo
.
sSpellImplName
,
aArgs
,
xContext
),
UNO_QUERY
);
uno
::
Reference
<
XServiceDisplayName
>
xDispName
(
aInfo
.
xSpell
,
UNO_QUERY
);
uno
::
Reference
<
XServiceDisplayName
>
xDispName
(
aInfo
.
xSpell
,
UNO_QUERY
);
if
(
xDispName
.
is
())
if
(
xDispName
.
is
())
...
@@ -772,7 +771,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
...
@@ -772,7 +771,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
ServiceInfo_Impl
aInfo
;
ServiceInfo_Impl
aInfo
;
aInfo
.
sGrammarImplName
=
pGrammarNames
[
nIdx
];
aInfo
.
sGrammarImplName
=
pGrammarNames
[
nIdx
];
aInfo
.
xGrammar
=
uno
::
Reference
<
XProofreader
>
(
aInfo
.
xGrammar
=
uno
::
Reference
<
XProofreader
>
(
x
MSF
->
createInstanceWithArguments
(
aInfo
.
sGrammarImplName
,
aArgs
),
UNO_QUERY
);
x
Context
->
getServiceManager
()
->
createInstanceWithArgumentsAndContext
(
aInfo
.
sGrammarImplName
,
aArgs
,
xContext
),
UNO_QUERY
);
uno
::
Reference
<
XServiceDisplayName
>
xDispName
(
aInfo
.
xGrammar
,
UNO_QUERY
);
uno
::
Reference
<
XServiceDisplayName
>
xDispName
(
aInfo
.
xGrammar
,
UNO_QUERY
);
if
(
xDispName
.
is
())
if
(
xDispName
.
is
())
...
@@ -796,7 +795,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
...
@@ -796,7 +795,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
ServiceInfo_Impl
aInfo
;
ServiceInfo_Impl
aInfo
;
aInfo
.
sHyphImplName
=
pHyphNames
[
nIdx
];
aInfo
.
sHyphImplName
=
pHyphNames
[
nIdx
];
aInfo
.
xHyph
=
uno
::
Reference
<
XHyphenator
>
(
aInfo
.
xHyph
=
uno
::
Reference
<
XHyphenator
>
(
x
MSF
->
createInstanceWithArguments
(
aInfo
.
sHyphImplName
,
aArgs
),
UNO_QUERY
);
x
Context
->
getServiceManager
()
->
createInstanceWithArgumentsAndContext
(
aInfo
.
sHyphImplName
,
aArgs
,
xContext
),
UNO_QUERY
);
uno
::
Reference
<
XServiceDisplayName
>
xDispName
(
aInfo
.
xHyph
,
UNO_QUERY
);
uno
::
Reference
<
XServiceDisplayName
>
xDispName
(
aInfo
.
xHyph
,
UNO_QUERY
);
if
(
xDispName
.
is
())
if
(
xDispName
.
is
())
...
@@ -820,7 +819,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
...
@@ -820,7 +819,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
ServiceInfo_Impl
aInfo
;
ServiceInfo_Impl
aInfo
;
aInfo
.
sThesImplName
=
pThesNames
[
nIdx
];
aInfo
.
sThesImplName
=
pThesNames
[
nIdx
];
aInfo
.
xThes
=
uno
::
Reference
<
XThesaurus
>
(
aInfo
.
xThes
=
uno
::
Reference
<
XThesaurus
>
(
x
MSF
->
createInstanceWithArguments
(
aInfo
.
sThesImplName
,
aArgs
),
UNO_QUERY
);
x
Context
->
getServiceManager
()
->
createInstanceWithArgumentsAndContext
(
aInfo
.
sThesImplName
,
aArgs
,
xContext
),
UNO_QUERY
);
uno
::
Reference
<
XServiceDisplayName
>
xDispName
(
aInfo
.
xThes
,
UNO_QUERY
);
uno
::
Reference
<
XServiceDisplayName
>
xDispName
(
aInfo
.
xThes
,
UNO_QUERY
);
if
(
xDispName
.
is
())
if
(
xDispName
.
is
())
...
@@ -871,14 +870,12 @@ SvxLinguData_Impl::SvxLinguData_Impl( const SvxLinguData_Impl &rData ) :
...
@@ -871,14 +870,12 @@ SvxLinguData_Impl::SvxLinguData_Impl( const SvxLinguData_Impl &rData ) :
aCfgHyphTable
(
rData
.
aCfgHyphTable
),
aCfgHyphTable
(
rData
.
aCfgHyphTable
),
aCfgThesTable
(
rData
.
aCfgThesTable
),
aCfgThesTable
(
rData
.
aCfgThesTable
),
aCfgGrammarTable
(
rData
.
aCfgGrammarTable
),
aCfgGrammarTable
(
rData
.
aCfgGrammarTable
),
xMSF
(
rData
.
xMSF
),
xLinguSrvcMgr
(
rData
.
xLinguSrvcMgr
)
xLinguSrvcMgr
(
rData
.
xLinguSrvcMgr
)
{
{
}
}
SvxLinguData_Impl
&
SvxLinguData_Impl
::
operator
=
(
const
SvxLinguData_Impl
&
rData
)
SvxLinguData_Impl
&
SvxLinguData_Impl
::
operator
=
(
const
SvxLinguData_Impl
&
rData
)
{
{
xMSF
=
rData
.
xMSF
;
xLinguSrvcMgr
=
rData
.
xLinguSrvcMgr
;
xLinguSrvcMgr
=
rData
.
xLinguSrvcMgr
;
aAllServiceLocales
=
rData
.
aAllServiceLocales
;
aAllServiceLocales
=
rData
.
aAllServiceLocales
;
aCfgSpellTable
=
rData
.
aCfgSpellTable
;
aCfgSpellTable
=
rData
.
aCfgSpellTable
;
...
...
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