diff options
author | Vinaya Mandke <vinaya.mandke@synerzip.com> | 2014-07-08 15:32:29 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-07-15 11:52:58 +0200 |
commit | 0d5b053436eebac00948e95d64a87e150d195c07 (patch) | |
tree | c0c6a514c0121e65cf6e7894f25c99a630613dde /oox | |
parent | 51add78184c7c5facdf98e7edf52c023522c3525 (diff) |
DOCX FILEOPEN VML Shape (image) is lost on import fdo#81031
ShapeContextHandler::getDrawingShapeContext mxDrawingShapeContext is set once and never reset.
So in a file which has numPicBullets and vml shapes in document.xml there is a problem.
First the fragment path is set as word/numbering.xml.
But when msRelationFragmentPath changes to word/document.xml,
mxDrawingShapeContext is not reset and hence the relationships are not resolved.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/10180
Change-Id: I4a1401103797972731257145430f2048b94a04bc
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/shape/ShapeContextHandler.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 53a692774e19..4ed6298e36fa 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -205,7 +205,19 @@ ShapeContextHandler::getDrawingShapeContext() (new oox::vml::DrawingFragment ( *mxFilterBase, msRelationFragmentPath, *mpDrawing ))); } - + else + { + // Reset the handler if fragment path has changed + OUString sHandlerFragmentPath = dynamic_cast<ContextHandler *>(mxDrawingFragmentHandler.get())->getFragmentPath(); + if ( !msRelationFragmentPath.equals(sHandlerFragmentPath) ) + { + mxDrawingFragmentHandler.clear(); + mxDrawingFragmentHandler.set + (dynamic_cast<ContextHandler *> + (new oox::vml::DrawingFragment + ( *mxFilterBase, msRelationFragmentPath, *mpDrawing ))); + } + } return mxDrawingFragmentHandler; } |