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
e17847e0
Kaydet (Commit)
e17847e0
authored
Ock 22, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Factor out SfxStringItem::dumpAsXml() from sw
Change-Id: If218d83297bfdd39471d5502c0639248c96af9c6
üst
3adaad3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
25 deletions
+16
-25
stritem.hxx
include/svl/stritem.hxx
+2
-0
stritem.cxx
svl/source/items/stritem.cxx
+9
-1
nodedump.cxx
sw/source/core/docnode/nodedump.cxx
+5
-24
No files found.
include/svl/stritem.hxx
Dosyayı görüntüle @
e17847e0
...
...
@@ -41,6 +41,8 @@ public:
virtual
SvStream
&
Store
(
SvStream
&
rStream
,
sal_uInt16
)
const
SAL_OVERRIDE
;
virtual
SfxPoolItem
*
Clone
(
SfxItemPool
*
=
0
)
const
SAL_OVERRIDE
;
void
dumpAsXml
(
struct
_xmlTextWriter
*
pWriter
)
const
;
};
#endif // INCLUDED_SVL_STRITEM_HXX
...
...
svl/source/items/stritem.cxx
Dosyayı görüntüle @
e17847e0
...
...
@@ -19,7 +19,7 @@
#include <svl/stritem.hxx>
#include <stringio.hxx>
#include <libxml/xmlwriter.h>
// class SfxStringItem
...
...
@@ -53,4 +53,12 @@ SfxPoolItem * SfxStringItem::Clone(SfxItemPool *) const
return
new
SfxStringItem
(
*
this
);
}
void
SfxStringItem
::
dumpAsXml
(
xmlTextWriterPtr
pWriter
)
const
{
xmlTextWriterStartElement
(
pWriter
,
BAD_CAST
(
"sfxStringItem"
));
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"whichId"
),
BAD_CAST
(
OString
::
number
(
Which
()).
getStr
()));
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"value"
),
BAD_CAST
(
GetValue
().
toUtf8
().
getStr
()));
xmlTextWriterEndElement
(
pWriter
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/core/docnode/nodedump.cxx
Dosyayı görüntüle @
e17847e0
...
...
@@ -502,6 +502,10 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case
RES_PAGEDESC
:
static_cast
<
const
SwFmtPageDesc
*>
(
pItem
)
->
dumpAsXml
(
writer
);
break
;
case
RES_FRMATR_CONDITIONAL_STYLE_NAME
:
case
RES_FRMATR_STYLE_NAME
:
static_cast
<
const
SfxStringItem
*>
(
pItem
)
->
dumpAsXml
(
writer
);
break
;
default
:
bDone
=
false
;
break
;
}
if
(
bDone
)
...
...
@@ -512,31 +516,8 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
writer
.
startElement
(
"item"
);
writer
.
writeFormatAttribute
(
"whichId"
,
TMP_FORMAT
,
pItem
->
Which
());
const
char
*
pWhich
=
0
;
boost
::
optional
<
OString
>
oValue
;
switch
(
pItem
->
Which
())
{
case
RES_FRMATR_STYLE_NAME
:
{
pWhich
=
"frame style name"
;
const
SfxStringItem
*
pStringItem
=
static_cast
<
const
SfxStringItem
*>
(
pItem
);
oValue
=
"name: "
+
OUStringToOString
(
pStringItem
->
GetValue
(),
RTL_TEXTENCODING_UTF8
);
break
;
}
case
RES_FRMATR_CONDITIONAL_STYLE_NAME
:
{
pWhich
=
"frame conditional style name"
;
const
SfxStringItem
*
pStringItem
=
static_cast
<
const
SfxStringItem
*>
(
pItem
);
oValue
=
"name: "
+
OUStringToOString
(
pStringItem
->
GetValue
(),
RTL_TEXTENCODING_UTF8
);
break
;
}
}
if
(
pWhich
)
writer
.
writeFormatAttribute
(
"which"
,
"%s"
,
BAD_CAST
(
pWhich
));
if
(
oValue
)
writer
.
writeFormatAttribute
(
"value"
,
"%s"
,
BAD_CAST
(
oValue
->
getStr
()));
pItem
=
aIter
.
NextItem
();
writer
.
endElement
();
pItem
=
aIter
.
NextItem
();
}
}
...
...
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