tdf#123855 sw_redlinehide: fix GetExpandText() not expanding footnotes
... due to change of default argument; the XHTML export is calling it
from SwXTextPortion::getString(). This is complicated a bit by a
bunch of changes to GetExpandText() callers.
(regression from bf488abbf46da51d17c3ad7ccf9e39005a55c2d7)
Change-Id: I0b1e10e17c8f3824d6fa1f21fc74cc59b310474f
Reviewed-on: https://gerrit.libreoffice.org/70791
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 3900f39..b8efd5b 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -28,6 +28,7 @@
#include "ndhints.hxx"
#include "SwNumberTreeTypes.hxx"
#include "IDocumentContentOperations.hxx"
#include "modeltoviewhelper.hxx"
#include <sfx2/Metadatable.hxx>
@@ -680,7 +681,7 @@
const bool bWithNum = false,
const bool bAddSpaceAfterListLabelStr = false,
const bool bWithSpacesForLevel = false,
const ExpandMode eAdditionalMode = ExpandMode(0)) const;
const ExpandMode eAdditionalMode = ExpandMode::ExpandFootnote) const;
bool CopyExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx,
sal_Int32 nIdx, sal_Int32 nLen,
SwRootFrame const* pLayout,
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index a2c13b8..4e190bc 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1305,7 +1305,7 @@
if( pONd )
{
rContentAtPos.eContentAtPos = IsAttrAtPos::Outline;
rContentAtPos.sStr = sw::GetExpandTextMerged(GetLayout(), *pONd, true, false, ExpandMode(0));
rContentAtPos.sStr = sw::GetExpandTextMerged(GetLayout(), *pONd, true, false, ExpandMode::ExpandFootnote);
bRet = true;
}
}
diff --git a/sw/source/core/doc/DocumentListItemsManager.cxx b/sw/source/core/doc/DocumentListItemsManager.cxx
index 7f69c72..d484730 100644
--- a/sw/source/core/doc/DocumentListItemsManager.cxx
+++ b/sw/source/core/doc/DocumentListItemsManager.cxx
@@ -73,7 +73,7 @@
{
SwTextNode const*const pNode(rNodeNum.GetTextNode());
assert(pNode);
return sw::GetExpandTextMerged(&rLayout, *pNode, true, true, ExpandMode(0));
return sw::GetExpandTextMerged(&rLayout, *pNode, true, true, ExpandMode::ExpandFootnote);
}
bool DocumentListItemsManager::isNumberedInLayout(
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 6ad230c..526ceb5 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -611,7 +611,7 @@
if( nStart != nEnd ) // a section?
{
m_sText = pTextNd->GetExpandText(pLayout, nStart, nEnd - nStart, false, false, false);
m_sText = pTextNd->GetExpandText(pLayout, nStart, nEnd - nStart, false, false, false, ExpandMode(0));
if (m_nSubType == REF_OUTLINE
|| (m_nSubType == REF_SEQUENCEFLD && REF_CONTENT == GetFormat()))
{
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 7839111..6261095 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -388,9 +388,10 @@
pTextMark->GetStart(),
*pEnd - pTextMark->GetStart(),
false, false, false,
pLayout && pLayout->IsHideRedlines()
ExpandMode::ExpandFootnote
| (pLayout && pLayout->IsHideRedlines()
? ExpandMode::HideDeletions
: ExpandMode(0));
: ExpandMode(0)));
if(SwTOIOptions::InitialCaps & nOpt && pTOXIntl && !aRet.sText.isEmpty())
{
aRet.sText = pTOXIntl->ToUpper( aRet.sText, 0 ) + aRet.sText.copy(1);
@@ -472,9 +473,10 @@
pTextMark->GetStart(),
*pEnd - pTextMark->GetStart(),
false, false, false,
pLayout && pLayout->IsHideRedlines()
ExpandMode::ExpandFootnote
| (pLayout && pLayout->IsHideRedlines()
? ExpandMode::HideDeletions
: ExpandMode(0)),
: ExpandMode(0))),
pTextMark->GetTOXMark().GetTextReading());
}