diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-04-27 18:54:58 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-04-28 10:50:19 +0200 |
commit | 569a06656e926dfb26d55958ee0f696aa9e5b7b0 (patch) | |
tree | 6f8d5da3900e77d1bca052636040576359ce22f9 /sw | |
parent | 2a33a16253d4f7c6ef989cc3a65ef5bd552ac48b (diff) |
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@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/xmldump.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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()) |