소스 검색

Merge pull request #87 from Twotsman/patch-2

Update HelperFunctions.cs
master
PrzemyslawKlys 9 년 전
부모
커밋
fd87d3bf4d
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4
    4
      DocX/HelperFunctions.cs

+ 4
- 4
DocX/HelperFunctions.cs 파일 보기

@@ -524,13 +524,13 @@ namespace Novacode
internal static Paragraph GetFirstParagraphEffectedByInsert(DocX document, int index)
{
// This document contains no Paragraphs and insertion is at index 0
if (document.paragraphLookup.Keys.Count() == 0 && index == 0)
if (document.Paragraphs.Count() == 0 && index == 0)
return null;
foreach (int paragraphEndIndex in document.paragraphLookup.Keys)
foreach (Paragraph p in document.Paragraphs)
{
if (paragraphEndIndex >= index)
return document.paragraphLookup[paragraphEndIndex];
if (p.endIndex >= index)
return p;
}
throw new ArgumentOutOfRangeException();

Loading…
취소
저장