Skip to content

Commit edce913

Browse files
committed
Improve destinations handling in RTF parser
1 parent 1cee85c commit edce913

3 files changed

Lines changed: 370 additions & 51 deletions

File tree

src/DocSharp.Docx/RtfToDocx/RtfDestination.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ internal class RtfDestination : RtfGroup
44
{
55
public string Name { get; }
66

7-
public RtfDestination(string name)
7+
// Set to true if the destination starts with '*'
8+
public bool IsIgnorable { get; }
9+
10+
// Special destinations such as pnseclvl can have a numeric parameter
11+
public int? Value { get; set; }
12+
public bool HasValue { get; set; }
13+
14+
public RtfDestination(string name, bool isIgnorable = false)
815
{
916
Name = name ?? string.Empty;
17+
IsIgnorable = isIgnorable;
1018
}
1119
}
1220

0 commit comments

Comments
 (0)