Fixed ugly bug in RichEdit (problem deleting paragraph inside table)

git-svn-id: svn://ultimatepp.org/upp/trunk@552 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-10-20 10:36:42 +00:00
parent bfb001f772
commit d6db33b1d2
10 changed files with 46 additions and 31 deletions

View file

@ -280,17 +280,19 @@ void RichText::ApplyFormatInfo(int pos, const FormatInfo& fi, int count)
void RichText::ReplaceStyle(int pos, const Uuid& id)
{
int p = FindPart(pos);
RichPara pa = RichTxt::Get(p, id, style);
Put(p, pa, style);
RichTxt& txt = GetUpdateText(pos);
int p = txt.FindPart(pos);
RichPara pa = txt.Get(p, id, style);
txt.Set(p, pa, style);
}
void RichText::ReStyle(int pos, const Uuid& id)
{
int p = FindPart(pos);
RichPara pa = Get(p);
RichTxt& txt = GetUpdateText(pos);
int p = txt.FindPart(pos);
RichPara pa = txt.Get(p, style);
pa.format.styleid = id;
Put(p, pa, style);
txt.Set(p, pa, style);
}
RichText::Formating RichText::SaveFormat(int pos, int count) const