sw/source/core/crsr/bookmrk.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit b7192612c18222e19a0867925e4fe1d5b0e12e8a Author: Michael Stahl <mst...@redhat.com> Date: Wed Sep 28 12:43:28 2016 +0200 sw: presumably rEnd != rStart implies rEnd isn't on index 0 ... because only checkbox marks with only one dummy character should have rEnd == rStart; the 2-dummy-character ones have the end position behind the 2nd dummy character, see lcl_AssureFieldMarksSet. ... and "fix" some more "unused variables". Change-Id: I25fb33891c1a74213bbeb2bbd7f3843809ee7273 diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index ba6bea9..b5364d2 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -117,11 +117,12 @@ namespace const SwPosition& rEnd = pField->GetMarkEnd(); SwTextNode const*const pEndTextNode = rEnd.nNode.GetNode().GetTextNode(); assert(pEndTextNode); - const sal_Int32 nEndPos = ( rEnd == rStart || rEnd.nContent.GetIndex() == 0 ) + const sal_Int32 nEndPos = (rEnd == rStart) ? rEnd.nContent.GetIndex() : rEnd.nContent.GetIndex() - 1; assert(pEndTextNode->GetText()[nEndPos] == aEndMark); - (void) pStartTextNode; + (void) pEndTextNode; + (void) nEndPos; SwPaM aEnd(rEnd, rEnd); if (aEnd.Start()->nContent > 0) --aEnd.Start()->nContent; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits