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
c74a6e6b
Kaydet (Commit)
c74a6e6b
authored
Haz 10, 2013
tarafından
Fridrich Štrba
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
mingw64: use the right format for writing out pointer-sized integers
Change-Id: I7961ffd978cb02c62be176a0afe931959b7d8f1f
üst
a2a34249
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
nodedump.cxx
sw/source/core/docnode/nodedump.cxx
+9
-5
xmldump.cxx
sw/source/core/text/xmldump.cxx
+5
-1
No files found.
sw/source/core/docnode/nodedump.cxx
Dosyayı görüntüle @
c74a6e6b
...
...
@@ -93,6 +93,10 @@ void WriterHelper::writeFormatAttribute( const char* attribute, const char* form
va_end
(
va
);
}
// Hack: somehow conversion from "..." to va_list does
// bomb on two string litterals in the format.
static
const
char
*
TMP_FORMAT
=
"%"
SAL_PRIuUINTPTR
;
}
void
SwDoc
::
dumpAsXml
(
xmlTextWriterPtr
w
)
...
...
@@ -117,9 +121,9 @@ void MarkManager::dumpAsXml( xmlTextWriterPtr w )
{
pMark_t
pMark
=
*
it
;
writer
.
startElement
(
"fieldmark"
);
writer
.
writeFormatAttribute
(
"startNode"
,
"%lu"
,
pMark
->
GetMarkStart
().
nNode
.
GetIndex
());
writer
.
writeFormatAttribute
(
"startNode"
,
TMP_FORMAT
,
pMark
->
GetMarkStart
().
nNode
.
GetIndex
());
writer
.
writeFormatAttribute
(
"startOffset"
,
"%d"
,
pMark
->
GetMarkStart
().
nContent
.
GetIndex
());
writer
.
writeFormatAttribute
(
"endNode"
,
"%lu"
,
pMark
->
GetMarkEnd
().
nNode
.
GetIndex
());
writer
.
writeFormatAttribute
(
"endNode"
,
TMP_FORMAT
,
pMark
->
GetMarkEnd
().
nNode
.
GetIndex
());
writer
.
writeFormatAttribute
(
"endOffset"
,
"%d"
,
pMark
->
GetMarkEnd
().
nContent
.
GetIndex
());
OString
txt8
=
OUStringToOString
(
pMark
->
GetName
(),
RTL_TEXTENCODING_UTF8
);
writer
.
writeFormatAttribute
(
"name"
,
"%s"
,
BAD_CAST
(
txt8
.
getStr
()));
...
...
@@ -206,7 +210,7 @@ void SwNode::dumpAsXml( xmlTextWriterPtr w )
}
writer
.
startElement
(
name
);
writer
.
writeFormatAttribute
(
"ptr"
,
"%p"
,
this
);
writer
.
writeFormatAttribute
(
"index"
,
"%lu"
,
GetIndex
()
);
writer
.
writeFormatAttribute
(
"index"
,
TMP_FORMAT
,
GetIndex
()
);
writer
.
endElement
();
if
(
GetNodeType
()
==
ND_ENDNODE
)
writer
.
endElement
();
// end start node
...
...
@@ -239,7 +243,7 @@ void SwStartNode::dumpAsXml( xmlTextWriterPtr w )
}
writer
.
startElement
(
name
);
writer
.
writeFormatAttribute
(
"ptr"
,
"%p"
,
this
);
writer
.
writeFormatAttribute
(
"index"
,
"%lu"
,
GetIndex
()
);
writer
.
writeFormatAttribute
(
"index"
,
TMP_FORMAT
,
GetIndex
()
);
// writer.endElement(); - it is a start node, so don't end, will make xml better nested
}
...
...
@@ -248,7 +252,7 @@ void SwTxtNode::dumpAsXml( xmlTextWriterPtr w )
WriterHelper
writer
(
w
);
writer
.
startElement
(
"text"
);
writer
.
writeFormatAttribute
(
"ptr"
,
"%p"
,
this
);
writer
.
writeFormatAttribute
(
"index"
,
"%lu"
,
GetIndex
()
);
writer
.
writeFormatAttribute
(
"index"
,
TMP_FORMAT
,
GetIndex
()
);
OUString
txt
=
GetTxt
();
for
(
int
i
=
0
;
i
<
32
;
++
i
)
txt
=
txt
.
replace
(
i
,
'*'
);
...
...
sw/source/core/text/xmldump.cxx
Dosyayı görüntüle @
c74a6e6b
...
...
@@ -348,6 +348,10 @@ void SwFrm::dumpInfosAsXml( xmlTextWriterPtr writer )
xmlTextWriterEndElement
(
writer
);
}
// Hack: somehow conversion from "..." to va_list does
// bomb on two string litterals in the format.
static
const
char
*
TMP_FORMAT
=
"%"
SAL_PRIuUINTPTR
;
void
SwFrm
::
dumpAsXmlAttributes
(
xmlTextWriterPtr
writer
)
{
xmlTextWriterWriteFormatAttribute
(
writer
,
BAD_CAST
(
"ptr"
),
"%p"
,
this
);
...
...
@@ -365,7 +369,7 @@ void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
{
SwTxtFrm
*
pTxtFrm
=
(
SwTxtFrm
*
)
this
;
SwTxtNode
*
pTxtNode
=
pTxtFrm
->
GetTxtNode
();
xmlTextWriterWriteFormatAttribute
(
writer
,
BAD_CAST
(
"txtNodeIndex"
),
"%lu"
,
pTxtNode
->
GetIndex
()
);
xmlTextWriterWriteFormatAttribute
(
writer
,
BAD_CAST
(
"txtNodeIndex"
),
TMP_FORMAT
,
pTxtNode
->
GetIndex
()
);
}
if
(
IsHeaderFrm
()
||
IsFooterFrm
())
{
...
...
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