diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-20 14:14:34 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-20 14:25:28 +0000 |
commit | ca36f09c7168bd5dd59118c1a8bccac7c826bde0 (patch) | |
tree | 5c859c10459001c134020604b5abb2017aead94b /editeng | |
parent | 104a1e641554be2e789758ae67c0e24620df8035 (diff) |
textranges are always in pairs
Change-Id: I3d98c26c7902bc89ab6701dd02e266fd466c6907
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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); |