20080720 release: updated list of controls for DfmToLfm converter.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@510 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
MacPgmr
2008-07-20 20:44:11 +00:00
parent 9f181dc51d
commit 25a4ed79d5
4 changed files with 113 additions and 63 deletions

View File

@@ -47,11 +47,13 @@ var
FnStr : string;
FnPos : Integer;
FnRef : string;
PrevInStr : string;
TopicStr : string;
TopicMapped : Boolean;
BuildStr : string;
TopicPos : Integer;
FootIdx : Integer;
LinkPos : Integer;
NextLinkPos : Integer;
UnlinkPos : Integer;
begin
@@ -208,7 +210,8 @@ begin
WriteLn(NewFileVar, '-->');
end
else if Pos('class=Topictitle', InStr) > 0 then {Found a topic?}
else if (Pos('class=Topictitle', InStr) > 0) or
(Pos('class=Topic>', InStr) > 0) then {Found a topic?}
begin
{Get footnote number _ftnXX}
FnPos := Pos('#_', InStr) + 1;
@@ -233,12 +236,22 @@ begin
Write(NewFileVar, '<a name="', TopicStr, '"></a>');
end;
end;
Write(NewFileVar, Copy(InStr, 1, 20)); {Save part of 1st topic line}
repeat {Skip over rest of topic lines}
PrevInStr := InStr;
{Save part of 1st topic line}
if Pos('class=Topictitle', InStr) > 0 then
Write(NewFileVar, Copy(InStr, 1, Pos('class=Topictitle>', InStr)+16))
else
Write(NewFileVar, Copy(InStr, 1, Pos('class=Topic>', InStr)+11));
BuildStr := InStr;
repeat {Get rest of topic lines}
ReadLn(OldFileVar, InStr);
if InStr <> '' then
BuildStr := BuildStr + ' ' + InStr;
until InStr = '';
WriteLn(NewFileVar, Copy(PrevInStr, 36, MaxInt)); {Save part of last topic line}
TopicPos := Length(BuildStr);
repeat
Dec(TopicPos);
until (TopicPos = 0) or (BuildStr[TopicPos] = '>');
WriteLn(NewFileVar, Copy(BuildStr, TopicPos+2, MaxInt));
end
else if CompareText(InStr, '<div><br clear=all>') = 0 then {Found footnotes?}
@@ -254,26 +267,45 @@ begin
LinkPos := Pos('<u>', InStr);
if LinkPos > 0 then {Line contains link?}
begin
PrevInStr := InStr;
ReadLn(OldFileVar, InStr); {Get next line too}
InStr := PrevInStr + ' ' + InStr; {Combine}
for FootIdx := 0 to Footnotes.Count -1 do
BuildStr := InStr;
repeat {Link may span lines, so get rest of paragraph}
ReadLn(OldFileVar, InStr);
if InStr <> '' then
BuildStr := BuildStr + ' ' + InStr;
until InStr = '';
InStr := BuildStr;
while LinkPos > 0 do
begin
TopicStr := Footnotes.ValueFromIndex[FootIdx];
if Pos(TopicStr, InStr) > 0 then
NextLinkPos := Pos('<u>', Copy(InStr, LinkPos+1, MaxInt));
if NextLinkPos = 0 then
NextLinkPos := Length(InStr) + 1
else
Inc(NextLinkPos, LinkPos);
BuildStr := '';
for FootIdx := 0 to Footnotes.Count - 1 do
begin
UnlinkPos := Pos('</u>', InStr);
Write(NewFileVar, Copy(InStr, 1, LinkPos-1),
'<a href="#');
if MapSection.Values[TopicStr] <> '' then
Write(NewFileVar, MapSection.Values[TopicStr])
else
Write(NewFileVar, TopicStr);
WriteLn(NewFileVar, '">',
Copy(InStr, LinkPos+3, UnlinkPos-LinkPos-3), '</a>',
Copy(InStr, UnlinkPos+4, MaxInt));
TopicStr := Footnotes.ValueFromIndex[FootIdx];
if (Pos(TopicStr, InStr) > LinkPos) and
(Pos(TopicStr, InStr) < NextLinkPos) then
begin
BuildStr := Copy(InStr, 1, LinkPos-1) + '<a href="#';
if MapSection.Values[TopicStr] <> '' then
BuildStr := BuildStr + MapSection.Values[TopicStr]
else
BuildStr := BuildStr + TopicStr;
UnlinkPos := Pos('</u>', InStr);
BuildStr := BuildStr + '">' +
Copy(InStr, LinkPos+3, UnlinkPos-LinkPos-3) + '</a>' +
Copy(InStr, UnlinkPos+4, MaxInt);
InStr := BuildStr;
LinkPos := Pos('<u>', InStr);
Break;
end;
end;
if BuildStr = '' then
Break;
end;
WriteLn(NewFileVar, InStr);
end
else
WriteLn(NewFileVar, InStr);

View File

@@ -54,15 +54,15 @@ const
HELP_CONTEXT = 1;
HELP_QUIT = 2;
{$IFDEF MSWINDOWS} {LCL doesn't have TApplication.HelpCommand, so call Win API}
function DoHelpCommand(Command : Word;
Data : LongInt) : Boolean;
begin
{$IFDEF MSWINDOWS} {LCL doesn't have TApplication.HelpCommand, so call Win API}
Result := WinHelp(Application.MainForm.Handle,
PChar(Application.HelpFile),
Command, Data);
{$ENDIF}
end; {DoHelpCommand}
{$ENDIF}
{THelpUtilManager}

View File

@@ -32,6 +32,11 @@
<A name="Whats_New"></A><H3>What's New</H3>
<UL>
<LI>20080720 release:
<UL>
<LI>Updated list of controls for DfmToLfm converter.
<LI>Updated CvtHelp.pas help converter.
</UL>
<LI>20080301 release:
<UL>
<LI>Expanded notes to help users who are new to Lazarus.
@@ -341,7 +346,7 @@ also be able to output version information to a Lazarus .lpi file.<P>
<A HREF="http://wiki.lazarus.freepascal.org/Deploying_Your_Application">http://wiki.lazarus.freepascal.org/Deploying_Your_Application</A><P>
<P>
<HR>
Last updated: March 1, 2008
Last updated: July 20, 2008
<P>
</BODY>

View File

@@ -25,38 +25,38 @@ ImeMode=
ImeName=
OEMConvert=
TextHeight=
TRadioGroup.TabOrder=
TBitBtn.ParentFont=
TCheckBox.Font.Charset=
TCheckBox.Font.Color=
TCheckBox.Font.Height=
TCheckBox.Font.Name=
TCheckBox.Font.Style=
TCheckBox.ParentFont=
TCheckGroup.Font.Charset=
TCheckGroup.Font.Color=
TCheckGroup.Font.Height=
TCheckGroup.Font.Name=
TCheckGroup.Font.Style=
TCheckGroup.ParentFont=
TCheckListBox.Font.Charset=
TCheckListBox.Font.Color=
TCheckListBox.Font.Height=
TCheckListBox.Font.Name=
TCheckListBox.Font.Style=
TCheckListBox.ParentFont=
TRadioButton.Font.Charset=
TRadioButton.Font.Color=
TRadioButton.Font.Height=
TRadioButton.Font.Name=
TRadioButton.Font.Style=
TRadioButton.ParentFont=
TRadioGroup.Font.Charset=
TRadioGroup.Font.Color=
TRadioGroup.Font.Height=
TRadioGroup.Font.Name=
TRadioGroup.Font.Style=
TRadioGroup.ParentFont=
;TRadioGroup.TabOrder=
;TBitBtn.ParentFont=
;TCheckBox.Font.Charset=
;TCheckBox.Font.Color=
;TCheckBox.Font.Height=
;TCheckBox.Font.Name=
;TCheckBox.Font.Style=
;TCheckBox.ParentFont=
;TCheckGroup.Font.Charset=
;TCheckGroup.Font.Color=
;TCheckGroup.Font.Height=
;TCheckGroup.Font.Name=
;TCheckGroup.Font.Style=
;TCheckGroup.ParentFont=
;TCheckListBox.Font.Charset=
;TCheckListBox.Font.Color=
;TCheckListBox.Font.Height=
;TCheckListBox.Font.Name=
;TCheckListBox.Font.Style=
;TCheckListBox.ParentFont=
;TRadioButton.Font.Charset=
;TRadioButton.Font.Color=
;TRadioButton.Font.Height=
;TRadioButton.Font.Name=
;TRadioButton.Font.Style=
;TRadioButton.ParentFont=
;TRadioGroup.Font.Charset=
;TRadioGroup.Font.Color=
;TRadioGroup.Font.Height=
;TRadioGroup.Font.Name=
;TRadioGroup.Font.Style=
;TRadioGroup.ParentFont=
TBevel.Font.Charset=
TBevel.Font.Color=
TBevel.Font.Height=
@@ -78,6 +78,7 @@ TLabeledEdit.Font.Color=
TLabeledEdit.Font.Height=
TLabeledEdit.Font.Name=
TLabeledEdit.Font.Style=
TListBox.ScrollWidth=
; When -p switch is used with DfmToLfm, don't try to add parent's font
@@ -86,24 +87,36 @@ TLabeledEdit.Font.Style=
[NoFont]
TMainMenu=
TMenuItem=
TPopupMenu=
TScrollBar=
TImage=
TTabSheet=
TCheckBox=
TCheckGroup=
TCheckListBox=
TRadioButton=
TRadioGroup=
;TCheckBox=
;TCheckGroup=
;TCheckListBox=
;TRadioButton=
;TRadioGroup=
TActionList=
TShape=
TBevel=
TNotebook=
TLabeledEdit=
TProgressBar=
TSplitter=
TTimer=
TOpenDialog=
TSaveDialog=
TFindDialog=
TPrintDialog=
TPrinterSetupDialog=
TOvcController=
TOvcSpinner=
TOvcTCCheckBox=
TOvcTCBitmap=
TOvcTCGlyphs=
TOvcTCIcon=
TWPRichText=
TFrameViewer=
THTMLViewer=