diff options
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 2 |
4 files changed, 10 insertions, 9 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 44812a67ad1f..f5bdacffe32d 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2170,7 +2170,7 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes) std::unique_ptr<OutlinerParaObject> pOutliner = ImportAsOutliner( sText, pRes->nCp2OrIdx, pRes->nCp2OrIdx + pRes->nMemLen, MAN_AND ); - m_pFormatOfJustInsertedApo = nullptr; + m_xFormatOfJustInsertedApo.reset(); SwPostItField aPostIt( static_cast<SwPostItFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(SwFieldIds::Postit)), sAuthor, sText, sInitials, OUString(), aDate ); @@ -4260,7 +4260,6 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_aParaStyleMapper(rD) , m_aCharStyleMapper(rD) , m_pFlyFormatOfJustInsertedGraphic(nullptr) - , m_pFormatOfJustInsertedApo(nullptr) , m_pPreviousNumPaM(nullptr) , m_pPrevNumRule(nullptr) , m_aTextNodesHavingFirstLineOfstSet() diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 61e30e6618ed..74953aa2016c 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1196,7 +1196,7 @@ private: std::unique_ptr<SwMSConvertControls> m_xFormImpl; // implementation of control SwFlyFrameFormat* m_pFlyFormatOfJustInsertedGraphic; - SwFrameFormat* m_pFormatOfJustInsertedApo; + std::unique_ptr<FrameDeleteWatch> m_xFormatOfJustInsertedApo; SwPaM* m_pPreviousNumPaM; const SwNumRule* m_pPrevNumRule; diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index f0a12ad3005e..6edc842e48ee 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2399,18 +2399,20 @@ void WW8TabDesc::CreateSwTable() Set fly anchor to its anchor pos, so that if a table starts immediately at this position a new node will be inserted before inserting the table. */ - if (!bInsNode && m_pIo->m_pFormatOfJustInsertedApo) + SwFrameFormat* pFormat = (!bInsNode && m_pIo->m_xFormatOfJustInsertedApo) + ? m_pIo->m_xFormatOfJustInsertedApo->GetFormat() : nullptr; + if (pFormat) { const SwPosition* pAPos = - m_pIo->m_pFormatOfJustInsertedApo->GetAnchor().GetContentAnchor(); + pFormat->GetAnchor().GetContentAnchor(); if (pAPos && &pAPos->nNode.GetNode() == &pPoint->nNode.GetNode()) { bInsNode = true; bSetMinHeight = true; - SwFormatSurround aSur(m_pIo->m_pFormatOfJustInsertedApo->GetSurround()); + SwFormatSurround aSur(pFormat->GetSurround()); aSur.SetAnchorOnly(true); - m_pIo->m_pFormatOfJustInsertedApo->SetFormatAttr(aSur); + pFormat->SetFormatAttr(aSur); } } @@ -2797,7 +2799,7 @@ void WW8TabDesc::FinishSwTable() } } } - m_pIo->m_pFormatOfJustInsertedApo = nullptr; + m_pIo->m_xFormatOfJustInsertedApo.reset(); m_MergeGroups.clear(); } } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 499fdc8e223e..1e68d7a592b4 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2716,7 +2716,7 @@ void SwWW8ImplReader::StopApo() //#i8062# if (m_xSFlyPara && m_xSFlyPara->pFlyFormat) - m_pFormatOfJustInsertedApo = m_xSFlyPara->pFlyFormat; + m_xFormatOfJustInsertedApo.reset(new FrameDeleteWatch(m_xSFlyPara->pFlyFormat)); m_xSFlyPara.reset(); m_xWFlyPara.reset(); |