diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-17 12:38:35 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-17 12:47:56 +0200 |
commit | 08280034197b577abf994cc05322c010fd1f9895 (patch) | |
tree | 5503365ddf6e547ef5fdadcd3241ffa5b88e9ffa /sw | |
parent | 2f28fc6e997d5f7f860d02b43a0a614b30a2531c (diff) |
SwTxtNode::dumpAsXml: handle RES_TXTATR_CHARFMT
Change-Id: I29d8eb9ab6d6428f699a92b6cd9d58ed8b3b7e48
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/docnode/nodedump.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index 4dcfb405485c..b195aa956101 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -35,6 +35,7 @@ #include "fmtclds.hxx" #include "fmtpdsc.hxx" #include "pagedesc.hxx" +#include "fchrfmt.hxx" #include <swmodule.hxx> #include <svl/itemiter.hxx> #include <svl/intitem.hxx> @@ -766,6 +767,7 @@ void SwTxtNode::dumpAsXml( xmlTextWriterPtr w ) const writer.writeFormatAttribute("whichId", TMP_FORMAT, pHint->Which()); const char* pWhich = 0; + boost::optional<OString> oValue; switch (pHint->Which()) { case RES_TXTATR_AUTOFMT: @@ -777,11 +779,20 @@ void SwTxtNode::dumpAsXml( xmlTextWriterPtr w ) const case RES_TXTATR_FLYCNT: pWhich = "fly content"; break; + case RES_TXTATR_CHARFMT: + { + pWhich = "character format"; + if (SwCharFmt* pCharFmt = pHint->GetCharFmt().GetCharFmt()) + oValue = "name: " + OUStringToOString(pCharFmt->GetName(), RTL_TEXTENCODING_UTF8); + break; + } default: break; } if (pWhich) writer.writeFormatAttribute("which", "%s", BAD_CAST(pWhich)); + if (oValue) + writer.writeFormatAttribute("value", "%s", BAD_CAST(oValue->getStr())); if (pHint->Which() == RES_TXTATR_AUTOFMT) { |