.cosmetics

git-svn-id: svn://ultimatepp.org/upp/trunk@10121 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-07-31 11:27:50 +00:00
parent 786bd24587
commit bd437b77c4

View file

@ -242,11 +242,12 @@ int RichTxt::GetPos(int x, PageY y, RichContext rc) const
while(parti < part.GetCount()) {
RichContext begin;
Advance(parti, rc, begin);
if(y < rc.py || y.page < rc.py.page)
if(y < rc.py || y.page < rc.py.page) {
if(IsTable(parti))
return GetTable(parti).GetPos(x, y, begin) + pos;
else
return Get(parti, *rc.styles, true).GetPos(x, y, begin.page, begin.py) + pos;
}
pos += GetPartLength(parti) + 1;
parti++;
}
@ -329,11 +330,12 @@ void RichTxt::GatherValPos(Vector<RichValPos>& f, RichContext rc, int pos, int t
int nbefore = 0;
int nline = 0;
const Para& p = part[parti].Get<Para>();
if(p.haspos)
if(p.haspos) {
if(type == LABELS)
Get(parti, *begin.styles, true).GatherLabels(f, begin.page, begin.py, pos);
else
Get(parti, *begin.styles, true).GatherIndexes(f, begin.page, begin.py, pos);
}
}
pos += GetPartLength(parti) + 1;
parti++;