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
2fdacd01
Kaydet (Commit)
2fdacd01
authored
Agu 08, 2011
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Move function to the file where it is used
üst
5207c9fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
68 deletions
+63
-68
bootstrap.cxx
cppuhelper/source/bootstrap.cxx
+0
-60
servicefactory.cxx
cppuhelper/source/servicefactory.cxx
+63
-8
No files found.
cppuhelper/source/bootstrap.cxx
Dosyayı görüntüle @
2fdacd01
...
...
@@ -119,66 +119,6 @@ Bootstrap const & get_unorc() SAL_THROW( () )
return
*
(
Bootstrap
const
*
)
&
s_bstrap
;
}
void
addFactories
(
char
const
*
const
*
ppNames
/* lib, implname, ..., 0 */
,
OUString
const
&
bootstrapPath
,
Reference
<
lang
::
XMultiComponentFactory
>
const
&
xMgr
,
Reference
<
registry
::
XRegistryKey
>
const
&
xKey
)
SAL_THROW
(
(
Exception
)
)
{
Reference
<
container
::
XSet
>
xSet
(
xMgr
,
UNO_QUERY
);
OSL_ASSERT
(
xSet
.
is
()
);
Reference
<
lang
::
XMultiServiceFactory
>
xSF
(
xMgr
,
UNO_QUERY
);
while
(
*
ppNames
)
{
OUString
lib
(
OUString
::
createFromAscii
(
*
ppNames
++
)
);
OUString
implName
(
OUString
::
createFromAscii
(
*
ppNames
++
)
);
Any
aFac
(
makeAny
(
loadSharedLibComponentFactory
(
lib
,
bootstrapPath
,
implName
,
xSF
,
xKey
)
)
);
xSet
->
insert
(
aFac
);
#if OSL_DEBUG_LEVEL > 1
if
(
xSet
->
has
(
aFac
))
{
Reference
<
lang
::
XServiceInfo
>
xInfo
;
if
(
aFac
>>=
xInfo
)
{
::
fprintf
(
stderr
,
"> implementation %s supports: "
,
ppNames
[
-
1
]
);
Sequence
<
OUString
>
supported
(
xInfo
->
getSupportedServiceNames
()
);
for
(
sal_Int32
nPos
=
supported
.
getLength
();
nPos
--
;
)
{
OString
str
(
OUStringToOString
(
supported
[
nPos
],
RTL_TEXTENCODING_ASCII_US
)
);
::
fprintf
(
stderr
,
nPos
?
"%s, "
:
"%s
\n
"
,
str
.
getStr
()
);
}
}
else
{
::
fprintf
(
stderr
,
"> implementation %s provides NO lang::XServiceInfo!!!
\n
"
,
ppNames
[
-
1
]
);
}
}
#endif
#if OSL_DEBUG_LEVEL > 0
if
(
!
xSet
->
has
(
aFac
))
{
OStringBuffer
buf
(
64
);
buf
.
append
(
"### failed inserting shared lib
\"
"
);
buf
.
append
(
ppNames
[
-
2
]
);
buf
.
append
(
"
\"
!!!"
);
OString
str
(
buf
.
makeStringAndClear
()
);
OSL_FAIL
(
str
.
getStr
()
);
}
#endif
}
}
// private forward decl
Reference
<
lang
::
XMultiComponentFactory
>
bootstrapInitialSF
(
OUString
const
&
rBootstrapPath
)
...
...
cppuhelper/source/servicefactory.cxx
Dosyayı görüntüle @
2fdacd01
...
...
@@ -33,6 +33,7 @@
#include "rtl/string.hxx"
#include "rtl/bootstrap.hxx"
#include "rtl/strbuf.hxx"
#include "osl/diagnose.h"
#include "osl/file.h"
#include "osl/module.h"
...
...
@@ -67,14 +68,6 @@ namespace css = com::sun::star;
namespace
cppu
{
// private forward decl
void
addFactories
(
char
const
*
const
*
ppNames
/* lib, implname, ..., 0 */
,
OUString
const
&
bootstrapPath
,
Reference
<
lang
::
XMultiComponentFactory
>
const
&
xMgr
,
Reference
<
registry
::
XRegistryKey
>
const
&
xKey
)
SAL_THROW
(
(
Exception
)
);
Reference
<
security
::
XAccessController
>
createDefaultAccessController
()
SAL_THROW
(
()
);
...
...
@@ -321,6 +314,68 @@ static void add_access_control_entries(
context_values
.
push_back
(
entry
);
}
namespace
{
void
addFactories
(
char
const
*
const
*
ppNames
/* lib, implname, ..., 0 */
,
OUString
const
&
bootstrapPath
,
Reference
<
lang
::
XMultiComponentFactory
>
const
&
xMgr
,
Reference
<
registry
::
XRegistryKey
>
const
&
xKey
)
SAL_THROW
(
(
Exception
)
)
{
Reference
<
container
::
XSet
>
xSet
(
xMgr
,
UNO_QUERY
);
OSL_ASSERT
(
xSet
.
is
()
);
Reference
<
lang
::
XMultiServiceFactory
>
xSF
(
xMgr
,
UNO_QUERY
);
while
(
*
ppNames
)
{
OUString
lib
(
OUString
::
createFromAscii
(
*
ppNames
++
)
);
OUString
implName
(
OUString
::
createFromAscii
(
*
ppNames
++
)
);
Any
aFac
(
makeAny
(
loadSharedLibComponentFactory
(
lib
,
bootstrapPath
,
implName
,
xSF
,
xKey
)
)
);
xSet
->
insert
(
aFac
);
#if OSL_DEBUG_LEVEL > 1
if
(
xSet
->
has
(
aFac
))
{
Reference
<
lang
::
XServiceInfo
>
xInfo
;
if
(
aFac
>>=
xInfo
)
{
::
fprintf
(
stderr
,
"> implementation %s supports: "
,
ppNames
[
-
1
]
);
Sequence
<
OUString
>
supported
(
xInfo
->
getSupportedServiceNames
()
);
for
(
sal_Int32
nPos
=
supported
.
getLength
();
nPos
--
;
)
{
OString
str
(
OUStringToOString
(
supported
[
nPos
],
RTL_TEXTENCODING_ASCII_US
)
);
::
fprintf
(
stderr
,
nPos
?
"%s, "
:
"%s
\n
"
,
str
.
getStr
()
);
}
}
else
{
::
fprintf
(
stderr
,
"> implementation %s provides NO lang::XServiceInfo!!!
\n
"
,
ppNames
[
-
1
]
);
}
}
#endif
#if OSL_DEBUG_LEVEL > 0
if
(
!
xSet
->
has
(
aFac
))
{
OStringBuffer
buf
(
64
);
buf
.
append
(
"### failed inserting shared lib
\"
"
);
buf
.
append
(
ppNames
[
-
2
]
);
buf
.
append
(
"
\"
!!!"
);
OString
str
(
buf
.
makeStringAndClear
()
);
OSL_FAIL
(
str
.
getStr
()
);
}
#endif
}
}
}
// namespace
Reference
<
lang
::
XMultiComponentFactory
>
bootstrapInitialSF
(
OUString
const
&
rBootstrapPath
)
SAL_THROW
(
(
Exception
)
)
...
...
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