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
9a93b3c6
Kaydet (Commit)
9a93b3c6
authored
Şub 28, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Extract SwDoc::dumpAsXml() from docnode
Change-Id: I49a35270d6ff2ea5c840a1f4f73d1f6a0701b2d5
üst
8a231fb2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
28 deletions
+43
-28
doc.hxx
sw/inc/doc.hxx
+1
-1
docfmt.cxx
sw/source/core/doc/docfmt.cxx
+42
-0
nodedump.cxx
sw/source/core/docnode/nodedump.cxx
+0
-27
No files found.
sw/inc/doc.hxx
Dosyayı görüntüle @
9a93b3c6
...
...
@@ -1666,7 +1666,7 @@ public:
* Dumps the entire nodes structure to the given destination (file nodes.xml in the current directory by default)
* @since 3.5
*/
void
dumpAsXml
(
xmlTextWriterPtr
writer
=
NULL
)
const
;
void
dumpAsXml
(
struct
_xmlTextWriter
*
=
0
)
const
;
std
::
set
<
Color
>
GetDocColors
();
...
...
sw/source/core/doc/docfmt.cxx
Dosyayı görüntüle @
9a93b3c6
...
...
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <libxml/xmlwriter.h>
#include <hintids.hxx>
#include <svl/itemiter.hxx>
#include <sfx2/app.hxx>
...
...
@@ -38,6 +39,8 @@
#include <frmatr.hxx>
#include <doc.hxx>
#include <docfunc.hxx>
#include <drawdoc.hxx>
#include <MarkManager.hxx>
#include <IDocumentUndoRedo.hxx>
#include <DocumentContentOperationsManager.hxx>
#include <IDocumentFieldsAccess.hxx>
...
...
@@ -1914,6 +1917,45 @@ void SwDoc::RenameFmt(SwFmt & rFmt, const OUString & sNewName,
BroadcastStyleOperation
(
sNewName
,
eFamily
,
SFX_STYLESHEET_MODIFIED
);
}
void
SwDoc
::
dumpAsXml
(
xmlTextWriterPtr
pWriter
)
const
{
bool
bOwns
=
false
;
if
(
!
pWriter
)
{
pWriter
=
xmlNewTextWriterFilename
(
"nodes.xml"
,
0
);
xmlTextWriterStartDocument
(
pWriter
,
NULL
,
NULL
,
NULL
);
bOwns
=
true
;
}
xmlTextWriterStartElement
(
pWriter
,
BAD_CAST
(
"swDoc"
));
xmlTextWriterWriteFormatAttribute
(
pWriter
,
BAD_CAST
(
"ptr"
),
"%p"
,
this
);
m_pNodes
->
dumpAsXml
(
pWriter
);
mpMarkManager
->
dumpAsXml
(
pWriter
);
m_pUndoManager
->
dumpAsXml
(
pWriter
);
getIDocumentFieldsAccess
().
GetFldTypes
()
->
dumpAsXml
(
pWriter
);
mpTxtFmtCollTbl
->
dumpAsXml
(
pWriter
);
mpCharFmtTbl
->
dumpAsXml
(
pWriter
);
mpFrmFmtTbl
->
dumpAsXml
(
pWriter
,
"frmFmtTbl"
);
mpSpzFrmFmtTbl
->
dumpAsXml
(
pWriter
,
"spzFrmFmtTbl"
);
mpSectionFmtTbl
->
dumpAsXml
(
pWriter
);
mpNumRuleTbl
->
dumpAsXml
(
pWriter
);
getIDocumentRedlineAccess
().
GetRedlineTbl
().
dumpAsXml
(
pWriter
);
getIDocumentRedlineAccess
().
GetExtraRedlineTbl
().
dumpAsXml
(
pWriter
);
if
(
const
SdrModel
*
pModel
=
getIDocumentDrawModelAccess
().
GetDrawModel
())
pModel
->
dumpAsXml
(
pWriter
);
xmlTextWriterStartElement
(
pWriter
,
BAD_CAST
(
"mbModified"
));
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"value"
),
BAD_CAST
(
OString
::
boolean
(
getIDocumentState
().
IsModified
()).
getStr
()));
xmlTextWriterEndElement
(
pWriter
);
xmlTextWriterEndElement
(
pWriter
);
if
(
bOwns
)
{
xmlTextWriterEndDocument
(
pWriter
);
xmlFreeTextWriter
(
pWriter
);
}
}
std
::
set
<
Color
>
SwDoc
::
GetDocColors
()
{
std
::
set
<
Color
>
aDocColors
;
...
...
sw/source/core/docnode/nodedump.cxx
Dosyayı görüntüle @
9a93b3c6
...
...
@@ -98,33 +98,6 @@ static const char* TMP_FORMAT = "%" SAL_PRIuUINTPTR;
}
void
SwDoc
::
dumpAsXml
(
xmlTextWriterPtr
w
)
const
{
WriterHelper
writer
(
w
);
writer
.
startElement
(
"doc"
);
writer
.
writeFormatAttribute
(
"ptr"
,
"%p"
,
this
);
m_pNodes
->
dumpAsXml
(
writer
);
mpMarkManager
->
dumpAsXml
(
writer
);
m_pUndoManager
->
dumpAsXml
(
writer
);
getIDocumentFieldsAccess
().
GetFldTypes
()
->
dumpAsXml
(
writer
);
mpTxtFmtCollTbl
->
dumpAsXml
(
writer
);
mpCharFmtTbl
->
dumpAsXml
(
writer
);
mpFrmFmtTbl
->
dumpAsXml
(
writer
,
"frmFmtTbl"
);
mpSpzFrmFmtTbl
->
dumpAsXml
(
writer
,
"spzFrmFmtTbl"
);
mpSectionFmtTbl
->
dumpAsXml
(
writer
);
mpNumRuleTbl
->
dumpAsXml
(
writer
);
getIDocumentRedlineAccess
().
GetRedlineTbl
().
dumpAsXml
(
writer
);
getIDocumentRedlineAccess
().
GetExtraRedlineTbl
().
dumpAsXml
(
writer
);
if
(
const
SdrModel
*
pModel
=
getIDocumentDrawModelAccess
().
GetDrawModel
())
pModel
->
dumpAsXml
(
writer
);
writer
.
startElement
(
"mbModified"
);
writer
.
writeFormatAttribute
(
"value"
,
TMP_FORMAT
,
static_cast
<
int
>
(
getIDocumentState
().
IsModified
()));
writer
.
endElement
();
writer
.
endElement
();
}
void
SwFldTypes
::
dumpAsXml
(
xmlTextWriterPtr
w
)
const
{
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