summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2011-12-02 23:43:23 +0100
committerMichael Stahl <mstahl@redhat.com>2011-12-03 00:48:15 +0100
commitfd95f1ab6220c6a530fd2e4e727417f504a5db51 (patch)
treeb378d6e72698a8329f41d7919016574a301016e2 /sc
parentaa59ee85a8e902aa4dc956822e9169093de6c454 (diff)
refactor SdrModel::GetDocumentStream
Remove 3 ~identical implementations of GetDocumentStream and the associated struct SdrDocumentStreamInfo.
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/drwlayer.hxx1
-rw-r--r--sc/source/core/data/drwlayer.cxx53
2 files changed, 0 insertions, 54 deletions
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 35e1843719a2..6f4f71dd6902 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -115,7 +115,6 @@ public:
virtual void SetChanged( sal_Bool bFlg = sal_True );
virtual Window* GetCurDocViewWin();
- virtual SvStream* GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) const;
virtual SdrLayerID GetControlExportLayerId( const SdrObject & ) const;
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 58b591cec3e1..327f65a15e17 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1904,59 +1904,6 @@ void ScDrawLayer::SetChanged( sal_Bool bFlg /* = sal_True */ )
FmFormModel::SetChanged( bFlg );
}
-SvStream* ScDrawLayer::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) const
-{
- OSL_ENSURE( pDoc, "ScDrawLayer::GetDocumentStream without document" );
- if ( !pDoc )
- return NULL;
-
- uno::Reference< embed::XStorage > xStorage = pDoc->GetDocumentShell() ?
- pDoc->GetDocumentShell()->GetStorage() :
- NULL;
- SvStream* pRet = NULL;
-
- if( xStorage.is() )
- {
- 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, '/' ) );
- const String aPictureStorageName( aPicturePath.GetToken( 0, '/' ) );
-
- try {
- if ( xStorage->isStorageElement( aPictureStorageName ) )
- {
- uno::Reference< embed::XStorage > xPictureStorage =
- xStorage->openStorageElement( aPictureStorageName, embed::ElementModes::READ );
-
- 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( uno::Exception& )
- {
- // TODO: error handling
- }
- }
- }
- rStreamInfo.mbDeleteAfterUse = ( pRet != NULL );
- }
-
- return pRet;
-}
-
SdrLayerID ScDrawLayer::GetControlExportLayerId( const SdrObject & ) const
{
// Layer fuer Export von Form-Controls in Versionen vor 5.0 - immer SC_LAYER_FRONT