From fe669a0ec72da4681b555c22fe01b8c6f99dadd6 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Mon, 6 Mar 2006 12:41:58 +0000 Subject: INTEGRATION: CWS swqbf56 (1.108.6); FILE MERGED 2006/03/02 13:28:53 od 1.108.6.2: RESYNC: (1.108-1.109); FILE MERGED 2006/03/02 12:34:10 od 1.108.6.1: #b6382898# OD 2006-02-22 #b6382898# +#ifndef _COM_SUN_STAR_TEXT_XTEXTDOCUMENT_HPP_ +#include +#endif +// <-- + using namespace ::rtl; using namespace ::com::sun::star; using namespace ::xmloff::token; @@ -539,7 +545,23 @@ void SdXMLShapeContext::AddShape(const char* pServiceName ) { try { - uno::Reference< drawing::XShape > xShape(xServiceFact->createInstance(OUString::createFromAscii(pServiceName)), uno::UNO_QUERY); + // --> OD 2006-02-22 #b6382898# + // Since fix for issue i33294 the Writer model doesn't support + // com.sun.star.drawing.OLE2Shape anymore. + // To handle Draw OLE objects it's decided to import these + // objects as com.sun.star.drawing.OLE2Shape and convert these + // objects after the import into com.sun.star.drawing.GraphicObjectShape. + uno::Reference< drawing::XShape > xShape; + if ( OUString::createFromAscii(pServiceName).compareToAscii( "com.sun.star.drawing.OLE2Shape" ) == 0 && + uno::Reference< text::XTextDocument >(GetImport().GetModel(), uno::UNO_QUERY).is() ) + { + xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(OUString::createFromAscii("com.sun.star.drawing.temporaryForXMLImportOLE2Shape")), uno::UNO_QUERY); + } + else + { + xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(OUString::createFromAscii(pServiceName)), uno::UNO_QUERY); + } + // <-- if( xShape.is() ) AddShape( xShape ); } -- cgit