summaryrefslogtreecommitdiff
path: root/include/xmloff/xmlmultiimagehelper.hxx
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-05-03 06:15:30 +0200
committerDavid Tardon <dtardon@redhat.com>2013-05-03 10:29:47 +0200
commit30b248dfe5bfb8a0649e36f22c943b3feb2f1385 (patch)
tree25a4f5798b08c3d9c93b43924a0779f17cb17131 /include/xmloff/xmlmultiimagehelper.hxx
parent9918757003ae043ad53a9c3fcea2733696f6eb5c (diff)
fdo#60075 open drawings with connector attached to SVG
This problem arises when there is a connector attached to draw:frame element with multiple draw:image elements in it. The import code expects that they are different representations of the same image (I have not found if this is specified in ODF), so it only selects the most "suitable" for import. To do that, it imports them all and then removes all but the selected one. The image import context, SdXMLGraphicObjectShapeContext, shares the parent frame's attributes, which means that all the images in a frame have got the same ID. in SdXMLGraphicObjectShapeContext::AddShape, the created css::draw::XShape is registered with its ID... That means that anything that refers to the frame's ID, like a draw:connector, will always get the _first_ image in the frame. Solution is to extend comphelper::UnoInterfaceToUniqueIdentifierMapper to allow reserving an identifier and setting an interface for it later. That way, SdXMLFrameShapeContext can reserve its own ID before it starts importing the first draw:image, and then set the selected XShape at the end. Change-Id: I2e11cfd38e1e3534df2b3c01d85da0d755a266c3
Diffstat (limited to 'include/xmloff/xmlmultiimagehelper.hxx')
-rw-r--r--include/xmloff/xmlmultiimagehelper.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/xmloff/xmlmultiimagehelper.hxx b/include/xmloff/xmlmultiimagehelper.hxx
index cb0a290b1bbd..bbe9ce121477 100644
--- a/include/xmloff/xmlmultiimagehelper.hxx
+++ b/include/xmloff/xmlmultiimagehelper.hxx
@@ -41,8 +41,10 @@ public:
virtual ~multiImageImportHelper();
/// solve multiple imported images. The most valuable one is choosen,
- /// see imlementation for evtl. changing weights and/or adding filetypes
- void solveMultipleImages();
+ /// see imlementation for evtl. changing weights and/or adding filetypes.
+ ///
+ /// @returns import context of the selected image
+ const SvXMLImportContext* solveMultipleImages();
/// add a content to the remembered image import contexts
void addContent(const SvXMLImportContext& rSvXMLImportContext);