[Libreoffice-commits] core.git: sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 28 08:50:59 UTC 2021
sw/source/core/text/xmldump.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 569a06656e926dfb26d55958ee0f696aa9e5b7b0
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Tue Apr 27 18:54:58 2021 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Wed Apr 28 10:50:19 2021 +0200
sw: fix crash in SwAnchoredObject::dumpAsXml()
SwAnchoredObject::GetObjBoundRect() is const, so it's only idiomatic
that calling it reformats everything.
Change-Id: Id57472ae3041c7264bc904e1a68907c48e60ac96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114757
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 85b7373ecd31..fd3d0ef4d62e 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -592,7 +592,8 @@ void SwAnchoredObject::dumpAsXml( xmlTextWriterPtr writer ) const
(void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "ptr" ), "%p", this );
(void)xmlTextWriterStartElement( writer, BAD_CAST( "bounds" ) );
- GetObjBoundRect().dumpAsXmlAttributes(writer);
+ // don't call GetObjBoundRect(), it modifies the layout
+ SwRect(GetDrawObj()->GetLastBoundRect()).dumpAsXmlAttributes(writer);
(void)xmlTextWriterEndElement( writer );
if (const SdrObject* pObject = GetDrawObj())
More information about the Libreoffice-commits
mailing list