[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 2 commits - sw/inc sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 16 22:55:15 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/text/txtfrm.cxx | 2 +-
sw/source/core/tox/txmsrt.cxx | 10 ++++++----
6 files changed, 12 insertions(+), 9 deletions(-)
New commits:
commit cf5d705f609124c06e00572401218c810b7e1652
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Apr 15 18:18:27 2019 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Apr 17 00:54:46 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.Stahl at cib.de>
(cherry picked from commit 2ea6f385d36966de8e30b9a537ac2875075ca9eb)
Reviewed-on: https://gerrit.libreoffice.org/70822
Tested-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 9f7674c2ba27..19b10d330126 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1801,7 +1801,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 6e5c379392b424e239e6a7aebfd849d83e432ee9
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Apr 15 17:11:51 2019 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Apr 17 00:54:36 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>
(cherry picked from commit f32ddd38ef777598901981491ad57bd37efe69e8)
Reviewed-on: https://gerrit.libreoffice.org/70810
Tested-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 8efd5c5b87ef..07c1f5db6982 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>
@@ -681,7 +682,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 01ee1e0ae0e2..67c6fc7df511 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1252,7 +1252,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 8d88fba75cf1..078f93af7ce2 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 cb80f96854c9..4ff27432095c 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 3e814c72c15b..f36669fc19a0 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