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
01573913
Kaydet (Commit)
01573913
authored
Şub 16, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: include SwFldTypes in doc model dump
Change-Id: I62a86c1615ccddb23e658e01423dce8634156ffe
üst
48796657
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
docary.hxx
sw/inc/docary.hxx
+2
-0
nodedump.cxx
sw/source/core/docnode/nodedump.cxx
+44
-0
No files found.
sw/inc/docary.hxx
Dosyayı görüntüle @
01573913
...
...
@@ -44,6 +44,7 @@ namespace com { namespace sun { namespace star { namespace i18n {
}}}}
#include <swtypes.hxx>
#include <ndarr.hxx>
/** provides some methods for generic operations on lists that contain
SwFmt* subclasses. */
...
...
@@ -114,6 +115,7 @@ public:
/// the destructor will free all objects still in the vector
~
SwFldTypes
();
sal_uInt16
GetPos
(
const
SwFieldType
*
pFieldType
)
const
;
void
dumpAsXml
(
xmlTextWriterPtr
w
);
};
class
SwTOXTypes
:
public
std
::
vector
<
SwTOXType
*>
{
...
...
sw/source/core/docnode/nodedump.cxx
Dosyayı görüntüle @
01573913
...
...
@@ -29,6 +29,10 @@
#include "doc.hxx"
#include "ndtxt.hxx"
#include "MarkManager.hxx"
#include "docary.hxx"
#include "switerator.hxx"
#include "fmtfld.hxx"
#include "docufld.hxx"
#include <libxml/encoding.h>
#include <libxml/xmlwriter.h>
...
...
@@ -117,6 +121,7 @@ void SwDoc::dumpAsXml( xmlTextWriterPtr w )
writer
.
writeFormatAttribute
(
"ptr"
,
"%p"
,
this
);
m_pNodes
->
dumpAsXml
(
writer
);
pMarkManager
->
dumpAsXml
(
writer
);
pFldTypes
->
dumpAsXml
(
writer
);
writer
.
endElement
();
}
...
...
@@ -145,6 +150,45 @@ void MarkManager::dumpAsXml( xmlTextWriterPtr w )
}
// namespace mark
}
// namespace sw
void
SwFldTypes
::
dumpAsXml
(
xmlTextWriterPtr
w
)
{
WriterHelper
writer
(
w
);
writer
.
startElement
(
"swfldtypes"
);
sal_uInt16
nCount
=
size
();
for
(
sal_uInt16
nType
=
0
;
nType
<
nCount
;
++
nType
)
{
const
SwFieldType
*
pCurType
=
(
*
this
)[
nType
];
SwIterator
<
SwFmtFld
,
SwFieldType
>
aIter
(
*
pCurType
);
for
(
const
SwFmtFld
*
pCurFldFmt
=
aIter
.
First
();
pCurFldFmt
;
pCurFldFmt
=
aIter
.
Next
())
{
writer
.
startElement
(
"swfmtfld"
);
writer
.
writeFormatAttribute
(
"ptr"
,
"%p"
,
pCurFldFmt
);
writer
.
writeFormatAttribute
(
"pTxtAttr"
,
"%p"
,
pCurFldFmt
->
GetTxtFld
());
const
char
*
name
=
"???"
;
switch
(
pCurFldFmt
->
GetFld
()
->
GetTyp
()
->
Which
())
{
case
RES_POSTITFLD
:
name
=
"swpostitfield"
;
break
;
default
:
SAL_INFO
(
"sw.core"
,
"unhandled field type "
<<
pCurFldFmt
->
GetFld
()
->
GetTyp
()
->
Which
());
break
;
}
writer
.
startElement
(
name
);
writer
.
writeFormatAttribute
(
"ptr"
,
"%p"
,
pCurFldFmt
->
GetFld
());
if
(
pCurFldFmt
->
GetFld
()
->
GetTyp
()
->
Which
()
==
RES_POSTITFLD
)
{
const
SwPostItField
*
pField
=
dynamic_cast
<
const
SwPostItField
*>
(
pCurFldFmt
->
GetFld
());
OString
txt8
=
OUStringToOString
(
pField
->
GetName
(),
RTL_TEXTENCODING_UTF8
);
writer
.
writeFormatAttribute
(
"name"
,
"%s"
,
BAD_CAST
(
txt8
.
getStr
()));
}
writer
.
endElement
();
writer
.
endElement
();
}
}
writer
.
endElement
();
}
void
SwNodes
::
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