[Libreoffice-commits] .: sw/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Mon Jul 2 08:48:26 PDT 2012


 sw/source/core/doc/docdesc.cxx  |    4 ++--
 sw/source/core/text/xmldump.cxx |    7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit fe0985c2326027e86678dffb544c87f108fe9b8e
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Mon Jul 2 17:48:57 2012 +0200

    sw: include header/footer type in layout dump
    
    Change-Id: I27318fbaf71874d34671c0da820caee6cdb22ace

diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 23fe98a..0d3073f 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 c9578a3..5818f20 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 )


More information about the Libreoffice-commits mailing list