summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
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 )