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
3db55f9d
Kaydet (Commit)
3db55f9d
authored
Kas 21, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Display XML namespace IDs in the tree.
Change-Id: I7223b6ac750a5c96ce9638b490eeae109ed854ef
üst
5e4222bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
xmlcontext.cxx
sc/source/filter/orcus/xmlcontext.cxx
+23
-4
No files found.
sc/source/filter/orcus/xmlcontext.cxx
Dosyayı görüntüle @
3db55f9d
...
...
@@ -31,13 +31,33 @@ ScOrcusXMLTreeParam::EntryData& setUserDataToEntry(
return
rStore
.
back
();
}
OUString
toString
(
const
orcus
::
xml_structure_tree
::
entity_name
&
entity
,
const
orcus
::
xml_structure_tree
::
walker
&
walker
)
{
OUStringBuffer
aBuf
;
if
(
entity
.
ns
)
{
// Namespace exists. Namespaces are displayed as ns0, ns1, ns2, ....
size_t
index
=
walker
.
get_xmlns_index
(
entity
.
ns
);
if
(
index
==
orcus
::
xml_structure_tree
::
walker
::
index_not_found
)
// This namespace doesn't exist in this context. Something has gone wrong.
aBuf
.
append
(
"???"
);
else
{
aBuf
.
append
(
"ns"
);
aBuf
.
append
(
static_cast
<
sal_Int32
>
(
index
));
}
aBuf
.
append
(
':'
);
}
aBuf
.
append
(
OUString
(
entity
.
name
.
get
(),
entity
.
name
.
size
(),
RTL_TEXTENCODING_UTF8
));
return
aBuf
.
makeStringAndClear
();
}
void
populateTree
(
SvTreeListBox
&
rTreeCtrl
,
orcus
::
xml_structure_tree
::
walker
&
rWalker
,
const
orcus
::
xml_structure_tree
::
entity_name
&
rElemName
,
bool
bRepeat
,
SvTreeListEntry
*
pParent
,
ScOrcusXMLTreeParam
&
rParam
)
{
OUString
aName
(
rElemName
.
name
.
get
(),
rElemName
.
name
.
size
(),
RTL_TEXTENCODING_UTF8
);
SvTreeListEntry
*
pEntry
=
rTreeCtrl
.
InsertEntry
(
aName
,
pParent
);
SvTreeListEntry
*
pEntry
=
rTreeCtrl
.
InsertEntry
(
toString
(
rElemName
,
rWalker
),
pParent
);
if
(
!
pEntry
)
// Can this ever happen!?
return
;
...
...
@@ -65,8 +85,7 @@ void populateTree(
for
(;
it
!=
itEnd
;
++
it
)
{
orcus
::
xml_structure_tree
::
entity_name
aAttrName
=
*
it
;
SvTreeListEntry
*
pAttr
=
rTreeCtrl
.
InsertEntry
(
OUString
(
aAttrName
.
name
.
get
(),
aAttrName
.
name
.
size
(),
RTL_TEXTENCODING_UTF8
),
pEntry
);
SvTreeListEntry
*
pAttr
=
rTreeCtrl
.
InsertEntry
(
toString
(
aAttrName
,
rWalker
),
pEntry
);
if
(
!
pAttr
)
continue
;
...
...
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