diff options
Diffstat (limited to 'chart2/source/model/main/ChartModel_Persistence.cxx')
-rw-r--r-- | chart2/source/model/main/ChartModel_Persistence.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 1868c38e094f..a2cda82ba514 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -608,16 +608,16 @@ void ChartModel::impl_load( { OSL_ENSURE( false, "loadFromStorage cannot create filter" ); } - + if( xStorage.is() ) impl_loadGraphics( xStorage ); setModified( sal_False ); - + // switchToStorage without notifying listeners (which shouldn't exist at // this time, anyway) m_xStorage = xStorage; - + { MutexGuard aGuard( m_aModelMutex ); m_nInLoad--; @@ -629,35 +629,35 @@ void ChartModel::impl_loadGraphics( { try { - const Reference< embed::XStorage >& xGraphicsStorage( - xStorage->openStorageElement( C2U( "Pictures" ), + const Reference< embed::XStorage >& xGraphicsStorage( + xStorage->openStorageElement( C2U( "Pictures" ), embed::ElementModes::READ ) ); - + if( xGraphicsStorage.is() ) - { + { const uno::Sequence< ::rtl::OUString > aElementNames( xGraphicsStorage->getElementNames() ); - + for( int i = 0; i < aElementNames.getLength(); ++i ) { if( xGraphicsStorage->isStreamElement( aElementNames[ i ] ) ) { - uno::Reference< io::XStream > xElementStream( - xGraphicsStorage->openStreamElement( + uno::Reference< io::XStream > xElementStream( + xGraphicsStorage->openStreamElement( aElementNames[ i ], embed::ElementModes::READ ) ); - + if( xElementStream.is() ) { - std::auto_ptr< SvStream > apIStm( - ::utl::UcbStreamHelper::CreateStream( + std::auto_ptr< SvStream > apIStm( + ::utl::UcbStreamHelper::CreateStream( xElementStream, true ) ); if( apIStm.get() ) { Graphic aGraphic; - - if( !GraphicConverter::Import( + + if( !GraphicConverter::Import( *apIStm.get(), aGraphic ) ) { |