Kaydet (Commit) fe669a0e authored tarafından Rüdiger Timm's avatar Rüdiger Timm

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# <SdXMLShapeContext::AddShape( const char* )
	   - The Writer model (XTextDocument) no longer support service
	     com.sun.star.drawing.OLE2Shape since fix for issue i33294.
	     To handle Draw OLE objects in Writer documents it has been
	     decided to import these as OLE object convert them after
	     the import into graphic objects.
	     Thus, if service com.sun.star.drawing.OLE2Shape is requested
	     for a Writer document, use temporary service name
	     com.sun.star.drawing.temporaryForXMLImportOLE2Shape to
	     retrieve such a service from the Writer model.
	     The conversion into graphic objects is performed after the
	     intrinsic XML import.
üst 02b82100
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: ximpshap.cxx,v $ * $RCSfile: ximpshap.cxx,v $
* *
* $Revision: 1.109 $ * $Revision: 1.110 $
* *
* last change: $Author: kz $ $Date: 2006-02-27 16:35:02 $ * last change: $Author: rt $ $Date: 2006-03-06 13:41:58 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -203,6 +203,12 @@ ...@@ -203,6 +203,12 @@
#include "xmlerror.hxx" #include "xmlerror.hxx"
#endif #endif
// --> OD 2006-02-22 #b6382898#
#ifndef _COM_SUN_STAR_TEXT_XTEXTDOCUMENT_HPP_
#include <com/sun/star/text/XTextDocument.hpp>
#endif
// <--
using namespace ::rtl; using namespace ::rtl;
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::xmloff::token; using namespace ::xmloff::token;
...@@ -539,7 +545,23 @@ void SdXMLShapeContext::AddShape(const char* pServiceName ) ...@@ -539,7 +545,23 @@ void SdXMLShapeContext::AddShape(const char* pServiceName )
{ {
try 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() ) if( xShape.is() )
AddShape( xShape ); AddShape( xShape );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment