From 258e6f93e81539d90b23f45224dd225a6e20ab0d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 4 Feb 2014 17:42:05 +0000 Subject: Resolves: #i124143# for draw:frame containing multiple draw:image... and draw:glue-point it is necessary to move the GluePoints from the last draw:image where they were automatically imported to the surviving one if these are different (cherry picked from commit c011af1087411a9bacd29cd479c807e698b2e92c) Conflicts: xmloff/inc/xmloff/xmlictxt.hxx xmloff/source/core/xmlmultiimagehelper.cxx xmloff/source/draw/ximpshap.cxx xmloff/source/draw/ximpshap.hxx Change-Id: I8f6c875767e9cbfee74838742401356df002b051 --- include/xmloff/shapeimport.hxx | 7 ++++++- include/xmloff/xmlictxt.hxx | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx index 62f26af6095e..c54a57f3448d 100644 --- a/include/xmloff/shapeimport.hxx +++ b/include/xmloff/shapeimport.hxx @@ -387,12 +387,17 @@ public: void addGluePointMapping( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, sal_Int32 nSourceId, sal_Int32 nDestinnationId ); + /** find mapping for given DestinationID. This allows to extract the original draw:id imported with a draw:glue-point */ + sal_Int32 findGluePointMapping( + const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, + sal_Int32 nDestinnationId ) const; + /** moves all current DestinationId's for rXShape by n */ void moveGluePointMapping( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, const sal_Int32 n ); /** retrieves a mapping for a glue point identifier from the current xml file to the identifier created after inserting the new glue point into the core. The mapping must be initialized first with addGluePointMapping() */ - sal_Int32 getGluePointId( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, sal_Int32 nSourceId ); + sal_Int32 getGluePointId( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, sal_Int32 nSourceId ); /** this method must be calling before the first shape is imported for the given page. Calls to this method can be nested */ diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx index 0fb72d104152..afa9698a2be6 100644 --- a/include/xmloff/xmlictxt.hxx +++ b/include/xmloff/xmlictxt.hxx @@ -89,6 +89,11 @@ public: /** This method is called for all characters that are contained in the * current element. The default is to ignore them. */ virtual void Characters( const OUString& rChars ); + + // #i124143# allow to copy evtl. useful data from another temporary import context, e.g. used to + // support multiple images and to rescue evtl. GluePoints imported with one of the + // to be deprecated contents + virtual void onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& rCandidate ); }; SV_DECL_REF( SvXMLImportContext ) -- cgit