Kaydet (Commit) f93583f8 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#9908 validate no negative editengine selection positions

Change-Id: I37dace2051518224c55756362facd3edba4a9571
Reviewed-on: https://gerrit.libreoffice.org/59058
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 992242a1
......@@ -582,7 +582,9 @@ namespace
bool IsValidSel(const EditEngine& rEngine, const ESelection& rSel)
{
const auto nParaCount = rEngine.GetParagraphCount();
return rSel.nStartPara < nParaCount && rSel.nEndPara < nParaCount;
if (rSel.nStartPara < nParaCount && rSel.nEndPara < nParaCount)
return rSel.nStartPos >= 0 && rSel.nEndPos >= 0;
return false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment