diff --git a/MSI/MSIBuild b/MSI/MSIBuild index b8364de..eccce8c 160000 --- a/MSI/MSIBuild +++ b/MSI/MSIBuild @@ -1 +1 @@ -Subproject commit b8364dea81f39b321d726317a9dcbf6b13a455e0 +Subproject commit eccce8c523c9193c1e3a627e4dd8a80cd3cd5703 diff --git a/MSI/MSICA b/MSI/MSICA index f989fdc..f927678 160000 --- a/MSI/MSICA +++ b/MSI/MSICA @@ -1 +1 @@ -Subproject commit f989fdc827d8fa731977d1771097cf038a50e145 +Subproject commit f9276783ac29d674e73231bfc168c2d357d1f549 diff --git a/ZRColaCompile/dbsource.cpp b/ZRColaCompile/dbsource.cpp index 52b8470..41e56de 100644 --- a/ZRColaCompile/dbsource.cpp +++ b/ZRColaCompile/dbsource.cpp @@ -245,7 +245,7 @@ ZRCola::DBSource::~DBSource() m_pHighlight1.free(); m_comHighlight.free(); - if (m_db) + if (m_db.valid()) m_db->Close(); if (m_locale) @@ -255,7 +255,7 @@ ZRCola::DBSource::~DBSource() bool ZRCola::DBSource::Open(LPCTSTR filename) { - wxASSERT_MSG(!m_db, wxT("database already open")); + wxASSERT_MSG(!m_db.valid(), wxT("database already open")); // Create COM object. HRESULT hr = ::CoCreateInstance(CLSID_CADOConnection, NULL, CLSCTX_ALL, IID_IADOConnection, (LPVOID*)&m_db); @@ -276,9 +276,9 @@ bool ZRCola::DBSource::Open(LPCTSTR filename) m_locale = _create_locale(LC_ALL, "Slovenian_Slovenia.1250"); // Create ADO command(s). - wxASSERT_MSG(!m_comCharacterGroup, wxT("ADO command already created")); + wxASSERT_MSG(!m_comCharacterGroup.valid(), wxT("ADO command already created")); wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comCharacterGroup))); - wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_ActiveConnection(variant(m_db)))); + wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_ActiveConnection(variant((IDispatch*)m_db)))); wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_CommandType(adCmdText))); wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_CommandText(bstr(L"SELECT [VRS_SkupineZnakov].[Znak], [VRS_SkupineZnakov].[pogost] " L"FROM [VRS_SkupineZnakov] " @@ -289,14 +289,14 @@ bool ZRCola::DBSource::Open(LPCTSTR filename) // Create and add command parameters. com_obj params; wxVERIFY(SUCCEEDED(m_comCharacterGroup->get_Parameters(¶ms))); - wxASSERT_MSG(!m_pCharacterGroup1, wxT("ADO command parameter already created")); + wxASSERT_MSG(!m_pCharacterGroup1.valid(), wxT("ADO command parameter already created")); wxVERIFY(SUCCEEDED(m_comCharacterGroup->CreateParameter(bstr(L"@Skupina"), adVarWChar, adParamInput, 50, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pCharacterGroup1))); wxVERIFY(SUCCEEDED(params->Append(m_pCharacterGroup1))); } - wxASSERT_MSG(!m_comTranslation, wxT("ADO command already created")); + wxASSERT_MSG(!m_comTranslation.valid(), wxT("ADO command already created")); wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comTranslation))); - wxVERIFY(SUCCEEDED(m_comTranslation->put_ActiveConnection(variant(m_db)))); + wxVERIFY(SUCCEEDED(m_comTranslation->put_ActiveConnection(variant((IDispatch*)m_db)))); wxVERIFY(SUCCEEDED(m_comTranslation->put_CommandType(adCmdText))); wxVERIFY(SUCCEEDED(m_comTranslation->put_CommandText(bstr(L"SELECT [Komb1] AS [komb], [rang_komb1] AS [rang_komb], '' AS [Kano], 0 AS [Kanoniziraj], [Komb2] AS [znak], [rang_komb2] AS [rang_znak] " L"FROM [VRS_ScriptRepl2] " @@ -306,14 +306,14 @@ bool ZRCola::DBSource::Open(LPCTSTR filename) // Create and add command parameters. com_obj params; wxVERIFY(SUCCEEDED(m_comTranslation->get_Parameters(¶ms))); - wxASSERT_MSG(!m_pTranslation1, wxT("ADO command parameter already created")); + wxASSERT_MSG(!m_pTranslation1.valid(), wxT("ADO command parameter already created")); wxVERIFY(SUCCEEDED(m_comTranslation->CreateParameter(bstr(L"@Script"), adSmallInt, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pTranslation1))); wxVERIFY(SUCCEEDED(params->Append(m_pTranslation1))); } - wxASSERT_MSG(!m_comTranslationSets, wxT("ADO command already created")); + wxASSERT_MSG(!m_comTranslationSets.valid(), wxT("ADO command already created")); wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comTranslationSets))); - wxVERIFY(SUCCEEDED(m_comTranslationSets->put_ActiveConnection(variant(m_db)))); + wxVERIFY(SUCCEEDED(m_comTranslationSets->put_ActiveConnection(variant((IDispatch*)m_db)))); wxVERIFY(SUCCEEDED(m_comTranslationSets->put_CommandType(adCmdText))); wxVERIFY(SUCCEEDED(m_comTranslationSets->put_CommandText(bstr(L"SELECT [Script] " L"FROM [VRS_Script2SeqScr] " @@ -323,14 +323,14 @@ bool ZRCola::DBSource::Open(LPCTSTR filename) // Create and add command parameters. com_obj params; wxVERIFY(SUCCEEDED(m_comTranslationSets->get_Parameters(¶ms))); - wxASSERT_MSG(!m_pTranslationSets1, wxT("ADO command parameter already created")); + wxASSERT_MSG(!m_pTranslationSets1.valid(), wxT("ADO command parameter already created")); wxVERIFY(SUCCEEDED(m_comTranslationSets->CreateParameter(bstr(L"@ID"), adSmallInt, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pTranslationSets1))); wxVERIFY(SUCCEEDED(params->Append(m_pTranslationSets1))); } - wxASSERT_MSG(!m_comHighlight, wxT("ADO command already created")); + wxASSERT_MSG(!m_comHighlight.valid(), wxT("ADO command already created")); wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comHighlight))); - wxVERIFY(SUCCEEDED(m_comHighlight->put_ActiveConnection(variant(m_db)))); + wxVERIFY(SUCCEEDED(m_comHighlight->put_ActiveConnection(variant((IDispatch*)m_db)))); wxVERIFY(SUCCEEDED(m_comHighlight->put_CommandType(adCmdText))); wxVERIFY(SUCCEEDED(m_comHighlight->put_CommandText(bstr(L"SELECT [komb] " L"FROM [VRS_HighlightChars2] " @@ -340,7 +340,7 @@ bool ZRCola::DBSource::Open(LPCTSTR filename) // Create and add command parameters. com_obj params; wxVERIFY(SUCCEEDED(m_comHighlight->get_Parameters(¶ms))); - wxASSERT_MSG(!m_pHighlight1, wxT("ADO command parameter already created")); + wxASSERT_MSG(!m_pHighlight1.valid(), wxT("ADO command parameter already created")); wxVERIFY(SUCCEEDED(m_comHighlight->CreateParameter(bstr(L"@group"), adSmallInt, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pHighlight1))); wxVERIFY(SUCCEEDED(params->Append(m_pHighlight1))); } @@ -360,7 +360,7 @@ bool ZRCola::DBSource::Open(LPCTSTR filename) void ZRCola::DBSource::LogErrors() const { - wxASSERT_MSG(m_db, wxT("database does not exist")); + wxASSERT_MSG(m_db.valid(), wxT("database does not exist")); // Get array of errors. ADOErrors *errors = NULL; @@ -393,7 +393,7 @@ void ZRCola::DBSource::LogErrors() const bool ZRCola::DBSource::GetValue(const com_obj& f, bool& val) const { - wxASSERT_MSG(f, wxT("field is empty")); + wxASSERT_MSG(f.valid(), wxT("field is empty")); variant v; wxVERIFY(SUCCEEDED(f->get_Value(&v))); @@ -407,7 +407,7 @@ bool ZRCola::DBSource::GetValue(const com_obj& f, bool& val) const bool ZRCola::DBSource::GetValue(const com_obj& f, short& val) const { - wxASSERT_MSG(f, wxT("field is empty")); + wxASSERT_MSG(f.valid(), wxT("field is empty")); variant v; wxVERIFY(SUCCEEDED(f->get_Value(&v))); @@ -421,7 +421,7 @@ bool ZRCola::DBSource::GetValue(const com_obj& f, short& val) const bool ZRCola::DBSource::GetValue(const com_obj& f, string& val) const { - wxASSERT_MSG(f, wxT("field is empty")); + wxASSERT_MSG(f.valid(), wxT("field is empty")); variant v; wxVERIFY(SUCCEEDED(f->get_Value(&v))); @@ -438,7 +438,7 @@ bool ZRCola::DBSource::GetValue(const com_obj& f, string& val) const bool ZRCola::DBSource::GetValue(const com_obj& f, wstring& val) const { - wxASSERT_MSG(f, wxT("field is empty")); + wxASSERT_MSG(f.valid(), wxT("field is empty")); variant v; wxVERIFY(SUCCEEDED(f->get_Value(&v))); @@ -456,7 +456,7 @@ bool ZRCola::DBSource::GetValue(const com_obj& f, wstring& val) const bool ZRCola::DBSource::GetUnicodeCharacter(const com_obj& f, wchar_t& chr) const { - wxASSERT_MSG(f, wxT("field is empty")); + wxASSERT_MSG(f.valid(), wxT("field is empty")); variant v; wxVERIFY(SUCCEEDED(f->get_Value(&v))); @@ -490,7 +490,7 @@ bool ZRCola::DBSource::GetUnicodeCharacter(const com_obj& f, wchar_t& bool ZRCola::DBSource::GetUnicodeString(const com_obj& f, wstring& str) const { - wxASSERT_MSG(f, wxT("field is empty")); + wxASSERT_MSG(f.valid(), wxT("field is empty")); variant v; wxVERIFY(SUCCEEDED(f->get_Value(&v))); @@ -527,7 +527,7 @@ bool ZRCola::DBSource::GetUnicodeString(const com_obj& f, wstring& str bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj& f, normperm& np) const { - wxASSERT_MSG(f, wxT("field is empty")); + wxASSERT_MSG(f.valid(), wxT("field is empty")); variant v; wxVERIFY(SUCCEEDED(f->get_Value(&v))); @@ -563,7 +563,7 @@ bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj& f, normperm& bool ZRCola::DBSource::GetLanguage(const com_obj& f, ZRCola::langid_t& lang) const { - wxASSERT_MSG(f, wxT("field is empty")); + wxASSERT_MSG(f.valid(), wxT("field is empty")); variant v; wxVERIFY(SUCCEEDED(f->get_Value(&v))); @@ -601,7 +601,7 @@ bool ZRCola::DBSource::GetLanguage(const com_obj& f, ZRCola::langid_t& bool ZRCola::DBSource::GetChrCat(const com_obj& f, chrcatid_t& cc) const { - wxASSERT_MSG(f, wxT("field is empty")); + wxASSERT_MSG(f.valid(), wxT("field is empty")); variant v; wxVERIFY(SUCCEEDED(f->get_Value(&v))); @@ -639,7 +639,7 @@ bool ZRCola::DBSource::GetChrCat(const com_obj& f, chrcatid_t& cc) con bool ZRCola::DBSource::GetTagNames(const winstd::com_obj& f, LCID lcid, list& names) const { - wxASSERT_MSG(f, wxT("field is empty")); + wxASSERT_MSG(f.valid(), wxT("field is empty")); variant v; wxVERIFY(SUCCEEDED(f->get_Value(&v))); @@ -691,7 +691,7 @@ bool ZRCola::DBSource::SelectNormPermSets(winstd::com_obj& rs) con if (FAILED(rs->Open(variant( L"SELECT [oblika], [oblike] " L"FROM [VRS_CharCanoOblike] " - L"ORDER BY [oblika], [oblike]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [oblika], [oblike]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0160: Error loading normalization permutation sets from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -704,7 +704,7 @@ bool ZRCola::DBSource::SelectNormPermSets(winstd::com_obj& rs) con bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj& rs, std::string& norm, normperm& np) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -745,7 +745,7 @@ bool ZRCola::DBSource::SelectTranslations(com_obj &rs) const L"SELECT [komb], [rang_komb], [Kano], [Kanoniziraj], [znak], [rang_znak] " L"FROM [VRS_ReplChar] " L"WHERE [rang_komb]=1 " - L"ORDER BY [znak], [rang_znak], [rang_komb], [komb]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [znak], [rang_znak], [rang_komb], [komb]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0040: Error loading translations from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -767,7 +767,7 @@ bool ZRCola::DBSource::SelectTranslations(short set, winstd::com_objput_Value(variant(set)))); - if (FAILED(rs->Open(variant(m_comTranslation), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { + if (FAILED(rs->Open(variant((IDispatch*)m_comTranslation), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { _ftprintf(stderr, wxT("%s: error ZCC0100: Error loading translations from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); return false; @@ -779,7 +779,7 @@ bool ZRCola::DBSource::SelectTranslations(short set, winstd::com_obj& rs, ZRCola::DBSource::translation& t) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -835,7 +835,7 @@ bool ZRCola::DBSource::SelectTranlationSets(com_obj &rs) const if (FAILED(rs->Open(variant( L"SELECT DISTINCT [entCode], [Src_En], [Dst_En] " L"FROM [VRS_Script2] " - L"ORDER BY [entCode], [Src_En], [Dst_En]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [entCode], [Src_En], [Dst_En]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0060: Error loading translation sets from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -848,7 +848,7 @@ bool ZRCola::DBSource::SelectTranlationSets(com_obj &rs) const bool ZRCola::DBSource::GetTranslationSet(const com_obj& rs, ZRCola::DBSource::transet& ts) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -885,7 +885,7 @@ bool ZRCola::DBSource::SelectTranlationSeqs(com_obj &rs) const if (FAILED(rs->Open(variant( L"SELECT DISTINCT [ID], [Descr], [Rank] " L"FROM [VRS_Script2Seq] " - L"ORDER BY [Rank], [Descr]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [Rank], [Descr]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0060: Error loading translation sequences from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -898,7 +898,7 @@ bool ZRCola::DBSource::SelectTranlationSeqs(com_obj &rs) const bool ZRCola::DBSource::GetTranslationSeq(const com_obj& rs, ZRCola::DBSource::transeq& ts) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -928,7 +928,7 @@ bool ZRCola::DBSource::GetTranslationSeq(const com_obj& rs, ZRCola wxVERIFY(SUCCEEDED(rs_chars->put_CursorLocation(adUseClient))); wxVERIFY(SUCCEEDED(rs_chars->put_CursorType(adOpenForwardOnly))); wxVERIFY(SUCCEEDED(rs_chars->put_LockType(adLockReadOnly))); - if (FAILED(rs_chars->Open(variant(m_comTranslationSets), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { + if (FAILED(rs_chars->Open(variant((IDispatch*)m_comTranslationSets), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { _ftprintf(stderr, wxT("%s: error ZCC0140: Error loading character group characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); return false; @@ -962,7 +962,7 @@ bool ZRCola::DBSource::SelectKeySequences(com_obj &rs) const if (FAILED(rs->Open(variant( L"SELECT DISTINCT [VRS_KeyCodes].[Znak], [VRS_CharGroup].[CharGroup], IIF([VRS_CharGroup].[Arg1] IS NOT NULL, [VRS_CharGroup].[Arg1], 0)+IIF([VRS_CharGroup].[Arg2] IS NOT NULL, [VRS_CharGroup].[Arg2], 0)+IIF([VRS_CharGroup].[Arg3] IS NOT NULL, [VRS_CharGroup].[Arg3], 0) AS [Modifiers], IIF([VRS_CharGroup].[Arg4] IS NOT NULL, [VRS_CharGroup].[Arg4], 0) AS [KeyCodePre], [VRS_KeyCodes].[KeyCode], [VRS_KeyCodes].[Shift] " L"FROM [VRS_KeyCodes] LEFT JOIN [VRS_CharGroup] ON [VRS_CharGroup].[CharGroup]=[VRS_KeyCodes].[CharGroup] " - L"ORDER BY [VRS_CharGroup].[CharGroup], [VRS_KeyCodes].[KeyCode], [VRS_KeyCodes].[Shift], [VRS_KeyCodes].[Znak]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [VRS_CharGroup].[CharGroup], [VRS_KeyCodes].[KeyCode], [VRS_KeyCodes].[Shift], [VRS_KeyCodes].[Znak]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0050: Error loading key sequences from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -975,7 +975,7 @@ bool ZRCola::DBSource::SelectKeySequences(com_obj &rs) const bool ZRCola::DBSource::GetKeySequence(const com_obj& rs, ZRCola::DBSource::keyseq& ks) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -1050,7 +1050,7 @@ bool ZRCola::DBSource::SelectLanguages(com_obj &rs) const if (FAILED(rs->Open(variant( L"SELECT DISTINCT [entCode], [Jezik_En] " L"FROM [VRS_Jezik] " - L"ORDER BY [entCode], [Jezik_En]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [entCode], [Jezik_En]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0060: Error loading languages from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -1063,7 +1063,7 @@ bool ZRCola::DBSource::SelectLanguages(com_obj &rs) const bool ZRCola::DBSource::GetLanguage(const com_obj& rs, ZRCola::DBSource::language& lang) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -1094,7 +1094,7 @@ bool ZRCola::DBSource::SelectLanguageCharacters(com_obj &rs) const if (FAILED(rs->Open(variant( L"SELECT DISTINCT [znak], [lang] " L"FROM [VRS_CharLocal] " - L"ORDER BY [znak], [lang]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [znak], [lang]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0090: Error loading language characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -1107,7 +1107,7 @@ bool ZRCola::DBSource::SelectLanguageCharacters(com_obj &rs) const bool ZRCola::DBSource::GetLanguageCharacter(const com_obj& rs, ZRCola::DBSource::langchar& lc) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -1138,7 +1138,7 @@ bool ZRCola::DBSource::SelectCharacterGroups(com_obj& rs) const if (FAILED(rs->Open(variant( L"SELECT DISTINCT [id], [Skupina], [opis_en], [Rang] " L"FROM [VRS_SkupinaZnakov] " - L"ORDER BY [Rang], [opis_en]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [Rang], [opis_en]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0090: Error loading character groups from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -1151,7 +1151,7 @@ bool ZRCola::DBSource::SelectCharacterGroups(com_obj& rs) const bool ZRCola::DBSource::GetCharacterGroup(const com_obj& rs, chrgrp& cg) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -1188,7 +1188,7 @@ bool ZRCola::DBSource::GetCharacterGroup(const com_obj& rs, chrgrp wxVERIFY(SUCCEEDED(rs_chars->put_CursorLocation(adUseClient))); wxVERIFY(SUCCEEDED(rs_chars->put_CursorType(adOpenForwardOnly))); wxVERIFY(SUCCEEDED(rs_chars->put_LockType(adLockReadOnly))); - if (FAILED(rs_chars->Open(variant(m_comCharacterGroup), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { + if (FAILED(rs_chars->Open(variant((IDispatch*)m_comCharacterGroup), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { _ftprintf(stderr, wxT("%s: error ZCC0140: Error loading character group characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); return false; @@ -1233,7 +1233,7 @@ bool ZRCola::DBSource::SelectCharacters(com_obj& rs) const L"WHERE " L"[aktiven]=1 AND " // Active characters only L"[kat]<>'g' " // Ignore "Other, Control" category! - L"ORDER BY [znak]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [znak]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0120: Error loading characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -1246,7 +1246,7 @@ bool ZRCola::DBSource::SelectCharacters(com_obj& rs) const bool ZRCola::DBSource::GetCharacter(const com_obj& rs, character& chr) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -1310,7 +1310,7 @@ bool ZRCola::DBSource::SelectCharacterCategories(com_obj& rs) cons L"SELECT DISTINCT [kat], [opis_en], [Rang] " L"FROM [VRS_CharCategory] " L"WHERE [kat]<>'g' " // Ignore "Other, Control" category! - L"ORDER BY [Rang], [opis_en]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [Rang], [opis_en]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0130: Error loading character categories from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -1323,7 +1323,7 @@ bool ZRCola::DBSource::SelectCharacterCategories(com_obj& rs) cons bool ZRCola::DBSource::GetCharacterCategory(const com_obj& rs, chrcat& cc) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -1360,7 +1360,7 @@ bool ZRCola::DBSource::SelectCharacterTags(winstd::com_obj& rs) co if (FAILED(rs->Open(variant( L"SELECT DISTINCT [znak], [oznaka] " L"FROM [VRS_CharTags] " - L"ORDER BY [znak], [oznaka]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [znak], [oznaka]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0130: Error loading character tags from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -1373,7 +1373,7 @@ bool ZRCola::DBSource::SelectCharacterTags(winstd::com_obj& rs) co bool ZRCola::DBSource::GetCharacterTag(const winstd::com_obj& rs, chrtag& ct) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -1404,7 +1404,7 @@ bool ZRCola::DBSource::SelectTagNames(winstd::com_obj& rs) const if (FAILED(rs->Open(variant( L"SELECT DISTINCT [oznaka], [opis_en], [opis_sl], [opis_ru] " L"FROM [VRS_Tags] " - L"ORDER BY [oznaka]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) + L"ORDER BY [oznaka]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText))) { _ftprintf(stderr, wxT("%s: error ZCC0130: Error loading tags from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); @@ -1417,7 +1417,7 @@ bool ZRCola::DBSource::SelectTagNames(winstd::com_obj& rs) const bool ZRCola::DBSource::GetTagName(const winstd::com_obj& rs, tagname& tn) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); @@ -1471,7 +1471,7 @@ bool ZRCola::DBSource::SelectHighlights(short set, winstd::com_obj // Open it. wxVERIFY(SUCCEEDED(m_pHighlight1->put_Value(variant(set)))); - if (FAILED(rs->Open(variant(m_comHighlight), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { + if (FAILED(rs->Open(variant((IDispatch*)m_comHighlight), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { _ftprintf(stderr, wxT("%s: error ZCC0101: Error loading highlights from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); LogErrors(); return false; @@ -1483,7 +1483,7 @@ bool ZRCola::DBSource::SelectHighlights(short set, winstd::com_obj bool ZRCola::DBSource::GetHighlight(const com_obj& rs, ZRCola::DBSource::highlight& h) const { - wxASSERT_MSG(rs, wxT("recordset is empty")); + wxASSERT_MSG(rs.valid(), wxT("recordset is empty")); com_obj flds; wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); diff --git a/lib/WinStd b/lib/WinStd index 6dead07..9136c74 160000 --- a/lib/WinStd +++ b/lib/WinStd @@ -1 +1 @@ -Subproject commit 6dead076a2e48e7f561c6e72e027c48ffcbb07be +Subproject commit 9136c74309c3cee7f99f8f09fdcf8645c2a0583e diff --git a/lib/oatpp b/lib/oatpp index 14ca5e5..06ce451 160000 --- a/lib/oatpp +++ b/lib/oatpp @@ -1 +1 @@ -Subproject commit 14ca5e55c8a7c8265b090e1704463c7ab42ca2ee +Subproject commit 06ce4516c47dcd856406a5af3fdb31e30d614ec0 diff --git a/lib/oatpp-swagger b/lib/oatpp-swagger index ed5251c..8cb460b 160000 --- a/lib/oatpp-swagger +++ b/lib/oatpp-swagger @@ -1 +1 @@ -Subproject commit ed5251c580e2e98beb50d818bcea8ddc91419d8c +Subproject commit 8cb460b546e84b06939a12897c85a6d863c1c53e diff --git a/lib/stdex b/lib/stdex index c1616b0..de592ce 160000 --- a/lib/stdex +++ b/lib/stdex @@ -1 +1 @@ -Subproject commit c1616b032e9597b072de6fae634ef242a6a67b1d +Subproject commit de592cebb9b917d5fdce4a4f2aaaeddfc51cb8cd