Kaydet (Commit) fe0985c2 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: include header/footer type in layout dump

Change-Id: I27318fbaf71874d34671c0da820caee6cdb22ace
üst 278000a2
...@@ -217,7 +217,7 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead, ...@@ -217,7 +217,7 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead,
} }
else if( (*aRCnt.GetCntntIdx()) == (*aCnt.GetCntntIdx()) ) else if( (*aRCnt.GetCntntIdx()) == (*aCnt.GetCntntIdx()) )
{ {
SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Header", SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), (bLeft ? "Left header" : "First header"),
GetDfltFrmFmt() ); GetDfltFrmFmt() );
::lcl_DescSetAttr( *pRight, *pFmt, sal_False ); ::lcl_DescSetAttr( *pRight, *pFmt, sal_False );
// The section which the right header attribute is pointing // The section which the right header attribute is pointing
...@@ -272,7 +272,7 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter &rFoot, ...@@ -272,7 +272,7 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter &rFoot,
} }
else if( (*aRCnt.GetCntntIdx()) == (*aLCnt.GetCntntIdx()) ) else if( (*aRCnt.GetCntntIdx()) == (*aLCnt.GetCntntIdx()) )
{ {
SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Footer", SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), (bLeft ? "Left footer" : "First footer"),
GetDfltFrmFmt() ); GetDfltFrmFmt() );
::lcl_DescSetAttr( *pRight, *pFmt, sal_False ); ::lcl_DescSetAttr( *pRight, *pFmt, sal_False );
// The section to which the right footer attribute is pointing // The section to which the right footer attribute is pointing
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "sectfrm.hxx" #include "sectfrm.hxx"
#include "tabfrm.hxx" #include "tabfrm.hxx"
#include "txtfrm.hxx" #include "txtfrm.hxx"
#include "hffrm.hxx"
#include "porlin.hxx" #include "porlin.hxx"
#include "porlay.hxx" #include "porlay.hxx"
#include "portxt.hxx" #include "portxt.hxx"
...@@ -367,6 +368,12 @@ void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) ...@@ -367,6 +368,12 @@ void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
SwTxtNode *pTxtNode = pTxtFrm->GetTxtNode(); SwTxtNode *pTxtNode = pTxtFrm->GetTxtNode();
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "txtNodeIndex" ), "%lu", pTxtNode->GetIndex() ); 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 ) void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment