diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2004-11-26 18:33:38 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2004-11-26 18:33:38 +0000 |
commit | 543c2d44f303e4b0806150966383ff45fb162160 (patch) | |
tree | 041e0ea51dbfcf1e2c265e5c6e403c60d1aadc22 /xmloff/source/draw/shapeimport.cxx | |
parent | 9d835dc6f7296a29f7a4c9999542c2270bb95591 (diff) |
INTEGRATION: CWS presentationengine01 (1.47.236); FILE MERGED
2004/11/22 23:10:57 thb 1.47.236.8: #i10000# Resolving merge problems: temporarily removed shorter SdXMLCustomShapeContext, until further clarified by CL
2004/11/17 19:09:34 thb 1.47.236.7: RESYNC: (1.53-1.55); FILE MERGED
2004/11/09 11:54:48 ka 1.47.236.6: added XML_TOKEN_MAP_END
2004/10/12 22:23:13 thb 1.47.236.5: RESYNC: (1.52-1.53); FILE MERGED
2004/09/03 15:15:01 thb 1.47.236.4: #110496# Fixes by SJ (seems that the merge went wrong here)
2004/07/23 12:18:26 thb 1.47.236.3: RESYNC: (1.50-1.52); FILE MERGED
2004/07/06 12:55:58 thb 1.47.236.2: RESYNC: (1.47-1.50); FILE MERGED
2004/04/16 12:41:09 cl 1.47.236.1: smil support for impress
Diffstat (limited to 'xmloff/source/draw/shapeimport.cxx')
-rw-r--r-- | xmloff/source/draw/shapeimport.cxx | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 9860b63bd9d0..e9051d289a87 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: shapeimport.cxx,v $ * - * $Revision: 1.56 $ + * $Revision: 1.57 $ * - * last change: $Author: obo $ $Date: 2004-11-17 10:34:44 $ + * last change: $Author: rt $ $Date: 2004-11-26 19:33:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,6 +59,10 @@ * ************************************************************************/ +#ifndef __COMPHELPER_UNOINTERFACETOUNIQUEIDENTIFIERMAPPER__ +#include "unointerfacetouniqueidentifiermapper.hxx" +#endif + #ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> #endif @@ -142,7 +146,7 @@ struct ConnectionHint { com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mxConnector; sal_Bool bStart; - sal_Int32 nDestShapeId; + OUString aDestShapeId; sal_Int32 nDestGlueId; }; @@ -365,6 +369,7 @@ static __FAR_DATA SvXMLTokenMapEntry aGroupShapeElemTokenMap[] = { XML_NAMESPACE_DRAW, XML_FRAME, XML_TOK_GROUP_FRAME }, { XML_NAMESPACE_DRAW, XML_CUSTOM_SHAPE, XML_TOK_GROUP_CUSTOM_SHAPE }, + { XML_NAMESPACE_DRAW, XML_CUSTOM_SHAPE, XML_TOK_GROUP_CUSTOM_SHAPE }, { XML_NAMESPACE_OFFICE, XML_ANNOTATION, XML_TOK_GROUP_ANNOTATION }, XML_TOKEN_MAP_END @@ -904,6 +909,12 @@ SvXMLShapeContext* XMLShapeImportHelper::CreateGroupChildContext( pContext = new SdXMLCustomShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes, sal_False ); break; } +// case XML_TOK_GROUP_CUSTOM_SHAPE: +// { +// // draw:customshape +// pContext = new SdXMLCustomShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes ); +// break; +// } // add other shapes here... default: return new SvXMLShapeContext( rImport, nPrefix, rLocalName, bTemporaryShape ); @@ -1260,36 +1271,15 @@ void XMLShapeImportHelper::shapeWithZIndexAdded( com::sun::star::uno::Reference< } } -void XMLShapeImportHelper::createShapeId( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, sal_Int32 nId ) -{ - DBG_ASSERT( mpImpl->maShapeIds.find(nId) == mpImpl->maShapeIds.end(), "draw:id imported twice!" ); - mpImpl->maShapeIds[nId] = xShape; -} - -uno::Reference< drawing::XShape > XMLShapeImportHelper::getShapeFromId( sal_Int32 nId ) -{ - IdShapeMap::iterator aShapeIter( mpImpl->maShapeIds.find( nId ) ); - if( aShapeIter != mpImpl->maShapeIds.end() ) - { - return (*aShapeIter).second; - } - else - { - DBG_ERROR( "unknown draw:id found!" ); - uno::Reference< drawing::XShape > xShape; - return xShape; - } -} - void XMLShapeImportHelper::addShapeConnection( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rConnectorShape, sal_Bool bStart, - sal_Int32 nDestShapeId, + const rtl::OUString& rDestShapeId, sal_Int32 nDestGlueId ) { ConnectionHint aHint; aHint.mxConnector = rConnectorShape; aHint.bStart = bStart; - aHint.nDestShapeId = nDestShapeId; + aHint.aDestShapeId = rDestShapeId; aHint.nDestGlueId = nDestGlueId; mpImpl->maConnections.push_back( aHint ); @@ -1322,7 +1312,8 @@ void XMLShapeImportHelper::restoreConnections() // #86637# simply setting these values WILL force the connector to do // an new layout promptly. So the line delta values have to be rescued // and restored around connector changes. - uno::Reference< drawing::XShape > xShape( getShapeFromId( rHint.nDestShapeId ) ); + uno::Reference< drawing::XShape > xShape( + mrImporter.getInterfaceToIdentifierMapper().getReference( rHint.aDestShapeId ), uno::UNO_QUERY ); if( xShape.is() ) { aAny <<= xShape; |