diff options
Diffstat (limited to 'sw/source/filter/ww8/ww8par.cxx')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 27d6032dd4d2..a2d959d7d3f7 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2478,7 +2478,7 @@ void wwSectionManager::SetHdFt(wwSection const &rSection, int nSect, } -void SwWW8ImplReader::FinalizeTextNode(SwPosition& rPos, bool bAddNew) +void SwWW8ImplReader::AppendTextNode(SwPosition& rPos) { SwTextNode* pText = m_pPaM->GetPointNode().GetTextNode(); @@ -2565,8 +2565,7 @@ void SwWW8ImplReader::FinalizeTextNode(SwPosition& rPos, bool bAddNew) m_bFirstPara = false; - if (bAddNew) - m_rDoc.getIDocumentContentOperations().AppendTextNode(rPos); + m_rDoc.getIDocumentContentOperations().AppendTextNode(rPos); // We can flush all anchored graphics at the end of a paragraph. m_xAnchorStck->Flush(); @@ -3482,13 +3481,13 @@ void SwWW8ImplReader::simpleAddTextToParagraph(std::u16string_view aAddString) else { m_rDoc.getIDocumentContentOperations().InsertString(*m_pPaM, addString.copy(0, nCharsLeft)); - FinalizeTextNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); m_rDoc.getIDocumentContentOperations().InsertString(*m_pPaM, addString.copy(nCharsLeft)); } } else { - FinalizeTextNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); m_rDoc.getIDocumentContentOperations().InsertString(*m_pPaM, addString); } @@ -3559,7 +3558,7 @@ bool SwWW8ImplReader::HandlePageBreakChar() && (m_bFirstPara || m_bFirstParaOfPage)) { IsTemp = false; - FinalizeTextNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE)); } @@ -3638,7 +3637,7 @@ bool SwWW8ImplReader::ReadChar(tools::Long nPosCp, tools::Long nCpOfs) // Always insert a txtnode for a column break, e.g. ## SwContentNode *pCntNd=m_pPaM->GetPointContentNode(); if (pCntNd!=nullptr && pCntNd->Len()>0) // if par is empty not break is needed - FinalizeTextNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SvxFormatBreakItem(SvxBreak::ColumnBefore, RES_BREAK)); } break; @@ -4107,7 +4106,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) } if (bSplit) { - FinalizeTextNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); } } @@ -4222,7 +4221,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) // to insert a text node. if (!bStartLine && !m_xAnchorStck->empty()) { - FinalizeTextNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); } m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SvxFormatBreakItem(SvxBreak::PageBefore, RES_BREAK)); @@ -4235,7 +4234,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) m_xPreviousNode.reset(); if (m_pPaM->GetPoint()->GetContentIndex()) - FinalizeTextNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); if (!m_bInHyperlink) bJoined = JoinNode(*m_pPaM); |