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
03fcda48
Kaydet (Commit)
03fcda48
authored
Mar 07, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert com.sun.star.comp.stoc.Introspection to direct construction
Change-Id: Ia01efee8c7cc28d1f71fd87c735a6cbc205b3eaf
üst
a77f0e5e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
67 deletions
+31
-67
native-code.py
solenv/bin/native-code.py
+2
-1
introspection.component
stoc/source/inspect/introspection.component
+3
-2
introspection.cxx
stoc/source/inspect/introspection.cxx
+26
-64
No files found.
solenv/bin/native-code.py
Dosyayı görüntüle @
03fcda48
...
@@ -18,7 +18,6 @@ from optparse import OptionParser
...
@@ -18,7 +18,6 @@ from optparse import OptionParser
core_factory_list
=
[
core_factory_list
=
[
(
"libembobj.a"
,
"embobj_component_getFactory"
),
(
"libembobj.a"
,
"embobj_component_getFactory"
),
(
"libintrospectionlo.a"
,
"introspection_component_getFactory"
),
(
"libreflectionlo.a"
,
"reflection_component_getFactory"
),
(
"libreflectionlo.a"
,
"reflection_component_getFactory"
),
(
"libstocserviceslo.a"
,
"stocservices_component_getFactory"
),
(
"libstocserviceslo.a"
,
"stocservices_component_getFactory"
),
(
"libchartcontrollerlo.a"
,
"chartcontroller_component_getFactory"
),
(
"libchartcontrollerlo.a"
,
"chartcontroller_component_getFactory"
),
...
@@ -100,6 +99,8 @@ core_constructor_list = [
...
@@ -100,6 +99,8 @@ core_constructor_list = [
"com_sun_star_comp_Draw_GraphicExporter_get_implementation"
,
"com_sun_star_comp_Draw_GraphicExporter_get_implementation"
,
"com_sun_star_comp_Svx_GraphicExportHelper_get_implementation"
,
"com_sun_star_comp_Svx_GraphicExportHelper_get_implementation"
,
"com_sun_star_comp_Svx_GraphicImportHelper_get_implementation"
,
"com_sun_star_comp_Svx_GraphicImportHelper_get_implementation"
,
# stoc/source/inspect/introspection.component
"com_sun_star_comp_stoc_Introspection_get_implementation"
,
# toolkit/util/tk.component
# toolkit/util/tk.component
"stardiv_Toolkit_VCLXToolkit_get_implementation"
,
"stardiv_Toolkit_VCLXToolkit_get_implementation"
,
# uui/util/uui.component
# uui/util/uui.component
...
...
stoc/source/inspect/introspection.component
Dosyayı görüntüle @
03fcda48
...
@@ -18,8 +18,9 @@
...
@@ -18,8 +18,9 @@
-->
-->
<component
loader=
"com.sun.star.loader.SharedLibrary"
environment=
"@CPPU_ENV@"
<component
loader=
"com.sun.star.loader.SharedLibrary"
environment=
"@CPPU_ENV@"
prefix=
"introspection"
xmlns=
"http://openoffice.org/2010/uno-components"
>
xmlns=
"http://openoffice.org/2010/uno-components"
>
<implementation
name=
"com.sun.star.comp.stoc.Introspection"
>
<implementation
name=
"com.sun.star.comp.stoc.Introspection"
constructor=
"com_sun_star_comp_stoc_Introspection_get_implementation"
>
<service
name=
"com.sun.star.beans.Introspection"
/>
<service
name=
"com.sun.star.beans.Introspection"
/>
<singleton
name=
"com.sun.star.beans.theIntrospection"
/>
<singleton
name=
"com.sun.star.beans.theIntrospection"
/>
</implementation>
</implementation>
...
...
stoc/source/inspect/introspection.cxx
Dosyayı görüntüle @
03fcda48
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
#include <com/sun/star/uno/DeploymentException.hpp>
#include <com/sun/star/uno/DeploymentException.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/reflection/XIdlReflection.hpp>
#include <com/sun/star/reflection/XIdlReflection.hpp>
...
@@ -74,10 +73,7 @@ using namespace com::sun::star::beans::MethodConcept;
...
@@ -74,10 +73,7 @@ using namespace com::sun::star::beans::MethodConcept;
using
namespace
cppu
;
using
namespace
cppu
;
using
namespace
osl
;
using
namespace
osl
;
#define IMPLEMENTATION_NAME "com.sun.star.comp.stoc.Introspection"
namespace
#define SERVICE_NAME "com.sun.star.beans.Introspection"
namespace
stoc_inspect
{
{
typedef
WeakImplHelper3
<
XIntrospectionAccess
,
XMaterialHolder
,
XExactName
>
IntrospectionAccessHelper
;
typedef
WeakImplHelper3
<
XIntrospectionAccess
,
XMaterialHolder
,
XExactName
>
IntrospectionAccessHelper
;
...
@@ -1593,9 +1589,6 @@ class ImplIntrospection : public XIntrospection
...
@@ -1593,9 +1589,6 @@ class ImplIntrospection : public XIntrospection
// Implementation der Introspection.
// Implementation der Introspection.
rtl
::
Reference
<
IntrospectionAccessStatic_Impl
>
implInspect
(
const
Any
&
aToInspectObj
);
rtl
::
Reference
<
IntrospectionAccessStatic_Impl
>
implInspect
(
const
Any
&
aToInspectObj
);
// Save XMultiServiceFactory from createComponent
Reference
<
XMultiServiceFactory
>
m_xSMgr
;
// CoreReflection halten
// CoreReflection halten
Reference
<
XIdlReflection
>
mxCoreReflection
;
Reference
<
XIdlReflection
>
mxCoreReflection
;
...
@@ -1616,7 +1609,7 @@ class ImplIntrospection : public XIntrospection
...
@@ -1616,7 +1609,7 @@ class ImplIntrospection : public XIntrospection
TypeProviderAccessCacheMap
*
mpTypeProviderCache
;
TypeProviderAccessCacheMap
*
mpTypeProviderCache
;
public
:
public
:
ImplIntrospection
(
const
Reference
<
X
MultiServiceFactory
>
&
rXSMgr
);
ImplIntrospection
(
const
Reference
<
X
ComponentContext
>
&
context
);
// Methoden von XInterface
// Methoden von XInterface
virtual
Any
SAL_CALL
queryInterface
(
const
Type
&
rType
)
throw
(
RuntimeException
,
std
::
exception
);
virtual
Any
SAL_CALL
queryInterface
(
const
Type
&
rType
)
throw
(
RuntimeException
,
std
::
exception
);
...
@@ -1631,8 +1624,6 @@ public:
...
@@ -1631,8 +1624,6 @@ public:
OUString
SAL_CALL
getImplementationName
()
throw
(
std
::
exception
);
OUString
SAL_CALL
getImplementationName
()
throw
(
std
::
exception
);
sal_Bool
SAL_CALL
supportsService
(
const
OUString
&
ServiceName
)
throw
(
std
::
exception
);
sal_Bool
SAL_CALL
supportsService
(
const
OUString
&
ServiceName
)
throw
(
std
::
exception
);
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
(
void
)
throw
(
std
::
exception
);
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
(
void
)
throw
(
std
::
exception
);
static
OUString
SAL_CALL
getImplementationName_Static
(
);
static
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames_Static
(
void
)
throw
();
// Methoden von XIntrospection
// Methoden von XIntrospection
virtual
Reference
<
XIntrospectionAccess
>
SAL_CALL
inspect
(
const
Any
&
aToInspectObj
)
virtual
Reference
<
XIntrospectionAccess
>
SAL_CALL
inspect
(
const
Any
&
aToInspectObj
)
...
@@ -1653,16 +1644,15 @@ enum MethodType
...
@@ -1653,16 +1644,15 @@ enum MethodType
};
};
// Ctor
// Ctor
ImplIntrospection
::
ImplIntrospection
(
const
Reference
<
X
MultiServiceFactory
>
&
rXSMgr
)
ImplIntrospection
::
ImplIntrospection
(
const
Reference
<
X
ComponentContext
>
&
context
)
:
OComponentHelper
(
m_mutex
)
:
OComponentHelper
(
m_mutex
)
,
m_xSMgr
(
rXSMgr
)
{
{
mnCacheEntryCount
=
0
;
mnCacheEntryCount
=
0
;
mnTPCacheEntryCount
=
0
;
mnTPCacheEntryCount
=
0
;
mpCache
=
NULL
;
mpCache
=
NULL
;
mpTypeProviderCache
=
NULL
;
mpTypeProviderCache
=
NULL
;
Reference
<
XPropertySet
>
xProps
(
rXSMgr
,
UNO_QUERY
);
Reference
<
XPropertySet
>
xProps
(
context
->
getServiceManager
()
,
UNO_QUERY
);
OSL_ASSERT
(
xProps
.
is
()
);
OSL_ASSERT
(
xProps
.
is
()
);
if
(
xProps
.
is
())
if
(
xProps
.
is
())
{
{
...
@@ -1771,7 +1761,7 @@ Sequence< sal_Int8 > ImplIntrospection::getImplementationId()
...
@@ -1771,7 +1761,7 @@ Sequence< sal_Int8 > ImplIntrospection::getImplementationId()
// XServiceInfo
// XServiceInfo
OUString
ImplIntrospection
::
getImplementationName
()
throw
(
std
::
exception
)
OUString
ImplIntrospection
::
getImplementationName
()
throw
(
std
::
exception
)
{
{
return
getImplementationName_Static
(
);
return
OUString
(
"com.sun.star.comp.stoc.Introspection"
);
}
}
// XServiceInfo
// XServiceInfo
...
@@ -1783,26 +1773,11 @@ sal_Bool ImplIntrospection::supportsService(const OUString& ServiceName) throw(s
...
@@ -1783,26 +1773,11 @@ sal_Bool ImplIntrospection::supportsService(const OUString& ServiceName) throw(s
// XServiceInfo
// XServiceInfo
Sequence
<
OUString
>
ImplIntrospection
::
getSupportedServiceNames
(
void
)
throw
(
std
::
exception
)
Sequence
<
OUString
>
ImplIntrospection
::
getSupportedServiceNames
(
void
)
throw
(
std
::
exception
)
{
{
return
getSupportedServiceNames_Static
();
Sequence
<
OUString
>
s
(
1
);
s
[
0
]
=
"com.sun.star.beans.Introspection"
;
return
s
;
}
}
// Helper XServiceInfo
OUString
ImplIntrospection
::
getImplementationName_Static
(
)
{
return
OUString
::
createFromAscii
(
IMPLEMENTATION_NAME
);
}
// ORegistryServiceManager_Static
Sequence
<
OUString
>
ImplIntrospection
::
getSupportedServiceNames_Static
(
void
)
throw
()
{
Sequence
<
OUString
>
aSNS
(
1
);
aSNS
.
getArray
()[
0
]
=
OUString
::
createFromAscii
(
SERVICE_NAME
);
return
aSNS
;
}
// Methoden von XIntrospection
// Methoden von XIntrospection
Reference
<
XIntrospectionAccess
>
ImplIntrospection
::
inspect
(
const
Any
&
aToInspectObj
)
Reference
<
XIntrospectionAccess
>
ImplIntrospection
::
inspect
(
const
Any
&
aToInspectObj
)
throw
(
RuntimeException
,
std
::
exception
)
throw
(
RuntimeException
,
std
::
exception
)
...
@@ -2841,42 +2816,29 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
...
@@ -2841,42 +2816,29 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
return
pAccess
;
return
pAccess
;
}
}
struct
Instance
{
explicit
Instance
(
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
context
)
:
instance
(
new
ImplIntrospection
(
context
))
{}
Reference
<
XInterface
>
SAL_CALL
ImplIntrospection_CreateInstance
(
const
Reference
<
XMultiServiceFactory
>
&
rSMgr
)
rtl
::
Reference
<
cppu
::
OWeakObject
>
instance
;
throw
(
RuntimeException
)
};
{
Reference
<
XInterface
>
xService
=
(
OWeakObject
*
)(
OComponentHelper
*
)
new
ImplIntrospection
(
rSMgr
);
struct
Singleton
:
return
xService
;
public
rtl
::
StaticWithArg
<
}
Instance
,
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
,
Singleton
>
{};
}
}
extern
"C"
extern
"C"
SAL_DLLPUBLIC_EXPORT
css
::
uno
::
XInterface
*
SAL_CALL
{
com_sun_star_comp_stoc_Introspection_get_implementation
(
SAL_DLLPUBLIC_EXPORT
void
*
SAL_CALL
introspection_component_getFactory
(
css
::
uno
::
XComponentContext
*
context
,
const
sal_Char
*
pImplName
,
void
*
pServiceManager
,
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
const
&
arguments
)
SAL_UNUSED_PARAMETER
void
*
)
{
{
void
*
pRet
=
0
;
assert
(
!
arguments
.
hasElements
());
return
cppu
::
acquire
(
Singleton
::
get
(
context
).
instance
.
get
());
if
(
pServiceManager
&&
rtl_str_compare
(
pImplName
,
IMPLEMENTATION_NAME
)
==
0
)
{
Reference
<
XSingleServiceFactory
>
xFactory
(
createOneInstanceFactory
(
reinterpret_cast
<
XMultiServiceFactory
*
>
(
pServiceManager
),
OUString
::
createFromAscii
(
pImplName
),
stoc_inspect
::
ImplIntrospection_CreateInstance
,
stoc_inspect
::
ImplIntrospection
::
getSupportedServiceNames_Static
()
)
);
if
(
xFactory
.
is
())
{
xFactory
->
acquire
();
pRet
=
xFactory
.
get
();
}
}
return
pRet
;
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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