Applied patch [ 808050 ] fixes for WXUNIVERSAL and UNICODE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -123,12 +123,12 @@ public:
|
|||||||
|
|
||||||
virtual int GetNumberRows()
|
virtual int GetNumberRows()
|
||||||
{
|
{
|
||||||
wxLogDebug(" GetNumberRows() = %i",m_rowtotal);
|
wxLogDebug(_T(" GetNumberRows() = %i"),m_rowtotal);
|
||||||
return m_rowtotal;
|
return m_rowtotal;
|
||||||
}
|
}
|
||||||
virtual int GetNumberCols()
|
virtual int GetNumberCols()
|
||||||
{
|
{
|
||||||
wxLogDebug(" GetNumberCols() = %i",m_nocols);
|
wxLogDebug(_T(" GetNumberCols() = %i"),m_nocols);
|
||||||
return m_nocols;
|
return m_nocols;
|
||||||
}
|
}
|
||||||
virtual bool IsEmptyCell(int row, int col) ;
|
virtual bool IsEmptyCell(int row, int col) ;
|
||||||
|
@@ -189,13 +189,13 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
// Public member functions
|
// Public member functions
|
||||||
wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
|
wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
|
||||||
const wxString &qryTblName="", bool qryOnly = !wxDB_QUERY_ONLY,
|
const wxString &qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY,
|
||||||
const wxString &tblPath="");
|
const wxString &tblPath=wxEmptyString);
|
||||||
|
|
||||||
// DEPRECATED
|
// DEPRECATED
|
||||||
wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
|
wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
|
||||||
const wxChar *qryTblName="", bool qryOnly = !wxDB_QUERY_ONLY,
|
const wxChar *qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY,
|
||||||
const wxString &tblPath="");
|
const wxString &tblPath=wxEmptyString);
|
||||||
|
|
||||||
virtual ~wxDbTable();
|
virtual ~wxDbTable();
|
||||||
|
|
||||||
@@ -267,14 +267,14 @@ public:
|
|||||||
void BuildSelectStmt(wxString &pSqlStmt, int typeOfSelect, bool distinct);
|
void BuildSelectStmt(wxString &pSqlStmt, int typeOfSelect, bool distinct);
|
||||||
void BuildSelectStmt(wxChar *pSqlStmt, int typeOfSelect, bool distinct);
|
void BuildSelectStmt(wxChar *pSqlStmt, int typeOfSelect, bool distinct);
|
||||||
|
|
||||||
void BuildDeleteStmt(wxString &pSqlStmt, int typeOfDel, const wxString &pWhereClause="");
|
void BuildDeleteStmt(wxString &pSqlStmt, int typeOfDel, const wxString &pWhereClause=wxEmptyString);
|
||||||
void BuildDeleteStmt(wxChar *pSqlStmt, int typeOfDel, const wxString &pWhereClause="");
|
void BuildDeleteStmt(wxChar *pSqlStmt, int typeOfDel, const wxString &pWhereClause=wxEmptyString);
|
||||||
|
|
||||||
void BuildUpdateStmt(wxString &pSqlStmt, int typeOfUpd, const wxString &pWhereClause="");
|
void BuildUpdateStmt(wxString &pSqlStmt, int typeOfUpd, const wxString &pWhereClause=wxEmptyString);
|
||||||
void BuildUpdateStmt(wxChar *pSqlStmt, int typeOfUpd, const wxString &pWhereClause="");
|
void BuildUpdateStmt(wxChar *pSqlStmt, int typeOfUpd, const wxString &pWhereClause=wxEmptyString);
|
||||||
|
|
||||||
void BuildWhereClause(wxString &pWhereClause, int typeOfWhere, const wxString &qualTableName="", bool useLikeComparison=FALSE);
|
void BuildWhereClause(wxString &pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=FALSE);
|
||||||
void BuildWhereClause(wxChar *pWhereClause, int typeOfWhere, const wxString &qualTableName="", bool useLikeComparison=FALSE);
|
void BuildWhereClause(wxChar *pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=FALSE);
|
||||||
|
|
||||||
#if wxODBC_BACKWARD_COMPATABILITY
|
#if wxODBC_BACKWARD_COMPATABILITY
|
||||||
// The following member functions are deprecated. You should use the BuildXxxxxStmt functions (above)
|
// The following member functions are deprecated. You should use the BuildXxxxxStmt functions (above)
|
||||||
@@ -311,7 +311,7 @@ public:
|
|||||||
HSTMT *NewCursor(bool setCursor = FALSE, bool bindColumns = TRUE) { return GetNewCursor(setCursor,bindColumns); }
|
HSTMT *NewCursor(bool setCursor = FALSE, bool bindColumns = TRUE) { return GetNewCursor(setCursor,bindColumns); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ULONG Count(const wxString &args="*");
|
ULONG Count(const wxString &args=_T("*"));
|
||||||
int DB_STATUS(void) { return(pDb->DB_STATUS); }
|
int DB_STATUS(void) { return(pDb->DB_STATUS); }
|
||||||
|
|
||||||
bool IsColNull(UWORD colNo) const;
|
bool IsColNull(UWORD colNo) const;
|
||||||
|
@@ -237,7 +237,7 @@ public:
|
|||||||
~wxGenericMDIClientWindow();
|
~wxGenericMDIClientWindow();
|
||||||
virtual bool CreateClient( wxGenericMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
|
virtual bool CreateClient( wxGenericMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
|
||||||
|
|
||||||
virtual int SetSelection(int nPage);
|
virtual int SetSelection(size_t nPage);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void PageChanged(int OldSelection, int newSelection);
|
void PageChanged(int OldSelection, int newSelection);
|
||||||
|
@@ -104,6 +104,10 @@ class WXDLLIMPEXP_GL wxGLCanvas: public wxWindow
|
|||||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name);
|
const wxPoint& pos, const wxSize& size, long style, const wxString& name);
|
||||||
|
|
||||||
void SetCurrent();
|
void SetCurrent();
|
||||||
|
#ifdef __WXUNIVERSAL__
|
||||||
|
virtual bool SetCurrent(bool doit = true){ return wxWindow::SetCurrent(doit); };
|
||||||
|
#endif
|
||||||
|
|
||||||
void SetColour(const wxChar *colour);
|
void SetColour(const wxChar *colour);
|
||||||
void SwapBuffers();
|
void SwapBuffers();
|
||||||
|
|
||||||
|
@@ -92,6 +92,9 @@ public:
|
|||||||
|
|
||||||
// is this item the current one?
|
// is this item the current one?
|
||||||
bool IsCurrent(size_t item) const { return item == (size_t)m_current; }
|
bool IsCurrent(size_t item) const { return item == (size_t)m_current; }
|
||||||
|
#ifdef __WXUNIVERSAL__
|
||||||
|
bool IsCurrent() const { return wxVScrolledWindow::IsCurrent(); }
|
||||||
|
#endif
|
||||||
|
|
||||||
// is this item selected?
|
// is this item selected?
|
||||||
bool IsSelected(size_t item) const;
|
bool IsSelected(size_t item) const;
|
||||||
|
@@ -131,6 +131,8 @@
|
|||||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)
|
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)
|
||||||
#define wxHAVE_TCHAR_SUPPORT
|
#define wxHAVE_TCHAR_SUPPORT
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#elif defined(__WATCOMC__)
|
||||||
|
#define wxHAVE_TCHAR_SUPPORT
|
||||||
#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
|
#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
|
||||||
#define wxHAVE_TCHAR_SUPPORT
|
#define wxHAVE_TCHAR_SUPPORT
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
@@ -74,7 +74,6 @@ WX_CHECK_BUILD_OPTIONS("wxODBC")
|
|||||||
|
|
||||||
WXDLLIMPEXP_DATA_ODBC(wxDbList*) PtrBegDbList = 0;
|
WXDLLIMPEXP_DATA_ODBC(wxDbList*) PtrBegDbList = 0;
|
||||||
|
|
||||||
|
|
||||||
wxChar const *SQL_LOG_FILENAME = wxT("sqllog.txt");
|
wxChar const *SQL_LOG_FILENAME = wxT("sqllog.txt");
|
||||||
wxChar const *SQL_CATALOG_FILENAME = wxT("catalog.txt");
|
wxChar const *SQL_CATALOG_FILENAME = wxT("catalog.txt");
|
||||||
|
|
||||||
@@ -601,9 +600,9 @@ bool wxDb::Open(const wxString &Dsn, const wxString &Uid, const wxString &AuthSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Connect to the data source
|
// Connect to the data source
|
||||||
retcode = SQLConnect(hdbc, (UCHAR FAR *) dsn.c_str(), SQL_NTS,
|
retcode = SQLConnect(hdbc, (SQLTCHAR FAR *) dsn.c_str(), SQL_NTS,
|
||||||
(UCHAR FAR *) uid.c_str(), SQL_NTS,
|
(SQLTCHAR FAR *) uid.c_str(), SQL_NTS,
|
||||||
(UCHAR FAR *) authStr.c_str(), SQL_NTS);
|
(SQLTCHAR FAR *) authStr.c_str(), SQL_NTS);
|
||||||
|
|
||||||
if ((retcode != SQL_SUCCESS) &&
|
if ((retcode != SQL_SUCCESS) &&
|
||||||
(retcode != SQL_SUCCESS_WITH_INFO))
|
(retcode != SQL_SUCCESS_WITH_INFO))
|
||||||
@@ -803,9 +802,9 @@ bool wxDb::Open(wxDb *copyDb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Connect to the data source
|
// Connect to the data source
|
||||||
retcode = SQLConnect(hdbc, (UCHAR FAR *) dsn.c_str(), SQL_NTS,
|
retcode = SQLConnect(hdbc, (SQLTCHAR FAR *) dsn.c_str(), SQL_NTS,
|
||||||
(UCHAR FAR *) uid.c_str(), SQL_NTS,
|
(SQLTCHAR FAR *) uid.c_str(), SQL_NTS,
|
||||||
(UCHAR FAR *) authStr.c_str(), SQL_NTS);
|
(SQLTCHAR FAR *) authStr.c_str(), SQL_NTS);
|
||||||
|
|
||||||
if (retcode == SQL_ERROR)
|
if (retcode == SQL_ERROR)
|
||||||
return(DispAllErrors(henv, hdbc));
|
return(DispAllErrors(henv, hdbc));
|
||||||
@@ -1483,7 +1482,7 @@ bool wxDb::DispAllErrors(HENV aHenv, HDBC aHdbc, HSTMT aHstmt)
|
|||||||
{
|
{
|
||||||
wxString odbcErrMsg;
|
wxString odbcErrMsg;
|
||||||
|
|
||||||
while (SQLError(aHenv, aHdbc, aHstmt, (UCHAR FAR *) sqlState, &nativeError, (UCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS)
|
while (SQLError(aHenv, aHdbc, aHstmt, (SQLTCHAR FAR *) sqlState, &nativeError, (SQLTCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS)
|
||||||
{
|
{
|
||||||
odbcErrMsg.Printf(wxT("SQL State = %s\nNative Error Code = %li\nError Message = %s\n"), sqlState, nativeError, errorMsg);
|
odbcErrMsg.Printf(wxT("SQL State = %s\nNative Error Code = %li\nError Message = %s\n"), sqlState, nativeError, errorMsg);
|
||||||
logError(odbcErrMsg, sqlState);
|
logError(odbcErrMsg, sqlState);
|
||||||
@@ -1510,7 +1509,7 @@ bool wxDb::DispAllErrors(HENV aHenv, HDBC aHdbc, HSTMT aHstmt)
|
|||||||
/********** wxDb::GetNextError() **********/
|
/********** wxDb::GetNextError() **********/
|
||||||
bool wxDb::GetNextError(HENV aHenv, HDBC aHdbc, HSTMT aHstmt)
|
bool wxDb::GetNextError(HENV aHenv, HDBC aHdbc, HSTMT aHstmt)
|
||||||
{
|
{
|
||||||
if (SQLError(aHenv, aHdbc, aHstmt, (UCHAR FAR *) sqlState, &nativeError, (UCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS)
|
if (SQLError(aHenv, aHdbc, aHstmt, (SQLTCHAR FAR *) sqlState, &nativeError, (SQLTCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS)
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
else
|
else
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
@@ -1866,7 +1865,7 @@ bool wxDb::DropView(const wxString &viewName)
|
|||||||
cout << endl << sqlStmt.c_str() << endl;
|
cout << endl << sqlStmt.c_str() << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS)
|
if (SQLExecDirect(hstmt, (SQLTCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS)
|
||||||
{
|
{
|
||||||
// Check for "Base table not found" error and ignore
|
// Check for "Base table not found" error and ignore
|
||||||
GetNextError(henv, hdbc, hstmt);
|
GetNextError(henv, hdbc, hstmt);
|
||||||
@@ -1899,7 +1898,7 @@ bool wxDb::ExecSql(const wxString &pSqlStmt)
|
|||||||
|
|
||||||
SQLFreeStmt(hstmt, SQL_CLOSE);
|
SQLFreeStmt(hstmt, SQL_CLOSE);
|
||||||
|
|
||||||
retcode = SQLExecDirect(hstmt, (UCHAR FAR *) pSqlStmt.c_str(), SQL_NTS);
|
retcode = SQLExecDirect(hstmt, (SQLTCHAR FAR *) pSqlStmt.c_str(), SQL_NTS);
|
||||||
if (retcode == SQL_SUCCESS ||
|
if (retcode == SQL_SUCCESS ||
|
||||||
(Dbms() == dbmsDB2 && (retcode == SQL_SUCCESS_WITH_INFO || retcode == SQL_NO_DATA_FOUND)))
|
(Dbms() == dbmsDB2 && (retcode == SQL_SUCCESS_WITH_INFO || retcode == SQL_NO_DATA_FOUND)))
|
||||||
{
|
{
|
||||||
@@ -1977,7 +1976,7 @@ int wxDb::GetKeyFields(const wxString &tableName, wxDbColInf* colInf, UWORD noCo
|
|||||||
retcode = SQLPrimaryKeys(hstmt,
|
retcode = SQLPrimaryKeys(hstmt,
|
||||||
NULL, 0, /* Catalog name */
|
NULL, 0, /* Catalog name */
|
||||||
NULL, 0, /* Schema name */
|
NULL, 0, /* Schema name */
|
||||||
(UCHAR FAR *) tableName.c_str(), SQL_NTS); /* Table name */
|
(SQLTCHAR FAR *) tableName.c_str(), SQL_NTS); /* Table name */
|
||||||
|
|
||||||
/*---------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------*/
|
||||||
/* Fetch and display the result set. This will be a list of the */
|
/* Fetch and display the result set. This will be a list of the */
|
||||||
@@ -2004,7 +2003,7 @@ int wxDb::GetKeyFields(const wxString &tableName, wxDbColInf* colInf, UWORD noCo
|
|||||||
retcode = SQLForeignKeys(hstmt,
|
retcode = SQLForeignKeys(hstmt,
|
||||||
NULL, 0, /* Primary catalog */
|
NULL, 0, /* Primary catalog */
|
||||||
NULL, 0, /* Primary schema */
|
NULL, 0, /* Primary schema */
|
||||||
(UCHAR FAR *)tableName.c_str(), SQL_NTS,/* Primary table */
|
(SQLTCHAR FAR *)tableName.c_str(), SQL_NTS,/* Primary table */
|
||||||
NULL, 0, /* Foreign catalog */
|
NULL, 0, /* Foreign catalog */
|
||||||
NULL, 0, /* Foreign schema */
|
NULL, 0, /* Foreign schema */
|
||||||
NULL, 0); /* Foreign table */
|
NULL, 0); /* Foreign table */
|
||||||
@@ -2050,7 +2049,7 @@ int wxDb::GetKeyFields(const wxString &tableName, wxDbColInf* colInf, UWORD noCo
|
|||||||
NULL, 0, /* Primary table */
|
NULL, 0, /* Primary table */
|
||||||
NULL, 0, /* Foreign catalog */
|
NULL, 0, /* Foreign catalog */
|
||||||
NULL, 0, /* Foreign schema */
|
NULL, 0, /* Foreign schema */
|
||||||
(UCHAR *)tableName.c_str(), SQL_NTS);/* Foreign table */
|
(SQLTCHAR *)tableName.c_str(), SQL_NTS);/* Foreign table */
|
||||||
|
|
||||||
/*---------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------*/
|
||||||
/* Fetch and display the result set. This will be all of the */
|
/* Fetch and display the result set. This will be all of the */
|
||||||
@@ -2167,8 +2166,8 @@ wxDbColInf *wxDb::GetColumns(wxChar *tableName[], const wxChar *userID)
|
|||||||
{
|
{
|
||||||
retcode = SQLColumns(hstmt,
|
retcode = SQLColumns(hstmt,
|
||||||
NULL, 0, // All qualifiers
|
NULL, 0, // All qualifiers
|
||||||
(UCHAR *) UserID.c_str(), SQL_NTS, // Owner
|
(SQLTCHAR *) UserID.c_str(), SQL_NTS, // Owner
|
||||||
(UCHAR *) TableName.c_str(), SQL_NTS,
|
(SQLTCHAR *) TableName.c_str(), SQL_NTS,
|
||||||
NULL, 0); // All columns
|
NULL, 0); // All columns
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2176,7 +2175,7 @@ wxDbColInf *wxDb::GetColumns(wxChar *tableName[], const wxChar *userID)
|
|||||||
retcode = SQLColumns(hstmt,
|
retcode = SQLColumns(hstmt,
|
||||||
NULL, 0, // All qualifiers
|
NULL, 0, // All qualifiers
|
||||||
NULL, 0, // Owner
|
NULL, 0, // Owner
|
||||||
(UCHAR *) TableName.c_str(), SQL_NTS,
|
(SQLTCHAR *) TableName.c_str(), SQL_NTS,
|
||||||
NULL, 0); // All columns
|
NULL, 0); // All columns
|
||||||
}
|
}
|
||||||
if (retcode != SQL_SUCCESS)
|
if (retcode != SQL_SUCCESS)
|
||||||
@@ -2322,8 +2321,8 @@ wxDbColInf *wxDb::GetColumns(const wxString &tableName, UWORD *numCols, const wx
|
|||||||
{
|
{
|
||||||
retcode = SQLColumns(hstmt,
|
retcode = SQLColumns(hstmt,
|
||||||
NULL, 0, // All qualifiers
|
NULL, 0, // All qualifiers
|
||||||
(UCHAR *) UserID.c_str(), SQL_NTS, // Owner
|
(SQLTCHAR *) UserID.c_str(), SQL_NTS, // Owner
|
||||||
(UCHAR *) TableName.c_str(), SQL_NTS,
|
(SQLTCHAR *) TableName.c_str(), SQL_NTS,
|
||||||
NULL, 0); // All columns
|
NULL, 0); // All columns
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2331,7 +2330,7 @@ wxDbColInf *wxDb::GetColumns(const wxString &tableName, UWORD *numCols, const wx
|
|||||||
retcode = SQLColumns(hstmt,
|
retcode = SQLColumns(hstmt,
|
||||||
NULL, 0, // All qualifiers
|
NULL, 0, // All qualifiers
|
||||||
NULL, 0, // Owner
|
NULL, 0, // Owner
|
||||||
(UCHAR *) TableName.c_str(), SQL_NTS,
|
(SQLTCHAR *) TableName.c_str(), SQL_NTS,
|
||||||
NULL, 0); // All columns
|
NULL, 0); // All columns
|
||||||
}
|
}
|
||||||
if (retcode != SQL_SUCCESS)
|
if (retcode != SQL_SUCCESS)
|
||||||
@@ -2815,8 +2814,8 @@ int wxDb::GetColumnCount(const wxString &tableName, const wxChar *userID)
|
|||||||
{
|
{
|
||||||
retcode = SQLColumns(hstmt,
|
retcode = SQLColumns(hstmt,
|
||||||
NULL, 0, // All qualifiers
|
NULL, 0, // All qualifiers
|
||||||
(UCHAR *) UserID.c_str(), SQL_NTS, // Owner
|
(SQLTCHAR *) UserID.c_str(), SQL_NTS, // Owner
|
||||||
(UCHAR *) TableName.c_str(), SQL_NTS,
|
(SQLTCHAR *) TableName.c_str(), SQL_NTS,
|
||||||
NULL, 0); // All columns
|
NULL, 0); // All columns
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2824,7 +2823,7 @@ int wxDb::GetColumnCount(const wxString &tableName, const wxChar *userID)
|
|||||||
retcode = SQLColumns(hstmt,
|
retcode = SQLColumns(hstmt,
|
||||||
NULL, 0, // All qualifiers
|
NULL, 0, // All qualifiers
|
||||||
NULL, 0, // Owner
|
NULL, 0, // Owner
|
||||||
(UCHAR *) TableName.c_str(), SQL_NTS,
|
(SQLTCHAR *) TableName.c_str(), SQL_NTS,
|
||||||
NULL, 0); // All columns
|
NULL, 0); // All columns
|
||||||
}
|
}
|
||||||
if (retcode != SQL_SUCCESS)
|
if (retcode != SQL_SUCCESS)
|
||||||
@@ -2906,7 +2905,7 @@ wxDbInf *wxDb::GetCatalog(const wxChar *userID)
|
|||||||
{
|
{
|
||||||
retcode = SQLTables(hstmt,
|
retcode = SQLTables(hstmt,
|
||||||
NULL, 0, // All qualifiers
|
NULL, 0, // All qualifiers
|
||||||
(UCHAR *) UserID.c_str(), SQL_NTS, // User specified
|
(SQLTCHAR *) UserID.c_str(), SQL_NTS, // User specified
|
||||||
NULL, 0, // All tables
|
NULL, 0, // All tables
|
||||||
NULL, 0); // All columns
|
NULL, 0); // All columns
|
||||||
}
|
}
|
||||||
@@ -2995,7 +2994,7 @@ bool wxDb::Catalog(const wxChar *userID, const wxString &fileName)
|
|||||||
wxChar typeName[30+1];
|
wxChar typeName[30+1];
|
||||||
SDWORD precision, length;
|
SDWORD precision, length;
|
||||||
|
|
||||||
FILE *fp = fopen(fileName.c_str(),wxT("wt"));
|
FILE *fp = wxFopen(fileName.c_str(),wxT("wt"));
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|
||||||
@@ -3012,7 +3011,7 @@ bool wxDb::Catalog(const wxChar *userID, const wxString &fileName)
|
|||||||
{
|
{
|
||||||
retcode = SQLColumns(hstmt,
|
retcode = SQLColumns(hstmt,
|
||||||
NULL, 0, // All qualifiers
|
NULL, 0, // All qualifiers
|
||||||
(UCHAR *) UserID.c_str(), SQL_NTS, // User specified
|
(SQLTCHAR *) UserID.c_str(), SQL_NTS, // User specified
|
||||||
NULL, 0, // All tables
|
NULL, 0, // All tables
|
||||||
NULL, 0); // All columns
|
NULL, 0); // All columns
|
||||||
}
|
}
|
||||||
@@ -3044,20 +3043,20 @@ bool wxDb::Catalog(const wxChar *userID, const wxString &fileName)
|
|||||||
if (wxStrcmp(tblName, tblNameSave.c_str()))
|
if (wxStrcmp(tblName, tblNameSave.c_str()))
|
||||||
{
|
{
|
||||||
if (cnt)
|
if (cnt)
|
||||||
fputs(wxT("\n"), fp);
|
wxFputs(wxT("\n"), fp);
|
||||||
fputs(wxT("================================ "), fp);
|
wxFputs(wxT("================================ "), fp);
|
||||||
fputs(wxT("================================ "), fp);
|
wxFputs(wxT("================================ "), fp);
|
||||||
fputs(wxT("===================== "), fp);
|
wxFputs(wxT("===================== "), fp);
|
||||||
fputs(wxT("========= "), fp);
|
wxFputs(wxT("========= "), fp);
|
||||||
fputs(wxT("=========\n"), fp);
|
wxFputs(wxT("=========\n"), fp);
|
||||||
outStr.Printf(wxT("%-32s %-32s %-21s %9s %9s\n"),
|
outStr.Printf(wxT("%-32s %-32s %-21s %9s %9s\n"),
|
||||||
wxT("TABLE NAME"), wxT("COLUMN NAME"), wxT("DATA TYPE"), wxT("PRECISION"), wxT("LENGTH"));
|
wxT("TABLE NAME"), wxT("COLUMN NAME"), wxT("DATA TYPE"), wxT("PRECISION"), wxT("LENGTH"));
|
||||||
fputs(outStr.c_str(), fp);
|
wxFputs(outStr.c_str(), fp);
|
||||||
fputs(wxT("================================ "), fp);
|
wxFputs(wxT("================================ "), fp);
|
||||||
fputs(wxT("================================ "), fp);
|
wxFputs(wxT("================================ "), fp);
|
||||||
fputs(wxT("===================== "), fp);
|
wxFputs(wxT("===================== "), fp);
|
||||||
fputs(wxT("========= "), fp);
|
wxFputs(wxT("========= "), fp);
|
||||||
fputs(wxT("=========\n"), fp);
|
wxFputs(wxT("=========\n"), fp);
|
||||||
tblNameSave = tblName;
|
tblNameSave = tblName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3070,7 +3069,7 @@ bool wxDb::Catalog(const wxChar *userID, const wxString &fileName)
|
|||||||
|
|
||||||
outStr.Printf(wxT("%-32s %-32s (%04d)%-15s %9ld %9ld\n"),
|
outStr.Printf(wxT("%-32s %-32s (%04d)%-15s %9ld %9ld\n"),
|
||||||
tblName, colName, sqlDataType, typeName, precision, length);
|
tblName, colName, sqlDataType, typeName, precision, length);
|
||||||
if (fputs(outStr.c_str(), fp) == EOF)
|
if (wxFputs(outStr.c_str(), fp) == EOF)
|
||||||
{
|
{
|
||||||
SQLFreeStmt(hstmt, SQL_CLOSE);
|
SQLFreeStmt(hstmt, SQL_CLOSE);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
@@ -3145,8 +3144,8 @@ bool wxDb::TableExists(const wxString &tableName, const wxChar *userID, const wx
|
|||||||
{
|
{
|
||||||
retcode = SQLTables(hstmt,
|
retcode = SQLTables(hstmt,
|
||||||
NULL, 0, // All qualifiers
|
NULL, 0, // All qualifiers
|
||||||
(UCHAR *) UserID.c_str(), SQL_NTS, // Only tables owned by this user
|
(SQLTCHAR *) UserID.c_str(), SQL_NTS, // Only tables owned by this user
|
||||||
(UCHAR FAR *)TableName.c_str(), SQL_NTS,
|
(SQLTCHAR FAR *)TableName.c_str(), SQL_NTS,
|
||||||
NULL, 0); // All table types
|
NULL, 0); // All table types
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -3154,7 +3153,7 @@ bool wxDb::TableExists(const wxString &tableName, const wxChar *userID, const wx
|
|||||||
retcode = SQLTables(hstmt,
|
retcode = SQLTables(hstmt,
|
||||||
NULL, 0, // All qualifiers
|
NULL, 0, // All qualifiers
|
||||||
NULL, 0, // All owners
|
NULL, 0, // All owners
|
||||||
(UCHAR FAR *)TableName.c_str(), SQL_NTS,
|
(SQLTCHAR FAR *)TableName.c_str(), SQL_NTS,
|
||||||
NULL, 0); // All table types
|
NULL, 0); // All table types
|
||||||
}
|
}
|
||||||
if (retcode != SQL_SUCCESS)
|
if (retcode != SQL_SUCCESS)
|
||||||
@@ -3176,7 +3175,7 @@ bool wxDb::TableExists(const wxString &tableName, const wxChar *userID, const wx
|
|||||||
|
|
||||||
/********** wxDb::TablePrivileges() **********/
|
/********** wxDb::TablePrivileges() **********/
|
||||||
bool wxDb::TablePrivileges(const wxString &tableName, const wxString &priv, const wxChar *userID,
|
bool wxDb::TablePrivileges(const wxString &tableName, const wxString &priv, const wxChar *userID,
|
||||||
const wxChar *schema, const wxString &tablePath)
|
const wxChar *schema, const wxString &WXUNUSED(tablePath))
|
||||||
{
|
{
|
||||||
wxASSERT(tableName.Length());
|
wxASSERT(tableName.Length());
|
||||||
|
|
||||||
@@ -3212,19 +3211,19 @@ bool wxDb::TablePrivileges(const wxString &tableName, const wxString &priv, cons
|
|||||||
{
|
{
|
||||||
retcode = SQLTablePrivileges(hstmt,
|
retcode = SQLTablePrivileges(hstmt,
|
||||||
NULL, 0, // Catalog
|
NULL, 0, // Catalog
|
||||||
(UCHAR FAR *)Schema.c_str(), SQL_NTS, // Schema
|
(SQLTCHAR FAR *)Schema.c_str(), SQL_NTS, // Schema
|
||||||
(UCHAR FAR *)TableName.c_str(), SQL_NTS);
|
(SQLTCHAR FAR *)TableName.c_str(), SQL_NTS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
retcode = SQLTablePrivileges(hstmt,
|
retcode = SQLTablePrivileges(hstmt,
|
||||||
NULL, 0, // Catalog
|
NULL, 0, // Catalog
|
||||||
NULL, 0, // Schema
|
NULL, 0, // Schema
|
||||||
(UCHAR FAR *)TableName.c_str(), SQL_NTS);
|
(SQLTCHAR FAR *)TableName.c_str(), SQL_NTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DBDEBUG_CONSOLE
|
#ifdef DBDEBUG_CONSOLE
|
||||||
fprintf(stderr ,wxT("SQLTablePrivileges() returned %i \n"),retcode);
|
wxFprintf(stderr ,wxT("SQLTablePrivileges() returned %i \n"),retcode);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((retcode != SQL_SUCCESS) && (retcode != SQL_SUCCESS_WITH_INFO))
|
if ((retcode != SQL_SUCCESS) && (retcode != SQL_SUCCESS_WITH_INFO))
|
||||||
@@ -3260,7 +3259,7 @@ bool wxDb::TablePrivileges(const wxString &tableName, const wxString &priv, cons
|
|||||||
return(DispAllErrors(henv, hdbc, hstmt));
|
return(DispAllErrors(henv, hdbc, hstmt));
|
||||||
}
|
}
|
||||||
#ifdef DBDEBUG_CONSOLE
|
#ifdef DBDEBUG_CONSOLE
|
||||||
fprintf(stderr,wxT("Scanning %s privilege on table %s.%s granted by %s to %s\n"),
|
wxFprintf(stderr,wxT("Scanning %s privilege on table %s.%s granted by %s to %s\n"),
|
||||||
result.privilege,result.tableOwner,result.tableName,
|
result.privilege,result.tableOwner,result.tableName,
|
||||||
result.grantor, result.grantee);
|
result.grantor, result.grantee);
|
||||||
#endif
|
#endif
|
||||||
@@ -3299,10 +3298,10 @@ const wxString wxDb::SQLTableName(const wxChar *tableName)
|
|||||||
wxString TableName;
|
wxString TableName;
|
||||||
|
|
||||||
if (Dbms() == dbmsACCESS)
|
if (Dbms() == dbmsACCESS)
|
||||||
TableName = '"';
|
TableName = _T("\"");
|
||||||
TableName += tableName;
|
TableName += tableName;
|
||||||
if (Dbms() == dbmsACCESS)
|
if (Dbms() == dbmsACCESS)
|
||||||
TableName += '"';
|
TableName += _T("\"");
|
||||||
|
|
||||||
return TableName;
|
return TableName;
|
||||||
} // wxDb::SQLTableName()
|
} // wxDb::SQLTableName()
|
||||||
@@ -3313,10 +3312,10 @@ const wxString wxDb::SQLColumnName(const wxChar *colName)
|
|||||||
wxString ColName;
|
wxString ColName;
|
||||||
|
|
||||||
if (Dbms() == dbmsACCESS)
|
if (Dbms() == dbmsACCESS)
|
||||||
ColName = '"';
|
ColName = _T("\"");
|
||||||
ColName += colName;
|
ColName += colName;
|
||||||
if (Dbms() == dbmsACCESS)
|
if (Dbms() == dbmsACCESS)
|
||||||
ColName += '"';
|
ColName += _T("\"");
|
||||||
|
|
||||||
return ColName;
|
return ColName;
|
||||||
} // wxDb::SQLColumnName()
|
} // wxDb::SQLColumnName()
|
||||||
@@ -3332,7 +3331,7 @@ bool wxDb::SetSqlLogging(wxDbSqlLogState state, const wxString &filename, bool a
|
|||||||
{
|
{
|
||||||
if (fpSqlLog == 0)
|
if (fpSqlLog == 0)
|
||||||
{
|
{
|
||||||
fpSqlLog = fopen(filename, (append ? wxT("at") : wxT("wt")));
|
fpSqlLog = wxFopen(filename, (append ? wxT("at") : wxT("wt")));
|
||||||
if (fpSqlLog == NULL)
|
if (fpSqlLog == NULL)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
@@ -3361,11 +3360,11 @@ bool wxDb::WriteSqlLog(const wxString &logMsg)
|
|||||||
if (fpSqlLog == 0 || sqlLogState == sqlLogOFF)
|
if (fpSqlLog == 0 || sqlLogState == sqlLogOFF)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|
||||||
if (fputs(wxT("\n"), fpSqlLog) == EOF)
|
if (wxFputs(wxT("\n"), fpSqlLog) == EOF)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
if (fputs(logMsg, fpSqlLog) == EOF)
|
if (wxFputs(logMsg, fpSqlLog) == EOF)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
if (fputs(wxT("\n"), fpSqlLog) == EOF)
|
if (wxFputs(wxT("\n"), fpSqlLog) == EOF)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
@@ -3557,10 +3556,10 @@ bool wxDb::ModifyColumn(const wxString &tableName, const wxString &columnName,
|
|||||||
switch (Dbms())
|
switch (Dbms())
|
||||||
{
|
{
|
||||||
case dbmsORACLE :
|
case dbmsORACLE :
|
||||||
alterSlashModify = "MODIFY";
|
alterSlashModify = _T("MODIFY");
|
||||||
break;
|
break;
|
||||||
case dbmsMS_SQL_SERVER :
|
case dbmsMS_SQL_SERVER :
|
||||||
alterSlashModify = "ALTER COLUMN";
|
alterSlashModify = _T("ALTER COLUMN");
|
||||||
break;
|
break;
|
||||||
case dbmsUNIDENTIFIED :
|
case dbmsUNIDENTIFIED :
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -3572,7 +3571,7 @@ bool wxDb::ModifyColumn(const wxString &tableName, const wxString &columnName,
|
|||||||
case dbmsDBASE :
|
case dbmsDBASE :
|
||||||
case dbmsXBASE_SEQUITER :
|
case dbmsXBASE_SEQUITER :
|
||||||
default :
|
default :
|
||||||
alterSlashModify = "MODIFY";
|
alterSlashModify = _T("MODIFY");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3590,7 +3589,7 @@ bool wxDb::ModifyColumn(const wxString &tableName, const wxString &columnName,
|
|||||||
|
|
||||||
// For varchars only, append the size of the column
|
// For varchars only, append the size of the column
|
||||||
if (dataType == DB_DATA_TYPE_VARCHAR &&
|
if (dataType == DB_DATA_TYPE_VARCHAR &&
|
||||||
(Dbms() != dbmsMY_SQL || dataTypeName != "text"))
|
(Dbms() != dbmsMY_SQL || dataTypeName != _T("text")))
|
||||||
{
|
{
|
||||||
wxString s;
|
wxString s;
|
||||||
s.Printf(wxT("(%lu)"), columnLength);
|
s.Printf(wxT("(%lu)"), columnLength);
|
||||||
@@ -3918,8 +3917,8 @@ bool wxDbGetDataSource(HENV henv, wxChar *Dsn, SWORD DsnMax, wxChar *DsDesc,
|
|||||||
{
|
{
|
||||||
SWORD cb1,cb2;
|
SWORD cb1,cb2;
|
||||||
|
|
||||||
if (SQLDataSources(henv, direction, (UCHAR FAR *) Dsn, DsnMax, &cb1,
|
if (SQLDataSources(henv, direction, (SQLTCHAR FAR *) Dsn, DsnMax, &cb1,
|
||||||
(UCHAR FAR *) DsDesc, DsDescMax, &cb2) == SQL_SUCCESS)
|
(SQLTCHAR FAR *) DsDesc, DsDescMax, &cb2) == SQL_SUCCESS)
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
else
|
else
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
@@ -263,7 +263,7 @@ bool wxDbGridTableBase::AssignDbTable(wxDbTable *tab, int count, bool takeOwners
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxDbGridTableBase::GetTypeName(int row, int col)
|
wxString wxDbGridTableBase::GetTypeName(int WXUNUSED(row), int col)
|
||||||
{
|
{
|
||||||
if (GetNumberCols() > col)
|
if (GetNumberCols() > col)
|
||||||
{
|
{
|
||||||
@@ -370,7 +370,7 @@ bool wxDbGridTableBase::CanGetValueAs(int row, int col, const wxString& typeName
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxDbGridTableBase::CanSetValueAs(int row, int col, const wxString& typeName)
|
bool wxDbGridTableBase::CanSetValueAs(int WXUNUSED(row), int col, const wxString& typeName)
|
||||||
{
|
{
|
||||||
if (typeName == wxGRID_VALUE_STRING)
|
if (typeName == wxGRID_VALUE_STRING)
|
||||||
{
|
{
|
||||||
@@ -680,7 +680,7 @@ void wxDbGridTableBase::ValidateRow(int row)
|
|||||||
m_data->SetKey(k);
|
m_data->SetKey(k);
|
||||||
if (!m_data->QueryOnKeyFields())
|
if (!m_data->QueryOnKeyFields())
|
||||||
{
|
{
|
||||||
wxDbLogExtendedErrorMsg("ODBC error during Query()\n\n", m_data->GetDb(),__FILE__,__LINE__);
|
wxDbLogExtendedErrorMsg(_T("ODBC error during Query()\n\n"), m_data->GetDb(),__TFILE__,__LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_data->GetNext();
|
m_data->GetNext();
|
||||||
|
@@ -80,7 +80,7 @@ ULONG lastTableID = 0;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void csstrncpyt(char *target, const char *source, int n)
|
void csstrncpyt(wxChar *target, const wxChar *source, int n)
|
||||||
{
|
{
|
||||||
while ( (*target++ = *source++) != '\0' && --n )
|
while ( (*target++ = *source++) != '\0' && --n )
|
||||||
;
|
;
|
||||||
@@ -614,7 +614,7 @@ bool wxDbTable::execDelete(const wxString &pSqlStmt)
|
|||||||
RETCODE retcode;
|
RETCODE retcode;
|
||||||
|
|
||||||
// Execute the DELETE statement
|
// Execute the DELETE statement
|
||||||
retcode = SQLExecDirect(hstmtDelete, (UCHAR FAR *) pSqlStmt.c_str(), SQL_NTS);
|
retcode = SQLExecDirect(hstmtDelete, (SQLTCHAR FAR *) pSqlStmt.c_str(), SQL_NTS);
|
||||||
|
|
||||||
if (retcode == SQL_SUCCESS ||
|
if (retcode == SQL_SUCCESS ||
|
||||||
retcode == SQL_NO_DATA_FOUND ||
|
retcode == SQL_NO_DATA_FOUND ||
|
||||||
@@ -636,7 +636,7 @@ bool wxDbTable::execUpdate(const wxString &pSqlStmt)
|
|||||||
RETCODE retcode;
|
RETCODE retcode;
|
||||||
|
|
||||||
// Execute the UPDATE statement
|
// Execute the UPDATE statement
|
||||||
retcode = SQLExecDirect(hstmtUpdate, (UCHAR FAR *) pSqlStmt.c_str(), SQL_NTS);
|
retcode = SQLExecDirect(hstmtUpdate, (SQLTCHAR FAR *) pSqlStmt.c_str(), SQL_NTS);
|
||||||
|
|
||||||
if (retcode == SQL_SUCCESS ||
|
if (retcode == SQL_SUCCESS ||
|
||||||
retcode == SQL_NO_DATA_FOUND ||
|
retcode == SQL_NO_DATA_FOUND ||
|
||||||
@@ -648,7 +648,8 @@ bool wxDbTable::execUpdate(const wxString &pSqlStmt)
|
|||||||
else if (retcode == SQL_NEED_DATA)
|
else if (retcode == SQL_NEED_DATA)
|
||||||
{
|
{
|
||||||
PTR pParmID;
|
PTR pParmID;
|
||||||
while ((retcode = SQLParamData(hstmtUpdate, &pParmID) == SQL_NEED_DATA))
|
retcode = SQLParamData(hstmtUpdate, &pParmID);
|
||||||
|
while (retcode == SQL_NEED_DATA)
|
||||||
{
|
{
|
||||||
// Find the parameter
|
// Find the parameter
|
||||||
int i;
|
int i;
|
||||||
@@ -706,7 +707,7 @@ bool wxDbTable::query(int queryType, bool forUpdate, bool distinct, const wxStri
|
|||||||
|
|
||||||
// Execute the SQL SELECT statement
|
// Execute the SQL SELECT statement
|
||||||
int retcode;
|
int retcode;
|
||||||
retcode = SQLExecDirect(hstmt, (UCHAR FAR *) (queryType == DB_SELECT_STATEMENT ? pSqlStmt.c_str() : sqlStmt.c_str()), SQL_NTS);
|
retcode = SQLExecDirect(hstmt, (SQLTCHAR FAR *) (queryType == DB_SELECT_STATEMENT ? pSqlStmt.c_str() : sqlStmt.c_str()), SQL_NTS);
|
||||||
if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO)
|
if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO)
|
||||||
return(pDb->DispAllErrors(henv, hdbc, hstmt));
|
return(pDb->DispAllErrors(henv, hdbc, hstmt));
|
||||||
|
|
||||||
@@ -837,7 +838,7 @@ bool wxDbTable::Open(bool checkPrivileges, bool checkTableExists)
|
|||||||
// Prepare the insert statement for execution
|
// Prepare the insert statement for execution
|
||||||
if (insertableCount)
|
if (insertableCount)
|
||||||
{
|
{
|
||||||
if (SQLPrepare(hstmtInsert, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS)
|
if (SQLPrepare(hstmtInsert, (SQLTCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS)
|
||||||
return(pDb->DispAllErrors(henv, hdbc, hstmtInsert));
|
return(pDb->DispAllErrors(henv, hdbc, hstmtInsert));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1426,7 +1427,7 @@ bool wxDbTable::CreateTable(bool attemptDrop)
|
|||||||
}
|
}
|
||||||
// For varchars, append the size of the string
|
// For varchars, append the size of the string
|
||||||
if (colDefs[i].DbDataType == DB_DATA_TYPE_VARCHAR &&
|
if (colDefs[i].DbDataType == DB_DATA_TYPE_VARCHAR &&
|
||||||
(pDb->Dbms() != dbmsMY_SQL || pDb->GetTypeInfVarchar().TypeName != "text"))// ||
|
(pDb->Dbms() != dbmsMY_SQL || pDb->GetTypeInfVarchar().TypeName != _T("text")))// ||
|
||||||
// colDefs[i].DbDataType == DB_DATA_TYPE_BLOB)
|
// colDefs[i].DbDataType == DB_DATA_TYPE_BLOB)
|
||||||
{
|
{
|
||||||
wxString s;
|
wxString s;
|
||||||
@@ -1532,7 +1533,7 @@ bool wxDbTable::CreateTable(bool attemptDrop)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Execute the CREATE TABLE statement
|
// Execute the CREATE TABLE statement
|
||||||
RETCODE retcode = SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS);
|
RETCODE retcode = SQLExecDirect(hstmt, (SQLTCHAR FAR *) sqlStmt.c_str(), SQL_NTS);
|
||||||
if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO)
|
if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO)
|
||||||
{
|
{
|
||||||
pDb->DispAllErrors(henv, hdbc, hstmt);
|
pDb->DispAllErrors(henv, hdbc, hstmt);
|
||||||
@@ -1572,7 +1573,7 @@ bool wxDbTable::DropTable()
|
|||||||
cout << endl << sqlStmt.c_str() << endl;
|
cout << endl << sqlStmt.c_str() << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RETCODE retcode = SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS);
|
RETCODE retcode = SQLExecDirect(hstmt, (SQLTCHAR FAR *) sqlStmt.c_str(), SQL_NTS);
|
||||||
if (retcode != SQL_SUCCESS)
|
if (retcode != SQL_SUCCESS)
|
||||||
{
|
{
|
||||||
// Check for "Base table not found" error and ignore
|
// Check for "Base table not found" error and ignore
|
||||||
@@ -1652,11 +1653,14 @@ bool wxDbTable::CreateIndex(const wxString &idxName, bool unique, UWORD noIdxCol
|
|||||||
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
// retcode is not used
|
||||||
wxODBC_ERRORS retcode;
|
wxODBC_ERRORS retcode;
|
||||||
// Oracle returns a DB_ERR_GENERAL_ERROR if the column is already
|
// Oracle returns a DB_ERR_GENERAL_ERROR if the column is already
|
||||||
// defined to be NOT NULL, but reportedly MySQL doesn't mind.
|
// defined to be NOT NULL, but reportedly MySQL doesn't mind.
|
||||||
// This line is just here for debug checking of the value
|
// This line is just here for debug checking of the value
|
||||||
retcode = (wxODBC_ERRORS)pDb->DB_STATUS;
|
retcode = (wxODBC_ERRORS)pDb->DB_STATUS;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1712,7 +1716,7 @@ bool wxDbTable::CreateIndex(const wxString &idxName, bool unique, UWORD noIdxCol
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Postgres and SQL Server 7 do not support the ASC/DESC keywords for index columns
|
// Postgres and SQL Server 7 do not support the ASC/DESC keywords for index columns
|
||||||
if (!((pDb->Dbms() == dbmsMS_SQL_SERVER) && (strncmp(pDb->dbInf.dbmsVer,"07",2)==0)) &&
|
if (!((pDb->Dbms() == dbmsMS_SQL_SERVER) && (wxStrncmp(pDb->dbInf.dbmsVer,_T("07"),2)==0)) &&
|
||||||
!(pDb->Dbms() == dbmsPOSTGRES))
|
!(pDb->Dbms() == dbmsPOSTGRES))
|
||||||
{
|
{
|
||||||
if (pIdxDefs[i].Ascending)
|
if (pIdxDefs[i].Ascending)
|
||||||
@@ -1721,7 +1725,7 @@ bool wxDbTable::CreateIndex(const wxString &idxName, bool unique, UWORD noIdxCol
|
|||||||
sqlStmt += wxT(" DESC");
|
sqlStmt += wxT(" DESC");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
wxASSERT_MSG(pIdxDefs[i].Ascending, "Datasource does not support DESCending index columns");
|
wxASSERT_MSG(pIdxDefs[i].Ascending, _T("Datasource does not support DESCending index columns"));
|
||||||
|
|
||||||
if ((i + 1) < noIdxCols)
|
if ((i + 1) < noIdxCols)
|
||||||
sqlStmt += wxT(",");
|
sqlStmt += wxT(",");
|
||||||
@@ -1737,7 +1741,7 @@ bool wxDbTable::CreateIndex(const wxString &idxName, bool unique, UWORD noIdxCol
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Execute the CREATE INDEX statement
|
// Execute the CREATE INDEX statement
|
||||||
if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS)
|
if (SQLExecDirect(hstmt, (SQLTCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS)
|
||||||
{
|
{
|
||||||
pDb->DispAllErrors(henv, hdbc, hstmt);
|
pDb->DispAllErrors(henv, hdbc, hstmt);
|
||||||
pDb->RollbackTrans();
|
pDb->RollbackTrans();
|
||||||
@@ -1788,7 +1792,7 @@ bool wxDbTable::DropIndex(const wxString &idxName)
|
|||||||
cout << endl << sqlStmt.c_str() << endl;
|
cout << endl << sqlStmt.c_str() << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS)
|
if (SQLExecDirect(hstmt, (SQLTCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS)
|
||||||
{
|
{
|
||||||
// Check for "Index not found" error and ignore
|
// Check for "Index not found" error and ignore
|
||||||
pDb->GetNextError(henv, hdbc, hstmt);
|
pDb->GetNextError(henv, hdbc, hstmt);
|
||||||
@@ -1888,7 +1892,8 @@ int wxDbTable::Insert(void)
|
|||||||
if (retcode == SQL_NEED_DATA)
|
if (retcode == SQL_NEED_DATA)
|
||||||
{
|
{
|
||||||
PTR pParmID;
|
PTR pParmID;
|
||||||
while ((retcode = SQLParamData(hstmtInsert, &pParmID) == SQL_NEED_DATA))
|
retcode = SQLParamData(hstmtInsert, &pParmID);
|
||||||
|
while (retcode == SQL_NEED_DATA)
|
||||||
{
|
{
|
||||||
// Find the parameter
|
// Find the parameter
|
||||||
int i;
|
int i;
|
||||||
@@ -2389,7 +2394,7 @@ ULONG wxDbTable::Count(const wxString &args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute the SQL statement
|
// Execute the SQL statement
|
||||||
if (SQLExecDirect(*hstmtCount, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS)
|
if (SQLExecDirect(*hstmtCount, (SQLTCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS)
|
||||||
{
|
{
|
||||||
pDb->DispAllErrors(henv, hdbc, *hstmtCount);
|
pDb->DispAllErrors(henv, hdbc, *hstmtCount);
|
||||||
return(0);
|
return(0);
|
||||||
@@ -2429,8 +2434,8 @@ bool wxDbTable::Refresh(void)
|
|||||||
hstmt = hstmtInternal;
|
hstmt = hstmtInternal;
|
||||||
#if wxODBC_BACKWARD_COMPATABILITY
|
#if wxODBC_BACKWARD_COMPATABILITY
|
||||||
// Save the where and order by clauses
|
// Save the where and order by clauses
|
||||||
char *saveWhere = where;
|
wxChar *saveWhere = where;
|
||||||
char *saveOrderBy = orderBy;
|
wxChar *saveOrderBy = orderBy;
|
||||||
#else
|
#else
|
||||||
wxString saveWhere = where;
|
wxString saveWhere = where;
|
||||||
wxString saveOrderBy = orderBy;
|
wxString saveOrderBy = orderBy;
|
||||||
@@ -2647,10 +2652,10 @@ wxVariant wxDbTable::GetCol(const int colNo) const
|
|||||||
val = (long)(*(unsigned long *)(colDefs[colNo].PtrDataObj));
|
val = (long)(*(unsigned long *)(colDefs[colNo].PtrDataObj));
|
||||||
break;
|
break;
|
||||||
case SQL_C_TINYINT:
|
case SQL_C_TINYINT:
|
||||||
val = (long)(*(char *)(colDefs[colNo].PtrDataObj));
|
val = (long)(*(wxChar *)(colDefs[colNo].PtrDataObj));
|
||||||
break;
|
break;
|
||||||
case SQL_C_UTINYINT:
|
case SQL_C_UTINYINT:
|
||||||
val = (long)(*(unsigned char *)(colDefs[colNo].PtrDataObj));
|
val = (long)(*(wxChar *)(colDefs[colNo].PtrDataObj));
|
||||||
break;
|
break;
|
||||||
case SQL_C_USHORT:
|
case SQL_C_USHORT:
|
||||||
val = (long)(*(UWORD *)(colDefs[colNo].PtrDataObj));
|
val = (long)(*(UWORD *)(colDefs[colNo].PtrDataObj));
|
||||||
@@ -2697,7 +2702,7 @@ void wxDbTable::SetCol(const int colNo, const wxVariant val)
|
|||||||
{
|
{
|
||||||
case SQL_CHAR:
|
case SQL_CHAR:
|
||||||
case SQL_VARCHAR:
|
case SQL_VARCHAR:
|
||||||
csstrncpyt((char *)(colDefs[colNo].PtrDataObj),
|
csstrncpyt((wxChar *)(colDefs[colNo].PtrDataObj),
|
||||||
val.GetString().c_str(),
|
val.GetString().c_str(),
|
||||||
colDefs[colNo].SzDataObj-1);
|
colDefs[colNo].SzDataObj-1);
|
||||||
break;
|
break;
|
||||||
@@ -2713,10 +2718,10 @@ void wxDbTable::SetCol(const int colNo, const wxVariant val)
|
|||||||
*(unsigned long *)(colDefs[colNo].PtrDataObj) = val.GetLong();
|
*(unsigned long *)(colDefs[colNo].PtrDataObj) = val.GetLong();
|
||||||
break;
|
break;
|
||||||
case SQL_C_TINYINT:
|
case SQL_C_TINYINT:
|
||||||
*(char *)(colDefs[colNo].PtrDataObj) = val.GetChar();
|
*(wxChar *)(colDefs[colNo].PtrDataObj) = val.GetChar();
|
||||||
break;
|
break;
|
||||||
case SQL_C_UTINYINT:
|
case SQL_C_UTINYINT:
|
||||||
*(unsigned char *)(colDefs[colNo].PtrDataObj) = val.GetChar();
|
*(wxChar *)(colDefs[colNo].PtrDataObj) = val.GetChar();
|
||||||
break;
|
break;
|
||||||
case SQL_C_USHORT:
|
case SQL_C_USHORT:
|
||||||
*(unsigned short *)(colDefs[colNo].PtrDataObj) = val.GetLong();
|
*(unsigned short *)(colDefs[colNo].PtrDataObj) = val.GetLong();
|
||||||
|
@@ -1561,7 +1561,11 @@ void wxPostScriptDC::DoDrawSpline( wxList *points )
|
|||||||
|
|
||||||
SetPen( m_pen );
|
SetPen( m_pen );
|
||||||
|
|
||||||
double a, b, c, d, x1, y1, x2, y2, x3, y3;
|
#if 0
|
||||||
|
// a and b are not used
|
||||||
|
double a, b;
|
||||||
|
#endif
|
||||||
|
double c, d, x1, y1, x2, y2, x3, y3;
|
||||||
wxPoint *p, *q;
|
wxPoint *p, *q;
|
||||||
|
|
||||||
wxList::compatibility_iterator node = points->GetFirst();
|
wxList::compatibility_iterator node = points->GetFirst();
|
||||||
@@ -1573,8 +1577,16 @@ void wxPostScriptDC::DoDrawSpline( wxList *points )
|
|||||||
p = (wxPoint *)node->GetData();
|
p = (wxPoint *)node->GetData();
|
||||||
c = p->x;
|
c = p->x;
|
||||||
d = p->y;
|
d = p->y;
|
||||||
x3 = a = (double)(x1 + c) / 2;
|
x3 =
|
||||||
y3 = b = (double)(y1 + d) / 2;
|
#if 0
|
||||||
|
a =
|
||||||
|
#endif
|
||||||
|
(double)(x1 + c) / 2;
|
||||||
|
y3 =
|
||||||
|
#if 0
|
||||||
|
b =
|
||||||
|
#endif
|
||||||
|
(double)(y1 + d) / 2;
|
||||||
|
|
||||||
fprintf( m_pstream,
|
fprintf( m_pstream,
|
||||||
"newpath\n"
|
"newpath\n"
|
||||||
@@ -1586,7 +1598,8 @@ void wxPostScriptDC::DoDrawSpline( wxList *points )
|
|||||||
CalcBoundingBox( (wxCoord)x1, (wxCoord)y1 );
|
CalcBoundingBox( (wxCoord)x1, (wxCoord)y1 );
|
||||||
CalcBoundingBox( (wxCoord)x3, (wxCoord)y3 );
|
CalcBoundingBox( (wxCoord)x3, (wxCoord)y3 );
|
||||||
|
|
||||||
while ((node = node->GetNext()))
|
node = node->GetNext();
|
||||||
|
while (node)
|
||||||
{
|
{
|
||||||
q = (wxPoint *)node->GetData();
|
q = (wxPoint *)node->GetData();
|
||||||
|
|
||||||
|
@@ -2838,12 +2838,15 @@ bool wxListMainWindow::OnRenameAccept(size_t itemEdit, const wxString& value)
|
|||||||
# pragma message disable initnotreach
|
# pragma message disable initnotreach
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void wxListMainWindow::OnRenameCancelled(size_t itemEdit)
|
void wxListMainWindow::OnRenameCancelled(size_t WXUNUSED(itemEdit))
|
||||||
{
|
{
|
||||||
// wxMSW seems not to notify the program about
|
// wxMSW seems not to notify the program about
|
||||||
// cancelled label edits.
|
// cancelled label edits.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// above unconditional return cause warning about not reachable code
|
||||||
|
|
||||||
// let owner know that the edit was cancelled
|
// let owner know that the edit was cancelled
|
||||||
wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetParent()->GetId() );
|
wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetParent()->GetId() );
|
||||||
|
|
||||||
@@ -2860,6 +2863,7 @@ void wxListMainWindow::OnRenameCancelled(size_t itemEdit)
|
|||||||
data->GetItem( 0, le.m_item );
|
data->GetItem( 0, le.m_item );
|
||||||
|
|
||||||
GetEventHandler()->ProcessEvent( le );
|
GetEventHandler()->ProcessEvent( le );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef __VMS__
|
#ifdef __VMS__
|
||||||
# pragma message enable initnotreach
|
# pragma message enable initnotreach
|
||||||
@@ -3965,13 +3969,19 @@ void wxListMainWindow::RecalculatePositions(bool noRefresh)
|
|||||||
// the window, we recalculate after subtracting the space taken by the
|
// the window, we recalculate after subtracting the space taken by the
|
||||||
// scrollbar
|
// scrollbar
|
||||||
|
|
||||||
int entireWidth = 0,
|
int entireWidth = 0;
|
||||||
entireHeight = 0;
|
#if 0
|
||||||
|
// entireHeight is not used so no need to define it
|
||||||
|
int entireHeight = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
for (int tries = 0; tries < 2; tries++)
|
for (int tries = 0; tries < 2; tries++)
|
||||||
{
|
{
|
||||||
entireWidth = 2*EXTRA_BORDER_X;
|
entireWidth = 2*EXTRA_BORDER_X;
|
||||||
|
#if 0
|
||||||
|
// entireHeight is not used so no need to define it
|
||||||
entireHeight = 2*EXTRA_BORDER_Y;
|
entireHeight = 2*EXTRA_BORDER_Y;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (tries == 1)
|
if (tries == 1)
|
||||||
{
|
{
|
||||||
@@ -4340,18 +4350,39 @@ void wxListMainWindow::InsertItem( wxListItem &item )
|
|||||||
|
|
||||||
m_dirty = TRUE;
|
m_dirty = TRUE;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// this is unused variable
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
|
#endif
|
||||||
if ( HasFlag(wxLC_REPORT) )
|
if ( HasFlag(wxLC_REPORT) )
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
// this is unused variable
|
||||||
mode = wxLC_REPORT;
|
mode = wxLC_REPORT;
|
||||||
|
#endif
|
||||||
ResetVisibleLinesRange();
|
ResetVisibleLinesRange();
|
||||||
}
|
}
|
||||||
else if ( HasFlag(wxLC_LIST) )
|
else if ( HasFlag(wxLC_LIST) )
|
||||||
|
#if 0
|
||||||
|
// this is unused variable
|
||||||
mode = wxLC_LIST;
|
mode = wxLC_LIST;
|
||||||
|
#else
|
||||||
|
{}
|
||||||
|
#endif
|
||||||
else if ( HasFlag(wxLC_ICON) )
|
else if ( HasFlag(wxLC_ICON) )
|
||||||
|
#if 0
|
||||||
|
// this is unused variable
|
||||||
mode = wxLC_ICON;
|
mode = wxLC_ICON;
|
||||||
|
#else
|
||||||
|
{}
|
||||||
|
#endif
|
||||||
else if ( HasFlag(wxLC_SMALL_ICON) )
|
else if ( HasFlag(wxLC_SMALL_ICON) )
|
||||||
|
#if 0
|
||||||
|
// this is unused variable
|
||||||
mode = wxLC_ICON; // no typo
|
mode = wxLC_ICON; // no typo
|
||||||
|
#else
|
||||||
|
{}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( _T("unknown mode") );
|
wxFAIL_MSG( _T("unknown mode") );
|
||||||
|
@@ -439,7 +439,7 @@ wxGenericMDIChildFrame::~wxGenericMDIChildFrame()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (pClientWindow->GetPageCount() - 1 >= 0)
|
if ((int)pClientWindow->GetPageCount() - 1 >= 0)
|
||||||
pClientWindow->SetSelection(pClientWindow->GetPageCount() - 1);
|
pClientWindow->SetSelection(pClientWindow->GetPageCount() - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -714,7 +714,7 @@ bool wxGenericMDIClientWindow::CreateClient( wxGenericMDIParentFrame *parent, lo
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGenericMDIClientWindow::SetSelection(int nPage)
|
int wxGenericMDIClientWindow::SetSelection(size_t nPage)
|
||||||
{
|
{
|
||||||
int oldSelection = wxNotebook::SetSelection(nPage);
|
int oldSelection = wxNotebook::SetSelection(nPage);
|
||||||
|
|
||||||
|
@@ -123,6 +123,8 @@ public:
|
|||||||
|
|
||||||
// implement wxComboPopup methods
|
// implement wxComboPopup methods
|
||||||
virtual bool SetSelection(const wxString& value);
|
virtual bool SetSelection(const wxString& value);
|
||||||
|
virtual void SetSelection(int n, bool select)
|
||||||
|
{ wxListBox::SetSelection( n, select); };
|
||||||
virtual wxControl *GetControl() { return this; }
|
virtual wxControl *GetControl() { return this; }
|
||||||
virtual void OnShow();
|
virtual void OnShow();
|
||||||
virtual wxCoord GetBestWidth() const;
|
virtual wxCoord GetBestWidth() const;
|
||||||
|
@@ -675,7 +675,11 @@ void wxControlRenderer::DrawItems(const wxListBox *lbox,
|
|||||||
|
|
||||||
void wxControlRenderer::DoDrawItems(const wxListBox *lbox,
|
void wxControlRenderer::DoDrawItems(const wxListBox *lbox,
|
||||||
size_t itemFirst, size_t itemLast,
|
size_t itemFirst, size_t itemLast,
|
||||||
|
#if wxUSE_CHECKLISTBOX
|
||||||
bool isCheckLbox)
|
bool isCheckLbox)
|
||||||
|
#else
|
||||||
|
bool WXUNUSED(isCheckLbox))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// prepare for the drawing: calc the initial position
|
// prepare for the drawing: calc the initial position
|
||||||
wxCoord lineHeight = lbox->GetLineHeight();
|
wxCoord lineHeight = lbox->GetLineHeight();
|
||||||
|
@@ -184,6 +184,7 @@ protected:
|
|||||||
|
|
||||||
// set the current node and item withotu refreshing anything
|
// set the current node and item withotu refreshing anything
|
||||||
void SetCurrent(wxMenuItemList::compatibility_iterator node);
|
void SetCurrent(wxMenuItemList::compatibility_iterator node);
|
||||||
|
virtual bool SetCurrent(bool doit = true){return wxPopupTransientWindow::SetCurrent(doit);};
|
||||||
|
|
||||||
// change the current item refreshing the old and new items
|
// change the current item refreshing the old and new items
|
||||||
void ChangeCurrent(wxMenuItemList::compatibility_iterator node);
|
void ChangeCurrent(wxMenuItemList::compatibility_iterator node);
|
||||||
@@ -331,7 +332,7 @@ void wxPopupMenuWindow::ResetCurrent()
|
|||||||
#if wxUSE_STL
|
#if wxUSE_STL
|
||||||
SetCurrent(wxMenuItemList::compatibility_iterator());
|
SetCurrent(wxMenuItemList::compatibility_iterator());
|
||||||
#else
|
#else
|
||||||
SetCurrent(NULL);
|
SetCurrent((wxwxMenuItemListNode *)NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1111,7 +1112,10 @@ void wxMenu::EndRadioGroup()
|
|||||||
|
|
||||||
bool wxMenu::DoAppend(wxMenuItem *item)
|
bool wxMenu::DoAppend(wxMenuItem *item)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
// not used at all
|
||||||
bool check = FALSE;
|
bool check = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( item->GetKind() == wxITEM_RADIO )
|
if ( item->GetKind() == wxITEM_RADIO )
|
||||||
{
|
{
|
||||||
@@ -1127,7 +1131,10 @@ bool wxMenu::DoAppend(wxMenuItem *item)
|
|||||||
item->SetRadioGroupEnd(m_startRadioGroup);
|
item->SetRadioGroupEnd(m_startRadioGroup);
|
||||||
|
|
||||||
// ensure that we have a checked item in the radio group
|
// ensure that we have a checked item in the radio group
|
||||||
|
#if 0
|
||||||
|
// not used at all
|
||||||
check = TRUE;
|
check = TRUE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else // extend the current radio group
|
else // extend the current radio group
|
||||||
{
|
{
|
||||||
|
@@ -44,7 +44,12 @@
|
|||||||
// macros
|
// macros
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// due to unsigned type nPage is always >= 0
|
||||||
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((size_t(nPage)) < GetPageCount()))
|
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((size_t(nPage)) < GetPageCount()))
|
||||||
|
#else
|
||||||
|
#define IS_VALID_PAGE(nPage) ((size_t(nPage)) < GetPageCount())
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
|
@@ -187,7 +187,7 @@ bool wxScrollArrows::HandleMouseMove(const wxMouseEvent& event) const
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( 1 ) //FIXME: m_control->ShouldPauseScrolling() )
|
else // if ( 1 ) FIXME: m_control->ShouldPauseScrolling() )
|
||||||
{
|
{
|
||||||
// we may want to stop it
|
// we may want to stop it
|
||||||
if ( arrow != m_captureData->m_arrowPressed )
|
if ( arrow != m_captureData->m_arrowPressed )
|
||||||
|
@@ -528,6 +528,8 @@ public:
|
|||||||
|
|
||||||
virtual bool CanUndo() const;
|
virtual bool CanUndo() const;
|
||||||
virtual bool Do(wxTextCtrl *text);
|
virtual bool Do(wxTextCtrl *text);
|
||||||
|
virtual bool Do() { return wxTextCtrlCommand::Do(); }
|
||||||
|
virtual bool Undo() { return wxTextCtrlCommand::Undo(); }
|
||||||
virtual bool Undo(wxTextCtrl *text);
|
virtual bool Undo(wxTextCtrl *text);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -551,6 +553,8 @@ public:
|
|||||||
|
|
||||||
virtual bool CanUndo() const;
|
virtual bool CanUndo() const;
|
||||||
virtual bool Do(wxTextCtrl *text);
|
virtual bool Do(wxTextCtrl *text);
|
||||||
|
virtual bool Do() { return wxTextCtrlCommand::Do(); }
|
||||||
|
virtual bool Undo() { return wxTextCtrlCommand::Undo(); }
|
||||||
virtual bool Undo(wxTextCtrl *text);
|
virtual bool Undo(wxTextCtrl *text);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -354,7 +354,10 @@ static bool wxGetResizingCursor(long hitTestResult, wxCursor& cursor)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
#if 0
|
||||||
|
// not rachable due to earlier return
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user