summaryrefslogtreecommitdiff
path: root/sd/source/ui/docshell/docshell.cxx
diff options
context:
space:
mode:
authorThorsten Behrens <thb@openoffice.org>2001-04-26 16:11:09 +0000
committerThorsten Behrens <thb@openoffice.org>2001-04-26 16:11:09 +0000
commite54033b69bf753e372b9f43f3231d3e6ecdb75b0 (patch)
treeb33354cca4c598c59f126f387ff1ece0ec43a921 /sd/source/ui/docshell/docshell.cxx
parentf7a6ec73a6bb5f54e2751938c309ff60690f62ce (diff)
Adaptions needed for player (SVX_LIGHT version)
Diffstat (limited to 'sd/source/ui/docshell/docshell.cxx')
-rw-r--r--sd/source/ui/docshell/docshell.cxx99
1 files changed, 2 insertions, 97 deletions
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 54f87e29e2d0..35815b23f50d 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docshell.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: ka $ $Date: 2001-03-28 11:55:47 $
+ * last change: $Author: thb $ $Date: 2001-04-26 17:11:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -220,7 +220,6 @@ SdDrawDocShell::SdDrawDocShell(SfxObjectCreateMode eMode,
// pStbMgr( NULL ),
bSdDataObj(bDataObject),
bOwnPrinter(FALSE),
- pDocStor(NULL),
eDocType(eDocumentType)
{
// pDoc = new SdDrawDocument(eDocType, this);
@@ -248,7 +247,6 @@ SdDrawDocShell::SdDrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode,
// pStbMgr( NULL ),
bSdDataObj(bDataObject),
bOwnPrinter(FALSE),
- pDocStor(NULL),
eDocType(eDocumentType)
{
Construct();
@@ -503,99 +501,6 @@ void SdDrawDocShell::ApplySlotFilter() const
}
-/*************************************************************************
-|*
-|* Document-Stream herausgeben (fuer load-on-demand Graphiken)
-|*
-\************************************************************************/
-
-SvStream* SdDrawDocShell::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo)
-{
- SvStorage* pStor = GetMedium()->GetStorage();
- SvStream* pRet = NULL;
-
- if( pStor )
- {
- 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 )
- {
- const String aPictureStreamName( aPicturePath.GetToken( 1, '/' ) );
-
- if( !xPictureStorage.Is() )
- {
- const String aPictureStorageName( aPicturePath.GetToken( 0, '/' ) );
-
- if( pStor->IsContained( aPictureStorageName ) &&
- pStor->IsStorage( aPictureStorageName ) )
- {
- xPictureStorage = pStor->OpenUCBStorage( aPictureStorageName, STREAM_READ );
- }
- }
-
- if( xPictureStorage.Is() &&
- xPictureStorage->IsContained( aPictureStreamName ) &&
- xPictureStorage->IsStream( aPictureStreamName ) )
- {
- pRet = xPictureStorage->OpenStream( aPictureStreamName, STREAM_READ );
-
- if( pRet )
- {
- pRet->SetVersion( xPictureStorage->GetVersion() );
- pRet->SetKey( xPictureStorage->GetKey() );
- }
- }
- }
-
- rStreamInfo.mbDeleteAfterUse = ( pRet != NULL );
- }
- else
- {
- // graphic from plain binary document stream
- if( !pDocStor )
- {
- if( pStor->IsStream( pStarDrawDoc ) )
- {
- BOOL bOK = pStor->Rename(pStarDrawDoc, pStarDrawDoc3);
- DBG_ASSERT(bOK, "Umbenennung des Streams gescheitert");
- }
-
- xDocStream = pStor->OpenStream( pStarDrawDoc3, STREAM_READ );
- xDocStream->SetVersion( pStor->GetVersion() );
- xDocStream->SetKey( pStor->GetKey() );
- pDocStor = pStor;
- }
-
- pRet = xDocStream;
- rStreamInfo.mbDeleteAfterUse = FALSE;
- }
- }
-
-#ifdef DEBUG
- if( pRet )
- {
- // try to get some information from stream
- const ULONG nStartPos = pRet->Tell();
- const ULONG nEndPos = pRet->Seek( STREAM_SEEK_TO_END );
- const ULONG nStmLen = nEndPos - nStartPos;
- sal_uChar aTestByte;
-
- // try to read one byte
- if( nStmLen )
- *pRet >> aTestByte;
-
- pRet->Seek( nStartPos );
- }
-#endif
-
- return pRet;
-}
-
void SdDrawDocShell::SetModified( BOOL bSet /* = TRUE */ )
{
SfxInPlaceObject::SetModified( bSet );