[Libreoffice-commits] core.git: sw/inc sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 16 08:28:12 UTC 2019
sw/inc/ndtxt.hxx | 3 ++-
sw/source/core/crsr/crstrvl.cxx | 2 +-
sw/source/core/doc/DocumentListItemsManager.cxx | 2 +-
sw/source/core/fields/reffld.cxx | 2 +-
sw/source/core/tox/txmsrt.cxx | 10 ++++++----
5 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit f32ddd38ef777598901981491ad57bd37efe69e8
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Apr 15 17:11:51 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Apr 16 10:27:33 2019 +0200
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 at cib.de>
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 3900f398adbd..b8efd5b985af 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 @@ public:
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 a2c13b838f4d..4e190bc7d2f4 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1305,7 +1305,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
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 7f69c7210942..d48473003660 100644
--- a/sw/source/core/doc/DocumentListItemsManager.cxx
+++ b/sw/source/core/doc/DocumentListItemsManager.cxx
@@ -73,7 +73,7 @@ OUString DocumentListItemsManager::getListItemText(const SwNodeNum& rNodeNum,
{
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 6ad230c05075..526ceb5de12d 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -611,7 +611,7 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
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 78391110d16d..6261095ec992 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -388,9 +388,10 @@ void SwTOXIndex::FillText( SwTextNode& rNd, const SwIndex& rInsPos, sal_uInt16,
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 @@ TextAndReading SwTOXContent::GetText_Impl(SwRootFrame const*const pLayout) const
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());
}
More information about the Libreoffice-commits
mailing list