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
5a1e7361
Kaydet (Commit)
5a1e7361
authored
Eki 03, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: include names of character and paragraph styles in doc model dump
Change-Id: Ib766fa7753e52ad81f5fe976d0e6c3e1f688a826
üst
087a8cb1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
docary.hxx
sw/inc/docary.hxx
+2
-0
nodedump.cxx
sw/source/core/docnode/nodedump.cxx
+39
-0
No files found.
sw/inc/docary.hxx
Dosyayı görüntüle @
5a1e7361
...
...
@@ -88,6 +88,7 @@ public:
virtual
SwFmt
*
GetFmt
(
size_t
idx
)
const
{
return
(
SwFmt
*
)
operator
[](
idx
);
}
sal_uInt16
GetPos
(
const
SwCharFmt
*
pFmt
)
const
;
bool
Contains
(
const
SwCharFmt
*
pFmt
)
const
;
void
dumpAsXml
(
xmlTextWriterPtr
w
);
/// free's any remaining child objects
virtual
~
SwCharFmts
();
};
...
...
@@ -98,6 +99,7 @@ public:
virtual
size_t
GetFmtCount
()
const
{
return
size
();
}
virtual
SwFmt
*
GetFmt
(
size_t
idx
)
const
{
return
(
SwFmt
*
)
operator
[](
idx
);
}
sal_uInt16
GetPos
(
const
SwTxtFmtColl
*
pFmt
)
const
;
void
dumpAsXml
(
xmlTextWriterPtr
w
);
virtual
~
SwTxtFmtColls
()
{}
};
...
...
sw/source/core/docnode/nodedump.cxx
Dosyayı görüntüle @
5a1e7361
...
...
@@ -16,6 +16,7 @@
#include "docufld.hxx"
#include "txatbase.hxx"
#include "fmtautofmt.hxx"
#include "charfmt.hxx"
#include <svl/itemiter.hxx>
#include <libxml/encoding.h>
...
...
@@ -110,6 +111,8 @@ void SwDoc::dumpAsXml( xmlTextWriterPtr w )
m_pNodes
->
dumpAsXml
(
writer
);
mpMarkManager
->
dumpAsXml
(
writer
);
mpFldTypes
->
dumpAsXml
(
writer
);
mpTxtFmtCollTbl
->
dumpAsXml
(
writer
);
mpCharFmtTbl
->
dumpAsXml
(
writer
);
writer
.
endElement
();
}
...
...
@@ -261,6 +264,42 @@ void SwStartNode::dumpAsXml( xmlTextWriterPtr w )
// writer.endElement(); - it is a start node, so don't end, will make xml better nested
}
void
SwCharFmts
::
dumpAsXml
(
xmlTextWriterPtr
w
)
{
WriterHelper
writer
(
w
);
if
(
size
())
{
writer
.
startElement
(
"swcharfmts"
);
for
(
size_t
i
=
0
;
i
<
size
();
++
i
)
{
SwCharFmt
*
pFmt
=
static_cast
<
SwCharFmt
*>
(
GetFmt
(
i
));
writer
.
startElement
(
"swcharfmt"
);
OString
aName
=
OUStringToOString
(
pFmt
->
GetName
(),
RTL_TEXTENCODING_UTF8
);
writer
.
writeFormatAttribute
(
"name"
,
"%s"
,
BAD_CAST
(
aName
.
getStr
()));
writer
.
endElement
();
}
writer
.
endElement
();
}
}
void
SwTxtFmtColls
::
dumpAsXml
(
xmlTextWriterPtr
w
)
{
WriterHelper
writer
(
w
);
if
(
size
())
{
writer
.
startElement
(
"swtxtfmtcolls"
);
for
(
size_t
i
=
0
;
i
<
size
();
++
i
)
{
SwTxtFmtColl
*
pColl
=
static_cast
<
SwTxtFmtColl
*>
(
GetFmt
(
i
));
writer
.
startElement
(
"swtxtfmtcoll"
);
OString
aName
=
OUStringToOString
(
pColl
->
GetName
(),
RTL_TEXTENCODING_UTF8
);
writer
.
writeFormatAttribute
(
"name"
,
"%s"
,
BAD_CAST
(
aName
.
getStr
()));
writer
.
endElement
();
}
writer
.
endElement
();
}
}
void
SwTxtNode
::
dumpAsXml
(
xmlTextWriterPtr
w
)
{
WriterHelper
writer
(
w
);
...
...
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