From edc5240a96f003b9aec8f8d2ce92db39ad603fd7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 10 Aug 2022 13:43:56 +0200 Subject: rename SwPaM::GetContentNode to GetPointContentNode/GetMarkContentNode Using a parameter to select point/mark makes the code much harder to read Change-Id: Ic24098a6045ff2262d4c808228ded7bf8206fe8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138085 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/filter/ww8/wrtw8sty.cxx | 2 +- sw/source/filter/ww8/ww8par.cxx | 12 ++++++------ sw/source/filter/ww8/ww8par2.cxx | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'sw/source/filter/ww8') diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index f0187d3a6230..ff5af1a68785 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -990,7 +990,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport ) const SwSectionFormat *pFormat = nullptr; rExport.m_pCurrentPageDesc = &rExport.m_rDoc.GetPageDesc( 0 ); - const SwNode* pNd = rExport.m_pCurPam->GetContentNode(); + const SwNode* pNd = rExport.m_pCurPam->GetPointContentNode(); const SfxItemSet* pSet = pNd ? &static_cast(pNd)->GetSwAttrSet() : nullptr; sal_uLong nRstLnNum = pSet ? pSet->Get( RES_LINENUMBER ).GetStartValue() : 0; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 065be5d855c4..74605572486a 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2503,9 +2503,9 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper ) aUL.SetLower( static_cast< sal_uInt16 >(nSpace) ); const sal_Int32 nEnd = pSpacingPos->GetContentIndex(); - rMyPam.GetPoint()->nContent.Assign(rMyPam.GetContentNode(), 0); + rMyPam.GetPoint()->nContent.Assign(rMyPam.GetPointContentNode(), 0); m_xCtrlStck->NewAttr(*pSpacingPos, aUL); - rMyPam.GetPoint()->nContent.Assign(rMyPam.GetContentNode(), nEnd); + rMyPam.GetPoint()->nContent.Assign(rMyPam.GetPointContentNode(), nEnd); m_xCtrlStck->SetAttr(*pSpacingPos, RES_UL_SPACE); bRet = true; } @@ -3317,7 +3317,7 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString sal_Int32 nLen = rAddString.getLength(); OUString sParagraphText; - const SwContentNode *pCntNd = m_pPaM->GetContentNode(); + const SwContentNode *pCntNd = m_pPaM->GetPointContentNode(); const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : nullptr; if (pNd) sParagraphText = pNd->GetText(); @@ -3462,7 +3462,7 @@ void SwWW8ImplReader::simpleAddTextToParagraph(const OUString& rAddString) if (addString.isEmpty()) return; - const SwContentNode *pCntNd = m_pPaM->GetContentNode(); + const SwContentNode *pCntNd = m_pPaM->GetPointContentNode(); const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : nullptr; OSL_ENSURE(pNd, "What the hell, where's my text node"); @@ -3628,7 +3628,7 @@ bool SwWW8ImplReader::ReadChar(tools::Long nPosCp, tools::Long nCpOfs) else if (!m_nInTable) { // Always insert a txtnode for a column break, e.g. ## - SwContentNode *pCntNd=m_pPaM->GetContentNode(); + SwContentNode *pCntNd=m_pPaM->GetPointContentNode(); if (pCntNd!=nullptr && pCntNd->Len()>0) // if par is empty not break is needed AppendTextNode(*m_pPaM->GetPoint()); m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SvxFormatBreakItem(SvxBreak::ColumnBefore, RES_BREAK)); @@ -4620,7 +4620,7 @@ void wwSectionManager::InsertSegments() aSectPaM.GetPoint()->Assign(*pTextNd); aSectPaM.GetPoint()->nContent.Assign( - aSectPaM.GetContentNode(), 0); + aSectPaM.GetPointContentNode(), 0); } aSectPaM.SetMark(); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 89338e5d0a67..2cff6ea67ef2 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2742,7 +2742,7 @@ void WW8TabDesc::ParkPaM() } while (m_pIo->m_pPaM->GetPointNode().GetNodeType() != SwNodeType::Text && ++nSttNd < nEndNd); - m_pIo->m_pPaM->GetPoint()->nContent.Assign(m_pIo->m_pPaM->GetContentNode(), 0); + m_pIo->m_pPaM->GetPoint()->nContent.Assign(m_pIo->m_pPaM->GetPointContentNode(), 0); m_pIo->m_rDoc.SetTextFormatColl(*m_pIo->m_pPaM, const_cast(m_pIo->m_pDfltTextFormatColl)); } } @@ -2984,7 +2984,7 @@ void WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) m_pIo->m_pPaM->GetPoint()->nNode = nSttNd; } while (m_pIo->m_pPaM->GetPointNode().GetNodeType() != SwNodeType::Text && ++nSttNd < nEndNd); - m_pIo->m_pPaM->GetPoint()->nContent.Assign(m_pIo->m_pPaM->GetContentNode(), 0); + m_pIo->m_pPaM->GetPoint()->nContent.Assign(m_pIo->m_pPaM->GetPointContentNode(), 0); // Precautionally set now, otherwise the style is not set for cells // that are inserted for margin balancing. m_pIo->m_rDoc.SetTextFormatColl(*m_pIo->m_pPaM, const_cast(m_pIo->m_pDfltTextFormatColl)); @@ -3009,9 +3009,9 @@ void WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) SwPosition* pGridPos = m_pIo->m_pPaM->GetPoint(); const sal_Int32 nEnd = pGridPos->GetContentIndex(); - pGridPos->nContent.Assign(m_pIo->m_pPaM->GetContentNode(), 0); + pGridPos->nContent.Assign(m_pIo->m_pPaM->GetPointContentNode(), 0); m_pIo->m_xCtrlStck->NewAttr(*pGridPos, aGridItem); - pGridPos->nContent.Assign(m_pIo->m_pPaM->GetContentNode(), nEnd); + pGridPos->nContent.Assign(m_pIo->m_pPaM->GetPointContentNode(), nEnd); m_pIo->m_xCtrlStck->SetAttr(*pGridPos, RES_PARATR_SNAPTOGRID); } -- cgit v1.2.3