Parcourir la source

Merge pull request #87 from Twotsman/patch-2

Update HelperFunctions.cs
master
PrzemyslawKlys il y a 9 ans
Parent
révision
fd87d3bf4d
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4
    4
      DocX/HelperFunctions.cs

+ 4
- 4
DocX/HelperFunctions.cs Voir le fichier

@@ -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();

Chargement…
Annuler
Enregistrer