summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-01 10:13:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-01 12:57:21 +0200
commit460b70779e5b88fcb021bf3f6ea1d682e1d6e0f3 (patch)
treec468b41a54f4cde15389d0e3a42297239e3fe835
parentb05090e9d8765e964d939ee5cdd743fc7f463acd (diff)
fix shutdown leak in CppunitTest_sc_pdf_export
Change-Id: I83a1f35d91c1843fa9500d18b7fc5b010201617c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/CppunitTest_sc_pdf_export.mk6
-rw-r--r--sc/qa/extras/scpdfexport.cxx13
2 files changed, 19 insertions, 0 deletions
diff --git a/sc/CppunitTest_sc_pdf_export.mk b/sc/CppunitTest_sc_pdf_export.mk
index 5f1cbff5f47a..9da73eed40d6 100644
--- a/sc/CppunitTest_sc_pdf_export.mk
+++ b/sc/CppunitTest_sc_pdf_export.mk
@@ -18,6 +18,12 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_pdf_export, \
$(eval $(call gb_CppunitTest_use_externals,sc_pdf_export, \
boost_headers \
))
+ifeq ($(TLS),NSS)
+$(eval $(call gb_CppunitTest_use_externals,sc_pdf_export,\
+ plc4 \
+ nss3 \
+))
+endif
$(eval $(call gb_CppunitTest_use_libraries,sc_pdf_export, \
comphelper \
diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx
index cfdb4a966aed..b98ee774b7ee 100644
--- a/sc/qa/extras/scpdfexport.cxx
+++ b/sc/qa/extras/scpdfexport.cxx
@@ -8,6 +8,7 @@
*/
#include <sal/config.h>
+#include <config_oox.h>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
@@ -26,6 +27,10 @@
#include <osl/file.hxx>
#include <comphelper/processfactory.hxx>
+#if USE_TLS_NSS
+#include <nss.h>
+#endif
+
using namespace css::lang;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -37,6 +42,7 @@ class ScPDFExportTest : public test::BootstrapFixture, public unotest::MacrosTes
public:
ScPDFExportTest() {}
+ ~ScPDFExportTest();
virtual void setUp() override final;
virtual void tearDown() override final;
@@ -69,6 +75,13 @@ public:
constexpr OUStringLiteral DATA_DIRECTORY = u"/sc/qa/extras/testdocuments/";
+ScPDFExportTest::~ScPDFExportTest()
+{
+#if USE_TLS_NSS
+ NSS_Shutdown();
+#endif
+}
+
void ScPDFExportTest::setUp()
{
test::BootstrapFixture::setUp();