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/text/txtfrm.cxx | 2 +- sw/source/core/tox/txmsrt.cxx | 10 ++++++---- 6 files changed, 12 insertions(+), 9 deletions(-)
New commits: commit 1149d20ce9f8682b58f98d3fa3bf289fc5974087 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Mon Apr 15 18:18:27 2019 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Wed Apr 17 00:54:16 2019 +0200 tdf#124722 sw_redlinehide: don't set negative SwTextFrame offsets nLen may be larger than the master SwTextFrame, but its follow can't have negative offset. (regression from 0acde7514e666fc04805fd36503bd174162336ca) Change-Id: I6177c748480cdf61e8f15a7032ba52d3ae2ea52c Reviewed-on: https://gerrit.libreoffice.org/70816 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit 2ea6f385d36966de8e30b9a537ac2875075ca9eb) Reviewed-on: https://gerrit.libreoffice.org/70821 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 7d4e077d58c2..99981405d297 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1796,7 +1796,7 @@ static void lcl_ModifyOfst(SwTextFrame & rFrame, assert(nLen != TextFrameIndex(COMPLETE_STRING)); if (rFrame.IsFollow() && nPos < rFrame.GetOfst()) { - rFrame.ManipOfst( op(rFrame.GetOfst(), nLen) ); + rFrame.ManipOfst( std::max(TextFrameIndex(0), op(rFrame.GetOfst(), nLen)) ); } } commit 51fb5ce0774c463caad7bcf9a6851161a56d60f7 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Mon Apr 15 17:11:51 2019 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Wed Apr 17 00:54:05 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.st...@cib.de> (cherry picked from commit f32ddd38ef777598901981491ad57bd37efe69e8) Reviewed-on: https://gerrit.libreoffice.org/70809 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 4c0e6468fb9b..442aecb2b024 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 42436696840b..3a46219ec7fe 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1296,7 +1296,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 c0ce2d7894fc..ed8e907a95b9 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -614,7 +614,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 be7fc9323faa..3cbb6549cd6c 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()); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits