浏览代码

Fixes a bug in RemoveText, patch by MiroJanosik, confirmed and tested by Bartosz Węgielewski

master
MadBoy_cp 12 年前
父节点
当前提交
a3f4a8d73b
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      DocX/Paragraph.cs

+ 2
- 1
DocX/Paragraph.cs 查看文件

@@ -3446,7 +3446,8 @@ namespace Novacode
default:
{
XElement[] splitRunBefore = Run.SplitRun(run, index, EditType.del);
int min = Math.Min(index + processed + (count - processed), run.EndIndex);
//int min = Math.Min(index + processed + (count - processed), run.EndIndex);
int min = Math.Min(index + (count - processed), run.EndIndex);
XElement[] splitRunAfter = Run.SplitRun(run, min, EditType.del);
object middle = CreateEdit(EditType.del, remove_datetime, new List<XElement>() { Run.SplitRun(new Run(Document, splitRunBefore[1], run.StartIndex + GetElementTextLength(splitRunBefore[0])), min, EditType.del)[0] });

正在加载...
取消
保存