From e26f8d2592a3d7cc5b43b3246b364397dd704f0d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 25 Aug 2017 11:09:38 +0100 Subject: coverity#1401307 document checked 'Uncaught exception' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit markup std::unique_ptr where coverity warns a dtor might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: Icc99cdecf8d8b011e599574f0a05b59efd1c65c2 Reviewed-on: https://gerrit.libreoffice.org/41561 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sc/inc/document.hxx | 3 +++ sc/inc/funcuno.hxx | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'sc/inc') diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 35ea5104b090..a2a073a68ab2 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -36,6 +36,7 @@ #include "typedstrdata.hxx" #include "calcmacros.hxx" #include "calcconfig.hxx" +#include #include #include #include @@ -2386,6 +2387,8 @@ private: void SetNeedsListeningGroups( const std::vector& rPosArray ); }; +typedef std::unique_ptr> ScDocumentUniquePtr; + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/inc/funcuno.hxx b/sc/inc/funcuno.hxx index cf0dc8065a1b..174975c8a1f9 100644 --- a/sc/inc/funcuno.hxx +++ b/sc/inc/funcuno.hxx @@ -26,8 +26,8 @@ #include #include #include +#include "document.hxx" -class ScDocument; class ScDocOptions; css::uno::Reference< css::uno::XInterface > SAL_CALL @@ -37,7 +37,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL class ScTempDocCache { private: - std::unique_ptr xDoc; + ScDocumentUniquePtr xDoc; bool bInUse; public: -- cgit