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
1c06dc14
Kaydet (Commit)
1c06dc14
authored
Agu 19, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
writerfilter: stop reading namespace-alias elements in factoryimpl
Change-Id: I52c2298c9583617481069040e118520cf8935c6d
üst
69d673b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
CustomTarget_source.mk
writerfilter/CustomTarget_source.mk
+2
-2
factoryimpl.py
writerfilter/source/ooxml/factoryimpl.py
+16
-7
No files found.
writerfilter/CustomTarget_source.mk
Dosyayı görüntüle @
1c06dc14
...
...
@@ -69,9 +69,9 @@ writerfilter_SRC_ooxml_Preprocess_py=$(writerfilter_SRC)/ooxml/modelpreprocess.p
writerfilter_SRC_ooxml_QNameToStr_py=$(writerfilter_SRC)/ooxml/qnametostr.py
writerfilter_SRC_ooxml_ResourceIds_py=$(writerfilter_SRC)/ooxml/resourceids.py
$(writerfilter_GEN_ooxml_Factory_cxx) : $(writerfilter_SRC)/ooxml/factoryimpl.py $(writerfilter_GEN_ooxml_Model_processed)
$(writerfilter_GEN_ooxml_Factory_cxx) : $(writerfilter_SRC)/ooxml/factoryimpl.py $(writerfilter_
DEP_ooxml_Namespaces_txt) $(writerfilter_
GEN_ooxml_Model_processed)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
$(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $< $(writerfilter_GEN_ooxml_Model_processed)) > $@
$(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $< $(writerfilter_
DEP_ooxml_Namespaces_txt) $(writerfilter_
GEN_ooxml_Model_processed)) > $@
$(writerfilter_GEN_ooxml_Factory_hxx) : $(writerfilter_SRC)/ooxml/factoryinc.py $(writerfilter_GEN_ooxml_Model_processed)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
...
...
writerfilter/source/ooxml/factoryimpl.py
Dosyayı görüntüle @
1c06dc14
...
...
@@ -126,7 +126,7 @@ std::string fastTokenToId(sal_uInt32 nToken)
{"""
)
aliases
=
[]
for
alias
in
sorted
(
[
a
.
getAttribute
(
"alias"
)
for
a
in
model
.
getElementsByTagName
(
"namespace-alias"
)]
):
for
alias
in
sorted
(
ooxUrlAliases
.
values
()
):
if
not
alias
in
aliases
:
aliases
.
append
(
alias
)
print
(
""" case oox::NMSP_
%
s:
...
...
@@ -160,11 +160,8 @@ def getFastParser(model):
{
mxFastParser = css::xml::sax::FastParser::create(mxContext);
"""
)
aliases
=
{}
for
alias
in
model
.
getElementsByTagName
(
"namespace-alias"
):
aliases
[
alias
.
getAttribute
(
"name"
)]
=
alias
.
getAttribute
(
"alias"
)
for
name
in
sorted
(
aliases
.
keys
()):
print
(
""" mxFastParser->registerNamespace("
%
s", oox::NMSP_
%
s);"""
%
(
name
,
aliases
[
name
]))
for
url
in
sorted
(
ooxUrlAliases
.
keys
()):
print
(
""" mxFastParser->registerNamespace("
%
s", oox::NMSP_
%
s);"""
%
(
url
,
ooxUrlAliases
[
url
]))
print
(
""" }
return mxFastParser;
...
...
@@ -200,7 +197,19 @@ using namespace com::sun::star;
getFastParser
(
model
)
modelPath
=
sys
.
argv
[
1
]
def
parseNamespaces
(
fro
):
sock
=
open
(
fro
)
for
i
in
sock
.
readlines
():
line
=
i
.
strip
()
id
,
alias
,
url
=
line
.
split
(
' '
)
ooxUrlAliases
[
url
]
=
alias
sock
.
close
()
namespacesPath
=
sys
.
argv
[
1
]
ooxUrlAliases
=
{}
parseNamespaces
(
namespacesPath
)
modelPath
=
sys
.
argv
[
2
]
model
=
minidom
.
parse
(
modelPath
)
createImpl
(
model
)
...
...
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