[Libreoffice-commits] core.git: 2 commits - oox/source unotools/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 29 07:45:01 UTC 2021
oox/source/shape/ShapeContextHandler.cxx | 10 ++--------
unotools/source/ucbhelper/XTempFile.hxx | 5 +++--
unotools/source/ucbhelper/xtempfile.cxx | 2 +-
3 files changed, 6 insertions(+), 11 deletions(-)
New commits:
commit a63679f30a2c455fe0a6471e76a0ec8e3aecd0ea
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Jun 29 08:22:38 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jun 29 09:44:43 2021 +0200
remove try/catch in ShapeContextHandler constructor
if we don't set mxShapeFilterBase here, we will just trigger a SEGV
later on, rather see the error at the original site
ever since
commit a68e07b994a02ced1ee447350340d9fe25638bd3
Date: Wed Mar 5 17:52:58 2008 +0000
INTEGRATION: CWS xmlfilter03_DEV300 (1.2.4); FILE MERGED
Change-Id: Iacb7c757d4c9526df076e0903d4539f12f4ce968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118043
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 4eb20ad36cda..3a0ed5a3a306 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -45,15 +45,9 @@ using namespace core;
using namespace drawingml;
ShapeContextHandler::ShapeContextHandler(uno::Reference< uno::XComponentContext > const & context) :
- mnStartToken(0)
+ mnStartToken(0),
+ mxShapeFilterBase( new ShapeFilterBase(context) )
{
- try
- {
- mxShapeFilterBase.set( new ShapeFilterBase(context) );
- }
- catch( uno::Exception& )
- {
- }
}
ShapeContextHandler::~ShapeContextHandler()
commit c3c8a7dbc4ce10156fca530a546babb0b478edaa
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Jun 29 08:49:48 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jun 29 09:44:28 2021 +0200
use std::optional in OTempFileService
since we are always needing this, no need to allocate it separately
Change-Id: Ic81aa485807dd1705fd0af2065044b4169c9cf5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118044
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/unotools/source/ucbhelper/XTempFile.hxx b/unotools/source/ucbhelper/XTempFile.hxx
index 80036263f0b9..a59abd5ae622 100644
--- a/unotools/source/ucbhelper/XTempFile.hxx
+++ b/unotools/source/ucbhelper/XTempFile.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include <memory>
+#include <optional>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XTempFile.hpp>
@@ -29,6 +29,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>
+#include <unotools/tempfile.hxx>
namespace com::sun::star::uno { class XComponentContext; }
@@ -48,7 +49,7 @@ typedef ::cppu::WeakImplHelper< css::io::XTempFile
class OTempFileService : public OTempFileBase
{
protected:
- std::unique_ptr<utl::TempFile> mpTempFile;
+ std::optional<utl::TempFile> mpTempFile;
::osl::Mutex maMutex;
SvStream* mpStream;
bool mbRemoveFile;
diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx
index 712c788aa3e2..0cc0d8904bac 100644
--- a/unotools/source/ucbhelper/xtempfile.cxx
+++ b/unotools/source/ucbhelper/xtempfile.cxx
@@ -33,7 +33,7 @@ OTempFileService::OTempFileService(css::uno::Reference< css::uno::XComponentCont
, mbInClosed( false )
, mbOutClosed( false )
{
- mpTempFile.reset(new utl::TempFile());
+ mpTempFile.emplace();
mpTempFile->EnableKillingFile();
}
More information about the Libreoffice-commits
mailing list