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
0506c3a1
Kaydet (Commit)
0506c3a1
authored
Ara 19, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
FactoryWrapper is a misnomer now
Change-Id: I59d77b4712e273318409a326c835861dc467596c
üst
a87bce32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
17 deletions
+20
-17
servicemanager.cxx
cppuhelper/source/servicemanager.cxx
+20
-17
No files found.
cppuhelper/source/servicemanager.cxx
Dosyayı görüntüle @
0506c3a1
...
...
@@ -518,14 +518,14 @@ css::beans::Property getDefaultContextProperty() {
css
::
beans
::
PropertyAttribute
::
READONLY
);
}
class
Factory
Wrapper
:
class
Implementation
Wrapper
:
public
cppu
::
WeakImplHelper3
<
css
::
lang
::
XSingleComponentFactory
,
css
::
lang
::
XSingleServiceFactory
,
css
::
lang
::
XServiceInfo
>
,
private
boost
::
noncopyable
{
public
:
Factory
Wrapper
(
Implementation
Wrapper
(
rtl
::
Reference
<
cppuhelper
::
ServiceManager
>
const
&
manager
,
boost
::
shared_ptr
<
cppuhelper
::
ServiceManager
::
Data
::
ImplementationInfo
>
const
&
...
...
@@ -534,7 +534,7 @@ public:
{
assert
(
manager
.
is
()
&&
info
.
get
()
!=
0
);
}
private
:
virtual
~
Factory
Wrapper
()
{}
virtual
~
Implementation
Wrapper
()
{}
virtual
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
SAL_CALL
createInstanceWithContext
(
...
...
@@ -579,7 +579,7 @@ private:
};
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
Factory
Wrapper
::
createInstanceWithContext
(
Implementation
Wrapper
::
createInstanceWithContext
(
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
Context
)
throw
(
css
::
uno
::
Exception
,
css
::
uno
::
RuntimeException
)
{
...
...
@@ -595,7 +595,7 @@ FactoryWrapper::createInstanceWithContext(
}
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
Factory
Wrapper
::
createInstanceWithArgumentsAndContext
(
Implementation
Wrapper
::
createInstanceWithArgumentsAndContext
(
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
const
&
Arguments
,
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
Context
)
throw
(
css
::
uno
::
Exception
,
css
::
uno
::
RuntimeException
)
...
...
@@ -609,14 +609,15 @@ FactoryWrapper::createInstanceWithArgumentsAndContext(
:
factory2_
->
createInstanceWithArguments
(
Arguments
);
}
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
FactoryWrapper
::
createInstance
()
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
ImplementationWrapper
::
createInstance
()
throw
(
css
::
uno
::
Exception
,
css
::
uno
::
RuntimeException
)
{
return
createInstanceWithContext
(
manager_
->
getContext
());
}
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
Factory
Wrapper
::
createInstanceWithArguments
(
Implementation
Wrapper
::
createInstanceWithArguments
(
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
const
&
Arguments
)
throw
(
css
::
uno
::
Exception
,
css
::
uno
::
RuntimeException
)
{
...
...
@@ -624,19 +625,20 @@ FactoryWrapper::createInstanceWithArguments(
Arguments
,
manager_
->
getContext
());
}
rtl
::
OUString
Factory
Wrapper
::
getImplementationName
()
rtl
::
OUString
Implementation
Wrapper
::
getImplementationName
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
info_
->
name
;
}
sal_Bool
Factory
Wrapper
::
supportsService
(
rtl
::
OUString
const
&
ServiceName
)
sal_Bool
Implementation
Wrapper
::
supportsService
(
rtl
::
OUString
const
&
ServiceName
)
throw
(
css
::
uno
::
RuntimeException
)
{
return
cppu
::
supportsService
(
this
,
ServiceName
);
}
css
::
uno
::
Sequence
<
rtl
::
OUString
>
FactoryWrapper
::
getSupportedServiceNames
()
css
::
uno
::
Sequence
<
rtl
::
OUString
>
ImplementationWrapper
::
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
)
{
if
(
info_
->
services
.
size
()
>
static_cast
<
sal_uInt32
>
(
SAL_MAX_INT32
))
{
...
...
@@ -656,7 +658,7 @@ css::uno::Sequence< rtl::OUString > FactoryWrapper::getSupportedServiceNames()
return
names
;
}
void
Factory
Wrapper
::
loadImplementation
(
void
Implementation
Wrapper
::
loadImplementation
(
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
context
)
{
{
...
...
@@ -1113,12 +1115,13 @@ cppuhelper::ServiceManager::createContentEnumeration(
break
;
}
if
(
!
impl
->
loaded
)
{
// Postpone actual factory instantiation as long as possible (so
// that e.g. opening LO's "Tools - Macros" menu does not try to
// instantiate a JVM, which can lead to a synchronous error
// dialog when no JVM is specified, and showing the dialog while
// hovering over a menu can cause trouble):
impl
->
factory1
=
new
FactoryWrapper
(
this
,
impl
->
info
);
// Postpone actual implementation instantiation as long as
// possible (so that e.g. opening LO's "Tools - Macros" menu
// does not try to instantiate a JVM, which can lead to a
// synchronous error dialog when no JVM is specified, and
// showing the dialog while hovering over a menu can cause
// trouble):
impl
->
factory1
=
new
ImplementationWrapper
(
this
,
impl
->
info
);
impl
->
loaded
=
true
;
}
}
...
...
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