-1->wxID_ANY, TRUE->true, FALSE->false & tabs->spaces replacements.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-06-04 17:58:56 +00:00
parent 72213209b7
commit 4fe30bceff
43 changed files with 805 additions and 798 deletions

View File

@@ -36,8 +36,8 @@ static unsigned long getint(FILE *fp)
c = getc(fp); c1 = getc(fp); c2 = getc(fp); c3 = getc(fp);
return (long)((long) c) +
(((long) c1) << 8) +
(((long) c2) << 16) +
(((long) c3) << 24);
(((long) c2) << 16) +
(((long) c3) << 24);
}
bool GetBMPHeader(FILE *fp, int *Width, int *Height, int *Planes, int *BitsPerPixel)
@@ -149,12 +149,12 @@ bool OutputBitmapData(FILE *fd)
#ifdef __WXMSW__
struct mfPLACEABLEHEADER {
DWORD key;
HANDLE hmf;
RECT bbox;
WORD inch;
DWORD reserved;
WORD checksum;
DWORD key;
HANDLE hmf;
RECT bbox;
WORD inch;
DWORD reserved;
WORD checksum;
};
// Returns size in TWIPS

View File

@@ -910,7 +910,7 @@ void HTMLOnMacro(int macroId, int no_args, bool start)
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(2, topicName, SubsectionsName);
SetCurrentOutput(Subsections);
HTMLHead();
HTMLHead();
TexOutput(_T("<title>"));
OutputCurrentSection();
TexOutput(_T("</title></head>\n"));
@@ -991,7 +991,7 @@ void HTMLOnMacro(int macroId, int no_args, bool start)
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(3, topicName, SubsubsectionsName);
SetCurrentOutput(Subsubsections);
HTMLHead();
HTMLHead();
TexOutput(_T("<title>"));
OutputCurrentSection();
TexOutput(_T("</title></head>\n"));
@@ -1133,7 +1133,7 @@ void HTMLOnMacro(int macroId, int no_args, bool start)
else
wxSnprintf(buf, sizeof(buf), _T("\n<TD ALIGN=LEFT>"));
TexOutput(buf);
OutputFont();
OutputFont();
}
else
TexOutput(_T("&amp;"));
@@ -1182,7 +1182,7 @@ void HTMLOnMacro(int macroId, int no_args, bool start)
else
wxSnprintf(buf, sizeof(buf), _T("<TR>\n<TD ALIGN=LEFT>"));
TexOutput(buf);
OutputFont();
OutputFont();
}
else
{
@@ -1971,15 +1971,15 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
// If a filename is supplied, use it, otherwise try to
// use the filename associated with the reference (from this document).
if (helpRefFilename)
{
{
TraverseChildrenFromChunk(helpRefFilename);
TexOutput(_T("#"));
}
}
else if (refFilename)
{
{
TexOutput(ConvertCase(refFilename));
TexOutput(_T("#"));
}
}
TexOutput(refName);
TexOutput(_T("\">"));
if (helpRefText)
@@ -2059,7 +2059,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
// If we have found the existing filename, make the inline
// image point to the original file (could be PS, for example)
if (originalFilename && (wxStrcmp(inlineFilename, originalFilename) != 0))
{
{
TexOutput(_T("<A HREF=\""));
TexOutput(ConvertCase(originalFilename));
TexOutput(_T("\">"));
@@ -2068,17 +2068,17 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
TexOutput(_T("\""));
TexOutput(alignment);
TexOutput(_T("></A>"));
}
}
else
#endif
{
{
TexOutput(_T("<img src=\""));
TexOutput(ConvertCase(wxFileNameFromPath(inlineFilename)));
TexOutput(_T("\""));
TexOutput(alignment);
TexOutput(_T(">"));
delete[] inlineFilename;
}
}
}
else
{
@@ -2195,27 +2195,36 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
{
if ( start ) {
// DHS
if (TwoColWidthA > -1) {
if (TwoColWidthA > -1)
{
wxChar buf[100];
wxSnprintf(buf, sizeof(buf), _T("\n<TR><TD VALIGN=TOP WIDTH=%d>\n"),TwoColWidthA);
TexOutput(buf);
} else
}
else
{
TexOutput(_T("\n<TR><TD VALIGN=TOP>\n"));
OutputFont();
}
OutputFont();
} else
TexOutput(_T("\n</FONT></TD>\n"));
}
if (arg_no == 2)
{
// DHS
if ( start ) {
if (TwoColWidthB > -1) {
if ( start )
{
if (TwoColWidthB > -1)
{
wxChar buf[100];
wxSnprintf(buf, sizeof(buf), _T("\n<TD VALIGN=TOP WIDTH=%d>\n"),TwoColWidthB);
TexOutput(buf);
} else
TexOutput(_T("\n<TD VALIGN=TOP>\n"));
OutputFont();
}
else
{
TexOutput(_T("\n<TD VALIGN=TOP>\n"));
}
OutputFont();
} else
TexOutput(_T("\n</FONT></TD></TR>\n"));
}
@@ -2701,7 +2710,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
if (compatibilityMode)
{
TexOutput(_T("<TR>\n<TD>"));
OutputFont();
OutputFont();
/*
for (int i = 0; i < noColumns; i++)
{
@@ -2797,7 +2806,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
{
wxStrcpy(buf2, _T("#000000"));
wxChar buf[100];
wxSnprintf(buf, sizeof(buf), _T("Could not find colour name %s"), name);
wxSnprintf(buf, sizeof(buf), _T("Could not find colour name %s"), name);
OnError(buf);
}
TexOutput(_T("<FONT COLOR=\""));
@@ -3014,7 +3023,7 @@ bool HTMLGo(void)
if (DocumentTitle)
{
SetCurrentOutput(tmpTitle);
HTMLHead();
HTMLHead();
TexOutput(_T("\n<HEAD><TITLE>"));
TraverseChildrenFromChunk(DocumentTitle);
TexOutput(_T("</TITLE></HEAD>\n"));
@@ -3022,7 +3031,7 @@ bool HTMLGo(void)
else
{
SetCurrentOutput(tmpTitle);
HTMLHeadTo(tmpTitle);
HTMLHeadTo(tmpTitle);
if (contentsString)
wxFprintf(tmpTitle, _T("<TITLE>%s</TITLE></HEAD>\n\n"), contentsString);
else
@@ -3239,7 +3248,7 @@ void GenerateHTMLWorkshopFiles(wxChar *fname)
_T(" <param name=\"Local\" value=\"%s#%s\">\n")
_T(" <param name=\"Name\" value=\"%s\">\n")
_T(" </OBJECT>\n"),
texTopic->filename, topicName, s);
texTopic->filename, topicName, s);
node1 = node1->GetNext();
}
}
@@ -3271,10 +3280,10 @@ void HTMLWorkshopAddToContents(int level, wxChar *s, wxChar *file)
_T(" <LI> <OBJECT type=\"text/sitemap\">\n")
_T(" <param name=\"Local\" value=\"%s#%s\">\n")
_T(" <param name=\"Name\" value=\""),
file, s);
file, s);
OutputCurrentSection();
wxFprintf(HTMLWorkshopContents,
_T("\">\n")
_T("\">\n")
_T(" </OBJECT>\n"));
HTMLWorkshopLastLevel = level;
}

View File

@@ -242,22 +242,22 @@ void WriteWinHelpContentsFileLine(wxChar *topicName, wxChar *xitle, int level)
int d=0;
while ( (xitle[s]!=0)&&(d<255) )
{
wxChar ch=xitle[s]&0xff;
if (ch==0x5c) {
wxChar ch1=xitle[s+1]&0xff;
wxChar ch2=xitle[s+2]&0xff;
wxChar ch3=xitle[s+3]&0xff;
s+=4; // next character
if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x36)) { title[d++]='<EFBFBD>'; }
if ((ch1==0x27)&&(ch2==0x65)&&(ch3==0x34)) { title[d++]='<EFBFBD>'; }
if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x63)) { title[d++]='<EFBFBD>'; }
if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x36)) { title[d++]='<EFBFBD>'; }
if ((ch1==0x27)&&(ch2==0x63)&&(ch3==0x34)) { title[d++]='<EFBFBD>'; }
if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x63)) { title[d++]='<EFBFBD>'; }
} else {
title[d++]=ch;
s++;
}
wxChar ch=xitle[s]&0xff;
if (ch==0x5c) {
wxChar ch1=xitle[s+1]&0xff;
wxChar ch2=xitle[s+2]&0xff;
wxChar ch3=xitle[s+3]&0xff;
s+=4; // next character
if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x36)) { title[d++]='<EFBFBD>'; }
if ((ch1==0x27)&&(ch2==0x65)&&(ch3==0x34)) { title[d++]='<EFBFBD>'; }
if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x63)) { title[d++]='<EFBFBD>'; }
if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x36)) { title[d++]='<EFBFBD>'; }
if ((ch1==0x27)&&(ch2==0x63)&&(ch3==0x34)) { title[d++]='<EFBFBD>'; }
if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x63)) { title[d++]='<EFBFBD>'; }
} else {
title[d++]=ch;
s++;
}
}
title[d]=0;
@@ -1637,7 +1637,7 @@ void RTFOnMacro(int macroId, int no_args, bool start)
}
else
SetCurrentOutput(NULL); // Don't write it into the contents, or anywhere else
}
}
else
SetCurrentOutput(NULL); // Don't write it into the contents, or anywhere else
}
@@ -2187,9 +2187,9 @@ void RTFOnMacro(int macroId, int no_args, bool start)
TraverseChildrenFromChunk(descriptionItemArg);
TexOutput(_T("}\\tab"));
descriptionItemArg = NULL;
}
else
{
}
else
{
wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\tab{\\b %d.}\\tab"), struc->currentItem);
TexOutput(indentBuf);
}
@@ -2203,9 +2203,9 @@ void RTFOnMacro(int macroId, int no_args, bool start)
TraverseChildrenFromChunk(descriptionItemArg);
TexOutput(_T("}\\tab"));
descriptionItemArg = NULL;
}
else
{
}
else
{
if (bulletFile && winHelp)
{
if (winHelpVersion > 3) // Transparent bitmap
@@ -2233,7 +2233,7 @@ void RTFOnMacro(int macroId, int no_args, bool start)
}
break;
}
}
}
}
}
break;
@@ -2581,8 +2581,8 @@ void RTFOnMacro(int macroId, int no_args, bool start)
{
if (start)
{
if ( issuedNewParagraph == 0 )
{
if ( issuedNewParagraph == 0 )
{
TexOutput(_T("\\par\\pard"));
issuedNewParagraph ++;
@@ -2591,29 +2591,29 @@ void RTFOnMacro(int macroId, int no_args, bool start)
// we have a suitable set of styles.
#if 0
if (winHelp && !inTabular && (ParSkip > 0))
{
{
TexOutput(_T("\\par"));
issuedNewParagraph ++;
}
}
#endif
WriteEnvironmentStyles();
}
// 1 is a whole paragraph if ParSkip == 0,
// half a paragraph if ParSkip > 0
else if ( issuedNewParagraph == 1 )
{
// Don't need a par at all if we've already had one,
// and ParSkip == 0.
}
// 1 is a whole paragraph if ParSkip == 0,
// half a paragraph if ParSkip > 0
else if ( issuedNewParagraph == 1 )
{
// Don't need a par at all if we've already had one,
// and ParSkip == 0.
#if 0
// Extra par if parskip is more than zero (usually looks best.)
if (winHelp && !inTabular && (ParSkip > 0))
{
{
TexOutput(_T("\\par"));
issuedNewParagraph ++;
}
}
#endif
WriteEnvironmentStyles();
}
}
/*
if (!issuedNewParagraph || (issuedNewParagraph > 1))
{
@@ -4221,11 +4221,11 @@ bool RTFOnArgument(int macroId, int arg_no, bool start)
wxFprintf(Popups, _T("+{\\footnote %s}\n"), GetBrowseString());
savedOutput = CurrentOutput1;
SetCurrentOutput(Popups);
}
else
{
}
else
{
SetCurrentOutput(savedOutput);
}
}
return true;
}
return true;
@@ -4254,7 +4254,7 @@ bool RTFOnArgument(int macroId, int arg_no, bool start)
if (start)
{
TexOutput(_T("{\\ul "));
}
}
else
{
TexOutput(_T("}"));
@@ -5015,11 +5015,11 @@ bool RTFOnArgument(int macroId, int arg_no, bool start)
wxSnprintf(buf, sizeof(buf), _T("{%s%d "), ((macroId == ltFCOL) ? _T("\\cf") : _T("\\cb")), pos);
TexOutput(buf);
}
else
{
wxSnprintf(buf, sizeof(buf), _T("Could not find colour name %s"), name);
else
{
wxSnprintf(buf, sizeof(buf), _T("Could not find colour name %s"), name);
OnError(buf);
}
}
break;
}
case 2:

View File

@@ -21,7 +21,7 @@ struct ColumnData
int spacing; // Space between columns in twips
bool leftBorder;
bool rightBorder;
bool absWidth; // If FALSE (the default), don't use an absolute width if you can help it.
bool absWidth; // If false (the default), don't use an absolute width if you can help it.
};
extern ColumnData TableData[];

View File

@@ -109,7 +109,7 @@ int subsectionFont = 12; // largeFont1;
int titleFont = LARGEFont3;
int authorFont = LargeFont2;
int mirrorMargins = true;
bool winHelp = false; // Output in Windows Help format if TRUE, linear otherwise
bool winHelp = false; // Output in Windows Help format if true, linear otherwise
bool isInteractive = false;
bool runTwice = false;
int convertMode = TEX_RTF;
@@ -117,7 +117,7 @@ bool checkCurleyBraces = false;
bool checkSyntax = false;
bool headerRule = false;
bool footerRule = false;
bool compatibilityMode = false; // If TRUE, maximum Latex compatibility
bool compatibilityMode = false; // If true, maximum Latex compatibility
// (Quality of RTF generation deteriorate)
bool generateHPJ; // Generate WinHelp Help Project file
wxChar *winHelpTitle = NULL; // Windows Help title
@@ -151,7 +151,7 @@ wxChar *followedLinkColourString = NULL;
bool combineSubSections = false;
bool htmlWorkshopFiles = false;
bool ignoreBadRefs = false;
wxChar *htmlFaceName = NULL;
wxChar *htmlFaceName = NULL;
extern int passNumber;
@@ -204,12 +204,12 @@ int CurrentInputIndex = 0;
wxChar *TexFileRoot = NULL;
wxChar *TexBibName = NULL; // Bibliography output file name
wxChar *TexTmpBibName = NULL; // Temporary bibliography output file name
bool isSync = false; // If TRUE, should not yield to other processes.
bool stopRunning = false; // If TRUE, should abort.
bool isSync = false; // If true, should not yield to other processes.
bool stopRunning = false; // If true, should abort.
static int currentColumn = 0;
wxChar *currentArgData = NULL;
bool haveArgData = false; // If TRUE, we're simulating the data.
bool haveArgData = false; // If true, we're simulating the data.
TexChunk *currentArgument = NULL;
TexChunk *nextChunk = NULL;
bool isArgOptional = false;
@@ -227,7 +227,7 @@ TexMacroDef *VerbatimMacroDef = NULL;
TexRef::TexRef(const wxChar *label, const wxChar *file,
const wxChar *section, const wxChar *sectionN)
const wxChar *section, const wxChar *sectionN)
{
refLabel = copystring(label);
refFile = file ? copystring(file) : (wxChar*) NULL;
@@ -967,7 +967,7 @@ void MacroError(wxChar *buffer)
* Parse an argument.
* 'environment' specifies the name of the macro IFF if we're looking for the end
* of an environment, e.g. \end{itemize}. Otherwise it's NULL.
* 'parseToBrace' is TRUE if the argument should extend to the next right brace,
* 'parseToBrace' is true if the argument should extend to the next right brace,
* e.g. in {\bf an argument} as opposed to \vskip 30pt
*
*/

View File

@@ -217,7 +217,7 @@ extern int sectionFont;
extern int subsectionFont;
extern int titleFont;
extern int authorFont;
extern bool winHelp; // Output in Windows Help format if TRUE, linear otherwise
extern bool winHelp; // Output in Windows Help format if true, linear otherwise
extern bool isInteractive;
extern bool runTwice;
extern int convertMode;
@@ -332,7 +332,7 @@ extern void FakeCurrentSection(wxChar *fakeSection, bool addToContents = true);
*/
extern wxChar *currentArgData;
extern bool haveArgData; // If TRUE, we're simulating the data.
extern bool haveArgData; // If true, we're simulating the data.
void StartSimulateArgument(wxChar *data);
void EndSimulateArgument(void);
@@ -345,7 +345,7 @@ void EndSimulateArgument(void);
void OnMacro(int macroId, int no_args, bool start);
// Called on start/end of argument examination.
// Return TRUE at the start of an argument to traverse
// Return true at the start of an argument to traverse
// (output) the argument.
bool OnArgument(int macroId, int arg_no, bool start);

View File

@@ -1086,9 +1086,9 @@ void OnInform(const wxChar *msg)
(*frame->textWindow) << msg << _T("\n");
/* This whole block of code is just wrong I think. It would behave
completely wrong under anything other than MSW due to the ELSE
with no statement, and the cout calls would fail under MSW, as
the code in this block is compiled if !NO_GUI This code has been
here since v1.1 of this file too. - gt
with no statement, and the cout calls would fail under MSW, as
the code in this block is compiled if !NO_GUI This code has been
here since v1.1 of this file too. - gt
else
#ifdef __WXMSW__
{

View File

@@ -449,7 +449,7 @@ void ReadTexReferences(wxChar *filename)
if (!istr.eof())
{
istr >> file;
istr >> sectionName;
istr >> sectionName;
char ch;
istr.get(ch); // Read past space
istr.get(ch);
@@ -1627,15 +1627,15 @@ void Tex2RTFYield(bool force)
static int yieldCount = 0;
if (isSync)
return;
return;
if (force)
yieldCount = 0;
yieldCount = 0;
if (yieldCount == 0)
{
if (wxTheApp)
wxYield();
yieldCount = 10;
if (wxTheApp)
wxYield();
yieldCount = 10;
}
yieldCount --;
#endif
@@ -1713,7 +1713,7 @@ wxChar *ConvertCase(wxChar *s)
}
#if !WXWIN_COMPATIBILITY_2
// if substring is TRUE, search for str1 in str2
// if substring is true, search for str1 in str2
bool StringMatch(const wxChar *str1, const wxChar *str2, bool subString,
bool exact)
{

View File

@@ -1,10 +1,10 @@
/*
* File: wxhlpblk.h
* Purpose: Text blocks used in wxHelp
* Author: Julian Smart
* Created: 1993
* Updated:
* Copyright: (c) 1993, AIAI, University of Edinburgh
* File: wxhlpblk.h
* Purpose: Text blocks used in wxHelp
* Author: Julian Smart
* Created: 1993
* Updated:
* Copyright: (c) 1993, AIAI, University of Edinburgh
*/
/* sccsid[] = "%W% %G%" */

View File

@@ -399,7 +399,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
}
break;
}
}
}
}
}
break;