diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-02-04 13:42:42 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-06-21 11:54:35 +0200 |
commit | 0dfe5dc1cef1a1f74de87908d05a5d4a7405d667 (patch) | |
tree | 82e4bbb589ff1cb009643bc900a94e659a67f719 /sw/source/core/bastyp/swrect.cxx | |
parent | g: we are not, in fact, in the BUILDDIR (diff) | |
download | core-0dfe5dc1cef1a1f74de87908d05a5d4a7405d667.tar.gz core-0dfe5dc1cef1a1f74de87908d05a5d4a7405d667.zip |
sw: fix crash in SwFrame::dumpAsXml()
when called from SfxObjectShell::GetPreviewMetaFile(), GetSfxViewShell()
is null apparently.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87984
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 60d37294291a2aaccc9fd84de49a7b9d30f2db0b)
Dump some more layout info as Xml
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90125
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
(cherry picked from commit 36f0a04d3caa176b20dccb10ff0bbcfb5cb8d893)
sw: dump sectionNodeIndex in layout.xml
useful to see if the sections are nested
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94882
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 27d7eedc1d3ea471f40d0a81bd4e957bdcf8d8d7)
cid#1464971 Dereference null return value
(cherry picked from commit 877ca303e675ae586caf2787d42756f1e1b22c98)
sw: fix names of SwFrameAreaDefinition flags in layout dump
These were renamed quite a while ago.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98853
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit ed62df4aa2b73164a1efc3b266d56cdbdf2dbf1a)
Handle input fields in layout/nodes dump
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100580
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit e2c81bdf6f9f0ee3289bec7aa4ddb1f95b95382d)
sw: avoid crashing in SwFrame::dumpAsXmlAttributes()
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107521
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 5dbb0403b6f814129983963f5fea02208995270a)
sw: fix crash in SwAnchoredObject::dumpAsXml()
SwAnchoredObject::GetObjBoundRect() is const, so it's only idiomatic
that calling it reformats everything.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114757
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 569a06656e926dfb26d55958ee0f696aa9e5b7b0)
Change-Id: Id57472ae3041c7264bc904e1a68907c48e60ac96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136178
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/core/bastyp/swrect.cxx')
-rw-r--r-- | sw/source/core/bastyp/swrect.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx index 1d53e6e7a71e..884c155003e2 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 @@ -218,6 +220,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) { |