[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 2 commits - sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Wed Dec 1 09:28:18 PST 2010
sw/source/core/inc/frame.hxx | 1 +
sw/source/core/inc/txtfrm.hxx | 4 ++++
sw/source/core/layout/pagechg.cxx | 2 +-
sw/source/core/text/xmldump.cxx | 19 +++++++++++++++++++
4 files changed, 25 insertions(+), 1 deletion(-)
New commits:
commit c972a97ab7c7e36f2190d1b89e3e49f9d23c7846
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Wed Dec 1 18:27:48 2010 +0100
Added some more infos to the layout dump
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 14cea93..20aaf56 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -922,6 +922,7 @@ public:
public:
#if OSL_DEBUG_LEVEL > 1
virtual void dumpAsXml(xmlTextWriterPtr writer);
+ virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer);
void dumpChildrenAsXml(xmlTextWriterPtr writer);
#endif
bool IsCollapse() const;
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 984be9d..475278a 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -610,6 +610,10 @@ public:
{
return mnHeightOfLastLine;
}
+
+#if OSL_DEBUG_LEVEL > 1
+ virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer);
+#endif
};
/*************************************************************************
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index caa9dff..f655e98 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -260,6 +260,9 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer )
if ( name != NULL )
{
xmlTextWriterStartElement( writer, ( const xmlChar * ) name );
+
+ dumpAsXmlAttributes( writer );
+
if ( IsTxtFrm( ) )
{
SwTxtFrm *pTxtFrm = ( SwTxtFrm * ) this;
@@ -284,6 +287,15 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer )
}
}
+void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
+{
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "ptr" ), "%p", this );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "next" ), "%p", GetNext() );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "prev" ), "%p", GetPrev() );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "upper" ), "%p", this->GetUpper() );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "lower" ), "%p", this->GetLower() );
+}
+
void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer )
{
SwFrm *pFrm = GetLower( );
@@ -292,3 +304,10 @@ void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer )
pFrm->dumpAsXml( writer );
}
}
+
+void SwTxtFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
+{
+ SwFrm::dumpAsXmlAttributes( writer );
+ if ( HasFollow() )
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%p", GetFollow() );
+}
commit d74a4b9d1a9dbaf3e4327ea83dddd1e99b493431
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Wed Dec 1 18:18:14 2010 +0100
SwBodyFrm::Paint needs to call the parent method in any case
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 5863e91..4591c8f 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -201,8 +201,8 @@ void SwBodyFrm::Paint( const SwRect& rRect, const SwPrtOptions* ) const
SwRect aRect = Frm();
pOut->DrawRect(aRect.SVRect());
pOut->Pop();
- SwLayoutFrm::Paint(rRect);
#endif
+ SwLayoutFrm::Paint(rRect);
}
/*************************************************************************
More information about the Libreoffice-commits
mailing list