[Libreoffice-commits] core.git: sw/qa sw/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 2 09:48:10 UTC 2021
sw/qa/core/filters-test.cxx | 13 ++++++++-----
sw/source/core/txtnode/txtedt.cxx | 2 +-
2 files changed, 9 insertions(+), 6 deletions(-)
New commits:
commit 8771f48512ed19197c17506f522578f43b092b21
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jun 2 10:59:48 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jun 2 11:47:30 2021 +0200
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 at collabora.co.uk>
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 )
More information about the Libreoffice-commits
mailing list