diff options
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r-- | sw/source/core/txtnode/modeltoviewhelper.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 6 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx index 6b6dcb855e4c..8302e34604ce 100644 --- a/sw/source/core/txtnode/modeltoviewhelper.cxx +++ b/sw/source/core/txtnode/modeltoviewhelper.cxx @@ -80,7 +80,8 @@ struct containsPos } }; -ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode, ExpandMode eMode) +ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode, + SwRootFrame const*const pLayout, ExpandMode eMode) { const OUString& rNodeText = rNode.GetText(); m_aRetText = rNodeText; @@ -162,7 +163,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode, ExpandMode eMode) const SwDoc *pDoc = rNode.GetDoc(); aFieldResult.m_sExpand = (eMode & ExpandMode::ReplaceMode) ? OUString(CHAR_ZWSP) - : rFootnote.GetViewNumStr(*pDoc, nullptr/*TODO?*/); + : rFootnote.GetViewNumStr(*pDoc, pLayout); aFieldResult.m_eType = FieldResult::FOOTNOTE; } break; diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index cbf522687445..7dbacee6596d 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3390,8 +3390,8 @@ OUString SwTextNode::GetExpandText( const sal_Int32 nIdx, { ExpandMode eMode = ExpandMode::ExpandFields | eAdditionalMode; - ModelToViewHelper aConversionMap(*this, eMode); - const OUString& aExpandText = aConversionMap.getViewText(); + ModelToViewHelper aConversionMap(*this, nullptr/*TODO*/, eMode); + const OUString aExpandText = aConversionMap.getViewText(); const sal_Int32 nExpandBegin = aConversionMap.ConvertToViewPosition( nIdx ); sal_Int32 nEnd = nLen == -1 ? GetText().getLength() : nIdx + nLen; const sal_Int32 nExpandEnd = aConversionMap.ConvertToViewPosition( nEnd ); diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 74b33c963af8..d3e640531f79 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1507,7 +1507,7 @@ SwRect SwTextFrame::SmartTagScan(SwTextNode & rNode) if ( nBegin < nEnd ) { // Expand the string: - const ModelToViewHelper aConversionMap(*pNode /*TODO - replace or expand fields for smart tags?*/); + const ModelToViewHelper aConversionMap(*pNode, getRootFrame() /*TODO - replace or expand fields for smart tags?*/); const OUString& aExpandText = aConversionMap.getViewText(); // Ownership ov ConversionMap is passed to SwXTextMarkup object! @@ -2064,7 +2064,9 @@ bool SwTextNode::CountWords( SwDocStat& rStat, } // ConversionMap to expand fields, remove invisible and redline deleted text for scanner - const ModelToViewHelper aConversionMap(*this, ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::HideInvisible | ExpandMode::HideDeletions); + const ModelToViewHelper aConversionMap(*this, + getIDocumentLayoutAccess().GetCurrentLayout(), + ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::HideInvisible | ExpandMode::HideDeletions); const OUString& aExpandText = aConversionMap.getViewText(); if (aExpandText.isEmpty() && !bCountNumbering) |