From ca36f09c7168bd5dd59118c1a8bccac7c826bde0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 20 Jan 2015 14:14:34 +0000 Subject: textranges are always in pairs Change-Id: I3d98c26c7902bc89ab6701dd02e266fd466c6907 --- editeng/source/editeng/impedit3.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'editeng') diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 57cedf4de4c9..d98efb594aea 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -841,7 +841,8 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) // Use the widest range ... // The widest range could be a bit confusing, so normally it // is the first one. Best with gaps. - if ( pTextRanges->size() ) + assert(pTextRanges->size() % 2 == 0 && "textranges are always in pairs"); + if (!pTextRanges->empty()) { long nA = pTextRanges->at(0); long nB = pTextRanges->at(1); -- cgit