summaryrefslogtreecommitdiffstats
path: root/sw/source/core/bastyp/swrect.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/bastyp/swrect.cxx')
-rw-r--r--sw/source/core/bastyp/swrect.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 8702d8f15733..ddd2849b6358 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -19,6 +19,8 @@
#include <swrect.hxx>
+#include <libxml/xmlwriter.h>
+
#ifdef DBG_UTIL
#include <tools/stream.hxx>
#endif
@@ -221,6 +223,16 @@ void SwRect::SetUpperRightCorner( const Point& rNew )
void SwRect::SetLowerLeftCorner( const Point& rNew )
{ m_Point = Point(rNew.X(), rNew.Y() - m_Size.getHeight()); }
+void SwRect::dumpAsXmlAttributes(xmlTextWriterPtr writer) const
+{
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("left"), "%li", Left());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("top"), "%li", Top());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("width"), "%li", Width());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("height"), "%li", Height());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("bottom"), "%li", Bottom());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("right"), "%li", Right());
+}
+
#ifdef DBG_UTIL
SvStream& WriteSwRect(SvStream &rStream, const SwRect &rRect)
{