vcl/source/gdi/impgraph.cxx | 48 ++------------------------------------------ 1 file changed, 3 insertions(+), 45 deletions(-)
New commits: commit 0f586493da9a1ac359dff9fe9110e60880610eb6 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Sat Apr 11 22:28:25 2020 +0200 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Sun Apr 12 10:11:41 2020 +0200 graphic: use UCBContentHelper to delete files Change-Id: Ibfec031daaa3b92d2286113c3ef981cfa6d09f05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92072 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 5751ecba700c..c6f08ec2130f 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -21,12 +21,11 @@ #include <sal/log.hxx> #include <comphelper/fileformat.h> -#include <comphelper/processfactory.hxx> #include <tools/fract.hxx> #include <tools/vcompat.hxx> #include <tools/urlobj.hxx> #include <tools/stream.hxx> -#include <ucbhelper/content.hxx> +#include <unotools/ucbhelper.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/tempfile.hxx> #include <vcl/outdev.hxx> @@ -37,8 +36,6 @@ #include <vcl/graph.hxx> #include <vcl/metaact.hxx> #include <impgraph.hxx> -#include <com/sun/star/ucb/CommandAbortedException.hpp> -#include <com/sun/star/ucb/ContentCreationException.hpp> #include <com/sun/star/graphic/XPrimitive2D.hpp> #include <vcl/dibtools.hxx> #include <map> @@ -355,26 +352,7 @@ void ImpGraphic::ImplClearGraphics() ImpSwapFile::~ImpSwapFile() { - try - { - ::ucbhelper::Content aCnt( aSwapURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), - css::uno::Reference< css::ucb::XCommandEnvironment >(), - comphelper::getProcessComponentContext() ); - - aCnt.executeCommand( "delete", css::uno::makeAny( true ) ); - } - catch( const css::ucb::ContentCreationException& ) - { - } - catch( const css::uno::RuntimeException& ) - { - } - catch( const css::ucb::CommandAbortedException& ) - { - } - catch( const css::uno::Exception& ) - { - } + utl::UCBContentHelper::Kill(aSwapURL.GetMainURL(INetURLObject::DecodeMechanism::NONE)); } void ImpGraphic::ImplSetPrepared(bool bAnimated, const Size* pSizeHint) @@ -1335,27 +1313,7 @@ bool ImpGraphic::ImplSwapOut() else { xOStm.reset(); - - try - { - ::ucbhelper::Content aCnt( aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), - css::uno::Reference< css::ucb::XCommandEnvironment >(), - comphelper::getProcessComponentContext() ); - - aCnt.executeCommand( "delete", css::uno::makeAny( true ) ); - } - catch( const css::ucb::ContentCreationException& ) - { - } - catch( const css::uno::RuntimeException& ) - { - } - catch( const css::ucb::CommandAbortedException& ) - { - } - catch( const css::uno::Exception& ) - { - } + utl::UCBContentHelper::Kill(aTmpURL.GetMainURL(INetURLObject::DecodeMechanism::NONE)); } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits