vcl/source/filter/graphicfilter.cxx | 3 -- vcl/source/gdi/impgraph.cxx | 48 ++---------------------------------- 2 files changed, 3 insertions(+), 48 deletions(-)
New commits: commit 76fcfe99aa536f35875e16f51618ea5760308b88 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Sat Apr 11 22:28:25 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Sat Apr 11 22:28:25 2020 +0200 graphic: use UCBContentHelper to delete files Change-Id: Ibfec031daaa3b92d2286113c3ef981cfa6d09f05 diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 45d13e71988b..292c0bc6d1f9 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)); } } } commit e8ee862ea90dd654d1e8efcb37287d137396df26 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Sat Apr 11 22:27:38 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Sat Apr 11 22:27:38 2020 +0200 remove unused includes in graphicfilter Change-Id: I5e4ef6aadd25697beb0d3289ee22cef1e5ac433b diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 9262a91592d9..e69686a3d99e 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -23,7 +23,6 @@ #include <osl/mutex.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/threadpool.hxx> -#include <ucbhelper/content.hxx> #include <cppuhelper/implbase.hxx> #include <tools/fract.hxx> #include <unotools/configmgr.hxx> @@ -57,8 +56,6 @@ #include <com/sun/star/svg/XSVGWriter.hpp> #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <com/sun/star/xml/sax/Writer.hpp> -#include <com/sun/star/ucb/CommandAbortedException.hpp> -#include <com/sun/star/ucb/ContentCreationException.hpp> #include <unotools/ucbstreamhelper.hxx> #include <rtl/bootstrap.hxx> #include <rtl/instance.hxx> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits