diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-08-18 16:34:31 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-08-18 15:29:40 +0200 |
commit | 83d1f9c2dd85d2793028c7afaa3459d1f76898b6 (patch) | |
tree | 9c4712e00a4b722156ddbe8c9c5c0bd8759c9a24 /vcl/source/graphic/UnoGraphicProvider.cxx | |
parent | 2a122f47dfa1b127c35838afb0ddac4e8524e400 (diff) |
Simplify a bit
Change-Id: I7b927cd3dade5bc73039541c3ec8c72a9de400b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172009
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'vcl/source/graphic/UnoGraphicProvider.cxx')
-rw-r--r-- | vcl/source/graphic/UnoGraphicProvider.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
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() ) |