diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-07-05 15:58:05 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-07-06 10:26:14 +0200 |
commit | 2b0a7c346f8e3c5823a9e032a4501f20bc712914 (patch) | |
tree | 5f96e91d57ec2cf3f360567ecb7c10518528778a /sw | |
parent | bf4d4a9cad6664bd5772618e31e998942caef77e (diff) |
tdf#118414 sw: fix fieldmarks in GetNextAttr()
Apparently this needs to stop both before and after the CH_TXT_ATR_*.
(regression from 3e724847308c0d9cdd727898faaeb347c5f0643a)
Change-Id: Iff3d594d2eec59436ad683b9cc7aca04f7527bd5
Reviewed-on: https://gerrit.libreoffice.org/57017
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/itratr.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index d1f77e062ee9..b6e53480d6e4 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -674,9 +674,11 @@ static sal_Int32 GetNextAttrImpl(SwTextNode const*const pTextNode, } } assert(p <= nNext); - if (p < l && nPosition < p) + if (p < l) { - nNext=p; + // found a CH_TXT_ATR_FIELD*: if it's same as current position, + // skip behind it so that both before- and after-positions are returned + nNext = (nPosition < p) ? p : p + 1; } return nNext; } |