vcl/source/graphic/UnoGraphicProvider.cxx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)
New commits: commit 83d1f9c2dd85d2793028c7afaa3459d1f76898b6 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Aug 18 16:34:31 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Aug 18 15:29:40 2024 +0200 Simplify a bit Change-Id: I7b927cd3dade5bc73039541c3ec8c72a9de400b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172009 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Jenkins diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index aa92b2f50b28..ad9a94baa849 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -223,17 +223,12 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadBitmap( const uno uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDescriptor( const uno::Sequence< beans::PropertyValue >& rMediaProperties ) { - uno::Reference< beans::XPropertySet > xRet; - OUString aURL; uno::Reference< io::XInputStream > xIStm; uno::Reference< awt::XBitmap >xBtm; for( const auto& rMediaProperty : rMediaProperties ) { - if (xRet.is()) - break; - const OUString aName( rMediaProperty.Name ); const uno::Any aValue( rMediaProperty.Value ); @@ -253,6 +248,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDesc SolarMutexGuard g; + uno::Reference<beans::XPropertySet> xRet; if( xIStm.is() ) { rtl::Reference<unographic::GraphicDescriptor> pDescriptor = new unographic::GraphicDescriptor; @@ -293,7 +289,6 @@ uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDesc uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( const uno::Sequence< ::beans::PropertyValue >& rMediaProperties ) { - uno::Reference< ::graphic::XGraphic > xRet; OUString aPath; uno::Reference< io::XInputStream > xIStm; @@ -306,17 +301,12 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co for (const auto& rMediaProperty : rMediaProperties) { - if (xRet.is()) - break; - const OUString aName( rMediaProperty.Name ); const uno::Any aValue( rMediaProperty.Value ); if (aName == "URL") { - OUString aURL; - aValue >>= aURL; - aPath = aURL; + aValue >>= aPath; } else if (aName == "InputStream") { @@ -365,6 +355,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co SolarMutexGuard g; + uno::Reference<::graphic::XGraphic> xRet; std::unique_ptr<SvStream> pIStm; if( xIStm.is() )