summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-10 03:59:57 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-10 05:02:38 +0100
commitd158a09e56e3944458d63a6c572f60dbe4632dad (patch)
tree5ec4a25cec10fd2aac21d8a797bd83a06df21c51
parente521930ea1c855c236efb67793e540d07c201d35 (diff)
handle shapes anchored to the wrong sheet without crash, fdo#58858
Change-Id: I00d127dbb6151e3100be931079cbf8907ac69ddd
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 7ac035168ea0..3e4599e6c015 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -693,7 +693,10 @@ void ScXMLExport::CollectSharedData(sal_Int32& nTableCount, sal_Int32& nShapesCo
{
ScMyShape aMyShape;
aMyShape.aAddress = pAnchor->maStart;
+ SAL_WARN_IF(aMyShape.aAddress.Tab() != nTable, "sc", "not anchored to current sheet!");
+ aMyShape.aAddress.SetTab(nTable);
aMyShape.aEndAddress = pAnchor->maEnd;
+ aMyShape.aEndAddress.SetTab( nTable );
aMyShape.nEndX = pAnchor->maEndOffset.X();
aMyShape.nEndY = pAnchor->maEndOffset.Y();
aMyShape.xShape = xShape;