Added ignoreBadRefs so e.g. the PMF manual doesn't generate bad references to
wxWindows classes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -577,6 +577,9 @@ are followed, e.g. use of $\backslash${\tt row} command in tabular environment.}
|
|||||||
The only default filename in the list is {\tt psbox.tex}.}
|
The only default filename in the list is {\tt psbox.tex}.}
|
||||||
\twocolitem{\inioption{isInteractive}}{If true, runs in interactive mode (the default).}
|
\twocolitem{\inioption{isInteractive}}{If true, runs in interactive mode (the default).}
|
||||||
\twocolitem{\inioption{runTwice}}{If true, runs the converter twice.}
|
\twocolitem{\inioption{runTwice}}{If true, runs the converter twice.}
|
||||||
|
\twocolitem{\inioption{ignoreBadRefs}}{If true (or yes), ignores bad helpref references
|
||||||
|
and simply writes the text in the first argument. Useful when a program such as HelpGen
|
||||||
|
generates references to classes documented in another manual.}
|
||||||
\end{twocollist}
|
\end{twocollist}
|
||||||
|
|
||||||
\subsubsection{Presentation options}\index{options, presentation}%
|
\subsubsection{Presentation options}\index{options, presentation}%
|
||||||
|
@@ -1906,6 +1906,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
|
|||||||
{
|
{
|
||||||
if (helpRefText)
|
if (helpRefText)
|
||||||
TraverseChildrenFromChunk(helpRefText);
|
TraverseChildrenFromChunk(helpRefText);
|
||||||
|
if (!ignoreBadRefs)
|
||||||
TexOutput(" (REF NOT FOUND)");
|
TexOutput(" (REF NOT FOUND)");
|
||||||
wxString errBuf;
|
wxString errBuf;
|
||||||
errBuf.Printf("Warning: unresolved reference '%s'", refName);
|
errBuf.Printf("Warning: unresolved reference '%s'", refName);
|
||||||
|
@@ -59,10 +59,8 @@ extern char *RTFCharset;
|
|||||||
// This is defined in the Tex2Any library and isn't in use after parsing
|
// This is defined in the Tex2Any library and isn't in use after parsing
|
||||||
extern char *BigBuffer;
|
extern char *BigBuffer;
|
||||||
|
|
||||||
|
|
||||||
extern wxHashTable TexReferences;
|
extern wxHashTable TexReferences;
|
||||||
|
|
||||||
|
|
||||||
// Are we in verbatim mode? If so, format differently.
|
// Are we in verbatim mode? If so, format differently.
|
||||||
static bool inVerbatim = FALSE;
|
static bool inVerbatim = FALSE;
|
||||||
|
|
||||||
@@ -95,6 +93,8 @@ static int TwoColWidthB = 3000;
|
|||||||
|
|
||||||
const int PageWidth = 12242; // 8.25 inches wide for A4
|
const int PageWidth = 12242; // 8.25 inches wide for A4
|
||||||
|
|
||||||
|
// Remember the anchor in a helpref
|
||||||
|
static TexChunk *helpRefText = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flag to say we've just issued a \par\pard command, so don't
|
* Flag to say we've just issued a \par\pard command, so don't
|
||||||
@@ -3343,17 +3343,27 @@ bool RTFOnArgument(int macroId, int arg_no, bool start)
|
|||||||
TexOutput("{\\i ");
|
TexOutput("{\\i ");
|
||||||
else
|
else
|
||||||
TexOutput("}");
|
TexOutput("}");
|
||||||
|
|
||||||
|
if (start)
|
||||||
|
helpRefText = GetArgChunk();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else if ((GetNoArgs() - arg_no) == 0) // Arg = 2, or 3 if first is optional
|
else if ((GetNoArgs() - arg_no) == 0) // Arg = 2, or 3 if first is optional
|
||||||
{
|
{
|
||||||
if (macroId != ltHELPREFN)
|
if (macroId != ltHELPREFN)
|
||||||
{
|
{
|
||||||
|
char *refName = GetArgData();
|
||||||
|
TexRef *texRef = NULL;
|
||||||
|
if (refName)
|
||||||
|
texRef = FindReference(refName);
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
|
if (texRef || !ignoreBadRefs)
|
||||||
TexOutput(" (");
|
TexOutput(" (");
|
||||||
char *refName = GetArgData();
|
|
||||||
if (refName)
|
if (refName)
|
||||||
|
{
|
||||||
|
if (texRef || !ignoreBadRefs)
|
||||||
{
|
{
|
||||||
if (useWord)
|
if (useWord)
|
||||||
{
|
{
|
||||||
@@ -3367,22 +3377,27 @@ bool RTFOnArgument(int macroId, int arg_no, bool start)
|
|||||||
{
|
{
|
||||||
// Only print section name if we're not in Word mode,
|
// Only print section name if we're not in Word mode,
|
||||||
// so can't do page references
|
// so can't do page references
|
||||||
TexRef *texRef = FindReference(refName);
|
|
||||||
if (texRef)
|
if (texRef)
|
||||||
{
|
{
|
||||||
TexOutput(texRef->sectionName) ; TexOutput(" "); TexOutput(texRef->sectionNumber);
|
TexOutput(texRef->sectionName) ; TexOutput(" "); TexOutput(texRef->sectionNumber);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!ignoreBadRefs)
|
||||||
TexOutput("??");
|
TexOutput("??");
|
||||||
sprintf(buf, "Warning: unresolved reference '%s'", refName);
|
sprintf(buf, "Warning: unresolved reference '%s'", refName);
|
||||||
OnInform(buf);
|
OnInform(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else TexOutput("??");
|
else TexOutput("??");
|
||||||
}
|
}
|
||||||
else TexOutput(")");
|
else
|
||||||
|
{
|
||||||
|
if (texRef || !ignoreBadRefs)
|
||||||
|
TexOutput(")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -144,6 +144,7 @@ char *linkColourString = NULL;
|
|||||||
char *followedLinkColourString = NULL;
|
char *followedLinkColourString = NULL;
|
||||||
bool combineSubSections = FALSE;
|
bool combineSubSections = FALSE;
|
||||||
bool htmlWorkshopFiles = FALSE;
|
bool htmlWorkshopFiles = FALSE;
|
||||||
|
bool ignoreBadRefs = FALSE;
|
||||||
|
|
||||||
extern int passNumber;
|
extern int passNumber;
|
||||||
|
|
||||||
|
@@ -248,6 +248,7 @@ extern char *linkColourString; // HTML link colour
|
|||||||
extern char *followedLinkColourString; // HTML followed link colour
|
extern char *followedLinkColourString; // HTML followed link colour
|
||||||
extern bool combineSubSections; // Stop splitting files below section
|
extern bool combineSubSections; // Stop splitting files below section
|
||||||
extern bool htmlWorkshopFiles; // generate HTML Help Workshop project files
|
extern bool htmlWorkshopFiles; // generate HTML Help Workshop project files
|
||||||
|
extern bool ignoreBadRefs; // Don't insert (REF NOT FOUND)
|
||||||
|
|
||||||
// Names to help with internationalisation
|
// Names to help with internationalisation
|
||||||
extern char *ContentsNameString;
|
extern char *ContentsNameString;
|
||||||
|
@@ -1183,6 +1183,8 @@ char *RegisterSetting(char *settingName, char *settingValue, bool interactive)
|
|||||||
htmlFrameContents = StringTobool(settingValue);
|
htmlFrameContents = StringTobool(settingValue);
|
||||||
else if (StringMatch(settingName, "upperCaseNames", FALSE, TRUE))
|
else if (StringMatch(settingName, "upperCaseNames", FALSE, TRUE))
|
||||||
upperCaseNames = StringTobool(settingValue);
|
upperCaseNames = StringTobool(settingValue);
|
||||||
|
else if (StringMatch(settingName, "ignoreBadRefs", FALSE, TRUE))
|
||||||
|
ignoreBadRefs = StringTobool(settingValue);
|
||||||
else if (StringMatch(settingName, "winHelpTitle", FALSE, TRUE))
|
else if (StringMatch(settingName, "winHelpTitle", FALSE, TRUE))
|
||||||
{
|
{
|
||||||
if (winHelpTitle)
|
if (winHelpTitle)
|
||||||
|
Reference in New Issue
Block a user