diff options
-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 ) |