diff options
author | Christian Lippka <cl@openoffice.org> | 2001-03-19 08:16:39 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2001-03-19 08:16:39 +0000 |
commit | e0e6bb703b1d08b30ea66e932b95f1dc88551122 (patch) | |
tree | fe3beb562e465da51dfc369eba2586d38b6d3c07 /svx/source/unodraw/unobtabl.cxx | |
parent | c95a5cc65895f2f7e21e4b9f013399ea0117e221 (diff) |
added xml and api support for player
Diffstat (limited to 'svx/source/unodraw/unobtabl.cxx')
-rw-r--r-- | svx/source/unodraw/unobtabl.cxx | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/svx/source/unodraw/unobtabl.cxx b/svx/source/unodraw/unobtabl.cxx index 827ea7bcbc53..1c1673fa0aed 100644 --- a/svx/source/unodraw/unobtabl.cxx +++ b/svx/source/unodraw/unobtabl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unobtabl.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: cl $ $Date: 2001-01-31 19:35:22 $ + * last change: $Author: cl $ $Date: 2001-03-19 09:13:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,9 +73,11 @@ #ifndef _SVX_XIT_HXX #include <xit.hxx> #endif +#ifndef SVX_LIGHT #ifndef _SFXDOCFILE_HXX #include <sfx2/docfile.hxx> #endif +#endif #ifndef _SVX_UNONAMEITEMTABLE_HXX_ #include "UnoNameItemTable.hxx" @@ -151,6 +153,13 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoBitmapTable_createInstance( Sdr return *new SvxUnoBitmapTable(pModel); } +#ifndef _STREAM_HXX +#include <tools/stream.hxx> +#endif +#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX +#include <unotools/localfilehelper.hxx> +#endif + /** returns a GraphicObject for this URL */ GraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw() { @@ -164,12 +173,21 @@ GraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw() } else { + Graphic aGraphic; + +#ifndef SVX_LIGHT SfxMedium aMedium( aURL, STREAM_READ, TRUE ); SvStream* pStream = aMedium.GetInStream(); - Graphic aGraphic; if( pStream ) GraphicConverter::Import( *pStream, aGraphic ); +#else + String aSystemPath( rURL ); + utl::LocalFileHelper::ConvertURLToSystemPath( aSystemPath, aSystemPath ); + SvFileStream aFile( aSystemPath, STREAM_READ ); + GraphicConverter::Import( aFile, aGraphic ); +#endif + return GraphicObject( aGraphic ); } |