diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-06 10:19:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-06 15:18:41 +0200 |
commit | 29277d4adf6e37cf201f11f3de704197feae494a (patch) | |
tree | 211138292b820b664210d5757a764410c070049d /sw | |
parent | fb7c1d512f26a40a3829464cad520a88eb8bebba (diff) |
ofz: fix some leaks
Change-Id: I2542447ed6bf5098829c3d8c77435d39c1cb2e5f
Reviewed-on: https://gerrit.libreoffice.org/39637
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 9 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 8 |
3 files changed, 9 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 155ae68b304e..5b965e1df6a1 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4142,7 +4142,6 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_pPrevNumRule(nullptr) , m_pPostProcessAttrsInfo(nullptr) , m_pWwFib(nullptr) - , m_pLstManager(nullptr) , m_aTextNodesHavingFirstLineOfstSet() , m_aTextNodesHavingLeftIndentSet() , m_pAktColl(nullptr) @@ -4987,7 +4986,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss) ::SetProgressState(m_nProgress, m_pDocShell); // Update - m_pLstManager = new WW8ListManager( *m_pTableStream, *this ); + m_xLstManager.reset(new WW8ListManager(*m_pTableStream, *this)); /* first (1) import all styles (see WW8PAR2.CXX) @@ -5297,10 +5296,10 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss) } } // update graphic bullet information - size_t nCount = m_pLstManager->GetWW8LSTInfoNum(); + size_t nCount = m_xLstManager->GetWW8LSTInfoNum(); for (size_t i = 0; i < nCount; ++i) { - SwNumRule* pRule = m_pLstManager->GetNumRule(i); + SwNumRule* pRule = m_xLstManager->GetNumRule(i); for (sal_uInt16 j = 0; j < MAXLEVEL; ++j) { SwNumFormat aNumFormat(pRule->Get(j)); @@ -5338,7 +5337,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss) } } } - DELETEZ( m_pLstManager ); + m_xLstManager.reset(); } SAL_WARN_IF(m_pTableEndPaM, "sw.ww8", "document ended without table ending"); diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 94aaf66325e0..9e5d7b7405e8 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1196,7 +1196,7 @@ private: WW8Fib* m_pWwFib; std::unique_ptr<WW8Fonts> m_xFonts; std::unique_ptr<WW8Dop> m_xWDop; - WW8ListManager* m_pLstManager; + std::unique_ptr<WW8ListManager> m_xLstManager; std::unique_ptr<WW8ScannerBase> m_xSBase; std::shared_ptr<WW8PLCFMan> m_xPlcxMan; std::map<short, OUString> m_aLinkStringMap; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 1bcc38ceca18..f77defc76882 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1739,7 +1739,7 @@ void SwWW8ImplReader::SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO, { std::vector<sal_uInt8> aParaSprms; SwNumRule *pNmRule = - m_pLstManager->GetNumRuleForActivation(nActLFO, + m_xLstManager->GetNumRuleForActivation(nActLFO, nActLevel, aParaSprms); if (pNmRule) UseListIndent(rStyleInf, pNmRule->Get(nActLevel)); @@ -1772,7 +1772,7 @@ void SwWW8ImplReader::RegisterNumFormatOnStyle(sal_uInt16 nStyle) ) { std::vector<sal_uInt8> aParaSprms; - pNmRule = m_pLstManager->GetNumRuleForActivation(nLFO, nLevel, + pNmRule = m_xLstManager->GetNumRuleForActivation(nLFO, nLevel, aParaSprms); if (pNmRule != nullptr) @@ -1805,7 +1805,7 @@ void SwWW8ImplReader::RegisterNumFormatOnTextNode(sal_uInt16 nActLFO, // and only sets the Level. It does not check if there is a NumRule // attached to the STYLE !!! - if (m_pLstManager) // are all list declarations read? + if (m_xLstManager) // are all list declarations read? { SwTextNode* pTextNd = m_pPaM->GetNode().GetTextNode(); OSL_ENSURE(pTextNd, "No Text-Node at PaM-Position"); @@ -1814,7 +1814,7 @@ void SwWW8ImplReader::RegisterNumFormatOnTextNode(sal_uInt16 nActLFO, std::vector<sal_uInt8> aParaSprms; const SwNumRule* pRule = bSetAttr ? - m_pLstManager->GetNumRuleForActivation( nActLFO, nActLevel, + m_xLstManager->GetNumRuleForActivation( nActLFO, nActLevel, aParaSprms, pTextNd) : nullptr; if (pRule != nullptr || !bSetAttr) |