summaryrefslogtreecommitdiff
path: root/sd/source/core/drawdoc3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/core/drawdoc3.cxx')
-rw-r--r--sd/source/core/drawdoc3.cxx82
1 files changed, 0 insertions, 82 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index b4000157dfac..c05af4811b20 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1242,88 +1242,6 @@ List* SdDrawDocument::GetCustomShowList(sal_Bool bCreate)
/*************************************************************************
|*
-|* Document-Stream herausgeben (fuer load-on-demand Graphiken)
-|*
-\************************************************************************/
-
-SvStream* SdDrawDocument::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) const
-{
- uno::Reference < embed::XStorage > xStor;
- if (mpDocSh)
- xStor = mpDocSh->GetStorage();
- SvStream* pRet = NULL;
-
- if( xStor.is() )
- {
- //TODO/MBA: binary format removed, needs testing
- if( rStreamInfo.maUserData.Len() &&
- ( rStreamInfo.maUserData.GetToken( 0, ':' ) ==
- String( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package" ) ) ) )
- {
- const String aPicturePath( rStreamInfo.maUserData.GetToken( 1, ':' ) );
-
- // graphic from picture stream in picture storage in XML package
- if( aPicturePath.GetTokenCount( '/' ) == 2 ) try
- {
- const String aPictureStreamName( aPicturePath.GetToken( 1, '/' ) );
- const String aPictureStorageName( aPicturePath.GetToken( 0, '/' ) );
- if( xStor->isStorageElement( aPictureStorageName ) )
- {
- uno::Reference < embed::XStorage > xPictureStorage =
- xStor->openStorageElement( aPictureStorageName, embed::ElementModes::READ );
- try
- {
- if( xPictureStorage.is() && xPictureStorage->isStreamElement( aPictureStreamName ) )
- {
- uno::Reference < io::XStream > xStream = xPictureStorage->openStreamElement( aPictureStreamName, embed::ElementModes::READ );
- if( xStream.is() )
- pRet = ::utl::UcbStreamHelper::CreateStream( xStream );
- }
- }
- catch( container::NoSuchElementException& )
- {
- }
- }
- }
- catch( uno::Exception& e )
- {
- (void)e;
- OSL_FAIL(
- (rtl::OString("sd::SdDrawDocument::GetDocumentStream(), "
- "exception caught: ") +
- rtl::OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ) +
- rtl::OString("\r\nATTENTION: Graphics may get lost now, please inform CL or KA!") ).getStr() );
- }
-
- rStreamInfo.mbDeleteAfterUse = ( pRet != NULL );
- }
- }
-
-#if OSL_DEBUG_LEVEL > 1
- if( pRet )
- {
- // try to get some information from stream
- const sal_uLong nStartPos = pRet->Tell();
- const sal_uLong nEndPos = pRet->Seek( STREAM_SEEK_TO_END );
- const sal_uLong nStmLen = nEndPos - nStartPos;
- sal_uChar aTestByte;
-
- // try to read one byte
- if( nStmLen )
- *pRet >> aTestByte;
-
- pRet->Seek( nStartPos );
- }
-#endif
-
- return pRet;
-}
-
-
-/*************************************************************************
-|*
|* Nicht benutzte MasterPages und Layouts entfernen
|*
\************************************************************************/