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
68210e1c
Kaydet (Commit)
68210e1c
authored
Ock 27, 2015
tarafından
Jan Holesovsky
Kaydeden (comit)
Miklos Vajna
Şub 09, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
native-code.py: Share more code around the factories too.
Change-Id: Iff0909ee110058cd3e351e4a96738d5b8e6ba62e
üst
5d86b4b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
29 deletions
+31
-29
native-code.py
solenv/bin/native-code.py
+31
-29
No files found.
solenv/bin/native-code.py
Dosyayı görüntüle @
68210e1c
...
...
@@ -189,7 +189,7 @@ constructor_map = {
# instead of outputting native-code.cxx, reduce the services.rdb according to
# the constraints, so that we can easily emulate what services do we need to
# add for a fully functional file loading / saving / ...
def
limit_rdb
(
services_rdb
,
full_constructor_map
):
def
limit_rdb
(
services_rdb
,
full_
factory_map
,
full_
constructor_map
):
ET
.
register_namespace
(
''
,
'http://openoffice.org/2010/uno-components'
)
tree
=
ET
.
parse
(
services_rdb
[
0
])
root
=
tree
.
getroot
()
...
...
@@ -211,15 +211,27 @@ opts.add_option("-r", "--limit-rdb", action="append", help="instead of outputtin
(
options
,
args
)
=
opts
.
parse_args
()
#
construct a lis
t of all the contructors that we need according to -g's
#
dic
t of all the contructors that we need according to -g's
full_constructor_map
=
{}
if
options
.
groups
:
for
constructor_group
in
options
.
groups
:
for
constructor
in
constructor_map
[
constructor_group
]:
full_constructor_map
[
constructor
]
=
True
# dict of all the factories that we need according to -g's
full_factory_map
=
{}
if
options
.
groups
:
for
factory_group
in
options
.
groups
:
for
entry
in
factory_map
[
factory_group
]:
factory_guard
=
None
if
len
(
entry
)
>
2
:
factory_guard
=
entry
[
2
]
map_entry
=
{
'function'
:
entry
[
1
],
'guard'
:
factory_guard
}
full_factory_map
[
entry
[
0
]]
=
map_entry
# are we only shuffling the services.rdb?
if
options
.
services
:
limit_rdb
(
options
.
services
,
full_constructor_map
)
limit_rdb
(
options
.
services
,
full_
factory_map
,
full_
constructor_map
)
exit
(
0
)
print
(
"""/*
...
...
@@ -232,19 +244,14 @@ print ("""/*
extern "C" {
"""
)
if
options
.
groups
:
for
factory_group
in
options
.
groups
:
for
entry
in
factory_map
[
factory_group
]:
factory_name
=
entry
[
0
]
factory_function
=
entry
[
1
]
factory_guard
=
None
if
len
(
entry
)
>
2
:
factory_guard
=
entry
[
2
]
if
factory_guard
:
print
(
factory_guard
)
print
(
'void * '
+
factory_function
+
'( const char* , void* , void* );'
)
if
factory_guard
:
print
(
'#endif'
)
for
entry
in
sorted
(
full_factory_map
.
keys
()):
factory_function
=
full_factory_map
[
entry
][
'function'
]
factory_guard
=
full_factory_map
[
entry
][
'guard'
]
if
factory_guard
:
print
(
factory_guard
)
print
(
'void * '
+
factory_function
+
'( const char* , void* , void* );'
)
if
factory_guard
:
print
(
'#endif'
)
print
(
''
)
for
constructor
in
sorted
(
full_constructor_map
.
keys
()):
...
...
@@ -256,19 +263,14 @@ lo_get_factory_map(void)
{
static lib_to_factory_mapping map[] = {"""
)
if
options
.
groups
:
for
factory_group
in
options
.
groups
:
for
entry
in
factory_map
[
factory_group
]:
factory_name
=
entry
[
0
]
factory_function
=
entry
[
1
]
factory_guard
=
None
if
len
(
entry
)
>
2
:
factory_guard
=
entry
[
2
]
if
factory_guard
:
print
(
factory_guard
)
print
(
' { "'
+
factory_name
+
'", '
+
factory_function
+
' },'
)
if
factory_guard
:
print
(
'#endif'
)
for
entry
in
sorted
(
full_factory_map
.
keys
()):
factory_function
=
full_factory_map
[
entry
][
'function'
]
factory_guard
=
full_factory_map
[
entry
][
'guard'
]
if
factory_guard
:
print
(
factory_guard
)
print
(
' { "'
+
entry
+
'", '
+
factory_function
+
' },'
)
if
factory_guard
:
print
(
'#endif'
)
print
(
"""
{ 0, 0 }
...
...
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