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
a4ed79bb
Kaydet (Commit)
a4ed79bb
authored
Ara 13, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Shortcut common case of calling same-env component_getFactory fn
Change-Id: I7f5d31c3b3e128b2df4d83c915673bf7b5d2ab8c
üst
d2038559
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
31 deletions
+41
-31
shlib.cxx
cppuhelper/source/shlib.cxx
+41
-31
No files found.
cppuhelper/source/shlib.cxx
Dosyayı görüntüle @
a4ed79bb
...
@@ -188,47 +188,57 @@ Reference< XInterface > invokeComponentFactory(
...
@@ -188,47 +188,57 @@ Reference< XInterface > invokeComponentFactory(
fprintf
(
stderr
,
"invokeComponentFactory envDcp:%s implName:%s modPath:%s
\n
"
,
envDcp
.
getStr
(),
implName
.
getStr
(),
modPath
.
getStr
());
fprintf
(
stderr
,
"invokeComponentFactory envDcp:%s implName:%s modPath:%s
\n
"
,
envDcp
.
getStr
(),
implName
.
getStr
(),
modPath
.
getStr
());
}
}
#endif
#endif
if
(
env
.
get
()
==
currentEnv
.
get
())
Mapping
aCurrent2Env
(
currentEnv
,
env
);
Mapping
aEnv2Current
(
env
,
currentEnv
);
if
(
aCurrent2Env
.
is
()
&&
aEnv2Current
.
is
())
{
{
void
*
pSMgr
=
aCurrent2Env
.
mapInterface
(
xRet
.
set
(
xMgr
.
get
(),
::
getCppuType
(
&
xMgr
)
);
static_cast
<
css
::
uno
::
XInterface
*>
(
(
*
reinterpret_cast
<
component_getFactoryFunc
>
(
pGetter
))(
aImplName
.
getStr
(),
xMgr
.
get
(),
0
)),
SAL_NO_ACQUIRE
);
}
else
{
Mapping
aCurrent2Env
(
currentEnv
,
env
);
Mapping
aEnv2Current
(
env
,
currentEnv
);
void
*
pSSF
=
NULL
;
if
(
aCurrent2Env
.
is
()
&&
aEnv2Current
.
is
())
{
void
*
pSMgr
=
aCurrent2Env
.
mapInterface
(
xMgr
.
get
(),
::
getCppuType
(
&
xMgr
)
);
env
.
invoke
(
s_getFactory
,
pGetter
,
&
aImplName
,
pSMgr
,
0
,
&
pSSF
)
;
void
*
pSSF
=
NULL
;
if
(
pSMgr
)
env
.
invoke
(
s_getFactory
,
pGetter
,
&
aImplName
,
pSMgr
,
0
,
&
pSSF
);
{
(
*
env
.
get
()
->
pExtEnv
->
releaseInterface
)(
env
.
get
()
->
pExtEnv
,
pSMgr
);
}
if
(
pSSF
)
if
(
pSMgr
)
{
{
aEnv2Current
.
mapInterface
(
(
*
env
.
get
()
->
pExtEnv
->
releaseInterface
)(
reinterpret_cast
<
void
**
>
(
&
xRet
),
env
.
get
()
->
pExtEnv
,
pSMgr
);
pSSF
,
::
getCppuType
(
&
xRet
)
);
}
(
env
.
get
()
->
pExtEnv
->
releaseInterface
)(
env
.
get
()
->
pExtEnv
,
pSSF
);
if
(
pSSF
)
{
aEnv2Current
.
mapInterface
(
reinterpret_cast
<
void
**
>
(
&
xRet
),
pSSF
,
::
getCppuType
(
&
xRet
)
);
(
env
.
get
()
->
pExtEnv
->
releaseInterface
)(
env
.
get
()
->
pExtEnv
,
pSSF
);
}
else
{
rExcMsg
=
rModulePath
+
": cannot get factory of "
+
"demanded implementation: "
+
OStringToOUString
(
aImplName
,
RTL_TEXTENCODING_ASCII_US
);
}
}
}
else
else
{
{
rExcMsg
=
rModulePath
+
rExcMsg
=
": cannot get factory of "
+
"cannot get uno mappings: C++ <=> UNO!"
;
"demanded implementation: "
+
OStringToOUString
(
aImplName
,
RTL_TEXTENCODING_ASCII_US
);
}
}
}
}
else
{
rExcMsg
=
"cannot get uno mappings: C++ <=> UNO!"
;
}
}
}
else
else
{
{
...
...
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