Old API deprecated. Use new and remove old usage where necessary.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e896726a47
commit
eecb33b018
@ -206,12 +206,12 @@ public:
|
||||
// user-defined class (default implementation creates a wxLogGui
|
||||
// object) -- this log object is used by default by all wxLogXXX()
|
||||
// functions.
|
||||
virtual wxLog *CreateLogTarget();
|
||||
wxDEPRECATED( virtual wxLog *CreateLogTarget() );
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
// similar to CreateLogTarget() but for the global wxMessageOutput
|
||||
// object
|
||||
virtual wxMessageOutput *CreateMessageOutput();
|
||||
wxDEPRECATED( virtual wxMessageOutput *CreateMessageOutput() );
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
@ -278,10 +278,7 @@ public:
|
||||
static bool CheckBuildOptions(const char *optionsSignature,
|
||||
const char *componentName);
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
static bool CheckBuildOptions(const wxBuildOptions& buildOptions)
|
||||
{
|
||||
return CheckBuildOptions(buildOptions.m_signature, "your program");
|
||||
}
|
||||
wxDEPRECATED( static bool CheckBuildOptions(const wxBuildOptions& buildOptions) );
|
||||
#endif
|
||||
|
||||
// implementation only from now on
|
||||
|
@ -160,7 +160,7 @@ public:
|
||||
// once you are done with it. Will return NULL if the
|
||||
// ArrayString was empty.
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
wxString* GetStringArray() const;
|
||||
wxDEPRECATED( wxString* GetStringArray() const );
|
||||
#endif
|
||||
|
||||
// item management
|
||||
@ -180,7 +180,7 @@ public:
|
||||
void Remove(const wxChar *sz);
|
||||
// remove item by index
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
void Remove(size_t nIndex, size_t nRemove = 1) { RemoveAt(nIndex, nRemove); }
|
||||
wxDEPRECATED( void Remove(size_t nIndex, size_t nRemove = 1) );
|
||||
#endif
|
||||
void RemoveAt(size_t nIndex, size_t nRemove = 1);
|
||||
|
||||
|
@ -84,9 +84,9 @@ public:
|
||||
// The arrays will contain an equal number of items found before the error.
|
||||
// wildCard is in the form:
|
||||
// "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
|
||||
static int ParseWildcard(const wxString& wildCard,
|
||||
wxArrayString& descriptions,
|
||||
wxArrayString& filters);
|
||||
wxDEPRECATED( static int ParseWildcard(const wxString& wildCard,
|
||||
wxArrayString& descriptions,
|
||||
wxArrayString& filters) );
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
// Append first extension to filePath from a ';' separated extensionList
|
||||
|
@ -27,12 +27,6 @@
|
||||
#include "wx/treebase.h"
|
||||
#include "wx/hashmap.h"
|
||||
|
||||
#ifdef __GNUWIN32__
|
||||
// Cygwin windows.h defines these identifiers
|
||||
#undef GetFirstChild
|
||||
#undef GetNextSibling
|
||||
#endif // Cygwin
|
||||
|
||||
// fwd decl
|
||||
class WXDLLEXPORT wxImageList;
|
||||
class WXDLLEXPORT wxDragImage;
|
||||
@ -363,42 +357,6 @@ public:
|
||||
wxRect& rect,
|
||||
bool textOnly = false) const;
|
||||
|
||||
// deprecated
|
||||
// ----------
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
// these methods are deprecated and will be removed in future versions of
|
||||
// wxWidgets, they're here for compatibility only, don't use them in new
|
||||
// code (the comments indicate why these methods are now useless and how to
|
||||
// replace them)
|
||||
|
||||
// use Expand, Collapse, CollapseAndReset or Toggle
|
||||
wxDEPRECATED( void ExpandItem(const wxTreeItemId& item, int action) );
|
||||
|
||||
// use AddRoot, PrependItem or AppendItem
|
||||
wxDEPRECATED( wxTreeItemId InsertItem(const wxTreeItemId& parent,
|
||||
const wxString& text,
|
||||
int image = -1, int selImage = -1,
|
||||
long insertAfter = wxTREE_INSERT_LAST) );
|
||||
|
||||
// use Set/GetImageList and Set/GetStateImageList
|
||||
wxImageList *GetImageList(int) const { return GetImageList(); }
|
||||
void SetImageList(wxImageList *imageList, int) { SetImageList(imageList); }
|
||||
|
||||
// use Set/GetItemImage directly
|
||||
int GetItemSelectedImage(const wxTreeItemId& item) const
|
||||
{ return GetItemImage(item, wxTreeItemIcon_Selected); }
|
||||
void SetItemSelectedImage(const wxTreeItemId& item, int image)
|
||||
{ SetItemImage(item, image, wxTreeItemIcon_Selected); }
|
||||
|
||||
// use the versions taking wxTreeItemIdValue cookies
|
||||
wxDEPRECATED( wxTreeItemId GetFirstChild(const wxTreeItemId& item,
|
||||
long& cookie) const );
|
||||
wxDEPRECATED( wxTreeItemId GetNextChild(const wxTreeItemId& item,
|
||||
long& cookie) const );
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
@ -462,7 +420,7 @@ private:
|
||||
void DeleteTextCtrl();
|
||||
|
||||
// support for additional item images which we implement using
|
||||
// wxTreeItemIndirectData technique - see the comments in msw/treectrl.cpp
|
||||
// wxTreeItemIndirectData technique
|
||||
void SetIndirectItemData(const wxTreeItemId& item,
|
||||
class wxTreeItemIndirectData *data);
|
||||
bool HasIndirectData(const wxTreeItemId& item) const;
|
||||
@ -493,5 +451,4 @@ private:
|
||||
|
||||
#endif // wxUSE_TREECTRL
|
||||
|
||||
#endif
|
||||
// _WX_TREECTRL_H_
|
||||
#endif // _WX_TREECTRL_H_
|
||||
|
@ -79,7 +79,7 @@ class WXDLLIMPEXP_CORE wxPoint;
|
||||
|
||||
// Make a copy of this string using 'new'
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s);
|
||||
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s) );
|
||||
#endif
|
||||
|
||||
// A shorter way of using strcmp
|
||||
@ -146,14 +146,14 @@ WXDLLEXPORT long wxGetCurrentId();
|
||||
WXDLLIMPEXP_DATA_BASE(extern const wxChar*) wxFloatToStringStr;
|
||||
WXDLLIMPEXP_DATA_BASE(extern const wxChar*) wxDoubleToStringStr;
|
||||
|
||||
WXDLLIMPEXP_BASE void StringToFloat(const wxChar *s, float *number);
|
||||
WXDLLIMPEXP_BASE wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr);
|
||||
WXDLLIMPEXP_BASE void StringToDouble(const wxChar *s, double *number);
|
||||
WXDLLIMPEXP_BASE wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr);
|
||||
WXDLLIMPEXP_BASE void StringToInt(const wxChar *s, int *number);
|
||||
WXDLLIMPEXP_BASE void StringToLong(const wxChar *s, long *number);
|
||||
WXDLLIMPEXP_BASE wxChar* IntToString(int number);
|
||||
WXDLLIMPEXP_BASE wxChar* LongToString(long number);
|
||||
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToFloat(const wxChar *s, float *number) );
|
||||
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr) );
|
||||
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToDouble(const wxChar *s, double *number) );
|
||||
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr) );
|
||||
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToInt(const wxChar *s, int *number) );
|
||||
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToLong(const wxChar *s, long *number) );
|
||||
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* IntToString(int number) );
|
||||
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* LongToString(long number) );
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
|
@ -442,6 +442,15 @@ void wxAppConsole::OnAssert(const wxChar *file,
|
||||
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
bool wxAppConsole::CheckBuildOptions(const wxBuildOptions& buildOptions)
|
||||
{
|
||||
return CheckBuildOptions(buildOptions.m_signature, "your program");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
||||
// other classes implementations
|
||||
// ============================================================================
|
||||
|
@ -1024,7 +1024,7 @@ wxString::wxString(const char *psz, wxMBConv& conv, size_t nLength)
|
||||
size_t nRealSize;
|
||||
wxWCharBuffer theBuffer = conv.cMB2WC(psz, nLen, &nRealSize);
|
||||
|
||||
//Copy
|
||||
//Copy
|
||||
if (nRealSize)
|
||||
assign( theBuffer.data() , nRealSize - 1 );
|
||||
}
|
||||
@ -1080,7 +1080,7 @@ wxString::wxString(const wchar_t *pwz, wxMBConv& conv, size_t nLength)
|
||||
size_t nRealSize;
|
||||
wxCharBuffer theBuffer = conv.cWC2MB(pwz, nLen, &nRealSize);
|
||||
|
||||
//Copy
|
||||
//Copy
|
||||
if (nRealSize)
|
||||
assign( theBuffer.data() , nRealSize - 1 );
|
||||
}
|
||||
@ -1629,7 +1629,7 @@ inline int wxSafeIsspace(wxChar ch) { return (ch < 127) && wxIsspace(ch); }
|
||||
wxString& wxString::Trim(bool bFromRight)
|
||||
{
|
||||
// first check if we're going to modify the string at all
|
||||
if ( !IsEmpty() &&
|
||||
if ( !empty() &&
|
||||
(
|
||||
(bFromRight && wxSafeIsspace(GetChar(Len() - 1))) ||
|
||||
(!bFromRight && wxSafeIsspace(GetChar(0u)))
|
||||
@ -2195,6 +2195,11 @@ wxString* wxArrayString::GetStringArray() const
|
||||
return array;
|
||||
}
|
||||
|
||||
void wxArrayString::Remove(size_t nIndex, size_t nRemove)
|
||||
{
|
||||
RemoveAt(nIndex, nRemove);
|
||||
}
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
// searches the array for an item (forward or backwards)
|
||||
|
@ -32,18 +32,12 @@
|
||||
|
||||
#include "wx/palmos/private.h"
|
||||
|
||||
// Set this to 1 to be _absolutely_ sure that repainting will work for all
|
||||
// comctl32.dll versions
|
||||
#define wxUSE_COMCTL32_SAFELY 0
|
||||
|
||||
#include "wx/app.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/imaglist.h"
|
||||
#include "wx/settings.h"
|
||||
|
||||
#include "wx/palmos/wrapcctl.h"
|
||||
|
||||
// macros to hide the cast ugliness
|
||||
// --------------------------------
|
||||
|
||||
|
@ -47,11 +47,6 @@ using namespace std;
|
||||
#if !WXWIN_COMPATIBILITY_2_4
|
||||
static inline wxChar* copystring(const wxChar* s)
|
||||
{ return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
|
||||
static inline void StringToInt (const wxChar *s, int *number)
|
||||
{
|
||||
if (s && *s && number)
|
||||
*number = (int) wxStrtol (s, (wxChar **) NULL, 10);
|
||||
}
|
||||
#endif
|
||||
|
||||
wxHashTable TexReferences(wxKEY_STRING);
|
||||
@ -1103,256 +1098,269 @@ bool StringTobool(wxChar *val)
|
||||
return false;
|
||||
}
|
||||
|
||||
void RegisterIntSetting (const wxString& s, int *number)
|
||||
{
|
||||
if (number)
|
||||
{
|
||||
long val;
|
||||
s.ToLong(&val);
|
||||
*number = (int)val;
|
||||
}
|
||||
}
|
||||
|
||||
// Define a variable value from the .ini file
|
||||
wxChar *RegisterSetting(wxChar *settingName, wxChar *settingValue, bool interactive)
|
||||
{
|
||||
static wxChar errorCode[100];
|
||||
wxStrcpy(errorCode, _T("OK"));
|
||||
if (StringMatch(settingName, _T("chapterName"), false, true))
|
||||
{
|
||||
delete[] ChapterNameString;
|
||||
ChapterNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("sectionName"), false, true))
|
||||
{
|
||||
delete[] SectionNameString;
|
||||
SectionNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("subsectionName"), false, true))
|
||||
{
|
||||
delete[] SubsectionNameString;
|
||||
SubsectionNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("subsubsectionName"), false, true))
|
||||
{
|
||||
delete[] SubsubsectionNameString;
|
||||
SubsubsectionNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("indexName"), false, true))
|
||||
{
|
||||
delete[] IndexNameString;
|
||||
IndexNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("contentsName"), false, true))
|
||||
{
|
||||
delete[] ContentsNameString;
|
||||
ContentsNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("glossaryName"), false, true))
|
||||
{
|
||||
delete[] GlossaryNameString;
|
||||
GlossaryNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("referencesName"), false, true))
|
||||
{
|
||||
delete[] ReferencesNameString;
|
||||
ReferencesNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("tablesName"), false, true))
|
||||
{
|
||||
delete[] TablesNameString;
|
||||
TablesNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("figuresName"), false, true))
|
||||
{
|
||||
delete[] FiguresNameString;
|
||||
FiguresNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("tableName"), false, true))
|
||||
{
|
||||
delete[] TableNameString;
|
||||
TableNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("figureName"), false, true))
|
||||
{
|
||||
delete[] FigureNameString;
|
||||
FigureNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("abstractName"), false, true))
|
||||
{
|
||||
delete[] AbstractNameString;
|
||||
AbstractNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("chapterFontSize"), false, true))
|
||||
StringToInt(settingValue, &chapterFont);
|
||||
else if (StringMatch(settingName, _T("sectionFontSize"), false, true))
|
||||
StringToInt(settingValue, §ionFont);
|
||||
else if (StringMatch(settingName, _T("subsectionFontSize"), false, true))
|
||||
StringToInt(settingValue, &subsectionFont);
|
||||
else if (StringMatch(settingName, _T("titleFontSize"), false, true))
|
||||
StringToInt(settingValue, &titleFont);
|
||||
else if (StringMatch(settingName, _T("authorFontSize"), false, true))
|
||||
StringToInt(settingValue, &authorFont);
|
||||
else if (StringMatch(settingName, _T("ignoreInput"), false, true))
|
||||
IgnorableInputFiles.Add(wxFileNameFromPath(settingValue));
|
||||
else if (StringMatch(settingName, _T("mirrorMargins"), false, true))
|
||||
mirrorMargins = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("runTwice"), false, true))
|
||||
runTwice = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("isInteractive"), false, true))
|
||||
isInteractive = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("headerRule"), false, true))
|
||||
headerRule = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("footerRule"), false, true))
|
||||
footerRule = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("combineSubSections"), false, true))
|
||||
combineSubSections = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("listLabelIndent"), false, true))
|
||||
StringToInt(settingValue, &labelIndentTab);
|
||||
else if (StringMatch(settingName, _T("listItemIndent"), false, true))
|
||||
StringToInt(settingValue, &itemIndentTab);
|
||||
else if (StringMatch(settingName, _T("useUpButton"), false, true))
|
||||
useUpButton = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("useHeadingStyles"), false, true))
|
||||
useHeadingStyles = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("useWord"), false, true))
|
||||
useWord = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("contentsDepth"), false, true))
|
||||
StringToInt(settingValue, &contentsDepth);
|
||||
else if (StringMatch(settingName, _T("generateHPJ"), false, true))
|
||||
generateHPJ = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("truncateFilenames"), false, true))
|
||||
truncateFilenames = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("winHelpVersion"), false, true))
|
||||
StringToInt(settingValue, &winHelpVersion);
|
||||
else if (StringMatch(settingName, _T("winHelpContents"), false, true))
|
||||
winHelpContents = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("htmlIndex"), false, true))
|
||||
htmlIndex = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("htmlWorkshopFiles"), false, true))
|
||||
htmlWorkshopFiles = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("htmlFrameContents"), false, true))
|
||||
htmlFrameContents = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("htmlStylesheet"), false, true))
|
||||
wxString settingValueStr( settingValue );
|
||||
|
||||
static wxChar errorCode[100];
|
||||
wxStrcpy(errorCode, _T("OK"));
|
||||
if (StringMatch(settingName, _T("chapterName"), false, true))
|
||||
{
|
||||
if (htmlStylesheet) delete[] htmlStylesheet;
|
||||
htmlStylesheet = copystring(settingValue);
|
||||
delete[] ChapterNameString;
|
||||
ChapterNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("upperCaseNames"), false, true))
|
||||
upperCaseNames = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("ignoreBadRefs"), false, true))
|
||||
ignoreBadRefs = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("htmlFaceName"), false, true))
|
||||
{
|
||||
delete[] htmlFaceName;
|
||||
htmlFaceName = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("winHelpTitle"), false, true))
|
||||
{
|
||||
if (winHelpTitle)
|
||||
delete[] winHelpTitle;
|
||||
winHelpTitle = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("indexSubsections"), false, true))
|
||||
indexSubsections = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("compatibility"), false, true))
|
||||
compatibilityMode = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("defaultColumnWidth"), false, true))
|
||||
{
|
||||
StringToInt(settingValue, &defaultTableColumnWidth);
|
||||
defaultTableColumnWidth = 20*defaultTableColumnWidth;
|
||||
}
|
||||
else if (StringMatch(settingName, _T("bitmapMethod"), false, true))
|
||||
{
|
||||
if ((wxStrcmp(settingValue, _T("includepicture")) != 0) && (wxStrcmp(settingValue, _T("hex")) != 0) &&
|
||||
(wxStrcmp(settingValue, _T("import")) != 0))
|
||||
else if (StringMatch(settingName, _T("sectionName"), false, true))
|
||||
{
|
||||
if (interactive)
|
||||
OnError(_T("Unknown bitmapMethod"));
|
||||
wxStrcpy(errorCode, _T("Unknown bitmapMethod"));
|
||||
delete[] SectionNameString;
|
||||
SectionNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("subsectionName"), false, true))
|
||||
{
|
||||
delete[] SubsectionNameString;
|
||||
SubsectionNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("subsubsectionName"), false, true))
|
||||
{
|
||||
delete[] SubsubsectionNameString;
|
||||
SubsubsectionNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("indexName"), false, true))
|
||||
{
|
||||
delete[] IndexNameString;
|
||||
IndexNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("contentsName"), false, true))
|
||||
{
|
||||
delete[] ContentsNameString;
|
||||
ContentsNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("glossaryName"), false, true))
|
||||
{
|
||||
delete[] GlossaryNameString;
|
||||
GlossaryNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("referencesName"), false, true))
|
||||
{
|
||||
delete[] ReferencesNameString;
|
||||
ReferencesNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("tablesName"), false, true))
|
||||
{
|
||||
delete[] TablesNameString;
|
||||
TablesNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("figuresName"), false, true))
|
||||
{
|
||||
delete[] FiguresNameString;
|
||||
FiguresNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("tableName"), false, true))
|
||||
{
|
||||
delete[] TableNameString;
|
||||
TableNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("figureName"), false, true))
|
||||
{
|
||||
delete[] FigureNameString;
|
||||
FigureNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("abstractName"), false, true))
|
||||
{
|
||||
delete[] AbstractNameString;
|
||||
AbstractNameString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("chapterFontSize"), false, true))
|
||||
RegisterIntSetting(settingValueStr, &chapterFont);
|
||||
else if (StringMatch(settingName, _T("sectionFontSize"), false, true))
|
||||
RegisterIntSetting(settingValueStr, §ionFont);
|
||||
else if (StringMatch(settingName, _T("subsectionFontSize"), false, true))
|
||||
RegisterIntSetting(settingValueStr, &subsectionFont);
|
||||
else if (StringMatch(settingName, _T("titleFontSize"), false, true))
|
||||
RegisterIntSetting(settingValueStr, &titleFont);
|
||||
else if (StringMatch(settingName, _T("authorFontSize"), false, true))
|
||||
RegisterIntSetting(settingValueStr, &authorFont);
|
||||
else if (StringMatch(settingName, _T("ignoreInput"), false, true))
|
||||
IgnorableInputFiles.Add(wxFileNameFromPath(settingValue));
|
||||
else if (StringMatch(settingName, _T("mirrorMargins"), false, true))
|
||||
mirrorMargins = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("runTwice"), false, true))
|
||||
runTwice = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("isInteractive"), false, true))
|
||||
isInteractive = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("headerRule"), false, true))
|
||||
headerRule = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("footerRule"), false, true))
|
||||
footerRule = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("combineSubSections"), false, true))
|
||||
combineSubSections = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("listLabelIndent"), false, true))
|
||||
RegisterIntSetting(settingValueStr, &labelIndentTab);
|
||||
else if (StringMatch(settingName, _T("listItemIndent"), false, true))
|
||||
RegisterIntSetting(settingValueStr, &itemIndentTab);
|
||||
else if (StringMatch(settingName, _T("useUpButton"), false, true))
|
||||
useUpButton = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("useHeadingStyles"), false, true))
|
||||
useHeadingStyles = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("useWord"), false, true))
|
||||
useWord = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("contentsDepth"), false, true))
|
||||
RegisterIntSetting(settingValueStr, &contentsDepth);
|
||||
else if (StringMatch(settingName, _T("generateHPJ"), false, true))
|
||||
generateHPJ = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("truncateFilenames"), false, true))
|
||||
truncateFilenames = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("winHelpVersion"), false, true))
|
||||
RegisterIntSetting(settingValueStr, &winHelpVersion);
|
||||
else if (StringMatch(settingName, _T("winHelpContents"), false, true))
|
||||
winHelpContents = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("htmlIndex"), false, true))
|
||||
htmlIndex = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("htmlWorkshopFiles"), false, true))
|
||||
htmlWorkshopFiles = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("htmlFrameContents"), false, true))
|
||||
htmlFrameContents = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("htmlStylesheet"), false, true))
|
||||
{
|
||||
if (htmlStylesheet)
|
||||
delete[] htmlStylesheet;
|
||||
htmlStylesheet = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("upperCaseNames"), false, true))
|
||||
upperCaseNames = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("ignoreBadRefs"), false, true))
|
||||
ignoreBadRefs = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("htmlFaceName"), false, true))
|
||||
{
|
||||
delete[] htmlFaceName;
|
||||
htmlFaceName = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("winHelpTitle"), false, true))
|
||||
{
|
||||
if (winHelpTitle)
|
||||
delete[] winHelpTitle;
|
||||
winHelpTitle = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("indexSubsections"), false, true))
|
||||
indexSubsections = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("compatibility"), false, true))
|
||||
compatibilityMode = StringTobool(settingValue);
|
||||
else if (StringMatch(settingName, _T("defaultColumnWidth"), false, true))
|
||||
{
|
||||
RegisterIntSetting(settingValueStr, &defaultTableColumnWidth);
|
||||
defaultTableColumnWidth = 20*defaultTableColumnWidth;
|
||||
}
|
||||
else if (StringMatch(settingName, _T("bitmapMethod"), false, true))
|
||||
{
|
||||
if ((wxStrcmp(settingValue, _T("includepicture")) != 0) && (wxStrcmp(settingValue, _T("hex")) != 0) &&
|
||||
(wxStrcmp(settingValue, _T("import")) != 0))
|
||||
{
|
||||
if (interactive)
|
||||
OnError(_T("Unknown bitmapMethod"));
|
||||
wxStrcpy(errorCode, _T("Unknown bitmapMethod"));
|
||||
}
|
||||
else
|
||||
{
|
||||
delete[] bitmapMethod;
|
||||
bitmapMethod = copystring(settingValue);
|
||||
}
|
||||
}
|
||||
else if (StringMatch(settingName, _T("htmlBrowseButtons"), false, true))
|
||||
{
|
||||
if (wxStrcmp(settingValue, _T("none")) == 0)
|
||||
htmlBrowseButtons = HTML_BUTTONS_NONE;
|
||||
else if (wxStrcmp(settingValue, _T("bitmap")) == 0)
|
||||
htmlBrowseButtons = HTML_BUTTONS_BITMAP;
|
||||
else if (wxStrcmp(settingValue, _T("text")) == 0)
|
||||
htmlBrowseButtons = HTML_BUTTONS_TEXT;
|
||||
else
|
||||
{
|
||||
if (interactive)
|
||||
OnInform(_T("Initialisation file error: htmlBrowseButtons must be one of none, bitmap, or text."));
|
||||
wxStrcpy(errorCode, _T("Initialisation file error: htmlBrowseButtons must be one of none, bitmap, or text."));
|
||||
}
|
||||
}
|
||||
else if (StringMatch(settingName, _T("backgroundImage"), false, true))
|
||||
{
|
||||
backgroundImageString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("backgroundColour"), false, true))
|
||||
{
|
||||
delete[] backgroundColourString;
|
||||
backgroundColourString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("textColour"), false, true))
|
||||
{
|
||||
textColourString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("linkColour"), false, true))
|
||||
{
|
||||
linkColourString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("followedLinkColour"), false, true))
|
||||
{
|
||||
followedLinkColourString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("conversionMode"), false, true))
|
||||
{
|
||||
if (StringMatch(settingValue, _T("RTF"), false, true))
|
||||
{
|
||||
winHelp = false; convertMode = TEX_RTF;
|
||||
}
|
||||
else if (StringMatch(settingValue, _T("WinHelp"), false, true))
|
||||
{
|
||||
winHelp = true; convertMode = TEX_RTF;
|
||||
}
|
||||
else if (StringMatch(settingValue, _T("XLP"), false, true) ||
|
||||
StringMatch(settingValue, _T("wxHelp"), false, true))
|
||||
{
|
||||
convertMode = TEX_XLP;
|
||||
}
|
||||
else if (StringMatch(settingValue, _T("HTML"), false, true))
|
||||
{
|
||||
convertMode = TEX_HTML;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (interactive)
|
||||
OnInform(_T("Initialisation file error: conversionMode must be one of\nRTF, WinHelp, XLP (or wxHelp), HTML."));
|
||||
wxStrcpy(errorCode, _T("Initialisation file error: conversionMode must be one of\nRTF, WinHelp, XLP (or wxHelp), HTML."));
|
||||
}
|
||||
}
|
||||
else if (StringMatch(settingName, _T("documentFontSize"), false, true))
|
||||
{
|
||||
int n;
|
||||
RegisterIntSetting(settingValueStr, &n);
|
||||
if (n == 10 || n == 11 || n == 12)
|
||||
SetFontSizes(n);
|
||||
else
|
||||
{
|
||||
wxChar buf[200];
|
||||
wxSnprintf(buf, sizeof(buf), _T("Initialisation file error: nonstandard document font size %d."), n);
|
||||
if (interactive)
|
||||
OnInform(buf);
|
||||
wxStrcpy(errorCode, buf);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
delete[] bitmapMethod;
|
||||
bitmapMethod = copystring(settingValue);
|
||||
wxChar buf[200];
|
||||
wxSnprintf(buf, sizeof(buf), _T("Initialisation file error: unrecognised setting %s."), settingName);
|
||||
if (interactive)
|
||||
OnInform(buf);
|
||||
wxStrcpy(errorCode, buf);
|
||||
}
|
||||
}
|
||||
else if (StringMatch(settingName, _T("htmlBrowseButtons"), false, true))
|
||||
{
|
||||
if (wxStrcmp(settingValue, _T("none")) == 0)
|
||||
htmlBrowseButtons = HTML_BUTTONS_NONE;
|
||||
else if (wxStrcmp(settingValue, _T("bitmap")) == 0)
|
||||
htmlBrowseButtons = HTML_BUTTONS_BITMAP;
|
||||
else if (wxStrcmp(settingValue, _T("text")) == 0)
|
||||
htmlBrowseButtons = HTML_BUTTONS_TEXT;
|
||||
else
|
||||
{
|
||||
if (interactive)
|
||||
OnInform(_T("Initialisation file error: htmlBrowseButtons must be one of none, bitmap, or text."));
|
||||
wxStrcpy(errorCode, _T("Initialisation file error: htmlBrowseButtons must be one of none, bitmap, or text."));
|
||||
}
|
||||
}
|
||||
else if (StringMatch(settingName, _T("backgroundImage"), false, true))
|
||||
{
|
||||
backgroundImageString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("backgroundColour"), false, true))
|
||||
{
|
||||
delete[] backgroundColourString;
|
||||
backgroundColourString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("textColour"), false, true))
|
||||
{
|
||||
textColourString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("linkColour"), false, true))
|
||||
{
|
||||
linkColourString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("followedLinkColour"), false, true))
|
||||
{
|
||||
followedLinkColourString = copystring(settingValue);
|
||||
}
|
||||
else if (StringMatch(settingName, _T("conversionMode"), false, true))
|
||||
{
|
||||
if (StringMatch(settingValue, _T("RTF"), false, true))
|
||||
{
|
||||
winHelp = false; convertMode = TEX_RTF;
|
||||
}
|
||||
else if (StringMatch(settingValue, _T("WinHelp"), false, true))
|
||||
{
|
||||
winHelp = true; convertMode = TEX_RTF;
|
||||
}
|
||||
else if (StringMatch(settingValue, _T("XLP"), false, true) ||
|
||||
StringMatch(settingValue, _T("wxHelp"), false, true))
|
||||
{
|
||||
convertMode = TEX_XLP;
|
||||
}
|
||||
else if (StringMatch(settingValue, _T("HTML"), false, true))
|
||||
{
|
||||
convertMode = TEX_HTML;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (interactive)
|
||||
OnInform(_T("Initialisation file error: conversionMode must be one of\nRTF, WinHelp, XLP (or wxHelp), HTML."));
|
||||
wxStrcpy(errorCode, _T("Initialisation file error: conversionMode must be one of\nRTF, WinHelp, XLP (or wxHelp), HTML."));
|
||||
}
|
||||
}
|
||||
else if (StringMatch(settingName, _T("documentFontSize"), false, true))
|
||||
{
|
||||
int n;
|
||||
StringToInt(settingValue, &n);
|
||||
if (n == 10 || n == 11 || n == 12)
|
||||
SetFontSizes(n);
|
||||
else
|
||||
{
|
||||
wxChar buf[200];
|
||||
wxSnprintf(buf, sizeof(buf), _T("Initialisation file error: nonstandard document font size %d."), n);
|
||||
if (interactive)
|
||||
OnInform(buf);
|
||||
wxStrcpy(errorCode, buf);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxChar buf[200];
|
||||
wxSnprintf(buf, sizeof(buf), _T("Initialisation file error: unrecognised setting %s."), settingName);
|
||||
if (interactive)
|
||||
OnInform(buf);
|
||||
wxStrcpy(errorCode, buf);
|
||||
}
|
||||
return errorCode;
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
bool ReadCustomMacros(wxChar *filename)
|
||||
|
Loading…
Reference in New Issue
Block a user