Skip to content

Commit 36b0342

Browse files
committed
Moved RTF version const inside TRTF.
The global cRTFVersion const exposed by URTFUtils was moved inside TRTF as a public const named Version. Updated code that uses this constance in URTFBuilder.
1 parent 4e0c621 commit 36b0342

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Src/URTFBuilder.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ destructor TRTFBuilder.Destroy;
296296

297297
function TRTFBuilder.DocHeader: ASCIIString;
298298
begin
299-
Result := TRTF.ControlWord(rcRTF, cRTFVersion)
299+
Result := TRTF.ControlWord(rcRTF, TRTF.Version)
300300
+ TRTF.ControlWord(rcAnsi)
301301
+ TRTF.ControlWord(rcAnsiCodePage, fCodePage)
302302
+ TRTF.ControlWord(rcDefFontNum, DefaultFontIdx)

Src/URTFUtils.pas

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ interface
2222
UEncodings;
2323

2424

25-
const
26-
/// <summary>RTF version.</summary>
27-
cRTFVersion = 1;
28-
29-
3025
type
3126
/// <summary>Enumeration containing identifiers for each supported RTF
3227
/// control word.</summary>
@@ -103,6 +98,11 @@ TRTF = record
10398
/// </returns>
10499
class function HexEscape(const Ch: AnsiChar): ASCIIString; static;
105100

101+
public
102+
const
103+
/// <summary>RTF major version number.</summary>
104+
Version = 1;
105+
106106
public
107107

108108
/// <summary>Returns a parameterless RTF control word.</summary>

0 commit comments

Comments
 (0)