summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-02 10:59:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-02 11:47:30 +0200
commit8771f48512ed19197c17506f522578f43b092b21 (patch)
tree24fe564a5d4609d1384db41de3398c62d0a7a0e8 /sw
parente4cf357a2e5d6506e4f9ff8d03edb53b699967f6 (diff)
quieten down this warning
Change-Id: I92c27cd332e20aa4c7bc208b85b571e99668e6dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/core/filters-test.cxx13
-rw-r--r--sw/source/core/txtnode/txtedt.cxx2
2 files changed, 9 insertions, 6 deletions
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index e3dbdafdaa07..3e4dfd697206 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -115,11 +115,14 @@ bool SwFiltersTest::filter(const OUString &rFilter, const OUString &rURL,
if (bLoaded)
xDocShRef->ResetError();
- utl::TempFile aTempFile;
- aTempFile.EnableKillingFile();
- SfxMedium aDstMed(aTempFile.GetURL(), StreamMode::STD_WRITE);
- aDstMed.SetFilter(pExportFilter);
- bool bSaved = xDocShRef->DoSaveAs(aDstMed);
+ bool bSaved;
+ {
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+ SfxMedium aDstMed(aTempFile.GetURL(), StreamMode::STD_WRITE);
+ aDstMed.SetFilter(pExportFilter);
+ bSaved = xDocShRef->DoSaveAs(aDstMed);
+ }
if (xDocShRef.is())
xDocShRef->DoClose();
return bSaved;
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 19fcadedbe4e..6e64a06c570d 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -2228,7 +2228,7 @@ SwWrongList const* SwTextNode::GetGrammarCheck() const
void SwTextNode::SetSmartTags( std::unique_ptr<SwWrongList> pNew )
{
- OSL_ENSURE( SwSmartTagMgr::Get().IsSmartTagsEnabled(),
+ OSL_ENSURE( !pNew || SwSmartTagMgr::Get().IsSmartTagsEnabled(),
"Weird - we have a smart tag list without any recognizers?" );
if ( m_pParaIdleData_Impl )