diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-07-02 17:48:57 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-07-02 17:49:39 +0200 |
commit | fe0985c2326027e86678dffb544c87f108fe9b8e (patch) | |
tree | 89695998c11ec742eb682a1eaf4b495fefed11aa | |
parent | 278000a28b8eceb8528ebdcf1d601de8192979e8 (diff) |
sw: include header/footer type in layout dump
Change-Id: I27318fbaf71874d34671c0da820caee6cdb22ace
-rw-r--r-- | sw/source/core/doc/docdesc.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/xmldump.cxx | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 23fe98a06a8a..0d3073fa6760 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -217,7 +217,7 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead, } else if( (*aRCnt.GetCntntIdx()) == (*aCnt.GetCntntIdx()) ) { - SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Header", + SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), (bLeft ? "Left header" : "First header"), GetDfltFrmFmt() ); ::lcl_DescSetAttr( *pRight, *pFmt, sal_False ); // The section which the right header attribute is pointing @@ -272,7 +272,7 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter &rFoot, } else if( (*aRCnt.GetCntntIdx()) == (*aLCnt.GetCntntIdx()) ) { - SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Footer", + SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), (bLeft ? "Left footer" : "First footer"), GetDfltFrmFmt() ); ::lcl_DescSetAttr( *pRight, *pFmt, sal_False ); // The section to which the right footer attribute is pointing diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index c9578a391b7c..5818f20e21e2 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -32,6 +32,7 @@ #include "sectfrm.hxx" #include "tabfrm.hxx" #include "txtfrm.hxx" +#include "hffrm.hxx" #include "porlin.hxx" #include "porlay.hxx" #include "portxt.hxx" @@ -367,6 +368,12 @@ void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) SwTxtNode *pTxtNode = pTxtFrm->GetTxtNode(); xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "txtNodeIndex" ), "%lu", pTxtNode->GetIndex() ); } + if (IsHeaderFrm()) + { + SwHeaderFrm *pHeaderFrm = (SwHeaderFrm*)this; + rtl::OUString aFmtName = pHeaderFrm->GetFmt()->GetName(); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtName" ), "%s", BAD_CAST(rtl::OUStringToOString(aFmtName, RTL_TEXTENCODING_UTF8).getStr())); + } } void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer ) |