From 4ea260ab19237488aa289127fa26198ab005c4ec Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 12 Mar 2012 08:08:43 +0000 Subject: [PATCH] codetools: fixed name conflict comparetext git-svn-id: trunk@35899 - --- components/codetools/basiccodetools.pas | 4 ++-- components/wiki/README.txt | 11 +++++++++++ components/wiki/lazwiki/wikiformat.pas | 4 ++-- components/wiki/test/wikisearchmain.pas | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/components/codetools/basiccodetools.pas b/components/codetools/basiccodetools.pas index 7c74da015d..b1ea4f71a1 100644 --- a/components/codetools/basiccodetools.pas +++ b/components/codetools/basiccodetools.pas @@ -153,7 +153,7 @@ procedure AdjustPositionAfterInsert(var p: integer; IsStart: boolean; // comparison function CompareText(Txt1: PChar; Len1: integer; Txt2: PChar; Len2: integer; CaseSensitive: boolean): integer; overload; -function CompareText(const Txt1, Txt2: string; +function CompareTextCT(const Txt1, Txt2: string; CaseSensitive: boolean = false): integer; overload; function CompareText(Txt1: PChar; Len1: integer; Txt2: PChar; Len2: integer; CaseSensitive, IgnoreSpace: boolean): integer; overload; @@ -5382,7 +5382,7 @@ begin Result:=0; end; -function CompareText(const Txt1, Txt2: string; CaseSensitive: boolean): integer; +function CompareTextCT(const Txt1, Txt2: string; CaseSensitive: boolean): integer; begin Result:=CompareText(PChar(Pointer(Txt1)),length(Txt1), PChar(Pointer(Txt2)),length(Txt2),CaseSensitive); diff --git a/components/wiki/README.txt b/components/wiki/README.txt index ab81636abe..b2d8afd943 100644 --- a/components/wiki/README.txt +++ b/components/wiki/README.txt @@ -30,3 +30,14 @@ Creating HTML pages: Creating chm: ./wikiconvert --format=chm --css=chm/wiki.css wikixml/Lazarus_Documentation.g400.xml 'wikixml/*.xml' + +ToDos +ToDos wiki parser: see wikiparser.pas + +ToDos iphtml: +-too big space between paragraphs +-jump to anchor after loading, Note: before first paint the areas are all 0,0,0,0 +-background for pre +-backslashes in text are not shown +-slow on some pages (e.g. lazarus_documentation) + diff --git a/components/wiki/lazwiki/wikiformat.pas b/components/wiki/lazwiki/wikiformat.pas index 671266f92e..7741b5d40d 100644 --- a/components/wiki/lazwiki/wikiformat.pas +++ b/components/wiki/lazwiki/wikiformat.pas @@ -664,14 +664,14 @@ var p1: TW2FormatPage absolute Page1; p2: TW2FormatPage absolute Page2; begin - Result:=BasicCodeTools.CompareText(p1.WikiDocumentName,p2.WikiDocumentName,true); + Result:=BasicCodeTools.CompareTextCT(p1.WikiDocumentName,p2.WikiDocumentName,true); end; function CompareDocumentNameWithPage(DocumentName, Page: Pointer): integer; var p: TW2FormatPage absolute Page; begin - Result:=BasicCodeTools.CompareText(AnsiString(DocumentName),p.WikiDocumentName,true); + Result:=BasicCodeTools.CompareTextCT(AnsiString(DocumentName),p.WikiDocumentName,true); end; function CompareDocumentNameWithPageIgnoreLang(DocumentName, Page: Pointer diff --git a/components/wiki/test/wikisearchmain.pas b/components/wiki/test/wikisearchmain.pas index b3f68769b5..fadcc7226d 100644 --- a/components/wiki/test/wikisearchmain.pas +++ b/components/wiki/test/wikisearchmain.pas @@ -556,7 +556,7 @@ end; procedure TWikiSearchDemoForm.UpdateHistoryButtons; begin - BackToolButton.Visible:=PageHistory.CurrentIndex>0; + BackToolButton.Enabled:=PageHistory.CurrentIndex>0; ForwardToolButton.Visible:=PageHistory.CurrentIndex+1