sw doc model xml dump: show SwAuthEntry
To see the author/title/etc of bibliography fields. Change-Id: Ia466c96d3d17b52b94a85070edd023a0579e970a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111732 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -44,6 +44,7 @@ public:
|
||||
inline OUString const & GetAuthorField(ToxAuthorityField ePos) const;
|
||||
inline void SetAuthorField(ToxAuthorityField ePos,
|
||||
const OUString& rField);
|
||||
void dumpAsXml(xmlTextWriterPtr pWriter) const;
|
||||
};
|
||||
|
||||
struct SwTOXSortKey
|
||||
|
||||
@@ -612,6 +612,10 @@ void SwAuthorityField::dumpAsXml(xmlTextWriterPtr pWriter) const
|
||||
|
||||
xmlTextWriterStartElement(pWriter, BAD_CAST("m_xAuthEntry"));
|
||||
xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", m_xAuthEntry.get());
|
||||
if (m_xAuthEntry.is())
|
||||
{
|
||||
m_xAuthEntry->dumpAsXml(pWriter);
|
||||
}
|
||||
xmlTextWriterEndElement(pWriter);
|
||||
xmlTextWriterStartElement(pWriter, BAD_CAST("m_nTempSequencePos"));
|
||||
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"),
|
||||
@@ -660,6 +664,21 @@ const char* const aFieldNames[] =
|
||||
"ISBN"
|
||||
};
|
||||
|
||||
void SwAuthEntry::dumpAsXml(xmlTextWriterPtr pWriter) const
|
||||
{
|
||||
xmlTextWriterStartElement(pWriter, BAD_CAST("SwAuthEntry"));
|
||||
|
||||
for (int i = 0; i < AUTH_FIELD_END; ++i)
|
||||
{
|
||||
xmlTextWriterStartElement(pWriter, BAD_CAST("m_aAuthField"));
|
||||
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("key"), BAD_CAST(aFieldNames[i]));
|
||||
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(m_aAuthFields[i].toUtf8().getStr()));
|
||||
xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
|
||||
xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
|
||||
bool SwAuthorityField::QueryValue( Any& rAny, sal_uInt16 /*nWhichId*/ ) const
|
||||
{
|
||||
if(!GetTyp())
|
||||
|
||||
Reference in New Issue
Block a user