Allows RTF text to be edited if it's normal text without formatting.
More...
|
string | AddBoldTagInRTF (string rtf, int textpos, int sellentext) |
| Make text bold. More...
|
|
string | AddItalicTagInRTF (string rtf, int textpos, int sellentext) |
| Make text italic. More...
|
|
string | AddUnderlineTagInRTF (string rtf, int textpos, int sellentext) |
| Make text underline. More...
|
|
string | AddStrikeTagInRTF (string rtf, int textpos, int sellentext) |
| Make text striketought. More...
|
|
string | RemoveBoldTagsInRTF (string rtf, int textpos, int sellentext) |
| Remove text bold. More...
|
|
string | RemoveItalicTagsInRTF (string rtf, int textpos, int sellentext) |
| Remove italic text. More...
|
|
string | RemoveStrikeTagsInRTF (string rtf, int textpos, int sellentext) |
| Remove striketought text. More...
|
|
string | RemoveUnderlineTagsInRTF (string rtf, int textpos, int sellentext) |
| Remove underline text. More...
|
|
string | SetColorAllRTF (string rtf, Color newclr, int textlength) |
| Set all rtf text to a particulair color. More...
|
|
string | SetSizeTagInRtf (string rtf, int textpos, int seltextlen, int fontsize) |
| Set the font size in RTF. More...
|
|
string | SetColorInRTF (string rtf, Color newclr, int textpos, int sellentext) |
| The color of text in the RTF stream, More...
|
|
|
int | NextTextChar (int nrtextchar) |
| More...
|
|
string | RemoveTagsInRTF (string rtf, int textpos, int sellentext, string starttag, string endtag) |
| Remove all RTF tags in selected text. More...
|
|
bool | CheckTagOpened (bool tagopen, string rtf, int i, string starttag, string endtag) |
| Check if the RTF tag is open. More...
|
|
StringBuilder | RemoveTag (StringBuilder newrtf, string rtf, int i, string starttag, string endtag) |
| Remove RTF tags, between position i for length of sellentext. More...
|
|
string | SetTagInRTF (string rtf, int textpos, int sellentext, string starttag, string endtag) |
| Add a RTF start- and endtag to the RTF stream More...
|
|
bool | InRTFFormat (string rtf, int pos, bool rtfformat) |
| Figure out if the RTF stream is at position pos still in RTF format mode or is displaying the text from the RTF stream. More...
|
|
bool | IsRTFTab (string rtf, int i) |
| Is there a RTF tab code at a position in a RTF stream. More...
|
|
int | FindStartPosDoc (string rtf) |
| Find the start of the RTF document content. More...
|
|
StringBuilder | CreateColortbl (StringBuilder newrtf, Color textcolor) |
| Create a colortable in the rtf stream. More...
|
|
int | CheckRTFLevel (string rtf, int i, int rtflevel) |
| Check if rtf contains a new level or depth document level has been gone up. Escape \ characters are not a new rtf level. More...
|
|
bool | IsRTFSpecialChar (string rtf, int i) |
| Is the RTF part at a position a RTF special chracter escaping. More...
|
|
int | IntParseFast (string value) |
| Converts a string to integer, optimization. More...
|
|
int | GetNrcoloritem (string rtf, Color clr) |
| Get the position of a color in the current colortbl. More...
|
|
Color | ParserColorItem (string colortblraw) |
| Parser a string with a coloritem from the colortbl in the RTF stream as a color object. More...
|
|
void | ParserColorTbl (string rtf, int posstartcolortbl) |
| Parser the colortbl in the RTF stream at position posstartcolortbl. Put all coloritems in the list colortblitems. More...
|
|
StringBuilder | AddColorItem (StringBuilder newrtf, int posstartcolortbl, Color newclr) |
| Add a color to the RTF colortbl. More...
|
|
int | FindPosStartColortbl (string rtf) |
| Find the start position of the colortbl in the RTF stream. More...
|
|
int | GetLenDigit (string text, int startpos) |
| Get the length of the digits in a string at a position More...
|
|
|
const string | RTF1DOCTAG = @"{\rtf1" |
| The RTF start tag More...
|
|
const string | VIEWKINDTAG = @"\viewkind" |
| The RTF document viewkind tag More...
|
|
const string | COLORTBLTAG = @"{\colortbl " |
| The RTF colortable tag More...
|
|
const string | COLORITEMTAG = @"\cf" |
| The RTF color format tag More...
|
|
const string | RTFTABTAG = @"\tab" |
| RTF tab character More...
|
|
const string | RTFBOLDTAG = @"\b" |
| RTF bold character More...
|
|
const string | RTFBOLDENDTAG = @"\b0" |
| RTF bold end character More...
|
|
const string | RTFITALICTAG = @"\i" |
| RTF italic tag More...
|
|
const string | RTFITALICENDTAG = @"\i0" |
| RTF italic endtag More...
|
|
const string | RTFSTRIKETAG = @"\strike" |
| RTF strike tag More...
|
|
const string | RTFSTRIKEENDTAG = @"\strike0" |
| RTF strike endtag More...
|
|
const string | RTFUNDERLINETAG = @"\ul" |
| RTF underline tag More...
|
|
const string | RTFUNDERLINEENDTAG = @"\ulnone" |
| RTF enderline endtag More...
|
|
const int | MAXLENRTFTTAG = 10 |
| Maximum length of a RTF tag More...
|
|
List< Color > | colortblitems = new List<Color>() |
| List with colortable coloritems More...
|
|
bool | rtfformat = true |
| Are we at current position in the RTF document buzy with RTF code format or text content. More...
|
|
int | drtflen = 0 |
| Different length between orginal RTF and new rtf. More...
|
|
char[] | hexchars = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } |
| Array with hexcharacters (lowercase alpha). More...
|
|
string NoteFly.RTFDirectEdit.AddBoldTagInRTF |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
sellentext |
|
) |
| |
- Parameters
-
rtf | The rtf stream. |
textpos | The text position. |
sellentext | The selected length to make bold. |
- Returns
- The rtf stream with new bold formatting.
StringBuilder NoteFly.RTFDirectEdit.AddColorItem |
( |
StringBuilder |
newrtf, |
|
|
int |
posstartcolortbl, |
|
|
Color |
newclr |
|
) |
| |
|
private |
- Parameters
-
newrtf | The rtf stream. |
posstartcolortbl | The position of start of colortbl in RTF. |
newclr | The new color to add to the colortbl. |
- Returns
- The new RTF with the color add to the colortbl.
string NoteFly.RTFDirectEdit.AddItalicTagInRTF |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
sellentext |
|
) |
| |
- Parameters
-
rtf | The rtf stream. |
textpos | The text position. |
sellentext | The selected length to make italic. |
- Returns
- The rtf stream with new italic formatting.
string NoteFly.RTFDirectEdit.AddStrikeTagInRTF |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
sellentext |
|
) |
| |
- Parameters
-
rtf | The rtf stream. |
textpos | The text position. |
sellentext | The selected length to make striketought. |
- Returns
- The rtf stream with new striketought formatting.
string NoteFly.RTFDirectEdit.AddUnderlineTagInRTF |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
sellentext |
|
) |
| |
- Parameters
-
rtf | The rtf stream. |
textpos | The text position. |
sellentext | The selected length to make underline. |
- Returns
- The rtf stream with new underline formatting.
int NoteFly.RTFDirectEdit.CheckRTFLevel |
( |
string |
rtf, |
|
|
int |
i, |
|
|
int |
rtflevel |
|
) |
| |
|
private |
- Parameters
-
rtf | The rtf stream. |
i | The position in RTF |
rtflevel | Current RTF depth level. |
- Returns
- New RTF depth level.
bool NoteFly.RTFDirectEdit.CheckTagOpened |
( |
bool |
tagopen, |
|
|
string |
rtf, |
|
|
int |
i, |
|
|
string |
starttag, |
|
|
string |
endtag |
|
) |
| |
|
private |
- Parameters
-
tagopen | True if tag open. |
rtf | The rtf stream. |
i | Position in the rtf stream. |
starttag | RTF start tag. |
endtag | RTF end tag. |
- Returns
- True if tag still in open state.
StringBuilder NoteFly.RTFDirectEdit.CreateColortbl |
( |
StringBuilder |
newrtf, |
|
|
Color |
textcolor |
|
) |
| |
|
private |
- Parameters
-
newrtf | The rtf stream. |
textcolor | The textcolor to add to the color table rtf stream. |
- Returns
- StringBuilder of colortbl.
int NoteFly.RTFDirectEdit.FindPosStartColortbl |
( |
string |
rtf | ) |
|
|
private |
- Parameters
-
- Returns
- The position in the RTF.
int NoteFly.RTFDirectEdit.FindStartPosDoc |
( |
string |
rtf | ) |
|
|
private |
- Parameters
-
- Returns
- The position after viewkind rtftag in the rtf stream.
int NoteFly.RTFDirectEdit.GetLenDigit |
( |
string |
text, |
|
|
int |
startpos |
|
) |
| |
|
private |
- Parameters
-
text | Text with digits at startpos |
startpos | The position where the digit are |
- Returns
- The length of the digits
int NoteFly.RTFDirectEdit.GetNrcoloritem |
( |
string |
rtf, |
|
|
Color |
clr |
|
) |
| |
|
private |
- Parameters
-
rtf | The rtf stream. |
clr | Color object |
- Returns
- Returns -1 if coloritem in colortbl is not found.
bool NoteFly.RTFDirectEdit.InRTFFormat |
( |
string |
rtf, |
|
|
int |
pos, |
|
|
bool |
rtfformat |
|
) |
| |
|
private |
- Parameters
-
rtf | The rtf stream. |
pos | The position to check. |
rtfformat | The current rtf status, in rtf formating if true |
- Returns
- True if document at pos is in rtf formating mode.
int NoteFly.RTFDirectEdit.IntParseFast |
( |
string |
value | ) |
|
|
private |
- Parameters
-
- Returns
- An integer.
bool NoteFly.RTFDirectEdit.IsRTFSpecialChar |
( |
string |
rtf, |
|
|
int |
i |
|
) |
| |
|
private |
- Parameters
-
rtf | The rtf stream. |
i | The RTF position in where the special character starts |
- Returns
- True if there is a special character RTF code at position i.
bool NoteFly.RTFDirectEdit.IsRTFTab |
( |
string |
rtf, |
|
|
int |
i |
|
) |
| |
|
private |
- Parameters
-
rtf | The rtf stream. |
i | Position with the rtf stream to look for a tab rtf character. |
- Returns
- True if rtf at position i is RTF tab code.
int NoteFly.RTFDirectEdit.NextTextChar |
( |
int |
nrtextchar | ) |
|
|
private |
Color NoteFly.RTFDirectEdit.ParserColorItem |
( |
string |
colortblraw | ) |
|
|
private |
- Parameters
-
colortblraw | An string with a coloritem for the RTF colortbl. |
- Returns
- An color object.
void NoteFly.RTFDirectEdit.ParserColorTbl |
( |
string |
rtf, |
|
|
int |
posstartcolortbl |
|
) |
| |
|
private |
- Parameters
-
rtf | The rtf stream. |
posstartcolortbl | Position of where the colortbl starts. |
string NoteFly.RTFDirectEdit.RemoveBoldTagsInRTF |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
sellentext |
|
) |
| |
- Parameters
-
rtf | The rtf stream. |
textpos | The text position. |
sellentext | The selected length to remove bold formatting from. |
- Returns
- The rtf stream without bold formatting.
string NoteFly.RTFDirectEdit.RemoveItalicTagsInRTF |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
sellentext |
|
) |
| |
- Parameters
-
rtf | The rtf stream. |
textpos | The text position. |
sellentext | The selected length to remove italic formatting from. |
- Returns
- The new rtf stream without italic formatting.
string NoteFly.RTFDirectEdit.RemoveStrikeTagsInRTF |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
sellentext |
|
) |
| |
- Parameters
-
rtf | The rtf stream. |
textpos | The text position. |
sellentext | The select text length. |
- Returns
- The new rtf stream without striketought formatting.
StringBuilder NoteFly.RTFDirectEdit.RemoveTag |
( |
StringBuilder |
newrtf, |
|
|
string |
rtf, |
|
|
int |
i, |
|
|
string |
starttag, |
|
|
string |
endtag |
|
) |
| |
|
private |
- Parameters
-
newrtf | The new rtf stream. |
rtf | The rtf stream. |
i | Position the rtf stream. |
starttag | RTF start tag. |
endtag | RTF end tag. |
- Returns
- The new rtf stream as stringbuilder.
string NoteFly.RTFDirectEdit.RemoveTagsInRTF |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
sellentext, |
|
|
string |
starttag, |
|
|
string |
endtag |
|
) |
| |
|
private |
- Parameters
-
rtf | The rtf stream. |
textpos | The text position. |
sellentext | The selected text length. |
starttag | The RTF starttag to remove. |
endtag | The RTF endtag to remove. Should be of the same kind as RTF starttag. |
- Returns
- The new rtf stream.
string NoteFly.RTFDirectEdit.RemoveUnderlineTagsInRTF |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
sellentext |
|
) |
| |
- Parameters
-
rtf | The rtf stream. |
textpos | The text position. |
sellentext | The selected text length. |
- Returns
- The new rtf stream.
string NoteFly.RTFDirectEdit.SetColorAllRTF |
( |
string |
rtf, |
|
|
Color |
newclr, |
|
|
int |
textlength |
|
) |
| |
- Parameters
-
rtf | The rtf stream. |
newclr | The color to use for all text in the rtf stream. |
textlength | The length of the real text in the rtf stream. |
- Returns
- The new rtf stream.
string NoteFly.RTFDirectEdit.SetColorInRTF |
( |
string |
rtf, |
|
|
Color |
newclr, |
|
|
int |
textpos, |
|
|
int |
sellentext |
|
) |
| |
- Parameters
-
rtf | The rtf stream. |
newclr | The color to give the text. |
textpos | The text position. |
sellentext | The text length to color. |
- Returns
- The new RTF stream.
string NoteFly.RTFDirectEdit.SetSizeTagInRtf |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
seltextlen, |
|
|
int |
fontsize |
|
) |
| |
- Parameters
-
rtf | The RTF stream. |
textpos | The text position. |
seltextlen | The selected text length. |
fontsize | The new font size. |
- Returns
string NoteFly.RTFDirectEdit.SetTagInRTF |
( |
string |
rtf, |
|
|
int |
textpos, |
|
|
int |
sellentext, |
|
|
string |
starttag, |
|
|
string |
endtag |
|
) |
| |
|
private |
- Parameters
-
rtf | The rtf stream. |
textpos | The text position where to add the starttag |
sellentext | The length of the text after the starttag to add the RTF end tag. |
starttag | The RTF start tag to add. |
endtag | The RTF end tag to add. |
- Returns
- The new rtf stream.
const string NoteFly.RTFDirectEdit.COLORITEMTAG = @"\cf" |
|
private |
List<Color> NoteFly.RTFDirectEdit.colortblitems = new List<Color>() |
|
private |
const string NoteFly.RTFDirectEdit.COLORTBLTAG = @"{\colortbl " |
|
private |
int NoteFly.RTFDirectEdit.drtflen = 0 |
|
private |
char [] NoteFly.RTFDirectEdit.hexchars = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } |
|
private |
const int NoteFly.RTFDirectEdit.MAXLENRTFTTAG = 10 |
|
private |
const string NoteFly.RTFDirectEdit.RTF1DOCTAG = @"{\rtf1" |
|
private |
const string NoteFly.RTFDirectEdit.RTFBOLDENDTAG = @"\b0" |
|
private |
const string NoteFly.RTFDirectEdit.RTFBOLDTAG = @"\b" |
|
private |
bool NoteFly.RTFDirectEdit.rtfformat = true |
|
private |
const string NoteFly.RTFDirectEdit.RTFITALICENDTAG = @"\i0" |
|
private |
const string NoteFly.RTFDirectEdit.RTFITALICTAG = @"\i" |
|
private |
const string NoteFly.RTFDirectEdit.RTFSTRIKEENDTAG = @"\strike0" |
|
private |
const string NoteFly.RTFDirectEdit.RTFSTRIKETAG = @"\strike" |
|
private |
const string NoteFly.RTFDirectEdit.RTFTABTAG = @"\tab" |
|
private |
const string NoteFly.RTFDirectEdit.RTFUNDERLINEENDTAG = @"\ulnone" |
|
private |
const string NoteFly.RTFDirectEdit.RTFUNDERLINETAG = @"\ul" |
|
private |
const string NoteFly.RTFDirectEdit.VIEWKINDTAG = @"\viewkind" |
|
private |
|