summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unobtabl.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-12-10 21:58:17 +0100
committerMathias Bauer <mba@openoffice.org>2009-12-10 21:58:17 +0100
commit6d82dbeddb991307a987b9f8087d78b702f6c7c0 (patch)
tree4c0a3b56f376a7449acc72e8768043fcbb971415 /svx/source/unodraw/unobtabl.cxx
parente253f0cf0ddfed47d1e64fd7b7304f48d0a4ece0 (diff)
#i107450#: move method CreateGraphicObjectFromURL to class GraphicObject
Diffstat (limited to 'svx/source/unodraw/unobtabl.cxx')
-rw-r--r--svx/source/unodraw/unobtabl.cxx42
1 files changed, 0 insertions, 42 deletions
diff --git a/svx/source/unodraw/unobtabl.cxx b/svx/source/unodraw/unobtabl.cxx
index 671de49dc4ba..7aa359ad6e19 100644
--- a/svx/source/unodraw/unobtabl.cxx
+++ b/svx/source/unodraw/unobtabl.cxx
@@ -34,11 +34,6 @@
#include <vcl/cvtgrf.hxx>
#include <svl/itemset.hxx>
#include <svx/xit.hxx>
-#ifndef SVX_LIGHT
-#ifndef _SFXDOCFILE_HXX
-#include <sfx2/docfile.hxx>
-#endif
-#endif
#include "UnoNameItemTable.hxx"
#include <svx/xbtmpit.hxx>
@@ -127,41 +122,4 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoBitmapTable_createInstance( Sdr
{
return *new SvxUnoBitmapTable(pModel);
}
-#include <tools/stream.hxx>
-#include <unotools/localfilehelper.hxx>
-/** returns a GraphicObject for this URL */
-GraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw()
-{
- const String aURL( rURL ), aPrefix( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX) );
-
- if( aURL.Search( aPrefix ) == 0 )
- {
- // graphic manager url
- ByteString aUniqueID( String(rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 )), RTL_TEXTENCODING_UTF8 );
- return GraphicObject( aUniqueID );
- }
- else
- {
- Graphic aGraphic;
-
-#ifndef SVX_LIGHT
- if ( aURL.Len() )
- {
- SfxMedium aMedium( aURL, STREAM_READ, TRUE );
- SvStream* pStream = aMedium.GetInStream();
-
- 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 );
- }
-}