From ae76fcae5d7b1612451074b1e163802593c92307 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Mon, 4 Oct 2004 16:58:16 +0000 Subject: INTEGRATION: CWS mav09 (1.5.684); FILE MERGED 2004/08/09 17:54:41 mav 1.5.684.5: RESYNC: (1.6-1.7); FILE MERGED 2004/05/19 14:28:58 mav 1.5.684.4: #i27773# resolve resync problems 2004/05/17 20:59:11 mav 1.5.684.3: RESYNC: (1.5-1.6); FILE MERGED 2004/04/21 14:45:33 mba 1.5.684.2: #i27773#: new storage and embedding API 2004/04/14 14:11:23 mba 1.5.684.1: #i27773#: remove so3; new storage API --- svx/source/xml/xmlxtimp.cxx | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'svx/source/xml/xmlxtimp.cxx') diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index 928706ccff2a..ebd52f5787ad 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlxtimp.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: rt $ $Date: 2004-07-13 07:52:08 $ + * last change: $Author: kz $ $Date: 2004-10-04 17:58:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,6 +67,9 @@ #include #endif +#ifndef _COM_SUN_STAR_EMBED_ELEMENTMODES_HPP_ +#include +#endif #ifndef _COM_SUN_STAR_IO_XACTIVEDATACONTROL_HPP_ #include #endif @@ -115,10 +118,6 @@ #include #endif -#ifndef _SVSTOR_HXX -#include -#endif - #ifndef _SFXDOCFILE_HXX #include #endif @@ -396,29 +395,27 @@ sal_Bool SvxXMLXTableImport::load( const OUString& rUrl, const Reference< XNameC break; } - SvStorageStreamRef xIStm; + uno::Reference < io::XStream > xIStm; uno::Reference< io::XActiveDataSource > xSource; - SvStorage* pStorage = aMedium.GetStorage(); + uno::Reference < embed::XStorage > xStorage = aMedium.GetStorage(); - xml::sax::InputSource aParserInput; + xml::sax::InputSource aParserInput; aParserInput.sSystemId = aMedium.GetName(); - if( pStorage ) + if( xStorage.is() ) { const String aContentStmName( RTL_CONSTASCII_USTRINGPARAM( "Content.xml" ) ); - xIStm = pStorage->OpenStream( aContentStmName, STREAM_READ | STREAM_NOCREATE ); - if( !xIStm.Is() ) + xIStm = xStorage->openStreamElement( aContentStmName, embed::ElementModes::READ ); + if( !xIStm.is() ) { DBG_ERROR( "could not open Content stream" ); break; } - xIStm->SetBufferSize( 16 * 1024 ); - aParserInput.aInputStream = new utl::OInputStreamWrapper( *xIStm ); - - pGraphicHelper = SvXMLGraphicHelper::Create( *pStorage, GRAPHICHELPER_MODE_READ ); + aParserInput.aInputStream = xIStm->getInputStream(); + pGraphicHelper = SvXMLGraphicHelper::Create( xStorage, GRAPHICHELPER_MODE_READ ); xGrfResolver = pGraphicHelper; } else -- cgit