X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12353a277fc1bcf4b70745fd02478b9b08b1ec0d..b6a20a20d010d643e52914f51aa0700df0da925f:/src/common/dbgrid.cpp diff --git a/src/common/dbgrid.cpp b/src/common/dbgrid.cpp index 713592835d..feecae05dc 100644 --- a/src/common/dbgrid.cpp +++ b/src/common/dbgrid.cpp @@ -11,7 +11,7 @@ // Branched From : dbgrid.cpp,v 1.18 2000/12/19 13:00:58 /////////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dbgrid.h" #endif @@ -23,7 +23,7 @@ #if wxUSE_ODBC -#if wxUSE_NEW_GRID +#if wxUSE_GRID #ifndef WX_PRECOMP #include "wx/textctrl.h" @@ -33,6 +33,10 @@ #include "wx/generic/gridctrl.h" #include "wx/dbgrid.h" +// DLL options compatibility check: +#include "wx/app.h" +WX_CHECK_BUILD_OPTIONS("wxDbGrid") + wxDbGridCellAttrProvider::wxDbGridCellAttrProvider() { @@ -175,7 +179,7 @@ wxDbGridTableBase::~wxDbGridTableBase() //FIXME: should i remove m_ColInfo and m_data from m_attrProvider if a wxDbGridAttrProvider // if ((provider = dynamic_cast(GetAttrProvider()))) - // Using C casting for now until we can support dynamic_cast with wxWindows + // Using C casting for now until we can support dynamic_cast with wxWidgets provider = (wxDbGridCellAttrProvider *)(GetAttrProvider()); if (provider) { @@ -229,7 +233,7 @@ bool wxDbGridTableBase::AssignDbTable(wxDbTable *tab, int count, bool takeOwners m_data = tab; //FIXME: Remove dynamic_cast before sumision to wxwin // if ((provider = dynamic_cast (GetAttrProvider()))) - // Using C casting for now until we can support dynamic_cast with wxWindows + // Using C casting for now until we can support dynamic_cast with wxWidgets provider = (wxDbGridCellAttrProvider *)(GetAttrProvider()); if (provider) { @@ -259,7 +263,7 @@ bool wxDbGridTableBase::AssignDbTable(wxDbTable *tab, int count, bool takeOwners return TRUE; } -wxString wxDbGridTableBase::GetTypeName(int row, int col) +wxString wxDbGridTableBase::GetTypeName(int WXUNUSED(row), int col) { if (GetNumberCols() > col) { @@ -366,16 +370,8 @@ bool wxDbGridTableBase::CanGetValueAs(int row, int col, const wxString& typeName return FALSE; } -bool wxDbGridTableBase::CanSetValueAs(int row, int col, const wxString& typeName) +bool wxDbGridTableBase::CanSetValueAs(int WXUNUSED(row), int col, const wxString& typeName) { - //Is this needed? As will be validated on SetValueAsXXXX - ValidateRow(row); - - if (m_data->IsColNull(m_ColInfo[col].DbCol)) - { - return FALSE; - } - if (typeName == wxGRID_VALUE_STRING) { //FIXME ummm What about blob field etc. @@ -684,7 +680,7 @@ void wxDbGridTableBase::ValidateRow(int row) m_data->SetKey(k); 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(); @@ -728,6 +724,6 @@ bool wxDbGridTableBase::Writeback() const WX_DEFINE_EXPORTED_OBJARRAY(keyarray); -#endif // #if wxUSE_NEW_GRID +#endif // #if wxUSE_GRID #endif // #if wxUSE_ODBC