summaryrefslogtreecommitdiff
path: root/oox/source/shape/ShapeContextHandler.cxx
diff options
context:
space:
mode:
authorSourav <sourav.mahajan@synerzip.com>2014-05-15 16:20:36 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-05-19 02:35:49 -0500
commitca0be6743496cbb747e320b5b13bd1270b113892 (patch)
tree3c1494517b41ed69e55d12404609de84200bb15c /oox/source/shape/ShapeContextHandler.cxx
parent31d8acbe260c7ff75d1cfa9479b7026528e493bd (diff)
fdo78474:Corruption a:graphicData has no info for the image.
The original file contains two text boxes one contains image and the other contains chart. Image in text box is not getting imported in LO which leads to no contents inside the a:graphicData tag which is causing the corruption. Root cause is found in ShapeContextHandler::getShape. mxChartShapeContext.is() returns true even when mnStartToken is not set as NMSP_dmlChart which is causing the issue. I have added one more condition to handle this. Change-Id: I6c567d7618b34c1a24f6809801e4460af6894c67 Reviewed-on: https://gerrit.libreoffice.org/9363 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'oox/source/shape/ShapeContextHandler.cxx')
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 4d9b91ad69b2..34a84b42f93f 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -463,7 +463,10 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException, std::exception)
mxLockedCanvasContext.clear();
}
}
- else if (mxChartShapeContext.is())
+ //NMSP_dmlChart == getNamespace( mnStartToken ) check is introduced to make sure that
+ //mnStartToken is set as NMSP_dmlChart in setStartToken.
+ //Only in case it is set then only the below block of code for ChartShapeContext should be executed.
+ else if (mxChartShapeContext.is() && (NMSP_dmlChart == getNamespace( mnStartToken )))
{
ChartGraphicDataContext* pChartGraphicDataContext = dynamic_cast<ChartGraphicDataContext*>(mxChartShapeContext.get());
if (pChartGraphicDataContext)