diff --git a/Generals/Code/Tools/Babylon/BABYLON.XLT b/Core/Tools/Babylon/BABYLON.XLT similarity index 100% rename from Generals/Code/Tools/Babylon/BABYLON.XLT rename to Core/Tools/Babylon/BABYLON.XLT diff --git a/GeneralsMD/Code/Tools/Babylon/Babylon.cpp b/Core/Tools/Babylon/Babylon.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/Babylon.cpp rename to Core/Tools/Babylon/Babylon.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/Babylon.h b/Core/Tools/Babylon/Babylon.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/Babylon.h rename to Core/Tools/Babylon/Babylon.h diff --git a/GeneralsMD/Code/Tools/Babylon/Babylon.odl b/Core/Tools/Babylon/Babylon.odl similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/Babylon.odl rename to Core/Tools/Babylon/Babylon.odl diff --git a/GeneralsMD/Code/Tools/Babylon/Babylon.rc b/Core/Tools/Babylon/Babylon.rc similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/Babylon.rc rename to Core/Tools/Babylon/Babylon.rc diff --git a/GeneralsMD/Code/Tools/Babylon/Babylon.reg b/Core/Tools/Babylon/Babylon.reg similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/Babylon.reg rename to Core/Tools/Babylon/Babylon.reg diff --git a/GeneralsMD/Code/Tools/Babylon/BabylonDlg.cpp b/Core/Tools/Babylon/BabylonDlg.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/BabylonDlg.cpp rename to Core/Tools/Babylon/BabylonDlg.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/BabylonDlg.h b/Core/Tools/Babylon/BabylonDlg.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/BabylonDlg.h rename to Core/Tools/Babylon/BabylonDlg.h diff --git a/GeneralsMD/Code/Tools/Babylon/CMakeLists.txt b/Core/Tools/Babylon/CMakeLists.txt similarity index 76% rename from GeneralsMD/Code/Tools/Babylon/CMakeLists.txt rename to Core/Tools/Babylon/CMakeLists.txt index 99d4b2be4b1..a85ee41a72c 100644 --- a/GeneralsMD/Code/Tools/Babylon/CMakeLists.txt +++ b/Core/Tools/Babylon/CMakeLists.txt @@ -51,16 +51,16 @@ set(BABYLON_SRC "XLStuff.h" ) -add_executable(z_babylon WIN32) -set_target_properties(z_babylon PROPERTIES OUTPUT_NAME babylon) +add_executable(core_babylon WIN32) +set_target_properties(core_babylon PROPERTIES OUTPUT_NAME babylon) -target_sources(z_babylon PRIVATE ${BABYLON_SRC}) +target_sources(core_babylon PRIVATE ${BABYLON_SRC}) -target_link_libraries(z_babylon PRIVATE +target_link_libraries(core_babylon PRIVATE core_config ) if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows") - target_compile_definitions(z_babylon PRIVATE _AFXDLL) - target_sources(z_babylon PRIVATE Babylon.rc) + target_compile_definitions(core_babylon PRIVATE _AFXDLL) + target_sources(core_babylon PRIVATE Babylon.rc) endif() diff --git a/GeneralsMD/Code/Tools/Babylon/DlgProxy.cpp b/Core/Tools/Babylon/DlgProxy.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/DlgProxy.cpp rename to Core/Tools/Babylon/DlgProxy.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/DlgProxy.h b/Core/Tools/Babylon/DlgProxy.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/DlgProxy.h rename to Core/Tools/Babylon/DlgProxy.h diff --git a/GeneralsMD/Code/Tools/Babylon/ExportDlg.cpp b/Core/Tools/Babylon/ExportDlg.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/ExportDlg.cpp rename to Core/Tools/Babylon/ExportDlg.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/ExportDlg.h b/Core/Tools/Babylon/ExportDlg.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/ExportDlg.h rename to Core/Tools/Babylon/ExportDlg.h diff --git a/GeneralsMD/Code/Tools/Babylon/GenerateDlg.cpp b/Core/Tools/Babylon/GenerateDlg.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/GenerateDlg.cpp rename to Core/Tools/Babylon/GenerateDlg.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/GenerateDlg.h b/Core/Tools/Babylon/GenerateDlg.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/GenerateDlg.h rename to Core/Tools/Babylon/GenerateDlg.h diff --git a/GeneralsMD/Code/Tools/Babylon/MatchDlg.cpp b/Core/Tools/Babylon/MatchDlg.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/MatchDlg.cpp rename to Core/Tools/Babylon/MatchDlg.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/MatchDlg.h b/Core/Tools/Babylon/MatchDlg.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/MatchDlg.h rename to Core/Tools/Babylon/MatchDlg.h diff --git a/GeneralsMD/Code/Tools/Babylon/ProceedDlg.cpp b/Core/Tools/Babylon/ProceedDlg.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/ProceedDlg.cpp rename to Core/Tools/Babylon/ProceedDlg.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/ProceedDlg.h b/Core/Tools/Babylon/ProceedDlg.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/ProceedDlg.h rename to Core/Tools/Babylon/ProceedDlg.h diff --git a/GeneralsMD/Code/Tools/Babylon/Report.cpp b/Core/Tools/Babylon/Report.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/Report.cpp rename to Core/Tools/Babylon/Report.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/Report.h b/Core/Tools/Babylon/Report.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/Report.h rename to Core/Tools/Babylon/Report.h diff --git a/GeneralsMD/Code/Tools/Babylon/RetranslateDlg.cpp b/Core/Tools/Babylon/RetranslateDlg.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/RetranslateDlg.cpp rename to Core/Tools/Babylon/RetranslateDlg.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/RetranslateDlg.h b/Core/Tools/Babylon/RetranslateDlg.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/RetranslateDlg.h rename to Core/Tools/Babylon/RetranslateDlg.h diff --git a/GeneralsMD/Code/Tools/Babylon/STRCHECK.PL b/Core/Tools/Babylon/STRCHECK.PL similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/STRCHECK.PL rename to Core/Tools/Babylon/STRCHECK.PL diff --git a/GeneralsMD/Code/Tools/Babylon/StdAfx.cpp b/Core/Tools/Babylon/StdAfx.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/StdAfx.cpp rename to Core/Tools/Babylon/StdAfx.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/StdAfx.h b/Core/Tools/Babylon/StdAfx.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/StdAfx.h rename to Core/Tools/Babylon/StdAfx.h diff --git a/GeneralsMD/Code/Tools/Babylon/TransDB.cpp b/Core/Tools/Babylon/TransDB.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/TransDB.cpp rename to Core/Tools/Babylon/TransDB.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/TransDB.h b/Core/Tools/Babylon/TransDB.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/TransDB.h rename to Core/Tools/Babylon/TransDB.h diff --git a/GeneralsMD/Code/Tools/Babylon/VIEWDBSII.cpp b/Core/Tools/Babylon/VIEWDBSII.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/VIEWDBSII.cpp rename to Core/Tools/Babylon/VIEWDBSII.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/VIEWDBSII.h b/Core/Tools/Babylon/VIEWDBSII.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/VIEWDBSII.h rename to Core/Tools/Babylon/VIEWDBSII.h diff --git a/GeneralsMD/Code/Tools/Babylon/VerifyDlg.cpp b/Core/Tools/Babylon/VerifyDlg.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/VerifyDlg.cpp rename to Core/Tools/Babylon/VerifyDlg.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/VerifyDlg.h b/Core/Tools/Babylon/VerifyDlg.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/VerifyDlg.h rename to Core/Tools/Babylon/VerifyDlg.h diff --git a/GeneralsMD/Code/Tools/Babylon/VerifyTextDlg.cpp b/Core/Tools/Babylon/VerifyTextDlg.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/VerifyTextDlg.cpp rename to Core/Tools/Babylon/VerifyTextDlg.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/VerifyTextDlg.h b/Core/Tools/Babylon/VerifyTextDlg.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/VerifyTextDlg.h rename to Core/Tools/Babylon/VerifyTextDlg.h diff --git a/GeneralsMD/Code/Tools/Babylon/ViewDBsDlg.cpp b/Core/Tools/Babylon/ViewDBsDlg.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/ViewDBsDlg.cpp rename to Core/Tools/Babylon/ViewDBsDlg.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/XLStuff.cpp b/Core/Tools/Babylon/XLStuff.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/XLStuff.cpp rename to Core/Tools/Babylon/XLStuff.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/XLStuff.h b/Core/Tools/Babylon/XLStuff.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/XLStuff.h rename to Core/Tools/Babylon/XLStuff.h diff --git a/GeneralsMD/Code/Tools/Babylon/bin.cpp b/Core/Tools/Babylon/bin.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/bin.cpp rename to Core/Tools/Babylon/bin.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/bin.h b/Core/Tools/Babylon/bin.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/bin.h rename to Core/Tools/Babylon/bin.h diff --git a/GeneralsMD/Code/Tools/Babylon/excel8.cpp b/Core/Tools/Babylon/excel8.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/excel8.cpp rename to Core/Tools/Babylon/excel8.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/excel8.h b/Core/Tools/Babylon/excel8.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/excel8.h rename to Core/Tools/Babylon/excel8.h diff --git a/GeneralsMD/Code/Tools/Babylon/expimp.cpp b/Core/Tools/Babylon/expimp.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/expimp.cpp rename to Core/Tools/Babylon/expimp.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/expimp.h b/Core/Tools/Babylon/expimp.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/expimp.h rename to Core/Tools/Babylon/expimp.h diff --git a/GeneralsMD/Code/Tools/Babylon/fileops.cpp b/Core/Tools/Babylon/fileops.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/fileops.cpp rename to Core/Tools/Babylon/fileops.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/fileops.h b/Core/Tools/Babylon/fileops.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/fileops.h rename to Core/Tools/Babylon/fileops.h diff --git a/GeneralsMD/Code/Tools/Babylon/iff.cpp b/Core/Tools/Babylon/iff.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/iff.cpp rename to Core/Tools/Babylon/iff.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/iff.h b/Core/Tools/Babylon/iff.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/iff.h rename to Core/Tools/Babylon/iff.h diff --git a/GeneralsMD/Code/Tools/Babylon/list.cpp b/Core/Tools/Babylon/list.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/list.cpp rename to Core/Tools/Babylon/list.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/list.h b/Core/Tools/Babylon/list.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/list.h rename to Core/Tools/Babylon/list.h diff --git a/GeneralsMD/Code/Tools/Babylon/loadsave.cpp b/Core/Tools/Babylon/loadsave.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/loadsave.cpp rename to Core/Tools/Babylon/loadsave.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/loadsave.h b/Core/Tools/Babylon/loadsave.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/loadsave.h rename to Core/Tools/Babylon/loadsave.h diff --git a/GeneralsMD/Code/Tools/Babylon/olestring.cpp b/Core/Tools/Babylon/olestring.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/olestring.cpp rename to Core/Tools/Babylon/olestring.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/olestring.h b/Core/Tools/Babylon/olestring.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/olestring.h rename to Core/Tools/Babylon/olestring.h diff --git a/GeneralsMD/Code/Tools/Babylon/res/Babylon.ico b/Core/Tools/Babylon/res/Babylon.ico similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/res/Babylon.ico rename to Core/Tools/Babylon/res/Babylon.ico diff --git a/GeneralsMD/Code/Tools/Babylon/res/Babylon.rc2 b/Core/Tools/Babylon/res/Babylon.rc2 similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/res/Babylon.rc2 rename to Core/Tools/Babylon/res/Babylon.rc2 diff --git a/Generals/Code/Tools/Babylon/res/bitmap1.bmp b/Core/Tools/Babylon/res/bitmap1.bmp similarity index 100% rename from Generals/Code/Tools/Babylon/res/bitmap1.bmp rename to Core/Tools/Babylon/res/bitmap1.bmp diff --git a/Generals/Code/Tools/Babylon/res/noxstring.ico b/Core/Tools/Babylon/res/noxstring.ico similarity index 100% rename from Generals/Code/Tools/Babylon/res/noxstring.ico rename to Core/Tools/Babylon/res/noxstring.ico diff --git a/Generals/Code/Tools/Babylon/res/noxstring.rc2 b/Core/Tools/Babylon/res/noxstring.rc2 similarity index 100% rename from Generals/Code/Tools/Babylon/res/noxstring.rc2 rename to Core/Tools/Babylon/res/noxstring.rc2 diff --git a/Generals/Code/Tools/Babylon/res/pause.bmp b/Core/Tools/Babylon/res/pause.bmp similarity index 100% rename from Generals/Code/Tools/Babylon/res/pause.bmp rename to Core/Tools/Babylon/res/pause.bmp diff --git a/Generals/Code/Tools/Babylon/res/paused.bmp b/Core/Tools/Babylon/res/paused.bmp similarity index 100% rename from Generals/Code/Tools/Babylon/res/paused.bmp rename to Core/Tools/Babylon/res/paused.bmp diff --git a/Generals/Code/Tools/Babylon/res/playd.bmp b/Core/Tools/Babylon/res/playd.bmp similarity index 100% rename from Generals/Code/Tools/Babylon/res/playd.bmp rename to Core/Tools/Babylon/res/playd.bmp diff --git a/Generals/Code/Tools/Babylon/res/playu.bmp b/Core/Tools/Babylon/res/playu.bmp similarity index 100% rename from Generals/Code/Tools/Babylon/res/playu.bmp rename to Core/Tools/Babylon/res/playu.bmp diff --git a/Generals/Code/Tools/Babylon/res/stop.bmp b/Core/Tools/Babylon/res/stop.bmp similarity index 100% rename from Generals/Code/Tools/Babylon/res/stop.bmp rename to Core/Tools/Babylon/res/stop.bmp diff --git a/GeneralsMD/Code/Tools/Babylon/resource.h b/Core/Tools/Babylon/resource.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/resource.h rename to Core/Tools/Babylon/resource.h diff --git a/Generals/Code/Tools/Babylon/resource.hm b/Core/Tools/Babylon/resource.hm similarity index 100% rename from Generals/Code/Tools/Babylon/resource.hm rename to Core/Tools/Babylon/resource.hm diff --git a/GeneralsMD/Code/Tools/Babylon/transcs.cpp b/Core/Tools/Babylon/transcs.cpp similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/transcs.cpp rename to Core/Tools/Babylon/transcs.cpp diff --git a/GeneralsMD/Code/Tools/Babylon/transcs.h b/Core/Tools/Babylon/transcs.h similarity index 100% rename from GeneralsMD/Code/Tools/Babylon/transcs.h rename to Core/Tools/Babylon/transcs.h diff --git a/Core/Tools/CMakeLists.txt b/Core/Tools/CMakeLists.txt index 809f3aeb0f2..dcf4f50e122 100644 --- a/Core/Tools/CMakeLists.txt +++ b/Core/Tools/CMakeLists.txt @@ -7,6 +7,7 @@ endif() # Build less useful tool/test binaries. if(RTS_BUILD_CORE_EXTRAS) + add_subdirectory(Babylon) add_subdirectory(buildVersionUpdate) add_subdirectory(Compress) add_subdirectory(CRCDiff) diff --git a/Generals/Code/Tools/Babylon/CMakeLists.txt b/Generals/Code/Tools/Babylon/CMakeLists.txt deleted file mode 100644 index ceebcead1a9..00000000000 --- a/Generals/Code/Tools/Babylon/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -set(BABYLON_SRC - "bin.cpp" - "bin.h" - "DlgProxy.cpp" - "DlgProxy.h" - "excel8.cpp" - "excel8.h" - "expimp.cpp" - "expimp.h" - "ExportDlg.cpp" - "ExportDlg.h" - "fileops.cpp" - "fileops.h" - "GenerateDlg.cpp" - "GenerateDlg.h" - "iff.cpp" - "iff.h" - "list.cpp" - "list.h" - "loadsave.cpp" - "loadsave.h" - "MatchDlg.cpp" - "MatchDlg.h" - "noxstring.cpp" - "noxstring.h" - "noxstringDlg.cpp" - "noxstringDlg.h" - "olestring.cpp" - "olestring.h" - "ProceedDlg.cpp" - "ProceedDlg.h" - "Report.cpp" - "Report.h" - "resource.h" - "RetranslateDlg.cpp" - "RetranslateDlg.h" - "StdAfx.cpp" - "StdAfx.h" - "transcs.cpp" - "transcs.h" - "TransDB.cpp" - "TransDB.h" - "VerifyDlg.cpp" - "VerifyDlg.h" - "VerifyTextDlg.cpp" - "VerifyTextDlg.h" - "ViewDBsDlg.cpp" - #"VIEWDBSII.cpp" - "VIEWDBSII.h" - "XLStuff.cpp" - "XLStuff.h" -) - -add_executable(g_babylon WIN32) -set_target_properties(g_babylon PROPERTIES OUTPUT_NAME noxstring) - -target_sources(g_babylon PRIVATE ${BABYLON_SRC}) - -target_link_libraries(g_babylon PRIVATE - core_config -) - -if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows") - target_compile_definitions(g_babylon PRIVATE _AFXDLL) - target_sources(g_babylon PRIVATE noxstring.rc) -endif() diff --git a/Generals/Code/Tools/Babylon/DlgProxy.cpp b/Generals/Code/Tools/Babylon/DlgProxy.cpp deleted file mode 100644 index beb5401589e..00000000000 --- a/Generals/Code/Tools/Babylon/DlgProxy.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// DlgProxy.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "DlgProxy.h" -#include "noxstringDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CNoxstringDlgAutoProxy - -IMPLEMENT_DYNCREATE(CNoxstringDlgAutoProxy, CCmdTarget) - -CNoxstringDlgAutoProxy::CNoxstringDlgAutoProxy() -{ - EnableAutomation(); - - // To keep the application running as long as an automation - // object is active, the constructor calls AfxOleLockApp. - AfxOleLockApp(); - - // Get access to the dialog through the application's - // main window pointer. Set the proxy's internal pointer - // to point to the dialog, and set the dialog's back pointer to - // this proxy. - ASSERT (AfxGetApp()->m_pMainWnd != NULL); - ASSERT_VALID (AfxGetApp()->m_pMainWnd); - ASSERT_KINDOF(CNoxstringDlg, AfxGetApp()->m_pMainWnd); - m_pDialog = (CNoxstringDlg*) AfxGetApp()->m_pMainWnd; - m_pDialog->m_pAutoProxy = this; -} - -CNoxstringDlgAutoProxy::~CNoxstringDlgAutoProxy() -{ - // To terminate the application when all objects created with - // with automation, the destructor calls AfxOleUnlockApp. - // Among other things, this will destroy the main dialog - if (m_pDialog != NULL) - m_pDialog->m_pAutoProxy = NULL; - AfxOleUnlockApp(); -} - -void CNoxstringDlgAutoProxy::OnFinalRelease() -{ - // When the last reference for an automation object is released - // OnFinalRelease is called. The base class will automatically - // deletes the object. Add additional cleanup required for your - // object before calling the base class. - - CCmdTarget::OnFinalRelease(); -} - -BEGIN_MESSAGE_MAP(CNoxstringDlgAutoProxy, CCmdTarget) - //{{AFX_MSG_MAP(CNoxstringDlgAutoProxy) - // NOTE - the ClassWizard will add and remove mapping macros here. - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -BEGIN_DISPATCH_MAP(CNoxstringDlgAutoProxy, CCmdTarget) - //{{AFX_DISPATCH_MAP(CNoxstringDlgAutoProxy) - // NOTE - the ClassWizard will add and remove mapping macros here. - //}}AFX_DISPATCH_MAP -END_DISPATCH_MAP() - -// Note: we add support for IID_INoxstring to support typesafe binding -// from VBA. This IID must match the GUID that is attached to the -// dispinterface in the .ODL file. - -// {2BF31248-3BA1-11D3-B9DA-006097B90D93} -static const IID IID_INoxstring = -{ 0x2bf31248, 0x3ba1, 0x11d3, { 0xb9, 0xda, 0x0, 0x60, 0x97, 0xb9, 0xd, 0x93 } }; - -BEGIN_INTERFACE_MAP(CNoxstringDlgAutoProxy, CCmdTarget) - INTERFACE_PART(CNoxstringDlgAutoProxy, IID_INoxstring, Dispatch) -END_INTERFACE_MAP() - -// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project -// {2BF31246-3BA1-11D3-B9DA-006097B90D93} -IMPLEMENT_OLECREATE2(CNoxstringDlgAutoProxy, "Noxstring.Application", 0x2bf31246, 0x3ba1, 0x11d3, 0xb9, 0xda, 0x0, 0x60, 0x97, 0xb9, 0xd, 0x93) - -///////////////////////////////////////////////////////////////////////////// -// CNoxstringDlgAutoProxy message handlers diff --git a/Generals/Code/Tools/Babylon/DlgProxy.h b/Generals/Code/Tools/Babylon/DlgProxy.h deleted file mode 100644 index 75313d02588..00000000000 --- a/Generals/Code/Tools/Babylon/DlgProxy.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// DlgProxy.h : header file -// - -#if !defined(AFX_DLGPROXY_H__2BF3124F_3BA1_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_DLGPROXY_H__2BF3124F_3BA1_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -class CNoxstringDlg; - -///////////////////////////////////////////////////////////////////////////// -// CNoxstringDlgAutoProxy command target - -class CNoxstringDlgAutoProxy : public CCmdTarget -{ - DECLARE_DYNCREATE(CNoxstringDlgAutoProxy) - - CNoxstringDlgAutoProxy(); // protected constructor used by dynamic creation - -// Attributes -public: - CNoxstringDlg* m_pDialog; - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CNoxstringDlgAutoProxy) - public: - virtual void OnFinalRelease(); - //}}AFX_VIRTUAL - -// Implementation -protected: - virtual ~CNoxstringDlgAutoProxy(); - - // Generated message map functions - //{{AFX_MSG(CNoxstringDlgAutoProxy) - // NOTE - the ClassWizard will add and remove member functions here. - //}}AFX_MSG - - DECLARE_MESSAGE_MAP() - DECLARE_OLECREATE(CNoxstringDlgAutoProxy) - - // Generated OLE dispatch map functions - //{{AFX_DISPATCH(CNoxstringDlgAutoProxy) - // NOTE - the ClassWizard will add and remove member functions here. - //}}AFX_DISPATCH - DECLARE_DISPATCH_MAP() - DECLARE_INTERFACE_MAP() -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_DLGPROXY_H__2BF3124F_3BA1_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/ExportDlg.cpp b/Generals/Code/Tools/Babylon/ExportDlg.cpp deleted file mode 100644 index 0b410f91af9..00000000000 --- a/Generals/Code/Tools/Babylon/ExportDlg.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// ExportDlg.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "ExportDlg.h" -#include "direct.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -static int max_index; - -///////////////////////////////////////////////////////////////////////////// -// CExportDlg dialog - - -CExportDlg::CExportDlg(CWnd* pParent /*=NULL*/) - : CDialog(CExportDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CExportDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void CExportDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CExportDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CExportDlg, CDialog) - //{{AFX_MSG_MAP(CExportDlg) - ON_CBN_SELCHANGE(IDC_COMBOLANG, OnSelchangeCombolang) - ON_CBN_SELENDOK(IDC_COMBOLANG, OnSelendokCombolang) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CExportDlg message handlers - -void CExportDlg::OnOK() -{ - char buffer[100]; - char *ptr; - // TODO: Add extra validation here - CEdit *edit = (CEdit *) GetDlgItem ( IDC_FILENAME ); - CButton *all = (CButton *) GetDlgItem ( IDC_RADIOALL ); - CButton *button; - CButton *sample = (CButton *) GetDlgItem ( IDC_RADIOSAMPLE ); - CButton *dialog = (CButton *) GetDlgItem ( IDC_RADIODIALOG ); - CButton *nondialog = (CButton *) GetDlgItem ( IDC_RADIONONDIALOG ); - CButton *unverified = (CButton *) GetDlgItem ( IDC_RADIOUNVERIFIED ); - CButton *missing = (CButton *) GetDlgItem ( IDC_RADIOMISSING ); - CButton *unsent = (CButton *) GetDlgItem ( IDC_RADIOUNSENT ); - - edit->GetWindowText ( buffer, sizeof ( filename) -1 ); - _getcwd ( filename, sizeof (filename ) -1 ); - strcat ( filename, "\\" ); - if ( ( ptr = strchr ( buffer, '.' ))) - { - *ptr = 0; - } - strcat ( filename, buffer ); - if ( all->GetCheck ()) - { - options.filter = TR_ALL; - } - else if ( dialog->GetCheck ()) - { - options.filter = TR_DIALOG; - } - else if ( nondialog->GetCheck ()) - { - options.filter = TR_NONDIALOG; - } - else if ( sample->GetCheck ()) - { - options.filter = TR_SAMPLE; - } - else if ( unverified->GetCheck ()) - { - options.filter = TR_UNVERIFIED; - } - else if ( missing->GetCheck ()) - { - options.filter = TR_MISSING_DIALOG; - } - else if ( unsent->GetCheck ()) - { - options.filter = TR_UNSENT; - } - else - { - options.filter = TR_CHANGES; - } - - options.include_comments = FALSE; - button = (CButton *) GetDlgItem ( IDC_CHECKTRANS ); - options.include_translations = button->GetCheck (); - - CDialog::OnOK(); -} - -void CExportDlg::OnCancel() -{ - // TODO: Add extra cleanup here - langid = LANGID_UNKNOWN; - CDialog::OnCancel(); -} - -BOOL CExportDlg::OnInitDialog() -{ - int index; - int lang_index; - LANGINFO *info; - CComboBox *combo; - CEdit *edit = (CEdit *) GetDlgItem ( IDC_FILENAME ); - CButton *button = (CButton *) GetDlgItem ( IDC_RADIOCHANGES ); - - - CDialog::OnInitDialog(); - - // TODO: Add extra initialization here - combo = (CComboBox *) GetDlgItem ( IDC_COMBOLANG ); - - combo->SetItemDataPtr ( 0, NULL ); - - options.filter = TR_CHANGES; - options.include_comments = FALSE; - options.include_translations = FALSE; - langid = LANGID_UNKNOWN; - filename[0] = 0; - button->SetCheck ( 1 ); - - - - index = 0; - lang_index = 0; - got_lang = FALSE; - while ( (info = GetLangInfo ( lang_index )) ) - { - if ( TRUE )//info->langid != LANGID_US ) - { - combo->InsertString ( index, info->name ); - combo->SetItemDataPtr ( index, info ); - if ( info->langid == CurrentLanguage ) - { - combo->SetCurSel ( index ); - got_lang = TRUE; - } - index++; - } - - lang_index++; - } - max_index = index; - - if ( !got_lang ) - { - combo->InsertString ( 0, "Select language" ); - combo->SetCurSel ( 0 ); - max_index++; - } - - edit->SetLimitText ( 8 ); - OnSelchangeCombolang (); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void CExportDlg::OnSelchangeCombolang() -{ - // TODO: Add your control notification handler code here - LANGINFO *info = NULL; - int index; - CButton *export_button = (CButton *) GetDlgItem ( IDOK ); - CComboBox *combo = (CComboBox *) GetDlgItem ( IDC_COMBOLANG ); - CEdit *edit = (CEdit *) GetDlgItem ( IDC_FILENAME ); - - index = combo->GetCurSel (); - - if ( index >= 0 && index < max_index ) - { - info = (LANGINFO *) combo->GetItemDataPtr ( index ); - } - - if ( info ) - { - char buffer[10]; - edit->EnableWindow ( TRUE ); - sprintf ( buffer, "Generals_%s", info->initials ); - edit->SetWindowText ( buffer ); - export_button->EnableWindow ( TRUE ); - langid = info->langid; - if ( !got_lang ) - { - combo->DeleteString ( 0 ); - max_index--; - got_lang = TRUE; - } - } - else - { - edit->SetWindowText (""); - edit->EnableWindow ( FALSE ); - export_button->EnableWindow ( FALSE ); - langid = LANGID_UNKNOWN; - } - -} - -void CExportDlg::OnSelendokCombolang() -{ - // TODO: Add your control notification handler code here - int i = 0; -} diff --git a/Generals/Code/Tools/Babylon/ExportDlg.h b/Generals/Code/Tools/Babylon/ExportDlg.h deleted file mode 100644 index 34269c519ac..00000000000 --- a/Generals/Code/Tools/Babylon/ExportDlg.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -#if !defined(AFX_EXPORTDLG_H__DDA81307_4F1A_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_EXPORTDLG_H__DDA81307_4F1A_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// ExportDlg.h : header file -// - -#include "expimp.h" - -///////////////////////////////////////////////////////////////////////////// -// CExportDlg dialog - -class CExportDlg : public CDialog -{ - LangID langid; - char filename[200]; - TROPTIONS options; - int got_lang; - -// Construction -public: - - LangID Language ( void ) { return langid; }; - char* Filename ( void ) { return filename; }; - TROPTIONS* Options ( void ) { return &options; }; - - CExportDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CExportDlg) - enum { IDD = IDD_EXPORT }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CExportDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CExportDlg) - virtual void OnOK(); - virtual void OnCancel(); - virtual BOOL OnInitDialog(); - afx_msg void OnSelchangeCombolang(); - afx_msg void OnSelendokCombolang(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_EXPORTDLG_H__DDA81307_4F1A_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/GenerateDlg.cpp b/Generals/Code/Tools/Babylon/GenerateDlg.cpp deleted file mode 100644 index 9bd34e60403..00000000000 --- a/Generals/Code/Tools/Babylon/GenerateDlg.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// GenerateDlg.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "GenerateDlg.h" -#include "direct.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CGenerateDlg dialog - - -CGenerateDlg::CGenerateDlg(CWnd* pParent /*=NULL*/) - : CDialog(CGenerateDlg::IDD, pParent) -{ - options.format = GN_UNICODE; - options.untranslated = GN_USEIDS; - langids[0] = LANGID_UNKNOWN; - filename[0] = 0; - //{{AFX_DATA_INIT(CGenerateDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void CGenerateDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CGenerateDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CGenerateDlg, CDialog) - //{{AFX_MSG_MAP(CGenerateDlg) - ON_BN_CLICKED(IDC_SELECTALL, OnSelectall) - ON_BN_CLICKED(IDC_INVERT, OnInvert) - ON_EN_CHANGE(IDC_PREFIX, OnChangePrefix) - ON_BN_CLICKED(IDC_NOXSTR, OnNoxstr) - ON_BN_CLICKED(IDC_UNICODE, OnUnicode) - ON_BN_CLICKED(IDC_IDS, OnIds) - ON_BN_CLICKED(IDC_ORIGINAL, OnOriginal) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CGenerateDlg message handlers - -BOOL CGenerateDlg::OnInitDialog() -{ - int index; - LANGINFO *info; - - edit = (CEdit *) GetDlgItem ( IDC_PREFIX ); - unicode = (CButton *) GetDlgItem ( IDC_UNICODE ); - strfile = (CButton *) GetDlgItem ( IDC_NOXSTR ); - useids = (CButton *) GetDlgItem ( IDC_IDS ); - usetext = (CButton *) GetDlgItem ( IDC_ORIGINAL ); - list = (CListBox *) GetDlgItem ( IDC_LANGUAGE ); - filetext = ( CStatic *) GetDlgItem ( IDC_FILENAME ); - - CDialog::OnInitDialog(); - - // TODO: Add extra initialization here - - unicode->SetCheck ( 1 ); - useids->SetCheck ( 1 ); - edit->SetWindowText ( "Generals" ); - edit->SetLimitText ( 5 ); - - OnChangePrefix (); - - - index = 0; - while ( (info = GetLangInfo ( index )) ) - { - list->InsertString ( index, info->name ); - if ( info->langid == CurrentLanguage ) - { - list->SetSel ( index ); - } - - index++; - } - num_langs = index; - - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void CGenerateDlg::OnSelectall() -{ - // TODO: Add your control notification handler code here - list->SelItemRange ( TRUE, 0, num_langs-1 ); -} - -void CGenerateDlg::OnInvert() -{ - // TODO: Add your control notification handler code here - int index = 0; - - - while ( index < num_langs ) - { - list->SetSel ( index, !list->GetSel ( index )); - index++; - } - - -} - -void CGenerateDlg::OnChangePrefix() -{ - char buffer[30]; - - edit->GetWindowText ( buffer, 6 ); - - if ( options.format == GN_NOXSTR ) - { - strcat ( buffer, "_{xx}.str" ); - } - else - { - strcat ( buffer, "_{xx}.csf" ); - } - - filetext->SetWindowText ( buffer ); - -} - -void CGenerateDlg::OnNoxstr() -{ - // TODO: Add your control notification handler code here - options.format = GN_NOXSTR; - OnChangePrefix (); - unicode->SetCheck ( 0 ); - - -} - -void CGenerateDlg::OnUnicode() -{ - // TODO: Add your control notification handler code here - options.format = GN_UNICODE; - OnChangePrefix (); - strfile->SetCheck ( 0 ); - -} - -void CGenerateDlg::OnCancel() -{ - // TODO: Add extra cleanup here - - CDialog::OnCancel(); -} - -void CGenerateDlg::OnOK() -{ - char buffer[30]; - int count; - int i; - // TODO: Add extra validation here - - edit->GetWindowText ( buffer, sizeof ( filename) -1 ); - _getcwd ( filename, sizeof (filename ) -1 ); - strcat ( filename, "\\" ); - strcat ( filename, buffer ); - - count = list->GetSelItems ( num_langs, langindices ); - - if ( !count ) - { - AfxMessageBox ( "No languages selected" ); - return; - } - - num_langs = 0; - for ( i = 0; i langid; - } - } - - langids[num_langs] = LANGID_UNKNOWN; - - - CDialog::OnOK(); -} - -void CGenerateDlg::OnIds() -{ - options.untranslated = GN_USEIDS; - usetext->SetCheck ( 0 ); - -} - -void CGenerateDlg::OnOriginal() -{ - options.untranslated = GN_USEORIGINAL; - useids->SetCheck ( 0 ); -} diff --git a/Generals/Code/Tools/Babylon/GenerateDlg.h b/Generals/Code/Tools/Babylon/GenerateDlg.h deleted file mode 100644 index 4531a6c8154..00000000000 --- a/Generals/Code/Tools/Babylon/GenerateDlg.h +++ /dev/null @@ -1,92 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -#if !defined(AFX_GENERATEDLG_H__959D0D41_50A5_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_GENERATEDLG_H__959D0D41_50A5_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// GenerateDlg.h : header file -// - -#include "expimp.h" - -///////////////////////////////////////////////////////////////////////////// -// CGenerateDlg dialog - -class CGenerateDlg : public CDialog -{ - char filename[200]; - GNOPTIONS options; - LangID langids[200]; - int langindices[200]; - int num_langs; - CListBox *list; - CEdit *edit; - CStatic *filetext; - CButton *unicode; - CButton *strfile; - CButton *useids; - CButton *usetext; - -// Construction -public: - CGenerateDlg(CWnd* pParent = NULL); // standard constructor - - char* FilePrefix ( void ) { return filename; }; - GNOPTIONS* Options ( void ) { return &options; }; - LangID* Langauges ( void ) { return langids; }; - -// Dialog Data - //{{AFX_DATA(CGenerateDlg) - enum { IDD = IDD_GENERATE }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CGenerateDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CGenerateDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnSelectall(); - afx_msg void OnInvert(); - afx_msg void OnChangePrefix(); - afx_msg void OnNoxstr(); - afx_msg void OnUnicode(); - virtual void OnCancel(); - virtual void OnOK(); - afx_msg void OnIds(); - afx_msg void OnOriginal(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_GENERATEDLG_H__959D0D41_50A5_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/MatchDlg.cpp b/Generals/Code/Tools/Babylon/MatchDlg.cpp deleted file mode 100644 index 4a1d7ddd66b..00000000000 --- a/Generals/Code/Tools/Babylon/MatchDlg.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// MatchDlg.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "MatchDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -NoxText *MatchingNoxText = NULL; -NoxText *MatchOriginalText; -NoxLabel *MatchLabel; - -#define MAX_MATCH 256 -static NoxText *current_match = NULL; - -///////////////////////////////////////////////////////////////////////////// -// CMatchDlg dialog - - -CMatchDlg::CMatchDlg(CWnd* pParent /*=NULL*/) - : CDialog(CMatchDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CMatchDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void CMatchDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CMatchDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CMatchDlg, CDialog) - //{{AFX_MSG_MAP(CMatchDlg) - ON_BN_CLICKED(IDC_NOMATCH, OnNomatch) - ON_BN_CLICKED(IDC_MATCH, OnMatch) - ON_BN_CLICKED(IDC_SKIP, OnSkip) - ON_CBN_SELCHANGE(IDC_MATCHCOMBO, OnSelchangeMatchcombo) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CMatchDlg message handlers - -void CMatchDlg::OnCancel() -{ - // TODO: Add extra cleanup here - - MatchingNoxText = NULL; - CDialog::OnCancel(); -} - -void CMatchDlg::OnNomatch() -{ - // TODO: Add your control notification handler code here - MatchingNoxText = NULL; - CDialog::OnOK (); -} - -void CMatchDlg::OnMatch() -{ - // TODO: Add your control notification handler code here - if ( (MatchingNoxText = current_match ) ) - { - CButton *check = (CButton *) GetDlgItem ( IDC_CHECKRETRANSLATE ); - - current_match->SetRetranslate ( check->GetCheck ()); - } - CDialog::OnOK (); -} - -BOOL CMatchDlg::OnInitDialog() -{ - NoxText *text; - ListSearch sh; - int index; - CStatic *newtext; - CComboBox *combo; - static char buffer[4*1024]; - - - sprintf ( buffer, "Resolve umatched text from \"%s\" on line %d", MatchLabel->NameSB(), - MatchOriginalText->LineNumber() ); - SetWindowText ( buffer ); - CDialog::OnInitDialog(); - - current_match = NULL; - - newtext = (CStatic *) GetDlgItem ( IDC_NEWTEXT ); - newtext->SetWindowText ( MatchOriginalText->GetSB()); - - combo = (CComboBox *) GetDlgItem ( IDC_MATCHCOMBO ); - CButton *check = (CButton *) GetDlgItem ( IDC_CHECKRETRANSLATE ); - check->SetCheck ( 1 ); - - text = MatchLabel->FirstText ( sh ); - index = 0; - - while ( text ) - { - if ( !text->Matched ()) - { - int result; - - result = combo->InsertString ( index, text->GetSB ()); - result = combo->SetItemDataPtr ( index, text ); - - if ( result == CB_ERR ) - { - result = 0; - } - if ( result == CB_ERRSPACE ) - { - result = 0; - } - index++; - } - - text = MatchLabel->NextText ( sh ); - } - - combo->SetCurSel ( 0 ); - OnSelchangeMatchcombo(); - MatchingNoxText = NULL; - // TODO: Add extra initialization here - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - -void CMatchDlg::OnSelchangeMatchcombo() -{ - // TODO: Add your control notification handler code here - int index; - CComboBox *combo = (CComboBox *) GetDlgItem ( IDC_MATCHCOMBO ); - - index = combo->GetCurSel (); - - if ( index >= 0 ) - { - CStatic *newtext = (CStatic *) GetDlgItem ( IDC_MATCHTEXT ); - current_match = (NoxText *) combo->GetItemDataPtr ( index ); - newtext->SetWindowText ( current_match->GetSB()); - } - else - { - current_match = NULL; - } -} - -void CMatchDlg::OnSkip() -{ - // TODO: Add your control notification handler code here - EndDialog ( IDSKIP ); -} - - diff --git a/Generals/Code/Tools/Babylon/MatchDlg.h b/Generals/Code/Tools/Babylon/MatchDlg.h deleted file mode 100644 index fa7c19a6469..00000000000 --- a/Generals/Code/Tools/Babylon/MatchDlg.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -#if !defined(AFX_MATCHDLG_H__FA868061_4EA7_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_MATCHDLG_H__FA868061_4EA7_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// MatchDlg.h : header file -// - -#include "TransDB.h" -#define IDSKIP 100 - -///////////////////////////////////////////////////////////////////////////// -// CMatchDlg dialog - -class CMatchDlg : public CDialog -{ -// Construction -public: - CMatchDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CMatchDlg) - enum { IDD = IDD_MATCH }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CMatchDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CMatchDlg) - virtual void OnCancel(); - afx_msg void OnNomatch(); - afx_msg void OnMatch(); - virtual BOOL OnInitDialog(); - afx_msg void OnSkip(); - afx_msg void OnSelchangeMatchcombo(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -extern NoxText *MatchingNoxText; -extern NoxText *MatchOriginalText; -extern NoxLabel *MatchLabel; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_MATCHDLG_H__FA868061_4EA7_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/ProceedDlg.cpp b/Generals/Code/Tools/Babylon/ProceedDlg.cpp deleted file mode 100644 index be572b825eb..00000000000 --- a/Generals/Code/Tools/Babylon/ProceedDlg.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// ProceedDlg.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "ProceedDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// ProceedDlg dialog - - -ProceedDlg::ProceedDlg(const char *nmessage, CWnd* pParent /*=NULL*/) - : CDialog(ProceedDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(ProceedDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT - message = nmessage; -} - - -void ProceedDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(ProceedDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(ProceedDlg, CDialog) - //{{AFX_MSG_MAP(ProceedDlg) - ON_BN_CLICKED(IDC_YES, OnYes) - ON_BN_CLICKED(IDC_ALWAYS, OnAlways) - ON_BN_CLICKED(IDC_NO, OnNo) - ON_WM_CLOSE() - ON_BN_CLICKED(IDC_BUTTON_NO, OnNo) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// ProceedDlg message handlers - -void ProceedDlg::OnYes() -{ - // TODO: Add your control notification handler code here - EndDialog ( IDYES ); - -} - -void ProceedDlg::OnAlways() -{ - // TODO: Add your control notification handler code here - EndDialog ( IDALWAYS ); - -} - -void ProceedDlg::OnNo() -{ - // TODO: Add your control notification handler code here - EndDialog ( IDNO ); - -} - -void ProceedDlg::OnClose() -{ - // TODO: Add your message handler code here and/or call default - - EndDialog ( IDNO ); - CDialog::OnClose(); -} - -BOOL ProceedDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - SetDlgItemText ( IDC_MESSAGE, message ); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} diff --git a/Generals/Code/Tools/Babylon/ProceedDlg.h b/Generals/Code/Tools/Babylon/ProceedDlg.h deleted file mode 100644 index a75bb20c1d5..00000000000 --- a/Generals/Code/Tools/Babylon/ProceedDlg.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -#if !defined(AFX_PROCEEDDLG_H__35C33E24_5AD8_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_PROCEEDDLG_H__35C33E24_5AD8_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// ProceedDlg.h : header file -// -#define IDALWAYS 101 - -///////////////////////////////////////////////////////////////////////////// -// ProceedDlg dialog - -class ProceedDlg : public CDialog -{ -// Construction - const char *message; -public: - ProceedDlg(const char *message, CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(ProceedDlg) - enum { IDD = IDD_PROCEED }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(ProceedDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(ProceedDlg) - afx_msg void OnYes(); - afx_msg void OnAlways(); - afx_msg void OnNo(); - afx_msg void OnClose(); - virtual BOOL OnInitDialog(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_PROCEEDDLG_H__35C33E24_5AD8_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/Report.cpp b/Generals/Code/Tools/Babylon/Report.cpp deleted file mode 100644 index d3a4a97229f..00000000000 --- a/Generals/Code/Tools/Babylon/Report.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// Report.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "Report.h" -#include - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CReport dialog - - -CReport::CReport(CWnd* pParent /*=NULL*/) - : CDialog(CReport::IDD, pParent) -{ - - options.translations = TRUE; - options.dialog = TRUE; - options.limit = 0; - langids[0] = LANGID_UNKNOWN; - filename[0] = 0; - //{{AFX_DATA_INIT(CReport) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void CReport::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CReport) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CReport, CDialog) - //{{AFX_MSG_MAP(CReport) - ON_BN_CLICKED(IDC_INVERT, OnInvert) - ON_BN_CLICKED(IDC_SELECTALL, OnSelectall) - ON_BN_CLICKED(IDC_SHOW_DETAILS, OnShowDetails) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CReport message handlers - -BOOL CReport::OnInitDialog() -{ - int index; - LANGINFO *info; - - limit = (CEdit *) GetDlgItem ( IDC_LIMIT ); - trans_status = (CButton *) GetDlgItem ( IDC_TRANSLATION_STATUS ); - dialog_status = (CButton *) GetDlgItem ( IDC_DIALOG_STATUS ); - show_details = (CButton *) GetDlgItem ( IDC_SHOW_DETAILS ); - ifless = (CButton *) GetDlgItem ( IDC_IFLESS ); - list = (CListBox *) GetDlgItem ( IDC_LANGUAGE ); - items = (CStatic *) GetDlgItem ( IDC_ITEMS ); - - CDialog::OnInitDialog(); - - // TODO: Add extra initialization here - - trans_status->SetCheck ( options.translations ); - dialog_status->SetCheck ( options.dialog ); - show_details->SetCheck ( 0 ); - ifless->SetCheck ( 1 ); - limit->EnableWindow ( FALSE ); - ifless->EnableWindow ( FALSE ); - items->EnableWindow ( FALSE ); - limit->SetWindowText ( "100" ); - limit->SetLimitText ( 50 ); - options.limit = 100; - - index = 0; - while ( (info = GetLangInfo ( index )) ) - { - list->InsertString ( index, info->name ); - if ( info->langid == CurrentLanguage ) - { - list->SetSel ( index ); - } - - index++; - } - num_langs = index; - - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void CReport::OnSelectall() -{ - // TODO: Add your control notification handler code here - list->SelItemRange ( TRUE, 0, num_langs-1 ); -} - -void CReport::OnInvert() -{ - // TODO: Add your control notification handler code here - int index = 0; - - - while ( index < num_langs ) - { - list->SetSel ( index, !list->GetSel ( index )); - index++; - } - - -} - - - -void CReport::OnShowDetails() -{ - // TODO: Add your control notification handler code here - if ( show_details->GetCheck () == 0 ) - { - ifless->EnableWindow ( FALSE ); - limit->EnableWindow ( FALSE ); - items->EnableWindow ( FALSE ); - } - else - { - ifless->EnableWindow ( TRUE ); - limit->EnableWindow ( TRUE ); - items->EnableWindow ( TRUE ); - } -} - -void CReport::OnOK() -{ - int count; - int i; - char buffer[100]; - - count = list->GetSelItems ( num_langs, langindices ); - - if ( !count ) - { - AfxMessageBox ( "No languages selected" ); - return; - } - -// get the filename - CFileDialog fd ( FALSE , NULL, "*.txt", OFN_OVERWRITEPROMPT | OFN_NOCHANGEDIR ); - - if ( fd.DoModal () != IDOK ) - { - return; - } - - strcpy ( filename, fd.GetPathName ()); - - num_langs = 0; - for ( i = 0; i langid; - } - } - - langids[num_langs] = LANGID_UNKNOWN; - - options.dialog = dialog_status->GetCheck (); - options.translations = trans_status->GetCheck (); - limit->GetWindowText( buffer, sizeof(buffer)-1); - options.limit = atoi ( buffer ); - - if ( !show_details->GetCheck () ) - { - options.limit = 0; - } - else if ( !ifless->GetCheck () ) - { - options.limit = INT_MAX; - } - - - CDialog::OnOK(); -} - -void CReport::OnCancel() -{ - // TODO: Add extra cleanup here - - CDialog::OnCancel(); -} diff --git a/Generals/Code/Tools/Babylon/Report.h b/Generals/Code/Tools/Babylon/Report.h deleted file mode 100644 index eb11c1a76f0..00000000000 --- a/Generals/Code/Tools/Babylon/Report.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -#if !defined(AFX_REPORT_H__47F98BA1_70E3_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_REPORT_H__47F98BA1_70E3_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// Report.h : header file -// - -#include "expimp.h" - -///////////////////////////////////////////////////////////////////////////// -// CReport dialog - -class CReport : public CDialog -{ - char filename[300]; - RPOPTIONS options; - LangID langids[200]; - int langindices[200]; - int num_langs; - CListBox *list; - CEdit *limit; - CButton *dialog_status; - CButton *trans_status; - CButton *show_details; - CButton *ifless; - CStatic *items; - - -// Construction -public: - CReport(CWnd* pParent = NULL); // standard constructor - - char* Filename ( void ) { return filename; }; - RPOPTIONS* Options ( void ) { return &options; }; - LangID* Langauges ( void ) { return langids; }; - -// Dialog Data - //{{AFX_DATA(CReport) - enum { IDD = IDD_CREATE_REPORTS }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CReport) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CReport) - virtual BOOL OnInitDialog(); - afx_msg void OnInvert(); - afx_msg void OnSelectall(); - afx_msg void OnShowDetails(); - virtual void OnOK(); - virtual void OnCancel(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_REPORT_H__47F98BA1_70E3_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/RetranslateDlg.cpp b/Generals/Code/Tools/Babylon/RetranslateDlg.cpp deleted file mode 100644 index 9ec76117400..00000000000 --- a/Generals/Code/Tools/Babylon/RetranslateDlg.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// RetranslateDlg.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "RetranslateDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// RetranslateDlg dialog - - -RetranslateDlg::RetranslateDlg(CWnd* pParent /*=NULL*/) - : CDialog(RetranslateDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(RetranslateDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void RetranslateDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(RetranslateDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(RetranslateDlg, CDialog) - //{{AFX_MSG_MAP(RetranslateDlg) - ON_WM_CANCELMODE() - ON_BN_CLICKED(IDC_MATCH, OnRetranslate) - ON_BN_CLICKED(IDC_SKIP, OnSkip) - ON_BN_CLICKED(IDC_NOMATCH, OnNoRetranslate) - ON_BN_CLICKED(IDCANCEL, OnSkipAll) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// RetranslateDlg message handlers - -BOOL RetranslateDlg::OnInitDialog() -{ - // TODO: Add extra initialization here - CStatic *text; - static char buffer[4*1024]; - - - CDialog::OnInitDialog(); - - text = (CStatic *) GetDlgItem ( IDC_NEWTEXT ); - text->SetWindowText ( newtext->GetSB()); - - text = (CStatic *) GetDlgItem ( IDC_OLDTEXT ); - text->SetWindowText ( oldtext->GetSB()); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void RetranslateDlg::OnCancelMode() -{ - CDialog::OnCancelMode(); - - // TODO: Add your message handler code here - -} - -void RetranslateDlg::OnRetranslate() -{ - // TODO: Add your control notification handler code here - - - oldtext->SetRetranslate ( TRUE ); - CDialog::OnOK (); -} - -void RetranslateDlg::OnSkip() -{ - // TODO: Add your control notification handler code here - - EndDialog ( IDSKIP ); -} - -void RetranslateDlg::OnNoRetranslate() -{ - // TODO: Add your control notification handler code here - - oldtext->SetRetranslate ( FALSE ); - CDialog::OnOK (); -} - -void RetranslateDlg::OnSkipAll() -{ - // TODO: Add your control notification handler code here - - CDialog::OnCancel (); -} diff --git a/Generals/Code/Tools/Babylon/RetranslateDlg.h b/Generals/Code/Tools/Babylon/RetranslateDlg.h deleted file mode 100644 index 2be8b94cd5d..00000000000 --- a/Generals/Code/Tools/Babylon/RetranslateDlg.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -#if !defined(AFX_RETRANSLATEDLG_H__19E25401_0ECB_11D4_B9DB_006097B90D93__INCLUDED_) -#define AFX_RETRANSLATEDLG_H__19E25401_0ECB_11D4_B9DB_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// RetranslateDlg.h : header file -// - -#include "TransDB.h" -#define IDSKIP 100 -///////////////////////////////////////////////////////////////////////////// -// RetranslateDlg dialog - -class RetranslateDlg : public CDialog -{ -// Construction -public: - - NoxText *newtext; - NoxText *oldtext; - - RetranslateDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(RetranslateDlg) - enum { IDD = IDD_RETRANSLATE }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(RetranslateDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(RetranslateDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnCancelMode(); - afx_msg void OnRetranslate(); - afx_msg void OnSkip(); - afx_msg void OnNoRetranslate(); - afx_msg void OnSkipAll(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_RETRANSLATEDLG_H__19E25401_0ECB_11D4_B9DB_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/STRCHECK.PL b/Generals/Code/Tools/Babylon/STRCHECK.PL deleted file mode 100644 index 77e20159ebc..00000000000 --- a/Generals/Code/Tools/Babylon/STRCHECK.PL +++ /dev/null @@ -1,192 +0,0 @@ -# -# Command & Conquer Generalsâ„¢ -# Copyright 2025 Electronic Arts Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -sub ShowWarning; -sub ShowError; - -$noxScript = shift || 'C:\Nox\Game\nox.str'; -$outFile = shift; - -open(STR, $noxScript) || die "Can't open Nox string file: $!\n"; - -if ($outFile) -{ - open(STDOUT, ">$outFile") || die "Can't open output file: $!\n"; -} -select((select(STDOUT), $| = 1)[0]); - -$state = 0; -$line = 0; -$strcount = 0; -$strMaxCount = 32; -$lastFileName = ""; -$lastFileNameLine = 0; -$ignoreErrors = 0; -$errCount = 0; -%labels = (); - - -while () -{ - $strline = $_; - $line++; - $strline =~ s/\/\/.*//g; - $strline =~ s/^\s*//g; - $strline =~ s/\s*$//g; - if (! ($strline eq "")) - { - if ($state == 0) - { - if (! ($strline =~ /^[^\"][^ :]*:[^ :]*[^\"]$/)) - { - ShowError($line, $strline, "Expecting 'file:name'\n"); - } - else - { - if (defined ($labels{$strline})) - { - ShowWarning($line, $strline, "Duplicate label at line $labels{$strline}\n"); - } - - $labels{$strline} = $line; - $lastFileName = $strline; - $lastFileNameLine = $line; - $strcount = 0; - $ignoreErrors = 0; - $state = 1; - } - } - - elsif ($state == 1) - { - if (++$strcount >= $strMaxCount) - { - ShowError($line, $strline, "Too many strings ($strcount) - suspected missing END from section $lastFileName on line $lastFileNameLine\n"); - } - elsif ($strline =~ /^END$/i) - { - $state = 0; - } - elsif ($strline =~ /\/n/i) - { - ShowWarning($line, $strline, "'/n'? This should probably be '\\n' instead\n"); - } - elsif ($strline =~ /^\"[^\"]*[^\"]$/) - { - $state = 2; - } - else - { - $strline =~ s/\"\s*={0,1}\s*[a-zA-Z0-9_\.]*[^\"]$/\"/i; - - if (! ($strline =~ /^\".*\"$/)) - { - if ($strline =~ /^[^\"][^ :]*:[^ :]*[^\"]$/) - { - ShowError($line, $strline, "Missing quote - suspected missing END from section $lastFileName on line $lastFileNameLine\n"); - } - else - { - ShowError($line, $strline, "Missing quote\n"); - } - } - } - } - - elsif ($state == 2) - { - $strline =~ s/\"\s*={0,1}\s*[a-zA-Z0-9_\.]*[^\"]$/\"/i; - if (++$strcount >= $strMaxCount) - { - ShowError($line, $strline, "Too many strings ($strcount) - suspected missing END from section $lastFileName on line $lastFileNameLine\n"); - } - elsif ($strline =~ /\/n/i) - { - ShowWarning($line, $strline, "'/n'? This should probably be '\\n' instead\n"); - } - elsif ($strline =~ /^[^\"].*\"$/) - { - $state = 1; - } - elsif (! ($strline =~ /^[^\"].*[^\"]$/)) - { - ShowError($line, $strline, "Extra quote character found at start of line\n"); - } - elsif ($strline =~ /^END$/i) - { - ShowWarning($line, $strline, "Suspiciously placed 'END'. Maybe missing an end-quote from previous section\n"); - } - } - } -} - -if ($state != 0) -{ - ShowError($line, $strline, "Missing END\n"); -} - -print STDOUT "$line lines processed\n"; - -close(STR); - -if ($errCount == 0) -{ - open(RESULT, ">strcheck.err") || die "Can't open output file: $!\n"; - print RESULT "OK"; - close (RESULT); - -} - -exit($errCount); - -sub ShowWarning -{ - my ($errLine, $errString, $errDesc) = @_; - - if (length($errString) > 32) - { - $errString = substr($errString, 0, 32) . "..."; - } - - if ($ignoreErrors == 0) - { - print STDOUT "$noxScript($errLine) : warning: '$errString' : $errDesc"; - } - - $state = 0; - $ignoreErrors = 1; -} - -sub ShowError -{ - my ($errLine, $errString, $errDesc) = @_; - - if (length($errString) > 32) - { - $errString = substr($errString, 0, 32) . "..."; - } - - if ($ignoreErrors == 0) - { - print STDOUT "$noxScript($errLine) : error: '$errString' : $errDesc"; - $errCount++; - } - - $state = 0; - $ignoreErrors = 1; -} diff --git a/Generals/Code/Tools/Babylon/StdAfx.cpp b/Generals/Code/Tools/Babylon/StdAfx.cpp deleted file mode 100644 index 57986e9bc13..00000000000 --- a/Generals/Code/Tools/Babylon/StdAfx.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// stdafx.cpp : source file that includes just the standard includes -// noxstring.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "StdAfx.h" - - - diff --git a/Generals/Code/Tools/Babylon/StdAfx.h b/Generals/Code/Tools/Babylon/StdAfx.h deleted file mode 100644 index 76bfc93679a..00000000000 --- a/Generals/Code/Tools/Babylon/StdAfx.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__2BF31252_3BA1_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_STDAFX_H__2BF31252_3BA1_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -// TheSuperHackers @compile xezon 24/03/2025 Prevent afxwin.h from loading d3d9types.h, colliding with our own DirectX library. -#define _d3d9TYPES_H_ - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC Automation classes -#include // MFC support for Internet Explorer 4 Common Controls -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - - -// This macro is the same as IMPLEMENT_OLECREATE, except it passes TRUE -// for the bMultiInstance parameter to the COleObjectFactory constructor. -// We want a separate instance of this application to be launched for -// each automation proxy object requested by automation controllers. -#ifndef IMPLEMENT_OLECREATE2 -#define IMPLEMENT_OLECREATE2(class_name, external_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ - AFX_DATADEF COleObjectFactory class_name::factory(class_name::guid, \ - RUNTIME_CLASS(class_name), TRUE, _T(external_name)); \ - const AFX_DATADEF GUID class_name::guid = \ - { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }; -#endif // IMPLEMENT_OLECREATE2 - -#include "excel8.h" - -extern char AppTitle[]; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_STDAFX_H__2BF31252_3BA1_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/TransDB.cpp b/Generals/Code/Tools/Babylon/TransDB.cpp deleted file mode 100644 index 50d835fb1de..00000000000 --- a/Generals/Code/Tools/Babylon/TransDB.cpp +++ /dev/null @@ -1,1905 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// TransDB.cpp -// - -#include "StdAfx.h" -#include "TransDB.h" -#include "noxstringDlg.h" -#include "noxstring.h" -#include "assert.h" -#include "bin.h" -#include "list.h" - -static char buffer[100*1024]; - -static List DataBases; - -static LANGINFO langinfo[] = - { - { LANGID_US, "US", "us", "e"}, - { LANGID_UK, "UK", "uk", "e" }, - { LANGID_GERMAN, "German", "ge", "g" }, - { LANGID_FRENCH, "French", "fr", "f" }, - { LANGID_SPANISH, "Spanish", "sp", "s" }, - { LANGID_ITALIAN, "Italian", "it", "i" }, - { LANGID_JAPANESE, "Japanese", "ja", "j" }, - { LANGID_KOREAN, "Korean", "ko", "k" }, - { LANGID_CHINESE, "Chinese", "ch", "c" }, - { LANGID_JABBER, "Jabberwockie", "jb", "e" }, - { LANGID_UNKNOWN, "Unknown", NULL, NULL } - }; - -LANGINFO *GetLangInfo ( int index ) -{ - - if ( (index >= 0) && (index < (sizeof ( langinfo ) / sizeof (LANGINFO )) -1) ) - { - return &langinfo[index]; - } - - return NULL; -} - -LANGINFO *GetLangInfo ( LangID langid ) -{ - LANGINFO *item; - - item = langinfo; - - while ( item->langid != LANGID_UNKNOWN ) - { - if ( item->langid == langid ) - { - return item; - } - item++; - } - - return NULL; -} - -const char *GetLangName ( LangID langid ) -{ - LANGINFO *item; - - if ( ( item = GetLangInfo ( langid )) ) - { - return item->name; - } - - return "unknown"; -} - -LANGINFO *GetLangInfo ( char *language ) -{ - LANGINFO *item; - - item = langinfo; - - while ( item->langid != LANGID_UNKNOWN ) - { - if ( !stricmp ( language, item->name ) ) - { - return item; - } - item++; - } - - return NULL; -} - -TransDB* FirstTransDB ( void ) -{ - ListNode *first; - - first = DataBases.Next (); - if ( first ) - { - return (TransDB *) first->Item (); - } - return NULL; -} - -TransDB::TransDB ( const char *cname ) -{ - text_bin = new Bin (); - text_id_bin = new BinID (); - label_bin = new Bin (); - obsolete_bin = new Bin (); - strncpy ( name, cname, sizeof ( name ) -1 ); - name[sizeof(name)-1] = 0; - node.SetItem ( this ); - DataBases.AddToTail ( &node ); - next_string_id = -1; - valid = TRUE; - num_obsolete = 0; - checked_for_errors = FALSE; - flags = TRANSDB_OPTION_NONE | TRANSDB_OPTION_DUP_TEXT; -} - -TransDB:: ~TransDB ( ) -{ - Clear (); - node.Remove (); - delete text_bin; - delete text_id_bin; - delete label_bin; - delete obsolete_bin; - -} - -void TransDB::AddLabel ( NoxLabel *label ) -{ - ListNode *node = new ListNode (); - - node->SetItem ( label ); - - label_bin->Add ( label, label->Name() ); - - labels.AddToTail ( node ); - label->SetDB ( this ); - Changed (); - -} - -void TransDB::AddText ( NoxText *text ) -{ - - text_bin->Add ( text, text->Get() ); - if ( text->ID () > 0 ) - { - text_id_bin->Add ( text, text->ID ()); - } - -} - -void TransDB::AddObsolete ( NoxText *text ) -{ - ListNode *node = new ListNode (); - - node->SetItem ( text ); - - obsolete_bin->Add ( text, text->Get() ); - if ( text->ID () > 0 ) - { - text_id_bin->Add ( text, text->ID ()); - } - - num_obsolete++; - text->SetParent ( (DBAttribs *)this ); - text->Changed (); - - obsolete.AddToTail ( node ); - Changed (); - -} - -void TransDB::RemoveLabel ( NoxLabel *label ) -{ - ListNode *node; - - if ( (node = labels.Find ( label )) ) - { - node->Remove (); - label->SetDB ( NULL ); - label_bin->Remove ( label ); - delete node; - Changed (); - } -} - -void TransDB::RemoveText ( NoxText *text ) -{ - text_bin->Remove ( text ); - text_id_bin->Remove ( text ); -} - -void TransDB::RemoveObsolete ( NoxText *text ) -{ - ListNode *node; - - if ( (node = obsolete.Find ( text )) ) - { - node->Remove (); - obsolete_bin->Remove ( text ); - text_id_bin->Remove ( text ); - num_obsolete--; - delete node; - Changed (); - } -} - -int TransDB::NumLabelsChanged ( void ) -{ - NoxLabel *label; - ListSearch sh; - int changed = 0; - - label = FirstLabel ( sh ); - - while ( label ) - { - if ( label->IsChanged ()) - { - changed++; - } - - label = NextLabel ( sh ); - } - - return changed; -} - -int TransDB::NumLabels ( void ) -{ - - return labels.NumItems(); -} - -NoxLabel* TransDB::FirstLabel ( ListSearch& sh ) -{ - ListNode *node; - - if ( ( node = sh.FirstNode ( &labels ))) - { - return (NoxLabel *) node->Item (); - } - - return NULL; -} - -NoxLabel* TransDB::NextLabel ( ListSearch& sh) -{ - ListNode *node; - - if ( ( node = sh.Next ())) - { - return (NoxLabel *) node->Item (); - } - - return NULL; -} - -NoxText* TransDB::FirstObsolete ( ListSearch& sh ) -{ - ListNode *node; - - if ( ( node = sh.FirstNode ( &obsolete ))) - { - return (NoxText *) node->Item (); - } - - return NULL; -} - -NoxText* TransDB::NextObsolete ( ListSearch& sh) -{ - ListNode *node; - - if ( ( node = sh.Next ())) - { - return (NoxText *) node->Item (); - } - - return NULL; -} - -NoxLabel* TransDB::FindLabel ( OLECHAR *name ) -{ - return (NoxLabel *) label_bin->Get ( name ); -} - -NoxText* TransDB::FindText ( OLECHAR *text ) -{ - - return (NoxText *) text_bin->Get ( text ); -} - -NoxText* TransDB::FindSubText ( OLECHAR *pattern, int item ) -{ - NoxLabel *label; - ListSearch sh; - NoxText *text; - ListSearch sh_text; - int plen = wcslen ( pattern ); - - label = FirstLabel ( sh ); - - while ( label ) - { - text = label->FirstText ( sh_text ); - - while ( text ) - { - - if ( !wcsnicmp ( text->Get (), pattern, 15 )) - { - if ( !item ) - { - return text; - } - - item--; - } - - text = label->NextText ( sh_text ); - } - - label = NextLabel ( sh ); - } - - return NULL; - -} - -NoxText* TransDB::FindText ( int id ) -{ - - return (NoxText *) text_id_bin->Get ( id ); -} - -NoxText* TransDB::FindNextText ( void ) -{ - - return (NoxText *) text_bin->GetNext ( ); -} - -NoxText* TransDB::FindObsolete ( OLECHAR *name ) -{ - return (NoxText *) obsolete_bin->Get ( name ); -} - -NoxText* TransDB::FindNextObsolete ( void ) -{ - - return (NoxText *) obsolete_bin->GetNext ( ); - -} - -int TransDB::Clear ( void ) -{ - ListSearch sh; - NoxLabel *label; - NoxText *text; - ListNode *node; - int count = 0; - - text_bin->Clear (); - text_id_bin->Clear (); - label_bin->Clear (); - obsolete_bin->Clear (); - - while ( node = sh.FirstNode ( &labels ) ) - { - node->Remove (); - label = (NoxLabel *) node->Item (); - count++; - delete label; - delete node; - } - - while ( node = sh.FirstNode ( &obsolete ) ) - { - node->Remove (); - text = (NoxText *) node->Item (); - count++; - delete text; - delete node; - } - - num_obsolete = 0; - - if ( next_string_id != -1 ) - { - next_string_id = START_STRING_ID; - } - - if ( count ) - { - Changed (); - } - - valid = TRUE; - - return count; -} - -void TransDB::ClearChanges ( void ) -{ - ListSearch sh; - NoxLabel *label; - - label = FirstLabel ( sh ); - while ( label ) - { - label->ClearChanges (); - label = NextLabel ( sh ); - } - - NoxText *text = FirstObsolete ( sh ); - while ( text ) - { - text->ClearChanges (); - text = NextObsolete ( sh ); - } - - NotChanged (); -} - -void TransDB::ClearProcessed ( void ) -{ - ListSearch sh; - NoxLabel *label; - - label = FirstLabel ( sh ); - while ( label ) - { - label->ClearProcessed (); - label = NextLabel ( sh ); - } - NotProcessed (); -} - -void TransDB::ClearMatched ( void ) -{ - ListSearch sh; - NoxLabel *label; - - label = FirstLabel ( sh ); - while ( label ) - { - label->ClearMatched (); - label = NextLabel ( sh ); - } - NotMatched (); -} - -void TransDB::AddToTree ( CTreeCtrl *tc, HTREEITEM parent, int changes, void (*cb) ( void ) ) -{ - HTREEITEM item; - HTREEITEM ilabels, iobsolete; - ListSearch sh; - NoxLabel *label; - NoxText *txt; - - sprintf ( buffer, "%s%c (%d/%d)",name, ChangedSymbol(), NumLabelsChanged(), NumLabels() ); - item = tc->InsertItem ( buffer, parent ); - ilabels = tc->InsertItem ( "Labels", item ); - - label = FirstLabel ( sh ); - - while ( label ) - { - if ( !changes || label->IsChanged ()) - { - label->AddToTree ( tc, ilabels, changes ); - } - - if ( cb ) - { - cb ( ); - } - - label = NextLabel ( sh ); - } - - if ( num_obsolete ) - { - iobsolete = tc->InsertItem ( "Obsolete Strings", item ); - - txt = FirstObsolete ( sh ); - - while ( txt ) - { - if ( !changes || txt->IsChanged ()) - { - txt->AddToTree ( tc, iobsolete ); - } - - if ( cb ) - { - cb ( ); - } - - txt = NextObsolete ( sh ); - } - } - - -} - -TransDB* TransDB::Next ( void ) -{ - ListNode *next; - - next = node.Next (); - - if ( next ) - { - return (TransDB *) next->Item (); - } - - return NULL; - -} - -void NoxLabel::init ( void ) -{ - db = NULL; - comment = NULL; - line_number = -1; - max_len = 0; - name = NULL; -} - -NoxLabel::NoxLabel ( void ) -{ - init (); - name = new OLEString ( ); - comment = new OLEString ( ); - context = new OLEString ( ); - speaker = new OLEString ( ); - listener = new OLEString ( ); - - -} - -NoxLabel::~NoxLabel ( ) -{ - Clear (); - delete name; - delete comment; - delete context; - delete speaker; - delete listener; -} - -void NoxLabel::Remove ( void ) -{ - if ( db ) - { - db->RemoveLabel ( this ); - } -} - -void NoxLabel::RemoveText ( NoxText *txt ) -{ - ListNode *node; - - if ( (node = text.Find ( txt )) ) - { - node->Remove (); - txt->SetDB ( NULL ); - txt->SetLabel ( NULL ); - txt->SetParent ( NULL ); - delete node; - Changed (); - } -} - -void NoxLabel::AddText ( NoxText *new_text ) -{ - TransDB *db = DB(); - ListNode *node = new ListNode (); - - node->SetItem ( new_text ); - - text.AddToTail ( node ); - Changed (); - new_text->SetDB ( db ); - new_text->SetParent ( (DBAttribs *) this ); - new_text->SetLabel ( this ); -} - -int NoxLabel::Clear ( void ) -{ - ListSearch sh; - NoxText *txt; - ListNode *node; - int count = 0; - - while ( node = sh.FirstNode ( &text ) ) - { - node->Remove (); - txt = (NoxText *) node->Item (); - delete txt; - delete node; - count++; - } - - if ( count ) - { - Changed (); - } - - return count; -} - -NoxLabel* NoxLabel::Clone ( void ) -{ - NoxLabel *clone = new NoxLabel(); - NoxText *txt; - ListSearch sh; - - clone->SetName ( Name()); - clone->SetComment ( Comment ()); - clone->SetListener ( Listener ()); - clone->SetSpeaker ( Speaker ()); - clone->SetMaxLen ( MaxLen ()); - clone->SetContext ( Context ()); - - txt = FirstText ( sh ); - - while ( txt ) - { - clone->AddText ( txt->Clone ()); - - txt = NextText ( sh ); - } - - return clone; -} - -NoxText* NoxLabel::FirstText ( ListSearch& sh ) -{ - ListNode *node; - - if ( ( node = sh.FirstNode ( &text ))) - { - return (NoxText *) node->Item (); - } - - return NULL; -} - -NoxText* NoxLabel::NextText ( ListSearch& sh) -{ - ListNode *node; - - if ( ( node = sh.Next ( ))) - { - return (NoxText *) node->Item (); - } - - return NULL; - -} - -NoxText* NoxLabel::FindText ( OLECHAR *find_text ) -{ - ListSearch sh; - NoxText *txt; - - txt = FirstText ( sh ); - - while ( txt ) - { - if ( !wcscmp ( txt->Get(), find_text )) - { - return txt; - } - txt = NextText ( sh ); - } - - return NULL; -} - - -void NoxLabel::SetDB ( TransDB *new_db ) -{ - NoxText *ntext; - ListSearch sh; - - db = new_db; - SetParent ( (DBAttribs *) new_db ); - - ntext = FirstText ( sh ); - - while ( ntext ) - { - ntext->SetDB ( new_db ); - - ntext = NextText ( sh ); - } - -} - -void NoxLabel::ClearChanges ( void ) -{ - NoxText *ntext; - ListSearch sh; - - ntext = FirstText ( sh ); - - while ( ntext ) - { - ntext->ClearChanges(); - - ntext = NextText ( sh ); - } - - NotChanged(); - -} - -void NoxLabel::ClearProcessed ( void ) -{ - NoxText *ntext; - ListSearch sh; - - ntext = FirstText ( sh ); - - while ( ntext ) - { - ntext->ClearProcessed(); - - ntext = NextText ( sh ); - } - - NotProcessed(); - -} - -void NoxLabel::ClearMatched ( void ) -{ - NoxText *ntext; - ListSearch sh; - - ntext = FirstText ( sh ); - - while ( ntext ) - { - ntext->ClearMatched(); - - ntext = NextText ( sh ); - } - - NotMatched(); - -} - -int NoxLabel::AllMatched ( void ) -{ - NoxText *ntext; - ListSearch sh; - - ntext = FirstText ( sh ); - - while ( ntext ) - { - if ( !ntext->Matched() ) - { - return FALSE; - } - - ntext = NextText ( sh ); - } - - return TRUE; -} - -NoxText::NoxText( void ) -{ - init (); - text = new OLEString ( ); - wavefile = new OLEString ( ); - -} - -int NoxText::IsSent ( void ) -{ - return sent; -} - -void NoxText::Sent ( int val ) -{ - sent = val; -} - -void NoxLabel::AddToTree ( CTreeCtrl *tc, HTREEITEM parent, int changes ) -{ - HTREEITEM litem; - ListSearch sh; - NoxText *txt; - - sprintf ( buffer, "%s%c", NameSB(), ChangedSymbol() ); - - litem = tc->InsertItem ( buffer, parent ); - - txt = FirstText ( sh ); - - while ( txt ) - { - if ( !changes || txt->IsChanged ()) - { - txt->AddToTree ( tc, litem ); - } - - txt = NextText ( sh ); - } - - if ( strcmp ( CommentSB(), "" ) ) - { - sprintf ( buffer, "COMMENT : %s", CommentSB() ); - tc->InsertItem ( buffer, litem ); - } - - if ( strcmp ( ContextSB(), "" ) ) - { - sprintf ( buffer, "CONTEXT : %s", ContextSB() ); - tc->InsertItem ( buffer, litem ); - } - - if ( strcmp ( SpeakerSB(), "" ) ) - { - sprintf ( buffer, "SPEAKER : %s", SpeakerSB() ); - tc->InsertItem ( buffer, litem ); - } - - if ( strcmp ( ListenerSB(), "" ) ) - { - sprintf ( buffer, "LISTENER: %s", ListenerSB() ); - tc->InsertItem ( buffer, litem ); - } - - if ( line_number != -1 ) - { - sprintf ( buffer, "LINE : %d", line_number ); - tc->InsertItem ( buffer, litem ); - } - - if ( max_len ) - { - sprintf ( buffer, "MAX LEN : %d", max_len ); - tc->InsertItem ( buffer, litem ); - } - -} - -void NoxText::init ( void ) -{ - db = NULL; - label = NULL; - line_number = -1; - revision = 1; - text = NULL; - wavefile = NULL; - id = -1; - retranslate = FALSE; - sent = FALSE; - - -} - -NoxText::~NoxText( ) -{ - Clear(); - delete text; - delete wavefile; - -} - -void NoxText::SetDB ( TransDB *new_db ) -{ - Translation *trans; - ListSearch sh; - - if ( db ) - { - db->RemoveText ( this ); - } - - - if ( (db = new_db) ) - { - AssignID (); - db->AddText ( this ); - } - - trans = FirstTranslation ( sh ); - - while ( trans ) - { - trans->SetDB ( new_db ); - - trans = NextTranslation ( sh ); - } - -} - -void NoxText::Remove ( void ) -{ - if ( label ) - { - label->RemoveText ( this ); - } -} - -int NoxText::IsDialog ( void ) -{ - - return strcmp (WaveSB(), "" ); - -} - -int NoxText::DialogIsValid ( const char *path, LangID langid, int check ) -{ - LANGINFO *linfo; - CWaveInfo *winfo; - DBAttribs *attribs; - - linfo = GetLangInfo ( langid ); - - if ( langid == LANGID_US ) - { - winfo = &WaveInfo; - attribs = (DBAttribs *) this; - } - else - { - Translation *trans = GetTranslation ( langid ); - - if ( !trans ) - { - return FALSE; - } - - attribs = (DBAttribs *) trans; - winfo = &trans->WaveInfo; - } - - - if ( winfo->Valid () && check ) - { - WIN32_FIND_DATA info; - HANDLE handle; - - winfo->SetValid ( FALSE ); - winfo->SetMissing ( TRUE ); - - sprintf ( buffer, "%s%s\\%s%s.wav", path, linfo->character, WaveSB(), linfo->character ); - if ( (handle = FindFirstFile ( buffer, &info )) != INVALID_HANDLE_VALUE ) - { - if ( ! (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) - { - if ( winfo->Lo () == info.nFileSizeLow && winfo->Hi() == info.nFileSizeHigh ) - { - winfo->SetValid ( TRUE ); - } - winfo->SetMissing ( FALSE ); - } - - FindClose ( handle ); - } - - } - - return winfo->Valid (); -} - -int NoxText::ValidateDialog ( const char *path, LangID langid ) -{ - WIN32_FIND_DATA info; - HANDLE handle; - CWaveInfo *winfo; - LANGINFO *linfo; - DBAttribs *attribs; - - linfo = GetLangInfo ( langid ); - - if ( langid == LANGID_US ) - { - winfo = &WaveInfo; - attribs = (DBAttribs *) this; - } - else - { - Translation *trans = GetTranslation ( langid ); - - if ( !trans ) - { - return FALSE; - } - - attribs = (DBAttribs *) trans; - winfo = &trans->WaveInfo; - } - - winfo->SetValid ( FALSE ); - winfo->SetMissing ( TRUE ); - - sprintf ( buffer, "%s%s\\%s%s.wav", path, linfo->character , WaveSB(), linfo->character ); - if ( (handle = FindFirstFile ( buffer, &info )) != INVALID_HANDLE_VALUE ) - { - if ( ! (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) - { - winfo->SetLo ( info.nFileSizeLow ); - winfo->SetHi ( info.nFileSizeHigh ); - winfo->SetValid ( TRUE ); - winfo->SetMissing ( FALSE ); - attribs->Changed(); - } - FindClose ( handle ); - } - - return winfo->Valid (); -} - -int NoxText::DialogIsPresent ( const char *path, LangID langid ) -{ - - WIN32_FIND_DATA info; - HANDLE handle; - int present = FALSE; - LANGINFO *linfo = GetLangInfo ( langid ); - - sprintf ( buffer, "%s%s\\%s%s.wav", path, linfo->character , WaveSB(), linfo->character ); - if ( (handle = FindFirstFile ( buffer, &info )) != INVALID_HANDLE_VALUE ) - { - if ( ! (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) - { - present = TRUE; - } - - FindClose ( handle ); - } - - return present; -} - -void NoxText::AddTranslation ( Translation *trans ) -{ - ListNode *node = new ListNode (); - - node->SetItem ( trans ); - - translations.AddToTail ( node ); - Changed (); - trans->SetDB ( DB() ); - trans->SetParent ( (DBAttribs *) this ); - -} - -Translation* NoxText::FirstTranslation ( ListSearch& sh ) -{ - ListNode *node; - - if ( ( node = sh.FirstNode ( &translations ))) - { - return (Translation *) node->Item (); - } - - return NULL; -} - -Translation* NoxText::NextTranslation ( ListSearch& sh) -{ - ListNode *node; - - if ( ( node = sh.Next ( ))) - { - return (Translation *) node->Item (); - } - - return NULL; -} - -Translation* NoxText::GetTranslation ( LangID langid ) -{ - ListSearch sh; - Translation *trans; - - trans = FirstTranslation ( sh ); - - while ( trans ) - { - if ( langid == trans->GetLangID()) - { - break; - } - - trans = NextTranslation ( sh ); - } - - - return trans; -} - -int NoxText::Clear ( void ) -{ - ListSearch sh; - Translation *trans; - ListNode *node; - int count = 0; - - while ( node = sh.FirstNode ( &translations ) ) - { - node->Remove (); - trans = (Translation *) node->Item (); - delete trans; - delete node; - count++; - } - if ( count ) - { - Changed (); - } - - return count; -} - -NoxText* NoxText::Clone ( void ) -{ - NoxText *clone = new NoxText(); - Translation *trans; - ListSearch sh; - - clone->Set ( Get ()); - clone->SetWave ( Wave ()); - clone->SetRevision ( Revision ()); - - trans = FirstTranslation ( sh ); - - while ( trans ) - { - clone->AddTranslation ( trans->Clone ()); - - trans = NextTranslation ( sh ); - } - - return clone; -} - -void NoxText::ClearChanges ( void ) -{ - Translation *trans; - ListSearch sh; - - trans = FirstTranslation ( sh ); - - while ( trans ) - { - trans->ClearChanges(); - - trans = NextTranslation ( sh ); - } - - NotChanged(); - -} - -void NoxText::ClearProcessed ( void ) -{ - Translation *trans; - ListSearch sh; - - trans = FirstTranslation ( sh ); - - while ( trans ) - { - trans->ClearProcessed(); - - trans = NextTranslation ( sh ); - } - - NotProcessed(); - -} - -void NoxText::ClearMatched ( void ) -{ - Translation *trans; - ListSearch sh; - - trans = FirstTranslation ( sh ); - - while ( trans ) - { - trans->ClearMatched(); - - trans = NextTranslation ( sh ); - } - - NotMatched(); - -} - -void NoxText::AssignID ( void ) -{ - if ( id != -1 ) - { - return; // already assigned - } - if ( db ) - { - SetID ( db->NewID ()); - } -} - -void NoxText::Set ( OLECHAR *string ) -{ - if ( db ) - { - db->RemoveText ( this ); - } - - text->Set ( string ); - InvalidateWave ( ); - if ( db ) - { - db->AddText ( this ); - } - - Changed (); -} - -void NoxText::Set ( char *string ) -{ - if ( db ) - { - db->RemoveText ( this ); - } - - text->Set ( string ); - InvalidateWave (); - if ( db ) - { - db->AddText ( this ); - } - - Changed (); -} - -void NoxText::InvalidateAllWaves ( void ) -{ - Translation *trans; - ListSearch sh; - - WaveInfo.SetValid ( FALSE ); - - trans = FirstTranslation ( sh ); - - while ( trans ) - { - trans->WaveInfo.SetValid ( FALSE ); - - trans = NextTranslation ( sh ); - } - -} - -void NoxText::InvalidateWave ( void ) -{ - - WaveInfo.SetValid ( FALSE ); - -} - -void NoxText::InvalidateWave ( LangID langid ) -{ - - WaveInfo.SetValid ( FALSE ); - - if ( langid == LANGID_US ) - { - InvalidateWave (); - } - else - { - Translation *trans = GetTranslation ( langid ); - - if ( trans ) - { - trans->WaveInfo.SetValid ( FALSE ); - } - - } -} - -void NoxText::AddToTree ( CTreeCtrl *tc, HTREEITEM parent, int changes ) -{ - HTREEITEM item; - ListSearch sh; - Translation *trans; - - sprintf ( buffer, "TEXT %c : %s", ChangedSymbol() ,GetSB ()); - item = tc->InsertItem ( buffer, parent ); - - trans = FirstTranslation ( sh ); - - while ( trans ) - { - if ( !changes || trans->IsChanged ()) - { - trans->AddToTree ( tc, item ); - } - - trans = NextTranslation ( sh ); - } - - if ( ID() != -1 ) - { - sprintf ( buffer, "ID : %d", ID ()); - tc->InsertItem ( buffer, item ); - } - - if ( strcmp ( WaveSB(), "" ) ) - { - sprintf ( buffer, "WAVE : %s", WaveSB() ); - tc->InsertItem ( buffer, item ); - } - - if ( line_number != -1 ) - { - sprintf ( buffer, "LINE : %d", line_number ); - tc->InsertItem ( buffer, item ); - } - - sprintf ( buffer, "REV : %d", revision ); - tc->InsertItem ( buffer, item ); - - sprintf ( buffer, "LEN : %d", this->Len() ); - tc->InsertItem ( buffer, item ); - -} - -Translation::Translation ( void ) -{ - text = new OLEString ( ); - comment = new OLEString ( ); - revision = 0; - sent = FALSE; - -} - -Translation::~Translation ( ) -{ - delete text; - delete comment; -} - -int Translation::IsSent ( void ) -{ - return sent; -} - -void Translation::Sent ( int val ) -{ - sent = val; -} - -void Translation::SetDB ( TransDB *new_db ) -{ - db = new_db; -} - -Translation* Translation::Clone ( void ) -{ - Translation *clone = new Translation(); - - clone->Set ( Get ()); - clone->SetComment ( Comment ()); - clone->SetLangID ( GetLangID ()); - clone->SetRevision ( Revision ()); - - return clone; -} - -void Translation::AddToTree ( CTreeCtrl *tc, HTREEITEM parent, int changes ) -{ - HTREEITEM item; - - sprintf ( buffer, "%s%c : %s", Language(), ChangedSymbol(), GetSB ()); - - item = tc->InsertItem ( buffer, parent ); - - if ( strcmp ( CommentSB(), "" ) ) - { - sprintf ( buffer, "COMMENT: %s", CommentSB() ); - tc->InsertItem ( buffer, item ); - } - - sprintf ( buffer, "REV : %d", revision ); - tc->InsertItem ( buffer, item ); - - sprintf ( buffer, "LEN : %d", Len() ); - tc->InsertItem ( buffer, item ); - -} - -int Translation::TooLong ( int maxlen ) -{ - return maxlen != 0 && text->Len () > maxlen; - -} - -int Translation::ValidateFormat ( NoxText *ntext ) -{ - return SameFormat ( text->Get(), ntext->Get ()); - -} - -int TransDB::Warnings ( CNoxstringDlg *dlg ) -{ - NoxLabel *label; - ListSearch sh_label; - int count = 0; - int warnings = 0; - List dups; - - if ( dlg ) - { - dlg->InitProgress ( NumLabels ()); - dlg->Log (""); - dlg->Log ("Generals.str Warnigs:"); - dlg->Status ( "Creating warnings report...", FALSE ); - } - - text_bin->Clear(); - - label = FirstLabel ( sh_label ); - - while ( label ) - { - NoxText *text; - NoxText *existing_text; - ListSearch sh_text; - - text = label->FirstText ( sh_text ); - - while ( text ) - { - if ( text->Len ( ) == 0 ) - { - if ( dlg ) - { - sprintf ( buffer, "Warning:: text at line %5d is NULL", - text->LineNumber()); - dlg->Log ( buffer ); - } - warnings++; - } - else if ( !DuplicatesAllowed() && ( existing_text = FindText ( text->Get () ))) - { - warnings++; - if ( dlg ) - { - DupNode *dup = new DupNode ( text, existing_text ); - dups.Add ( dup ); - } - } - else - { - text_bin->Add ( text, text->Get() ); - } - - text = label->NextText ( sh_text ); - } - - count++; - if ( dlg ) - { - dlg->SetProgress ( count ); - } - label = NextLabel ( sh_label ); - } - - if ( dlg ) - { - DupNode *dup; - - while ( (dup = (DupNode*)dups.LastNode ())) - { - sprintf ( buffer, "Warning:: text at line %5d is a duplicate of text on line %5d", - dup->Duplicate()->LineNumber(), dup->Original()->LineNumber()); - dlg->Log ( buffer ); - - dup->Remove (); - delete dup; - } - sprintf ( buffer, "Total warnings: %d", warnings ); - dlg->Log ( buffer ); - dlg->Ready(); - } - - return warnings; -} - -int TransDB::Errors ( CNoxstringDlg *dlg ) -{ - NoxLabel *label; - NoxLabel *existing_label; - ListSearch sh_label; - Bin *tbin = new Bin (); - int count = 0; - int errors = 0; - - if ( dlg ) - { - dlg->InitProgress ( NumLabels ()); - dlg->Log (""); - dlg->Log ("Generals.str Errors:"); - dlg->Status ( "Creating error report...", FALSE ); - } - - - - label_bin->Clear(); - - label = FirstLabel ( sh_label ); - - while ( label ) - { - NoxText *text; - NoxText *existing_text; - ListSearch sh_text; - - if ( !MultiTextAllowed () && label->NumStrings () > 1 ) - { - errors++; - if ( dlg ) - { - sprintf ( buffer, "Error : Label \"%s\" at line %d is has more than 1 string defined", - label->NameSB(), label->LineNumber()); - dlg->Log ( buffer ); - } - - } - - if ( ( existing_label = FindLabel ( label->Name () ))) - { - errors++; - if ( dlg ) - { - sprintf ( buffer, "Error : Label \"%s\" at line %d is already defined on line %d", - label->NameSB(), label->LineNumber(), existing_label->LineNumber()); - dlg->Log ( buffer ); - } - } - - label_bin->Add ( label, label->Name()); - - tbin->Clear (); - - text = label->FirstText ( sh_text ); - - while ( text ) - { - if ( ( existing_text = (NoxText *) tbin->Get ( text->Get () ))) - { - errors++; - if ( dlg ) - { - sprintf ( buffer, "Error : Label \"%s\" has duplicate text at line %d", - label->NameSB(), text->LineNumber()); - dlg->Log ( buffer ); - } - } - - tbin->Add ( text, text->Get() ); - - // check string length against max len - - if ( label->MaxLen () ) - { - if ( text->Len () > label->MaxLen ()) - { - errors++; - if ( dlg ) - { - sprintf ( buffer, "Error : The US text at line %d (for label \"%s\") exceeds the max length", - text->LineNumber(), label->NameSB()); - dlg->Log ( buffer ); - } - } - } - - text = label->NextText ( sh_text ); - } - - count++; - if ( dlg ) - { - dlg->SetProgress ( count ); - } - label = NextLabel ( sh_label ); - } - - if ( dlg ) - { - sprintf ( buffer, "Total errors: %d", errors ); - dlg->Log ( buffer ); - - dlg->Ready(); - } - - delete tbin; - last_error_count = errors; - checked_for_errors = TRUE; - return errors; -} - -CWaveInfo::CWaveInfo ( void ) -{ - wave_valid = FALSE; - missing = TRUE; -} - -void TransDB::VerifyDialog( LangID langid, void (*cb) (void) ) -{ - NoxLabel *label; - ListSearch sh_label; - int count = 0; - LANGINFO *linfo = GetLangInfo ( langid ); - - label = FirstLabel ( sh_label ); - - while ( label ) - { - NoxText *text; - ListSearch sh_text; - - text = label->FirstText ( sh_text ); - - while ( text ) - { - if ( text->IsDialog ()) - { - if ( text->DialogIsPresent ( DialogPath, langid )) - { - text->DialogIsValid ( DialogPath, langid ); - } - } - - text = label->NextText ( sh_text ); - } - - if ( cb ) - { - cb(); - } - label = NextLabel ( sh_label ); - } - -} - -void TransDB::InvalidateDialog( LangID langid ) -{ - NoxLabel *label; - ListSearch sh_label; - - label = FirstLabel ( sh_label ); - - while ( label ) - { - NoxText *text; - ListSearch sh_text; - - text = label->FirstText ( sh_text ); - - while ( text ) - { - if ( text->IsDialog ()) - { - text->InvalidateWave ( langid ); - } - - text = label->NextText ( sh_text ); - } - - label = NextLabel ( sh_label ); - } - -} - -int TransDB::ReportDialog( DLGREPORT *report, LangID langid, void (*print) ( const char *), PMASK pmask ) -{ - NoxLabel *label; - ListSearch sh_label; - int count = 0; - DLGREPORT _info; - DLGREPORT *info = &_info; - int skip_verify = FALSE; - LANGINFO *linfo = GetLangInfo ( langid ); - - if ( report ) - { - info = report; - } - - memset ( info, 0, sizeof ( DLGREPORT )); - - - label = FirstLabel ( sh_label ); - - while ( label ) - { - NoxText *text; - ListSearch sh_text; - - text = label->FirstText ( sh_text ); - - while ( text ) - { - if ( text->IsDialog ()) - { - if ( text->DialogIsPresent ( DialogPath, langid)) - { - if ( !text->DialogIsValid ( DialogPath, langid, FALSE ) ) - { - if ( print && pmask & PMASK_UNRESOLVED ) - { - sprintf ( buffer, "%d: audio file \"%s%s.wav\" not verified", text->ID(), text->WaveSB (), linfo->character); - - print ( buffer ); - } - info->unresolved++; - } - else - { - info->resolved++; - } - } - else - { - if ( print && pmask & PMASK_MISSING ) - { - sprintf ( buffer, "%d: audio file \"%s%s.wav\" missing", text->ID(), text->WaveSB (), linfo->character); - - print ( buffer ); - } - info->missing++; - } - - info->numdialog++; - } - - text = label->NextText ( sh_text ); - } - - label = NextLabel ( sh_label ); - } - - return info->missing + info->unresolved + info->errors ; -} - -int TransDB::ReportTranslations( TRNREPORT *report, LangID langid, void (*print) ( const char *buffer), PMASK pmask ) -{ - NoxLabel *label; - ListSearch sh_label; - int count = 0; - int first_error = FALSE; - TRNREPORT _info; - TRNREPORT *info = &_info; - - if ( report ) - { - info = report; - } - - memset ( info, 0, sizeof ( TRNREPORT )); - - label = FirstLabel ( sh_label ); - - while ( label ) - { - NoxText *text; - ListSearch sh_text; - int maxlen = label->MaxLen (); - - text = label->FirstText ( sh_text ); - - while ( text ) - { - int textnum = 0; - Translation *trans; - int too_big = FALSE; - - if ( text->Len ()) - { - info->numstrings++; - if ( langid != LANGID_US ) - { - if ( (trans = text->GetTranslation ( langid ) )) - { - if ( maxlen && trans->Len() > maxlen ) - { - if ( print && pmask & PMASK_TOOLONG ) - { - sprintf ( buffer, "%d: translation is too long by %d characters", text->ID (), trans->Len() - maxlen); - - print ( buffer ); - } - too_big = TRUE; - } - - if ( text->Revision () > trans->Revision ()) - { - if ( print && pmask & PMASK_RETRANSLATE ) - { - sprintf ( buffer, "%d: needs re-translation", text->ID () ); - - print ( buffer ); - } - info->retranslate++; - } - else - { - info->translated++; - if ( !trans->ValidateFormat ( text ) ) - { - if ( print && pmask & PMASK_BADFORMAT ) - { - sprintf ( buffer, "%d: translation has differring formating to original", text->ID () ); - - print ( buffer ); - } - info->bad_format++; - } - } - } - else - { - if ( print && pmask & PMASK_MISSING ) - { - sprintf ( buffer, "%d: not translated", text->ID ()); - - print ( buffer ); - } - info->missing++; - } - } - else - { - // check maxlen - if ( maxlen ) - { - if ( text->Len() > maxlen ) - { - if ( print && pmask & PMASK_TOOLONG ) - { - sprintf ( buffer, "%d: is too long by %d characters", text->ID (), text->Len() - maxlen); - - print ( buffer ); - } - too_big = TRUE; - } - } - } - - } - - if ( too_big ) - { - info->too_big++; - } - text = label->NextText ( sh_text ); - } - - info->numlabels++; - - label = NextLabel ( sh_label ); - } - - info->errors = info->too_big + info->bad_format; - - return info->missing + info->too_big + info->retranslate + info->bad_format; -} diff --git a/Generals/Code/Tools/Babylon/TransDB.h b/Generals/Code/Tools/Babylon/TransDB.h deleted file mode 100644 index 7f15475d59d..00000000000 --- a/Generals/Code/Tools/Babylon/TransDB.h +++ /dev/null @@ -1,430 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// ParseStr.h -// -// - -#ifndef __TRANSDB_H -#define __TRANSDB_H - -#include "olestring.h" -#include "list.h" -#include "bin.h" - -class CNoxstringDlg; - -typedef struct -{ - int numdialog; - int missing; - int unresolved; - int resolved; - int errors; - -} DLGREPORT; - -typedef struct -{ - int numlabels; - int numstrings; - int missing; - int retranslate; - int too_big; - int errors; - int bad_format; - int translated; - -} TRNREPORT; - -typedef enum -{ - - PMASK_NONE = 0, - PMASK_MISSING = 0x00000001, - PMASK_UNRESOLVED = 0x00000002, - PMASK_BADFORMAT = 0x00000004, - PMASK_TOOLONG = 0x00000008, - PMASK_RETRANSLATE = 0x00000010, - PMASK_ALL = 0xffffffff -} PMASK; - -typedef enum -{ - LANGID_US, - LANGID_UK, - LANGID_GERMAN, - LANGID_FRENCH, - LANGID_SPANISH, - LANGID_ITALIAN, - LANGID_JAPANESE, - LANGID_JABBER, - LANGID_KOREAN, - LANGID_CHINESE, - LANGID_UNKNOWN -} LangID; - -typedef struct -{ - LangID langid; - const char *name; - const char *initials ; // two character identifier - const char *character; // single character identifier - -} LANGINFO; - -LANGINFO* GetLangInfo ( LangID langid ); -const char* GetLangName ( LangID langid ); -LANGINFO* GetLangInfo ( int index ); -LANGINFO* GetLangInfo ( char *language ); - -class CWaveInfo -{ - int wave_valid; - DWORD wave_size_hi; - DWORD wave_size_lo; - int missing; - - public: - - CWaveInfo ( void ); - int Valid ( void ) { return wave_valid; }; - DWORD Lo ( void ) { return wave_size_lo; }; - DWORD Hi ( void ) { return wave_size_hi; }; - void SetValid( int new_valid ) { wave_valid = new_valid; }; - void SetLo ( DWORD new_lo ) { wave_size_lo = new_lo; }; - void SetHi ( DWORD new_hi ) { wave_size_hi = new_hi; }; - int Missing ( void ) { return missing; }; - void SetMissing ( int val ) { missing = val; }; -}; - -class DBAttribs -{ - DBAttribs *parent; - int changed; - int processed; - void *match; - - - public: - - DBAttribs( void ) { parent = NULL; changed = FALSE; processed = FALSE; match = NULL; }; - - void SetParent ( DBAttribs *new_parent ) { parent = new_parent; }; - int IsChanged ( void ) { return changed; }; - void Changed ( void ) { changed = TRUE; if ( parent ) parent->Changed(); }; - void NotChanged ( void ) { changed = FALSE; }; - char ChangedSymbol ( void ) { return changed ? '*' :' '; }; - int IsProcessed ( void ) { return processed; }; - void Processed ( void ) { processed = TRUE; }; - void NotProcessed ( void ) { processed = FALSE; }; - void* Matched ( void ) { return match; }; - void Match ( void* new_match ) { match = new_match; }; - void NotMatched ( void ) { match = NULL; }; - - -}; - -class TransDB; -class NoxLabel; -class NoxText; - -class Translation : public DBAttribs -{ - TransDB *db; - - OLEString *text; - OLEString *comment; - LangID langid; - int revision; - int sent; - - - public: - - CWaveInfo WaveInfo; - - Translation ( void ); - ~Translation ( ); - - void SetDB ( TransDB *new_db ); - Translation* Clone ( void ); - void SetLangID ( LangID new_id ) { langid = new_id; }; - TransDB* DB ( void ) { return db; }; - void ClearChanges (void) { NotChanged(); }; - void ClearProcessed (void) { NotProcessed(); }; - void ClearMatched (void) { NotMatched(); }; - int Clear ( void ) { return 0;}; - void Set ( OLECHAR *string ) { text->Set ( string ); Changed();}; - void Set ( char *string ) { text->Set ( string ); Changed(); }; - OLECHAR* Get ( void ) { return text->Get (); }; - int Len ( void ) { return text->Len (); }; - char* GetSB ( void ) { return text->GetSB (); }; - void SetComment ( OLECHAR *string ) { comment->Set ( string ); Changed(); }; - void SetComment ( char *string ) { comment->Set ( string ); Changed(); }; - OLECHAR* Comment ( void ) { return comment->Get(); }; - char* CommentSB ( void ) { return comment->GetSB(); }; - int Revision ( void ) { return revision; }; - void SetRevision ( int new_rev ) { revision = new_rev; Changed(); }; - LangID GetLangID ( void ) { return langid; }; - const char* Language ( void ) { return GetLangName ( langid );}; - void AddToTree ( CTreeCtrl *tc, HTREEITEM parent, int changes = FALSE ); - int TooLong ( int maxlen ); - int ValidateFormat ( NoxText *text ); - int IsSent ( void ); - void Sent ( int val ); -}; - -class NoxText : public DBAttribs -{ - - TransDB *db; - - OLEString *text; - NoxLabel *label; - OLEString *wavefile; - unsigned int line_number; - List translations; - int revision; - int id; - int retranslate; - int sent; - - void init ( void ); - - public: - CWaveInfo WaveInfo; - - NoxText( void ); - ~NoxText( ); - - void AddTranslation ( Translation *trans ); - Translation* FirstTranslation ( ListSearch &sh ); - Translation* NextTranslation ( ListSearch &sh ); - Translation* GetTranslation ( LangID langid ); - void SetDB ( TransDB *new_db ); - void ClearChanges ( void ); - void ClearProcessed ( void ); - void ClearMatched ( void ); - int Clear ( void ); - NoxText* Clone ( void ); - void Remove ( void ); - void AssignID ( void ); - void Set ( OLECHAR *string ); - void Set ( char *string ); - void SetID ( int new_id ) { id = new_id; Changed(); }; - int ID ( void ) { return id; }; - void LockText ( void ) { text->Lock(); }; - TransDB* DB ( void ) { return db; }; - OLECHAR* Get ( void ) { return text->Get (); } ; - int Len ( void ) { return text->Len (); }; - char* GetSB ( void ) { return text->GetSB (); } ; - void SetWave ( OLECHAR *string ) { wavefile->Set ( string ); Changed(); InvalidateAllWaves (); }; - void SetWave ( char *string ) { wavefile->Set ( string ); Changed(); InvalidateAllWaves (); }; - void SetLabel ( NoxLabel *new_label ) { label = new_label; }; - void SetRetranslate ( int flag = TRUE ) { retranslate = flag;}; - int Retranslate ( void ) { return retranslate; }; - OLECHAR* Wave ( void ) { return wavefile->Get (); } ; - char* WaveSB ( void ) { return wavefile->GetSB (); } ; - NoxLabel* Label ( void ) { return label; } ; - int Revision ( void ) { return revision; } ; - void SetRevision ( int new_rev ) { revision = new_rev; Changed(); } ; - void IncRevision ( void ) { revision++; Changed(); }; - void AddToTree ( CTreeCtrl *tc, HTREEITEM parent, int changes = FALSE ); - int LineNumber ( void ) { return line_number; }; - void SetLineNumber ( int line ) { line_number = line; Changed(); }; - void FormatMetaString ( void ) { text->FormatMetaString (); Changed();}; - int IsDialog ( void ); - int DialogIsPresent ( const char *path, LangID langid = LANGID_US ); - int DialogIsValid ( const char *path, LangID langid = LANGID_US, int check = TRUE ); - int ValidateDialog( const char *path, LangID langid = LANGID_US ); - void InvalidateAllWaves ( void ); - void InvalidateWave ( void ); - void InvalidateWave ( LangID langid ); - int IsSent ( void ); - void Sent ( int val ); - -}; - - -class NoxLabel : public DBAttribs -{ - TransDB *db; - - - OLEString *name; - OLEString *comment; - OLEString *context; - OLEString *speaker; - OLEString *listener; - unsigned int max_len; - unsigned int line_number; - List text; - - void init ( void ); - - public: - - NoxLabel ( void ); - ~NoxLabel ( ); - - int Clear ( void ); - void ClearChanges ( void ); - void ClearProcessed ( void ); - void ClearMatched ( void ); - int AllMatched ( void ); - void Remove ( void ); - void AddText ( NoxText *new_text ); - void RemoveText ( NoxText *new_text ); - NoxText* FirstText ( ListSearch& sh ); - NoxText* NextText ( ListSearch& sh); - NoxText* FindText ( OLECHAR *find_text ); - void SetDB ( TransDB *new_db ); - NoxLabel* Clone ( void ); - int NumStrings ( void ) { return text.NumItems(); }; - void SetMaxLen ( int max ) { max_len = max; Changed(); }; - int MaxLen ( void ) { return max_len; }; - void SetLineNumber( int line ) { line_number = line; Changed(); }; - int LineNumber ( void ) { return line_number; }; - TransDB* DB ( void ) { return db;}; - void LockName ( void ) { name->Lock(); }; - void SetName ( OLECHAR *string ) { name->Set ( string ); Changed(); }; - void SetName ( char *string ) { name->Set ( string ); Changed(); }; - void SetComment ( OLECHAR *string ) { comment->Set ( string ); Changed(); }; - void SetComment ( char *string ) { comment->Set ( string ); Changed(); }; - void SetContext ( OLECHAR *string ) { context->Set ( string ); Changed(); }; - void SetContext ( char *string ) { context->Set ( string ); Changed(); }; - void SetSpeaker ( char *string ) { speaker->Set ( string ); Changed(); }; - void SetSpeaker ( OLECHAR *string ) { speaker->Set ( string ); Changed(); }; - void SetListener ( char *string ) { listener->Set ( string ); Changed(); }; - void SetListener ( OLECHAR *string ) { listener->Set ( string ); Changed(); }; - - OLECHAR* Name ( void ) { return name->Get (); }; - OLECHAR* Comment ( void ) { return comment->Get(); }; - OLECHAR* Context ( void ) { return context->Get(); }; - OLECHAR* Speaker ( void ) { return speaker->Get(); }; - OLECHAR* Listener ( void ) { return listener->Get(); }; - - - char* NameSB ( void ) { return name->GetSB (); }; - char* CommentSB ( void ) { return comment->GetSB(); }; - char* ContextSB ( void ) { return context->GetSB(); }; - char* SpeakerSB ( void ) { return speaker->GetSB(); }; - char* ListenerSB ( void ) { return listener->GetSB(); }; - - void AddToTree ( CTreeCtrl *tc, HTREEITEM parent, int changes = FALSE ); - -}; - -#define TRANSDB_OPTION_NONE 00000000 -#define TRANSDB_OPTION_DUP_TEXT 00000001 // strings can be dupilcated across labels -#define TRANSDB_OPTION_MULTI_TEXT 00000002 // labels can have more than 1 string - -const int START_STRING_ID = 10000; -class TransDB : public DBAttribs -{ - ListNode node; - List labels; - List obsolete; - Bin *label_bin; - Bin *text_bin; - BinID *text_id_bin; - Bin *obsolete_bin; - char name[100]; - int num_obsolete; - int next_string_id; - int valid; - int checked_for_errors; - int last_error_count; - int flags; - - - public: - - TransDB ( const char *name = "no name" ); - ~TransDB ( ); - - void InvalidateDialog( LangID langid ); - void VerifyDialog( LangID langid, void (*cb) ( void ) = NULL ); - int ReportDialog( DLGREPORT *report, LangID langid, void (*print) ( const char *)= NULL, PMASK pmask= PMASK_ALL ); - int ReportTranslations( TRNREPORT *report, LangID langid, void (*print) ( const char *) = NULL, PMASK pmask = PMASK_ALL ); - void ReportDuplicates ( CNoxstringDlg *dlg = NULL ); - void AddLabel ( NoxLabel *label ); - void AddText ( NoxText *text ); - void AddObsolete ( NoxText *text ); - void RemoveLabel ( NoxLabel *label ); - void RemoveText ( NoxText *text ); - void RemoveObsolete ( NoxText *text ); - int Errors ( CNoxstringDlg *dlg = NULL ); - int HasErrors ( void ) { return checked_for_errors ? last_error_count != 0 : FALSE; }; - int Warnings ( CNoxstringDlg *dlg = NULL ); - int NumLabelsChanged ( void ); - int NumLabels ( void ); - int NumObsolete ( void ) { return num_obsolete; }; - NoxLabel* FirstLabel ( ListSearch& sh ); - NoxLabel* NextLabel ( ListSearch& sh); - NoxText* FirstObsolete ( ListSearch& sh ); - NoxText* NextObsolete ( ListSearch& sh); - NoxLabel* FindLabel ( OLECHAR *name ); - NoxText* FindText ( OLECHAR *text ); - NoxText* FindSubText ( OLECHAR *text, int item = 0 ); - NoxText* FindText ( int id ); - NoxText* FindNextText ( void ); - NoxText* FindObsolete ( OLECHAR *text ); - NoxText* FindNextObsolete ( void ); - int Clear ( void ); - void ClearChanges ( void ); - void ClearProcessed ( void ); - void ClearMatched ( void ); - TransDB* Next ( void ); - void AddToTree ( CTreeCtrl *tc, HTREEITEM parent, int changes = FALSE, void (*cb) ( void ) = NULL ); - char* Name ( void ) { return name;}; - void EnableIDs ( void ) { next_string_id = START_STRING_ID; }; - int NewID ( void ) { if ( next_string_id != -1) return next_string_id++; else return -1; }; - int ID ( void ) { return next_string_id; }; - void SetID ( int new_id ) { next_string_id = new_id; }; - int IsValid ( void ) { return valid; }; - void InValid ( void ) { valid = FALSE; }; - int DuplicatesAllowed ( void ) { return flags & TRANSDB_OPTION_DUP_TEXT;}; - int MultiTextAllowed ( void ) { return flags & TRANSDB_OPTION_MULTI_TEXT;}; - void AllowDupiclates ( int yes = TRUE) { yes ? flags |= TRANSDB_OPTION_DUP_TEXT : flags &= ~(TRANSDB_OPTION_DUP_TEXT ); }; - void AllowMultiText ( int yes = TRUE) { yes ? flags |= TRANSDB_OPTION_MULTI_TEXT : flags &= ~(TRANSDB_OPTION_MULTI_TEXT ); }; -}; - - -class DupNode : public ListNode -{ - NoxText *original; - NoxText *duplicate; - - public: - DupNode ( NoxText *dup, NoxText *orig ) { original = orig; duplicate = dup, SetPriority ( orig->LineNumber ());}; - - NoxText *Duplicate ( void ) { return duplicate; }; - NoxText *Original ( void ) { return original; }; - -}; - - - -extern TransDB* FirstTransDB ( void ); - - - -#endif // __TRANSDB_H \ No newline at end of file diff --git a/Generals/Code/Tools/Babylon/VIEWDBSII.cpp b/Generals/Code/Tools/Babylon/VIEWDBSII.cpp deleted file mode 100644 index 3ae87ffdcfa..00000000000 --- a/Generals/Code/Tools/Babylon/VIEWDBSII.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// VIEWDBSII.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "VIEWDBSII.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// VIEWDBSII dialog - - -VIEWDBSII::VIEWDBSII(CWnd* pParent /*=NULL*/) - : CDialog(VIEWDBSII::IDD, pParent) -{ - //{{AFX_DATA_INIT(VIEWDBSII) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void VIEWDBSII::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(VIEWDBSII) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(VIEWDBSII, CDialog) - //{{AFX_MSG_MAP(VIEWDBSII) - // NOTE: the ClassWizard will add message map macros here - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// VIEWDBSII message handlers diff --git a/Generals/Code/Tools/Babylon/VIEWDBSII.h b/Generals/Code/Tools/Babylon/VIEWDBSII.h deleted file mode 100644 index d8dfbcc3d1f..00000000000 --- a/Generals/Code/Tools/Babylon/VIEWDBSII.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -#if !defined(AFX_VIEWDBSII_H__AC697EE4_6D37_4F29_ACC7_8B260A33DA2E__INCLUDED_) -#define AFX_VIEWDBSII_H__AC697EE4_6D37_4F29_ACC7_8B260A33DA2E__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// VIEWDBSII.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// VIEWDBSII dialog - -class VIEWDBSII : public CDialog -{ -// Construction -public: - VIEWDBSII(CWnd* pParent = NULL); // standard constructor - - void OnClose(); - BOOL OnInitDialog(); - HTREEITEM create_changes_view ( void ); - HTREEITEM create_full_view ( void ); - -// Dialog Data - //{{AFX_DATA(VIEWDBSII) - enum { IDD = IDD_VIEWDBS }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(VIEWDBSII) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(VIEWDBSII) - // NOTE: the ClassWizard will add member functions here - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -extern int ViewChanges; -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_VIEWDBSII_H__AC697EE4_6D37_4F29_ACC7_8B260A33DA2E__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/VerifyDlg.cpp b/Generals/Code/Tools/Babylon/VerifyDlg.cpp deleted file mode 100644 index 7e7ac8533b4..00000000000 --- a/Generals/Code/Tools/Babylon/VerifyDlg.cpp +++ /dev/null @@ -1,238 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// VerifyDlg.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "VerifyDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -#define TIMERID 1000 - -///////////////////////////////////////////////////////////////////////////// -// VerifyDlg dialog - - -VerifyDlg::VerifyDlg( NoxText *ntext, LangID langid, const char *path, CWnd* pParent /*=NULL*/) - : CDialog(VerifyDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(VerifyDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT - - nox_text = ntext; - linfo = GetLangInfo ( langid ); - sprintf ( wavefile, "%s%s\\%s%s.wav", path, linfo->character, ntext->WaveSB(), linfo->character ); -} - - -void VerifyDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(VerifyDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(VerifyDlg, CDialog) - //{{AFX_MSG_MAP(VerifyDlg) - ON_BN_CLICKED(IDC_NOMATCH, OnNomatch) - ON_BN_CLICKED(IDOK, OnMatch) - ON_BN_CLICKED(IDC_STOP, OnStop) - ON_BN_CLICKED(IDC_PLAY, OnPlay) - ON_BN_CLICKED(IDC_PAUSE, OnPause) - ON_WM_TIMER() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// VerifyDlg message handlers - -BOOL VerifyDlg::OnInitDialog() -{ - //long total; - CDialog::OnInitDialog(); - RECT rect; - - // TODO: Add extra initialization here - - this->GetWindowRect ( &rect ); - rect.top -= 100; - rect.bottom -= 100; - this->MoveWindow ( &rect ); - stop.AutoLoad ( IDC_STOP, this ); - pause.AutoLoad ( IDC_PAUSE, this ); - play.AutoLoad ( IDC_PLAY, this ); - - wave = GetDlgItem ( IDC_WAVENAME ); - text = (CStatic *) GetDlgItem ( IDC_TEXT ); - slider = (CSliderCtrl *) GetDlgItem ( IDC_SLIDER ); - - wave->SetWindowText ( wavefile ); - SetDlgItemText ( IDC_TEXT_TITLE, (nox_text->Label()->NameSB())); - if ( linfo->langid == LANGID_US ) - { - text->SetWindowText ( nox_text->GetSB ()); - } - else - { - Translation *trans = nox_text->GetTranslation ( linfo->langid ); - - if ( trans ) - { - text->SetWindowText ( trans->GetSB ()); - } - else - { - text->SetWindowText ( "No translation!!"); - } - - } - -#if 0 - HDIGDRIVER dig; - HMDIDRIVER mdi; - HDLSDEVICE dls; - - AIL_quick_handles ( &dig, &mdi, &dls ); - stream = AIL_open_stream ( dig, wavefile, 0 ); - if ( stream ) - { - timer = SetTimer( TIMERID, 300, NULL ); - AIL_stream_ms_position ( stream, &total, NULL ); - slider->SetRange ( 0, total ); - } -#endif - - PostMessage ( WM_COMMAND, MAKEWPARAM ( IDC_PLAY, BN_CLICKED )); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void VerifyDlg::OnNomatch() -{ - // TODO: Add your control notification handler code here - CloseAudio (); - this->EndDialog ( IDSKIP ); -} - -void VerifyDlg::OnMatch() -{ - // TODO: Add your control notification handler code here - CloseAudio (); - CDialog::OnOK(); - -} - -void VerifyDlg::OnCancel() -{ - // TODO: Add extra cleanup here - - CloseAudio (); - CDialog::OnCancel(); -} - -void VerifyDlg::OnStop() -{ - // TODO: Add your control notification handler code here - #if 0 - if ( stream ) - { - AIL_pause_stream ( stream, TRUE ); - AIL_set_stream_ms_position ( stream, 0 ); - } - #endif -} - -void VerifyDlg::OnPlay() -{ - // TODO: Add your control notification handler code here - #if 0 - if ( stream ) - { - if ( AIL_stream_status ( stream ) == SMP_STOPPED ) - { - AIL_pause_stream ( stream, FALSE); - } - else - { - AIL_start_stream ( stream ); - } - } - #endif -} - -void VerifyDlg::OnPause() -{ - // TODO: Add your control notification handler code here - #if 0 - if ( stream ) - { - if ( AIL_stream_status ( stream ) == SMP_STOPPED ) - { - AIL_pause_stream ( stream, FALSE); - } - else - { - AIL_pause_stream ( stream, TRUE); - } - } - #endif - -} - -void VerifyDlg::CloseAudio ( void ) -{ - #if 0 - if ( stream ) - { - AIL_close_stream ( stream ); - stream = NULL; - } - #endif -} - -void VerifyDlg::OnTimer(UINT nIDEvent) -{ - // TODO: Add your message handler code here and/or call default - if ( nIDEvent == TIMERID ) - { - #if 0 - if ( stream ) - { - long current; - AIL_stream_ms_position ( stream, NULL, ¤t ); - slider->SetPos ( current ); - } - #endif - } - else - { - CDialog::OnTimer(nIDEvent); - } -} - diff --git a/Generals/Code/Tools/Babylon/VerifyDlg.h b/Generals/Code/Tools/Babylon/VerifyDlg.h deleted file mode 100644 index 9dec509a73f..00000000000 --- a/Generals/Code/Tools/Babylon/VerifyDlg.h +++ /dev/null @@ -1,85 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -#if !defined(AFX_VERIFYDLG_H__88E9C121_599B_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_VERIFYDLG_H__88E9C121_599B_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// VerifyDlg.h : header file -// - -#include "TransDB.h" -#define IDSKIP 100 - -///////////////////////////////////////////////////////////////////////////// -// VerifyDlg dialog - -class VerifyDlg : public CDialog -{ - CBitmapButton stop; - CBitmapButton play; - CBitmapButton pause; - CWnd *wave; - CStatic *text; - NoxText *nox_text; - LANGINFO *linfo; - UINT timer; - char wavefile[1024]; - CSliderCtrl *slider; -// Construction -public: - VerifyDlg(NoxText *ntext, LangID langid, const char *path, CWnd* pParent = NULL); // standard constructor - void CloseAudio ( void ); - -// Dialog Data - //{{AFX_DATA(VerifyDlg) - enum { IDD = IDD_MATCHDIALOG }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(VerifyDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(VerifyDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnNomatch(); - afx_msg void OnMatch(); - virtual void OnCancel(); - afx_msg void OnStop(); - afx_msg void OnPlay(); - afx_msg void OnPause(); - afx_msg void OnTimer(UINT nIDEvent); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_VERIFYDLG_H__88E9C121_599B_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/VerifyTextDlg.cpp b/Generals/Code/Tools/Babylon/VerifyTextDlg.cpp deleted file mode 100644 index 65e3d54bdf4..00000000000 --- a/Generals/Code/Tools/Babylon/VerifyTextDlg.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// VerifyTextDlg.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "VerifyTextDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CVerifyTextDlg dialog - - -CVerifyTextDlg::CVerifyTextDlg( char *trans, char *orig, CWnd* pParent /*=NULL*/) - : CDialog(CVerifyTextDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CVerifyTextDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT - - m_trans = trans; - m_orig = orig; -} - - -void CVerifyTextDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CVerifyTextDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CVerifyTextDlg, CDialog) - //{{AFX_MSG_MAP(CVerifyTextDlg) - ON_BN_CLICKED(IDC_NOMATCH, OnNomatch) - ON_BN_CLICKED(IDC_MATCH, OnMatch) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CVerifyTextDlg message handlers - -void CVerifyTextDlg::OnNomatch() -{ - - EndDialog ( IDNO ); - -} - -void CVerifyTextDlg::OnMatch() -{ - - EndDialog ( IDYES ); - -} - -BOOL CVerifyTextDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - SetDlgItemText ( IDC_TRANS, m_trans ); - SetDlgItemText ( IDC_ORIG, m_orig ); - - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} diff --git a/Generals/Code/Tools/Babylon/VerifyTextDlg.h b/Generals/Code/Tools/Babylon/VerifyTextDlg.h deleted file mode 100644 index fb18f912b3c..00000000000 --- a/Generals/Code/Tools/Babylon/VerifyTextDlg.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -#if !defined(AFX_VERIFYTEXTDLG_H__39DB1C81_6B90_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_VERIFYTEXTDLG_H__39DB1C81_6B90_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// VerifyTextDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CVerifyTextDlg dialog - -class CVerifyTextDlg : public CDialog -{ -// Construction - char *m_trans; - char *m_orig; -public: - CVerifyTextDlg(char *trans, char *orig, CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CVerifyTextDlg) - enum { IDD = IDD_VERIFYTEXT }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CVerifyTextDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CVerifyTextDlg) - afx_msg void OnNomatch(); - afx_msg void OnMatch(); - virtual BOOL OnInitDialog(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_VERIFYTEXTDLG_H__39DB1C81_6B90_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/ViewDBsDlg.cpp b/Generals/Code/Tools/Babylon/ViewDBsDlg.cpp deleted file mode 100644 index 52973463582..00000000000 --- a/Generals/Code/Tools/Babylon/ViewDBsDlg.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// ViewDBsDlg.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "noxstringDlg.h" -#include "VIEWDBSII.h" -#include "TransDB.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -int ViewChanges = FALSE; - -///////////////////////////////////////////////////////////////////////////// -// CViewDBsDlg dialog - - -VIEWDBSII::VIEWDBSII(CWnd* pParent /*=NULL*/) - : CDialog(VIEWDBSII::IDD, pParent) -{ - //{{AFX_DATA_INIT(CViewDBsDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void VIEWDBSII::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CViewDBsDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(VIEWDBSII, CDialog) - //{{AFX_MSG_MAP(CViewDBsDlg) - ON_WM_CLOSE() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CViewDBsDlg message handlers - -static int label_count; -static void progress_cb ( void ) -{ - label_count++; - if ( MainDLG ) - { - MainDLG->SetProgress ( label_count ); - } -} - -HTREEITEM VIEWDBSII::create_full_view ( void ) -{ - CTreeCtrl *tc = ( CTreeCtrl *) GetDlgItem ( IDC_TREEVIEW ); - HTREEITEM root; - TransDB *db; - int count = 0; - const char *title = "Building database view..."; - - MainDLG->Log (""); - MainDLG->Status ( title ); - - root = tc->InsertItem ( "DBs" ); - - - db = FirstTransDB ( ); - - while ( db ) - { - count += db->NumLabels (); - count += db->NumObsolete (); - db = db->Next (); - } - - MainDLG->InitProgress ( count ); - - label_count = 0; - - db = FirstTransDB ( ); - - while ( db ) - { - char buffer[100]; - - sprintf ( buffer, "%s%s", title, db->Name()); - MainDLG->Status ( buffer, FALSE ); - db->AddToTree ( tc, root, FALSE, progress_cb ); - db = db->Next (); - } - - MainDLG->Log ("OK", SAME_LINE ); - tc->Expand ( root, TVE_EXPAND ); - return root; -} - -HTREEITEM VIEWDBSII::create_changes_view ( void ) -{ - CTreeCtrl *tc = ( CTreeCtrl *) GetDlgItem ( IDC_TREEVIEW ); - HTREEITEM root; - TransDB *db; - int count = 0; - const char *title = "Building changes view..."; - - MainDLG->Log (""); - MainDLG->Status ( title ); - - - - db = FirstTransDB ( ); - - while ( db ) - { - if ( db->IsChanged ()) - { - count += db->NumLabels (); - count += db->NumObsolete (); - } - db = db->Next (); - } - - if ( MainDLG ) - { - MainDLG->InitProgress ( count ); - } - - if ( count ) - { - root = tc->InsertItem ( "Changes" ); - } - else - { - root = tc->InsertItem ( "No Changes" ); - } - - label_count = 0; - - db = FirstTransDB ( ); - - while ( db ) - { - char buffer[100]; - - if ( db->IsChanged ()) - { - sprintf ( buffer, "%s%s", title, db->Name()); - MainDLG->Status ( buffer, FALSE ); - db->AddToTree ( tc, root, TRUE, progress_cb ); - } - db = db->Next (); - } - - if ( MainDLG ) - { - MainDLG->ProgressComplete ( ); - MainDLG->Log ("OK", SAME_LINE ); - MainDLG->Ready (); - } - - tc->Expand ( root, TVE_EXPAND ); - return root; -} - -BOOL VIEWDBSII::OnInitDialog() -{ - HTREEITEM root; - CDialog::OnInitDialog(); - - // TODO: Add extra initialization here - - if ( !ViewChanges ) - { - root = create_full_view (); - } - else - { - root = create_changes_view (); - } - - - MainDLG->Ready(); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void VIEWDBSII::OnClose() -{ - // TODO: Add your message handler code here and/or call default - - CTreeCtrl *tc = ( CTreeCtrl *) GetDlgItem ( IDC_TREEVIEW ); - HTREEITEM root = tc->GetRootItem (); - tc->Expand ( root, TVE_COLLAPSE ); - tc->DeleteAllItems (); - CDialog::OnClose(); -} - diff --git a/Generals/Code/Tools/Babylon/XLStuff.cpp b/Generals/Code/Tools/Babylon/XLStuff.cpp deleted file mode 100644 index bbfe4a41e90..00000000000 --- a/Generals/Code/Tools/Babylon/XLStuff.cpp +++ /dev/null @@ -1,673 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// XLStuff.cpp -// -// -#include "StdAfx.h" -#include "noxstring.h" -#include "resource.h" -#include -#include "XLStuff.h" -#include -#include - -static const int xlWorkbookNormal = -4143; -static const int xlNoChange = 1; -static const int xlLocalSessionChanges = 2; -static const int xlWBATWorksheet = -4167; -static _Workbook *workbook = NULL; -static _Application *xl = NULL; -static Workbooks *wbs = NULL; -static Range *range = NULL; -static _Worksheet *ws = NULL; -static OLECHAR buffer[100*1024]; - -static VARIANT no, yes, dummy, dummy0, nullstring, empty; -static VARIANT continuous, automatic, medium, thin, none; -static VARIANT yellow, solid; - -static VARIANT GetCell ( int row, int column ) -{ - VARIANT cell; - VARIANT result; - LPDISPATCH dispatch; - OLECHAR cellname[20]; - - V_VT ( &cell ) = VT_EMPTY; - - assert ( column > 0 ); - swprintf ( cellname, L"%c%d", 'A'+column -1 , row ); - V_VT ( &cell ) = VT_BSTR; - V_BSTR ( &cell ) = SysAllocString (cellname); - - V_VT ( &result ) = VT_BOOL; - V_BOOL ( &result ) = FALSE; - - if ( !ws ) - { - goto error; - } - - if ( ! (dispatch = ws->GetRange (cell, cell ))) - { - goto error; - } - - - range->AttachDispatch ( dispatch ); - result = range->GetValue (); - range->ReleaseDispatch ( ); - -error: - - VariantClear ( &cell ); - - return result; -} - - -int PutCell ( int row, int column, const OLECHAR *string, int val ) -{ - VARIANT cell; - VARIANT newValue; - int ok = FALSE; - LPDISPATCH dispatch; - OLECHAR cellname[20]; - - - V_VT ( &newValue ) = VT_EMPTY; - V_VT ( &cell ) = VT_EMPTY; - - assert ( column > 0 ); - swprintf ( cellname, L"%c%d", 'A'+column-1, row ); - V_VT ( &cell ) = VT_BSTR; - V_BSTR ( &cell ) = SysAllocString (cellname); - - if ( !ws ) - { - goto error; - } - - if ( ! (dispatch = ws->GetRange (cell, cell ))) - { - goto error; - } - - range->AttachDispatch ( dispatch ); - - if ( string ) - { - V_VT ( &newValue ) = VT_BSTR; - - if ( string[0] == '\'') - { - buffer[0] = '\\'; - wcscpy ( &buffer[1], string ); - V_BSTR ( &newValue ) = SysAllocString ( buffer ); - } - else - { - V_BSTR ( &newValue ) = SysAllocString ( string ); - } - - } - else - { - V_VT ( &newValue ) = VT_I4; - V_I4 ( &newValue ) = val; - } - - range->SetValue ( newValue ); - range->ReleaseDispatch ( ); - ok = TRUE; - -error: - - - VariantClear ( &cell ); - VariantClear ( &newValue ); - - return ok; -} - -int PutSeparator ( int row ) -{ -// Rows(row).Select -// Selection.Borders(xlDiagonalDown).LineStyle = xlNone -// Selection.Borders(xlDiagonalUp).LineStyle = xlNone -// Selection.Borders(xlEdgeLeft).LineStyle = xlNone -// Selection.Borders(xlEdgeTop).LineStyle = xlNone -// With Selection.Borders(xlEdgeBottom) -// .LineStyle = xlContinuous -// .Weight = xlMedium -// .ColorIndex = xlAutomatic -// End With -// With Selection.Borders(xlEdgeRight) -// .LineStyle = xlContinuous -// .Weight = xlThin -// .ColorIndex = xlAutomatic -// End With - int ok = FALSE; - Border *border = NULL; - Borders *borders = NULL; - LPDISPATCH dispatch; - OLECHAR cellname1[20]; - OLECHAR cellname2[20]; - VARIANT cell1,cell2; - - if ( !ws ) - { - goto error; - } - - assert ( row > 0 ); - swprintf ( cellname1, L"A%d", row ); - swprintf ( cellname2, L"%c%d", 'A'+CELL_LAST-1-1, row ); - V_VT ( &cell1 ) = VT_BSTR; - V_BSTR ( &cell1 ) = SysAllocString (cellname1); - - V_VT ( &cell2 ) = VT_BSTR; - V_BSTR ( &cell2 ) = SysAllocString (cellname2); - - - if ( ! (dispatch = ws->GetRange (cell1, cell2 ))) - { - goto error; - } - - range->AttachDispatch ( dispatch ); - - dispatch = range->GetBorders (); - - - borders = new Borders ( dispatch ); - - if ( !borders ) - { - goto error; - } - - dispatch = borders->GetItem ( xlEdgeBottom ); - - border = new Border ( dispatch ); - - if ( !border ) - { - goto error; - } - - border->SetLineStyle ( continuous ); - border->SetColorIndex ( automatic ); - border->SetWeight ( thin ); - - ok = TRUE; - -error: - - range->ReleaseDispatch ( ); - - if ( borders ) - { - delete borders ; - } - - if ( border ) - { - delete border ; - } - - VariantClear ( &cell1 ); - VariantClear ( &cell2 ); - - return ok; -} - - -int PutSection ( int row, OLECHAR *title ) -{ - - int ok = FALSE; - Range *range = NULL; - Border *border = NULL; - Borders *borders = NULL; - Interior *interior = NULL; - LPDISPATCH dispatch; - OLECHAR cellname1[20]; - OLECHAR cellname2[20]; - VARIANT cell1,cell2; - _Worksheet *ws = NULL; - - if ( !ws ) - { - goto error; - } - - assert ( row > 0 ); - swprintf ( cellname1, L"A%d", row ); - swprintf ( cellname2, L"%c%d", 'A'+CELL_LAST-1-1, row ); - V_VT ( &cell1 ) = VT_BSTR; - V_BSTR ( &cell1 ) = SysAllocString (cellname1); - - V_VT ( &cell2 ) = VT_BSTR; - V_BSTR ( &cell2 ) = SysAllocString (cellname2); - - - if ( ! (dispatch = ws->GetRange (cell1, cell2 ))) - { - goto error; - } - - range->AttachDispatch ( dispatch ); - - dispatch = range->GetBorders (); - - - borders = new Borders ( dispatch ); - - if ( !borders ) - { - goto error; - } - - dispatch = borders->GetItem ( xlEdgeBottom ); - - border = new Border ( dispatch ); - - if ( !border ) - { - goto error; - } - - border->SetLineStyle ( continuous ); - border->SetColorIndex ( automatic ); - border->SetWeight ( thin ); - - delete border; - border = NULL; - - dispatch = borders->GetItem ( xlEdgeTop ); - - border = new Border ( dispatch ); - - if ( !border ) - { - goto error; - } - - border->SetLineStyle ( continuous ); - border->SetColorIndex ( automatic ); - border->SetWeight ( medium ); - - delete border; - border = NULL; - - dispatch = borders->GetItem ( xlEdgeRight ); - - border = new Border ( dispatch ); - - if ( !border ) - { - goto error; - } - - border->SetLineStyle ( none ); - - delete border; - border = NULL; - - dispatch = borders->GetItem ( xlEdgeLeft ); - - border = new Border ( dispatch ); - - if ( !border ) - { - goto error; - } - - border->SetLineStyle ( none ); - - dispatch = range->GetInterior ( ); - - interior = new Interior ( dispatch ); - - if ( !interior ) - { - goto error; - } - - interior->SetColorIndex ( yellow ); - interior->SetPattern ( solid ); - - PutCell ( row, 1, L"Section", 0 ); - PutCell ( row, 2, title, 0 ); - - ok = TRUE; - -error: - - range->ReleaseDispatch ( ); - - if ( borders ) - { - delete borders ; - } - - if ( border ) - { - delete border ; - } - - VariantClear ( &cell1 ); - VariantClear ( &cell2 ); - - return ok; - -} - -int OpenExcel ( void ) -{ - LPDISPATCH dispatch; - - if ( xl ) - { - return TRUE; - } -#if 0 - while ( ExcelRunning ()) - { - if ( AfxMessageBox ( "Excel is running!\n\nClose or kill all instances of Excel and retry\n\nNOTE: Check task tray (CTRL-ALT-DELETE) for instances of Excel", MB_OKCANCEL ) == IDCANCEL ) - { - return FALSE; - } - } -#endif - - xl = new _Application(); - - if ( !xl ) - { - return FALSE; - } - - if ( !xl->CreateDispatch ("Excel.Application")) - { - goto error_access; - } - - dispatch = xl->GetWorkbooks ( ); - - if ( dispatch ) - { - wbs = new Workbooks( dispatch ); - } - - if ( !wbs ) - { - return FALSE; - } - - if ( ! (ws = new _Worksheet ())) - { - return FALSE; - } - - if ( ! (range = new Range ())) - { - return FALSE; - } - - - V_VT ( &no ) = VT_BOOL; - V_VT ( &yes ) = VT_BOOL; - V_VT ( &dummy ) = VT_I4; - V_VT ( &dummy0 ) = VT_I4; - V_VT ( &nullstring ) = VT_BSTR ; - V_VT ( &empty ) = VT_EMPTY; - V_VT ( &continuous ) = VT_I4; - V_VT ( &automatic ) = VT_I4; - V_VT ( &medium ) = VT_I4; - V_VT ( &thin ) = VT_I4; - V_VT ( &none ) = VT_I4; - V_VT ( &solid ) = VT_I4; - V_VT ( &yellow ) = VT_I4; - - V_BOOL ( &no ) = FALSE; - V_BOOL ( &yes ) = TRUE; - V_I4 ( &dummy ) = 1; - V_I4 ( &dummy0 ) = 0; - V_BSTR ( &nullstring ) = SysAllocString ( OLESTR ("") ); - - V_I4 ( &continuous ) = xlContinuous; - V_I4 ( &automatic ) = xlAutomatic; - V_I4 ( &medium ) = xlMedium; - V_I4 ( &thin ) = xlThin; - V_I4 ( &none ) = xlThin; - V_I4 ( &solid ) = xlSolid; - V_I4 ( &yellow ) = 6; - - - return TRUE; - -error_access: - AfxMessageBox ("Could not access Excel!\n\nMake sure Excel is installed on this system."); - return FALSE; -} - - -void CloseExcel ( void ) -{ - CloseWorkBook (); - - if ( range ) - { - delete range; - range = NULL; - } - - if ( ws ) - { - delete ws; - ws = NULL; - } - - if ( wbs ) - { - wbs->Close(); - delete wbs; - wbs = NULL; - } - - if ( xl ) - { - xl->Quit(); - xl->ReleaseDispatch (); - delete xl; - xl = NULL; - } - - VariantClear ( &nullstring ); - -} - -int OpenWorkBook ( const char *filename ) -{ - LPDISPATCH dispatch; - - dispatch = wbs->Open ((LPCTSTR) filename, dummy0, yes, dummy, nullstring, nullstring, yes, dummy, dummy, no, no, dummy, no ); - - if ( dispatch ) - { - workbook = new _Workbook ( dispatch ); - } - - if ( !workbook ) - { - return FALSE; - } - - SelectActiveSheet ( ); - - return TRUE; -} - -int NewWorkBook ( const char *path ) -{ - LPDISPATCH dispatch; - VARIANT temp; - char tfile[200]; - char *p; - WIN32_FIND_DATA finfo; - HANDLE handle; - - V_VT ( &temp ) = VT_I4; - V_I4 ( &temp ) = xlWBATWorksheet; - - if ( path ) - { - strcpy ( tfile, path ); - if ( (p = strchr ( tfile, '.' ))) - { - *p = 0; - } - - strcpy ( p, ".xlt" ); - - if ( (handle = FindFirstFile ( tfile, &finfo)) != INVALID_HANDLE_VALUE ) - { - if ( !(finfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) - { - swprintf ( buffer, L"%S", tfile ); - V_VT ( &temp ) = VT_BSTR; - V_BSTR ( &temp ) = SysAllocString ( buffer ); - } - - FindClose ( handle ); - } - } - - dispatch = wbs->Add ( temp ); - - VariantClear ( &temp ); - - if ( dispatch ) - { - workbook = new _Workbook ( dispatch ); - } - - if ( !workbook ) - { - return FALSE; - } - SelectActiveSheet ( ); - return TRUE; -} - -int SaveWorkBook ( const char *filename, int protect ) -{ - VARIANT name, fileformat, rc; - - V_VT ( &name ) = VT_BSTR; - swprintf ( buffer, L"%S", filename ); - V_BSTR ( &name ) = SysAllocString ( buffer ); - - V_VT ( &fileformat ) = VT_I4; - V_I4 ( &fileformat ) = xlWorkbookNormal; - - - V_VT ( &rc ) = VT_I4; - V_I4 ( &rc ) = xlLocalSessionChanges; - - if ( protect ) - { - VARIANT password; - V_VT ( &password ) = VT_BSTR; - V_BSTR ( &password ) = SysAllocString ( L"" ); - - ws->Protect ( password, yes, yes, yes, no ); - VariantClear ( &password ); - } - workbook->SaveAs ( name, fileformat, nullstring, nullstring, no, no, - xlNoChange, rc, no, empty, empty ); - - VariantClear ( &name ); - - return TRUE; - -} - -void CloseWorkBook ( void ) -{ - if ( workbook ) - { - workbook->SetSaved ( TRUE ); - workbook->Close ( no, nullstring, no ); - delete workbook; - workbook = NULL; - } - -} - -void SelectActiveSheet ( void ) -{ - LPDISPATCH dispatch; - - if ( ! (dispatch = xl->GetActiveSheet ())) - { - return; - } - - ws->ReleaseDispatch ( ); - ws->AttachDispatch ( dispatch ); -} - -int GetInt ( int row, int cell ) -{ - long value; - VARIANT var; - _variant_t v; - - var = GetCell ( row, cell ); - - v.Attach ( var ); - - value = v; - - return (int) value; - -} - -int GetString ( int row, int cell, OLECHAR *string ) -{ - VARIANT var; - - string[0] =0; - var = GetCell ( row, cell ); - - if ( V_VT ( &var ) == VT_BSTR ) - { - wcscpy ( string, V_BSTR ( &var )); - - } - VariantClear ( &var ); - - return 1; - -} - diff --git a/Generals/Code/Tools/Babylon/XLStuff.h b/Generals/Code/Tools/Babylon/XLStuff.h deleted file mode 100644 index a0e22660855..00000000000 --- a/Generals/Code/Tools/Babylon/XLStuff.h +++ /dev/null @@ -1,262 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// XLStuff.h -// -// - -#ifndef XLSTUFF_H -#define XLSTUFF_H - -#include "noxstringDlg.h" -typedef enum { - xlAll = -4104, - xlAutomatic = -4105, - xlBoth = 1, - xlCenter = -4108, - xlChecker = 9, - xlCircle = 8, - xlCorner = 2, - xlCrissCross = 16, - xlCross = 4, - xlDiamond = 2, - xlDistributed = -4117, - xlDoubleAccounting = 5, - xlFixedValue = 1, - xlFormats = -4122, - xlGray16 = 17, - xlGray8 = 18, - xlGrid = 15, - xlHigh = -4127, - xlInside = 2, - xlJustify = -4130, - xlLightDown = 13, - xlLightHorizontal = 11, - xlLightUp = 14, - xlLightVertical = 12, - xlLow = -4134, - xlManual = -4135, - xlMinusValues = 3, - xlModule = -4141, - xlNextToAxis = 4, - xlNone = -4142, - xlNotes = -4144, - xlOff = -4146, - xlOn = 1, - xlPercent = 2, - xlPlus = 9, - xlPlusValues = 2, - xlSemiGray75 = 10, - xlShowLabel = 4, - xlShowLabelAndPercent = 5, - xlShowPercent = 3, - xlShowValue = 2, - xlSimple = -4154, - xlSingle = 2, - xlSingleAccounting = 4, - xlSolid = 1, - xlSquare = 1, - xlStar = 5, - xlStError = 4, - xlToolbarButton = 2, - xlTriangle = 3, - xlGray25 = -4124, - xlGray50 = -4125, - xlGray75 = -4126, - xlBottom = -4107, - xlLeft = -4131, - xlRight = -4152, - xlTop = -4160, - xl3DBar = -4099, - xl3DSurface = -4103, - xlBar = 2, - xlColumn = 3, - xlCombination = -4111, - xlCustom = -4114, - xlDefaultAutoFormat = -1, - xlMaximum = 2, - xlMinimum = 4, - xlOpaque = 3, - xlTransparent = 2, - xlBidi = -5000, - xlLatin = -5001, - xlContext = -5002, - xlLTR = -5003, - xlRTL = -5004, - xlVisualCursor = 2, - xlLogicalCursor = 1, - xlSystem = 1, - xlPartial = 3, - xlHindiNumerals = 3, - xlBidiCalendar = 3, - xlGregorian = 2, - xlComplete = 4, - xlScale = 3, - xlClosed = 3, - xlColor1 = 7, - xlColor2 = 8, - xlColor3 = 9, - xlConstants = 2, - xlContents = 2, - xlBelow = 1, - xlCascade = 7, - xlCenterAcrossSelection = 7, - xlChart4 = 2, - xlChartSeries = 17, - xlChartShort = 6, - xlChartTitles = 18, - xlClassic1 = 1, - xlClassic2 = 2, - xlClassic3 = 3, - xl3DEffects1 = 13, - xl3DEffects2 = 14, - xlAbove = 0, - xlAccounting1 = 4, - xlAccounting2 = 5, - xlAccounting3 = 6, - xlAccounting4 = 17, - xlAdd = 2, - xlDebugCodePane = 13, - xlDesktop = 9, - xlDirect = 1, - xlDivide = 5, - xlDoubleClosed = 5, - xlDoubleOpen = 4, - xlDoubleQuote = 1, - xlEntireChart = 20, - xlExcelMenus = 1, - xlExtended = 3, - xlFill = 5, - xlFirst = 0, - xlFloating = 5, - xlFormula = 5, - xlGeneral = 1, - xlGridline = 22, - xlIcons = 1, - xlImmediatePane = 12, - xlInteger = 2, - xlLast = 1, - xlLastCell = 11, - xlList1 = 10, - xlList2 = 11, - xlList3 = 12, - xlLocalFormat1 = 15, - xlLocalFormat2 = 16, - xlLong = 3, - xlLotusHelp = 2, - xlMacrosheetCell = 7, - xlMixed = 2, - xlMultiply = 4, - xlNarrow = 1, - xlNoDocuments = 3, - xlOpen = 2, - xlOutside = 3, - xlReference = 4, - xlSemiautomatic = 2, - xlShort = 1, - xlSingleQuote = 2, - xlStrict = 2, - xlSubtract = 3, - xlTextBox = 16, - xlTiled = 1, - xlTitleBar = 8, - xlToolbar = 1, - xlVisible = 12, - xlWatchPane = 11, - xlWide = 3, - xlWorkbookTab = 6, - xlWorksheet4 = 1, - xlWorksheetCell = 3, - xlWorksheetShort = 5, - xlAllExceptBorders = 6, - xlLeftToRight = 2, - xlTopToBottom = 1, - xlVeryHidden = 2, - xlDrawingObject = 14 -} Constants; - -typedef enum { - xlHairline = 1, - xlMedium = -4138, - xlThick = 4, - xlThin = 2 -} XlBorderWeight; - -typedef enum { - xlContinuous = 1, - xlDash = -4115, - xlDashDot = 4, - xlDashDotDot = 5, - xlDot = -4118, - xlDouble = -4119, - xlSlantDashDot = 13, - xlLineStyleNone = -4142 -} XlLineStyle; - -typedef enum { - xlInsideHorizontal = 12, - xlInsideVertical = 11, - xlDiagonalDown = 5, - xlDiagonalUp = 6, - xlEdgeBottom = 9, - xlEdgeLeft = 7, - xlEdgeRight = 10, - xlEdgeTop = 8 -} XlBordersIndex; - -enum { - CELL_WAVEFILE = 1, - CELL_LABEL, - CELL_SPEAKER, - CELL_LISTENER, - CELL_STRINGID, - CELL_ENGLISH, - CELL_LOCALIZED, - CELL_CONTEXT, - CELL_COMMENT, - CELL_MAXLEN, - CELL_STRLEN, - CELL_LENCHECK, - CELL_REVISION, - CELL_LAST -}; - -#define ROW_COUNT 1 -#define COLUMN_COUNT 2 -#define ROW_LANGUAGE 1 -#define COLUMN_LANGUAGE 1 - - - -int OpenExcel ( void ); -void CloseExcel ( void ); -int NewWorkBook ( const char *path ); -int SaveWorkBook ( const char *filename, int protect = FALSE ); -int OpenWorkBook ( const char *filename ); -void CloseWorkBook ( void ); -int PutCell ( int row, int column, const OLECHAR *string, int val ); -int PutSeparator ( int row ); -int PutSection ( int row, const OLECHAR *title ); -void SelectActiveSheet ( void ); -int GetInt ( int row, int cell ); -int GetString ( int row, int cell, OLECHAR *buffer ); - - - -#endif // XLSTUFF_H \ No newline at end of file diff --git a/Generals/Code/Tools/Babylon/bin.cpp b/Generals/Code/Tools/Babylon/bin.cpp deleted file mode 100644 index b09cb47a496..00000000000 --- a/Generals/Code/Tools/Babylon/bin.cpp +++ /dev/null @@ -1,404 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// Bin.cpp -// - -#include "StdAfx.h" -#include "bin.h" -#include "assert.h" -#include "list.h" - -Bin::Bin ( int size ) -{ - assert ( size > 0 ); - num_buckets = size; - sh_item = NULL; - - bucket = new List[size]; - -} - -Bin::~Bin ( ) -{ - Clear (); - - delete [] bucket; - -} - - - -void Bin::Clear ( void ) -{ - int count = num_buckets; - sh_item = NULL; - while ( count-- ) - { - List *head = &bucket[count]; - BinItem *item; - - while ( ( item = (BinItem *) head->Next ())) - { - Remove ( item ); - } - } - -} - -void* Bin::Get ( OLECHAR *text1, OLECHAR *text2 ) -{ - BinItem *item; - - if ( ( item = GetBinItem ( text1, text2 )) ) - { - return item->Item(); - } - - return NULL; -} - -void* Bin::GetNext ( void ) -{ - BinItem *item; - - if ( ( item = GetNextBinItem ( )) ) - { - return item->Item(); - } - - return NULL; -} - -void Bin::Add ( void *data, OLECHAR *text1, OLECHAR *text2 ) -{ - BinItem *item; - List *list; - int hash; - - sh_item = NULL; - - hash = calc_hash ( text1 ); - item = new BinItem ( data, hash, text1, text2 ); - - list = &bucket[hash%num_buckets]; - - list->AddToTail ( (ListNode *) item ); - -} - -BinItem* Bin::GetBinItem ( OLECHAR *text1, OLECHAR *text2) -{ - - sh_size1 = sh_size2 = 0; - sh_text1 = text1; - sh_text2 = text2; - - sh_hash = calc_hash ( text1 ); - - if ( sh_text1 ) - { - sh_size1 = wcslen ( sh_text1 ); - } - - if ( sh_text2 ) - { - sh_size2 = wcslen ( sh_text2 ); - } - - sh_item = (BinItem *) &bucket[sh_hash%num_buckets]; - - - return GetNextBinItem (); -} - -BinItem* Bin::GetNextBinItem ( void ) -{ - if ( sh_item ) - { - sh_item = (BinItem *) sh_item->Next (); - } - - while ( sh_item ) - { - if ( sh_item->Same ( sh_hash, sh_text1, sh_size1, sh_text2, sh_size2 )) - { - break; - } - sh_item = (BinItem *) sh_item->Next (); - } - - return sh_item; -} - -BinItem* Bin::GetBinItem ( void *item ) -{ - BinItem *bitem = NULL; - int i; - - - for ( i=0; i< num_buckets; i++) - { - - if ( ( bitem = (BinItem *) bucket[i].Find ( item ))) - { - break; - } - - } - - return bitem; - -} - -void Bin::Remove ( void *item ) -{ - BinItem *bitem; - - if ( ( bitem = GetBinItem ( item ) )) - { - Remove ( bitem ); - } - -} - -void Bin::Remove ( OLECHAR *text1, OLECHAR *text2 ) -{ - BinItem *bitem; - - if ( ( bitem = GetBinItem ( text1, text2 ) )) - { - Remove ( bitem ); - } - -} - -void Bin::Remove ( BinItem *item ) -{ - sh_item = NULL; - item->Remove (); - delete item ; - -} - - -BinItem::BinItem ( void *data, int new_hash, OLECHAR *new_text1, OLECHAR *new_text2 ) -{ - SetItem ( data ); - hash = new_hash; - - if ( (text1 = new_text1) ) - { - text1size = wcslen ( text1 ); - } - else - { - text1size = 0; - } - - if ( (text2 = new_text2) ) - { - text2size = wcslen ( text2 ); - } - else - { - text2size = 0; - } -} - -int BinItem::Same ( int chash, OLECHAR *ctext1, int size1, OLECHAR *ctext2, int size2 ) -{ - if ( hash != chash || text1size != size1 || text2size != size2 ) - { - return FALSE; - } - - if ( wcsicmp ( text1, ctext1 )) - { - return FALSE; - } - - if ( text2 && ctext2 && wcsicmp ( text2, ctext2 )) - { - return FALSE; - } - - return TRUE; - - -} -int Bin::calc_hash ( OLECHAR *text ) -{ - int hash = 0; - - while ( *text ) - { - hash += *text++; - } - - return hash; - -} - -// Bin ID code - -BinID::BinID ( int size ) -{ - assert ( size > 0 ); - num_buckets = size; - - bucket = new List[size]; - -} - -BinID::~BinID ( ) -{ - Clear (); - - delete [] bucket; - -} - - - -void BinID::Clear ( void ) -{ - int count = num_buckets; - - while ( count-- ) - { - List *head = &bucket[count]; - BinIDItem *item; - - while ( ( item = (BinIDItem *) head->Next ())) - { - Remove ( item ); - } - } - -} - -void* BinID::Get ( int id) -{ - BinIDItem *item; - - if ( ( item = GetBinIDItem ( id )) ) - { - return item->Item(); - } - - return NULL; -} - -void BinID::Add ( void *data, int id ) -{ - BinIDItem *item; - List *list; - - - item = new BinIDItem ( data, id ); - - list = &bucket[id%num_buckets]; - - list->AddToTail ( (ListNode *) item ); - -} - -BinIDItem* BinID::GetBinIDItem ( int id ) -{ - BinIDItem *item; - - - item = (BinIDItem *) bucket[id%num_buckets].Next(); - - while ( item ) - { - if ( item->Same ( id )) - { - break; - } - item = (BinIDItem *) item->Next (); - } - - return item ; -} - - -BinIDItem* BinID::GetBinIDItem ( void *item ) -{ - BinIDItem *bitem = NULL; - int i; - - - for ( i=0; i< num_buckets; i++) - { - - if ( ( bitem = (BinIDItem *) bucket[i].Find ( item ))) - { - break; - } - - } - - return bitem; - -} - -void BinID::Remove ( void *item ) -{ - BinIDItem *bitem; - - if ( ( bitem = GetBinIDItem ( item ) )) - { - Remove ( bitem ); - } - -} - -void BinID::Remove ( int id ) -{ - BinIDItem *bitem; - - if ( ( bitem = GetBinIDItem ( id ) )) - { - Remove ( bitem ); - } - -} - -void BinID::Remove ( BinIDItem *item ) -{ - item->Remove (); - delete item ; - -} - - -BinIDItem::BinIDItem ( void *data, int new_id ) -{ - SetItem ( data ); - id = new_id; - -} - -int BinIDItem::Same ( int compare_id ) -{ - return id == compare_id; -} - diff --git a/Generals/Code/Tools/Babylon/bin.h b/Generals/Code/Tools/Babylon/bin.h deleted file mode 100644 index c5b01278f3a..00000000000 --- a/Generals/Code/Tools/Babylon/bin.h +++ /dev/null @@ -1,108 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// Bin.h -// - - -#ifndef __BIN_H -#define __BIN_H - -#include "list.h" -#include "olestring.h" - -class BinItem: public ListNode -{ - int hash; - OLECHAR *text1; - int text1size; - OLECHAR *text2; - int text2size; - - public: - BinItem ( void *data, int hash, OLECHAR *text1, OLECHAR *text2 ); - int Same ( int chash, OLECHAR *ctext1, int size1, OLECHAR *ctext2, int size2 ); - -}; - -class Bin -{ - List *bucket; - int num_buckets; - BinItem *sh_item; - int sh_size1,sh_size2; - int sh_hash; - OLECHAR *sh_text1, *sh_text2; - - int calc_hash ( OLECHAR *text ); - - public: - - Bin ( int size = 256 ); - ~Bin (); - - void Clear ( void ); - void* Get ( OLECHAR *text1, OLECHAR *text2 = NULL ); - void* GetNext ( void ); - void Add ( void *item, OLECHAR *text1, OLECHAR *text2 = NULL ); - BinItem* GetBinItem ( OLECHAR *text1, OLECHAR *text2 = NULL ); - BinItem* GetBinItem ( void *item ); - BinItem* GetNextBinItem ( void ); - void Remove ( void *item ); - void Remove ( OLECHAR *text1, OLECHAR *text2 = NULL ); - void Remove ( BinItem *item ); - - -}; - - -class BinIDItem: public ListNode -{ - int id; - - public: - BinIDItem ( void *data, int id ); - int Same ( int id ); - -}; - -class BinID -{ - List *bucket; - int num_buckets; - - public: - - BinID ( int size = 256 ); - ~BinID (); - - void Clear ( void ); - void* Get ( int id ); - void Add ( void *item, int id ); - BinIDItem* GetBinIDItem ( int id ); - BinIDItem* GetBinIDItem ( void *item ); - void Remove ( void *item ); - void Remove ( int id ); - void Remove ( BinIDItem *item ); - - -}; - - -#endif // __BIN_H \ No newline at end of file diff --git a/Generals/Code/Tools/Babylon/excel8.cpp b/Generals/Code/Tools/Babylon/excel8.cpp deleted file mode 100644 index 8b08a7e47b9..00000000000 --- a/Generals/Code/Tools/Babylon/excel8.cpp +++ /dev/null @@ -1,5455 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// Machine generated IDispatch wrapper class(es) created with ClassWizard - -#include "StdAfx.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - - - -///////////////////////////////////////////////////////////////////////////// -// Workbooks properties - -///////////////////////////////////////////////////////////////////////////// -// Workbooks operations - -LPDISPATCH Workbooks::GetApplication() -{ - LPDISPATCH result; - InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long Workbooks::GetCreator() -{ - long result; - InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH Workbooks::GetParent() -{ - LPDISPATCH result; - InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Workbooks::Add(const VARIANT& Template) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xb5, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &Template); - return result; -} - -void Workbooks::Close() -{ - InvokeHelper(0x115, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -long Workbooks::GetCount() -{ - long result; - InvokeHelper(0x76, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH Workbooks::GetItem(const VARIANT& Index) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xaa, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - &Index); - return result; -} - -LPUNKNOWN Workbooks::Get_NewEnum() -{ - LPUNKNOWN result; - InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL); - return result; -} - -LPDISPATCH Workbooks::Open(LPCTSTR Filename, const VARIANT& UpdateLinks, const VARIANT& ReadOnly, const VARIANT& Format, const VARIANT& Password, const VARIANT& WriteResPassword, const VARIANT& IgnoreReadOnlyRecommended, const VARIANT& Origin, - const VARIANT& Delimiter, const VARIANT& Editable, const VARIANT& Notify, const VARIANT& Converter, const VARIANT& AddToMru) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_BSTR VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x2aa, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - Filename, &UpdateLinks, &ReadOnly, &Format, &Password, &WriteResPassword, &IgnoreReadOnlyRecommended, &Origin, &Delimiter, &Editable, &Notify, &Converter, &AddToMru); - return result; -} - -void Workbooks::OpenText(LPCTSTR Filename, const VARIANT& Origin, const VARIANT& StartRow, const VARIANT& DataType, long TextQualifier, const VARIANT& ConsecutiveDelimiter, const VARIANT& Tab, const VARIANT& Semicolon, const VARIANT& Comma, - const VARIANT& Space, const VARIANT& Other, const VARIANT& OtherChar, const VARIANT& FieldInfo, const VARIANT& TextVisualLayout) -{ - static BYTE parms[] = - VTS_BSTR VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x2ab, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Filename, &Origin, &StartRow, &DataType, TextQualifier, &ConsecutiveDelimiter, &Tab, &Semicolon, &Comma, &Space, &Other, &OtherChar, &FieldInfo, &TextVisualLayout); -} - -LPDISPATCH Workbooks::Get_Default(const VARIANT& Index) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - &Index); - return result; -} - - -///////////////////////////////////////////////////////////////////////////// -// _Application properties - -///////////////////////////////////////////////////////////////////////////// -// _Application operations - -LPDISPATCH _Application::GetApplication() -{ - LPDISPATCH result; - InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long _Application::GetCreator() -{ - long result; - InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetParent() -{ - LPDISPATCH result; - InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetActiveCell() -{ - LPDISPATCH result; - InvokeHelper(0x131, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetActiveChart() -{ - LPDISPATCH result; - InvokeHelper(0xb7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -CString _Application::GetActivePrinter() -{ - CString result; - InvokeHelper(0x132, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Application::SetActivePrinter(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x132, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -LPDISPATCH _Application::GetActiveSheet() -{ - LPDISPATCH result; - InvokeHelper(0x133, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetActiveWindow() -{ - LPDISPATCH result; - InvokeHelper(0x2f7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetActiveWorkbook() -{ - LPDISPATCH result; - InvokeHelper(0x134, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetAddIns() -{ - LPDISPATCH result; - InvokeHelper(0x225, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetAssistant() -{ - LPDISPATCH result; - InvokeHelper(0x59e, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Application::Calculate() -{ - InvokeHelper(0x117, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH _Application::GetCells() -{ - LPDISPATCH result; - InvokeHelper(0xee, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetCharts() -{ - LPDISPATCH result; - InvokeHelper(0x79, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetColumns() -{ - LPDISPATCH result; - InvokeHelper(0xf1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetCommandBars() -{ - LPDISPATCH result; - InvokeHelper(0x59f, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long _Application::GetDDEAppReturnCode() -{ - long result; - InvokeHelper(0x14c, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::DDEExecute(long Channel, LPCTSTR String) -{ - static BYTE parms[] = - VTS_I4 VTS_BSTR; - InvokeHelper(0x14d, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Channel, String); -} - -long _Application::DDEInitiate(LPCTSTR App, LPCTSTR Topic) -{ - long result; - static BYTE parms[] = - VTS_BSTR VTS_BSTR; - InvokeHelper(0x14e, DISPATCH_METHOD, VT_I4, (void*)&result, parms, - App, Topic); - return result; -} - -void _Application::DDEPoke(long Channel, const VARIANT& Item, const VARIANT& Data) -{ - static BYTE parms[] = - VTS_I4 VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x14f, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Channel, &Item, &Data); -} - -VARIANT _Application::DDERequest(long Channel, LPCTSTR Item) -{ - VARIANT result; - static BYTE parms[] = - VTS_I4 VTS_BSTR; - InvokeHelper(0x150, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - Channel, Item); - return result; -} - -void _Application::DDETerminate(long Channel) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x151, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Channel); -} - -VARIANT _Application::Evaluate(const VARIANT& Name) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x1, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &Name); - return result; -} - -VARIANT _Application::_Evaluate(const VARIANT& Name) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xfffffffb, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &Name); - return result; -} - -VARIANT _Application::ExecuteExcel4Macro(LPCTSTR String) -{ - VARIANT result; - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x15e, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - String); - return result; -} - -LPDISPATCH _Application::Intersect(LPDISPATCH Arg1, LPDISPATCH Arg2, const VARIANT& Arg3, const VARIANT& Arg4, const VARIANT& Arg5, const VARIANT& Arg6, const VARIANT& Arg7, const VARIANT& Arg8, const VARIANT& Arg9, const VARIANT& Arg10, - const VARIANT& Arg11, const VARIANT& Arg12, const VARIANT& Arg13, const VARIANT& Arg14, const VARIANT& Arg15, const VARIANT& Arg16, const VARIANT& Arg17, const VARIANT& Arg18, const VARIANT& Arg19, const VARIANT& Arg20, - const VARIANT& Arg21, const VARIANT& Arg22, const VARIANT& Arg23, const VARIANT& Arg24, const VARIANT& Arg25, const VARIANT& Arg26, const VARIANT& Arg27, const VARIANT& Arg28, const VARIANT& Arg29, const VARIANT& Arg30) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_DISPATCH VTS_DISPATCH VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x2fe, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - Arg1, Arg2, &Arg3, &Arg4, &Arg5, &Arg6, &Arg7, &Arg8, &Arg9, &Arg10, &Arg11, &Arg12, &Arg13, &Arg14, &Arg15, &Arg16, &Arg17, &Arg18, &Arg19, &Arg20, &Arg21, &Arg22, &Arg23, &Arg24, &Arg25, &Arg26, &Arg27, &Arg28, &Arg29, &Arg30); - return result; -} - -LPDISPATCH _Application::GetNames() -{ - LPDISPATCH result; - InvokeHelper(0x1ba, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetRange(const VARIANT& Cell1, const VARIANT& Cell2) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0xc5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - &Cell1, &Cell2); - return result; -} - -LPDISPATCH _Application::GetRows() -{ - LPDISPATCH result; - InvokeHelper(0x102, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT _Application::Run(const VARIANT& Macro, const VARIANT& Arg1, const VARIANT& Arg2, const VARIANT& Arg3, const VARIANT& Arg4, const VARIANT& Arg5, const VARIANT& Arg6, const VARIANT& Arg7, const VARIANT& Arg8, const VARIANT& Arg9, - const VARIANT& Arg10, const VARIANT& Arg11, const VARIANT& Arg12, const VARIANT& Arg13, const VARIANT& Arg14, const VARIANT& Arg15, const VARIANT& Arg16, const VARIANT& Arg17, const VARIANT& Arg18, const VARIANT& Arg19, - const VARIANT& Arg20, const VARIANT& Arg21, const VARIANT& Arg22, const VARIANT& Arg23, const VARIANT& Arg24, const VARIANT& Arg25, const VARIANT& Arg26, const VARIANT& Arg27, const VARIANT& Arg28, const VARIANT& Arg29, - const VARIANT& Arg30) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x103, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &Macro, &Arg1, &Arg2, &Arg3, &Arg4, &Arg5, &Arg6, &Arg7, &Arg8, &Arg9, &Arg10, &Arg11, &Arg12, &Arg13, &Arg14, &Arg15, &Arg16, &Arg17, &Arg18, &Arg19, &Arg20, &Arg21, &Arg22, &Arg23, &Arg24, &Arg25, &Arg26, &Arg27, &Arg28, &Arg29, &Arg30); - return result; -} - -VARIANT _Application::_Run2(const VARIANT& Macro, const VARIANT& Arg1, const VARIANT& Arg2, const VARIANT& Arg3, const VARIANT& Arg4, const VARIANT& Arg5, const VARIANT& Arg6, const VARIANT& Arg7, const VARIANT& Arg8, const VARIANT& Arg9, - const VARIANT& Arg10, const VARIANT& Arg11, const VARIANT& Arg12, const VARIANT& Arg13, const VARIANT& Arg14, const VARIANT& Arg15, const VARIANT& Arg16, const VARIANT& Arg17, const VARIANT& Arg18, const VARIANT& Arg19, - const VARIANT& Arg20, const VARIANT& Arg21, const VARIANT& Arg22, const VARIANT& Arg23, const VARIANT& Arg24, const VARIANT& Arg25, const VARIANT& Arg26, const VARIANT& Arg27, const VARIANT& Arg28, const VARIANT& Arg29, - const VARIANT& Arg30) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x326, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &Macro, &Arg1, &Arg2, &Arg3, &Arg4, &Arg5, &Arg6, &Arg7, &Arg8, &Arg9, &Arg10, &Arg11, &Arg12, &Arg13, &Arg14, &Arg15, &Arg16, &Arg17, &Arg18, &Arg19, &Arg20, &Arg21, &Arg22, &Arg23, &Arg24, &Arg25, &Arg26, &Arg27, &Arg28, &Arg29, &Arg30); - return result; -} - -LPDISPATCH _Application::GetSelection() -{ - LPDISPATCH result; - InvokeHelper(0x93, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Application::SendKeys(const VARIANT& Keys, const VARIANT& Wait) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x17f, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Keys, &Wait); -} - -LPDISPATCH _Application::GetSheets() -{ - LPDISPATCH result; - InvokeHelper(0x1e5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetThisWorkbook() -{ - LPDISPATCH result; - InvokeHelper(0x30a, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::Union(LPDISPATCH Arg1, LPDISPATCH Arg2, const VARIANT& Arg3, const VARIANT& Arg4, const VARIANT& Arg5, const VARIANT& Arg6, const VARIANT& Arg7, const VARIANT& Arg8, const VARIANT& Arg9, const VARIANT& Arg10, const VARIANT& Arg11, - const VARIANT& Arg12, const VARIANT& Arg13, const VARIANT& Arg14, const VARIANT& Arg15, const VARIANT& Arg16, const VARIANT& Arg17, const VARIANT& Arg18, const VARIANT& Arg19, const VARIANT& Arg20, const VARIANT& Arg21, - const VARIANT& Arg22, const VARIANT& Arg23, const VARIANT& Arg24, const VARIANT& Arg25, const VARIANT& Arg26, const VARIANT& Arg27, const VARIANT& Arg28, const VARIANT& Arg29, const VARIANT& Arg30) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_DISPATCH VTS_DISPATCH VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x30b, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - Arg1, Arg2, &Arg3, &Arg4, &Arg5, &Arg6, &Arg7, &Arg8, &Arg9, &Arg10, &Arg11, &Arg12, &Arg13, &Arg14, &Arg15, &Arg16, &Arg17, &Arg18, &Arg19, &Arg20, &Arg21, &Arg22, &Arg23, &Arg24, &Arg25, &Arg26, &Arg27, &Arg28, &Arg29, &Arg30); - return result; -} - -LPDISPATCH _Application::GetWindows() -{ - LPDISPATCH result; - InvokeHelper(0x1ae, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetWorkbooks() -{ - LPDISPATCH result; - InvokeHelper(0x23c, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetWorksheetFunction() -{ - LPDISPATCH result; - InvokeHelper(0x5a0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetWorksheets() -{ - LPDISPATCH result; - InvokeHelper(0x1ee, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetExcel4IntlMacroSheets() -{ - LPDISPATCH result; - InvokeHelper(0x245, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetExcel4MacroSheets() -{ - LPDISPATCH result; - InvokeHelper(0x243, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Application::ActivateMicrosoftApp(long Index) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x447, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Index); -} - -void _Application::AddChartAutoFormat(const VARIANT& Chart, LPCTSTR Name, const VARIANT& Description) -{ - static BYTE parms[] = - VTS_VARIANT VTS_BSTR VTS_VARIANT; - InvokeHelper(0xd8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Chart, Name, &Description); -} - -void _Application::AddCustomList(const VARIANT& ListArray, const VARIANT& ByRow) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x30c, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &ListArray, &ByRow); -} - -BOOL _Application::GetAlertBeforeOverwriting() -{ - BOOL result; - InvokeHelper(0x3a2, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetAlertBeforeOverwriting(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x3a2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -CString _Application::GetAltStartupPath() -{ - CString result; - InvokeHelper(0x139, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Application::SetAltStartupPath(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x139, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -BOOL _Application::GetAskToUpdateLinks() -{ - BOOL result; - InvokeHelper(0x3e0, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetAskToUpdateLinks(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x3e0, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Application::GetEnableAnimations() -{ - BOOL result; - InvokeHelper(0x49c, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetEnableAnimations(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x49c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -LPDISPATCH _Application::GetAutoCorrect() -{ - LPDISPATCH result; - InvokeHelper(0x479, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long _Application::GetBuild() -{ - long result; - InvokeHelper(0x13a, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -BOOL _Application::GetCalculateBeforeSave() -{ - BOOL result; - InvokeHelper(0x13b, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetCalculateBeforeSave(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x13b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -long _Application::GetCalculation() -{ - long result; - InvokeHelper(0x13c, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetCalculation(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x13c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -VARIANT _Application::GetCaller(const VARIANT& Index) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x13d, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, - &Index); - return result; -} - -BOOL _Application::GetCanPlaySounds() -{ - BOOL result; - InvokeHelper(0x13e, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -BOOL _Application::GetCanRecordSounds() -{ - BOOL result; - InvokeHelper(0x13f, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -CString _Application::GetCaption() -{ - CString result; - InvokeHelper(0x8b, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Application::SetCaption(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x8b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -BOOL _Application::GetCellDragAndDrop() -{ - BOOL result; - InvokeHelper(0x140, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetCellDragAndDrop(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x140, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -double _Application::CentimetersToPoints(double Centimeters) -{ - double result; - static BYTE parms[] = - VTS_R8; - InvokeHelper(0x43e, DISPATCH_METHOD, VT_R8, (void*)&result, parms, - Centimeters); - return result; -} - -BOOL _Application::CheckSpelling(LPCTSTR Word, const VARIANT& CustomDictionary, const VARIANT& IgnoreUppercase) -{ - BOOL result; - static BYTE parms[] = - VTS_BSTR VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1f9, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, - Word, &CustomDictionary, &IgnoreUppercase); - return result; -} - -VARIANT _Application::GetClipboardFormats(const VARIANT& Index) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x141, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, - &Index); - return result; -} - -BOOL _Application::GetDisplayClipboardWindow() -{ - BOOL result; - InvokeHelper(0x142, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetDisplayClipboardWindow(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x142, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -long _Application::GetCommandUnderlines() -{ - long result; - InvokeHelper(0x143, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetCommandUnderlines(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x143, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -BOOL _Application::GetConstrainNumeric() -{ - BOOL result; - InvokeHelper(0x144, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetConstrainNumeric(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x144, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -VARIANT _Application::ConvertFormula(const VARIANT& Formula, long FromReferenceStyle, const VARIANT& ToReferenceStyle, const VARIANT& ToAbsolute, const VARIANT& RelativeTo) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x145, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &Formula, FromReferenceStyle, &ToReferenceStyle, &ToAbsolute, &RelativeTo); - return result; -} - -BOOL _Application::GetCopyObjectsWithCells() -{ - BOOL result; - InvokeHelper(0x3df, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetCopyObjectsWithCells(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x3df, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -long _Application::GetCursor() -{ - long result; - InvokeHelper(0x489, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetCursor(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x489, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -long _Application::GetCustomListCount() -{ - long result; - InvokeHelper(0x313, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -long _Application::GetCutCopyMode() -{ - long result; - InvokeHelper(0x14a, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetCutCopyMode(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x14a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -long _Application::GetDataEntryMode() -{ - long result; - InvokeHelper(0x14b, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetDataEntryMode(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x14b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -CString _Application::Get_Default() -{ - CString result; - InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -CString _Application::GetDefaultFilePath() -{ - CString result; - InvokeHelper(0x40e, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Application::SetDefaultFilePath(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x40e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -void _Application::DeleteChartAutoFormat(LPCTSTR Name) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0xd9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Name); -} - -void _Application::DeleteCustomList(long ListNum) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x30f, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - ListNum); -} - -LPDISPATCH _Application::GetDialogs() -{ - LPDISPATCH result; - InvokeHelper(0x2f9, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -BOOL _Application::GetDisplayAlerts() -{ - BOOL result; - InvokeHelper(0x157, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetDisplayAlerts(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x157, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Application::GetDisplayFormulaBar() -{ - BOOL result; - InvokeHelper(0x158, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetDisplayFormulaBar(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x158, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Application::GetDisplayFullScreen() -{ - BOOL result; - InvokeHelper(0x425, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetDisplayFullScreen(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x425, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Application::GetDisplayNoteIndicator() -{ - BOOL result; - InvokeHelper(0x159, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetDisplayNoteIndicator(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x159, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -long _Application::GetDisplayCommentIndicator() -{ - long result; - InvokeHelper(0x4ac, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetDisplayCommentIndicator(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x4ac, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -BOOL _Application::GetDisplayExcel4Menus() -{ - BOOL result; - InvokeHelper(0x39f, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetDisplayExcel4Menus(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x39f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Application::GetDisplayRecentFiles() -{ - BOOL result; - InvokeHelper(0x39e, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetDisplayRecentFiles(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x39e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Application::GetDisplayScrollBars() -{ - BOOL result; - InvokeHelper(0x15a, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetDisplayScrollBars(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x15a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Application::GetDisplayStatusBar() -{ - BOOL result; - InvokeHelper(0x15b, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetDisplayStatusBar(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x15b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Application::DoubleClick() -{ - InvokeHelper(0x15d, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -BOOL _Application::GetEditDirectlyInCell() -{ - BOOL result; - InvokeHelper(0x3a1, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetEditDirectlyInCell(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x3a1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Application::GetEnableAutoComplete() -{ - BOOL result; - InvokeHelper(0x49b, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetEnableAutoComplete(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x49b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -long _Application::GetEnableCancelKey() -{ - long result; - InvokeHelper(0x448, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetEnableCancelKey(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x448, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -BOOL _Application::GetEnableSound() -{ - BOOL result; - InvokeHelper(0x4ad, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetEnableSound(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x4ad, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -VARIANT _Application::GetFileConverters(const VARIANT& Index1, const VARIANT& Index2) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x3a3, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, - &Index1, &Index2); - return result; -} - -LPDISPATCH _Application::GetFileSearch() -{ - LPDISPATCH result; - InvokeHelper(0x4b0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetFileFind() -{ - LPDISPATCH result; - InvokeHelper(0x4b1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Application::FindFile() -{ - InvokeHelper(0x42c, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -BOOL _Application::GetFixedDecimal() -{ - BOOL result; - InvokeHelper(0x15f, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetFixedDecimal(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x15f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -long _Application::GetFixedDecimalPlaces() -{ - long result; - InvokeHelper(0x160, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetFixedDecimalPlaces(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x160, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -VARIANT _Application::GetCustomListContents(long ListNum) -{ - VARIANT result; - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x312, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - ListNum); - return result; -} - -long _Application::GetCustomListNum(const VARIANT& ListArray) -{ - long result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x311, DISPATCH_METHOD, VT_I4, (void*)&result, parms, - &ListArray); - return result; -} - -VARIANT _Application::GetOpenFilename(const VARIANT& FileFilter, const VARIANT& FilterIndex, const VARIANT& Title, const VARIANT& ButtonText, const VARIANT& MultiSelect) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x433, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &FileFilter, &FilterIndex, &Title, &ButtonText, &MultiSelect); - return result; -} - -VARIANT _Application::GetSaveAsFilename(const VARIANT& InitialFilename, const VARIANT& FileFilter, const VARIANT& FilterIndex, const VARIANT& Title, const VARIANT& ButtonText) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x434, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &InitialFilename, &FileFilter, &FilterIndex, &Title, &ButtonText); - return result; -} - -void _Application::Goto(const VARIANT& Reference, const VARIANT& Scroll) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1db, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Reference, &Scroll); -} - -double _Application::GetHeight() -{ - double result; - InvokeHelper(0x7b, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL); - return result; -} - -void _Application::SetHeight(double newValue) -{ - static BYTE parms[] = - VTS_R8; - InvokeHelper(0x7b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - newValue); -} - -void _Application::Help(const VARIANT& HelpFile, const VARIANT& HelpContextID) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x162, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &HelpFile, &HelpContextID); -} - -BOOL _Application::GetIgnoreRemoteRequests() -{ - BOOL result; - InvokeHelper(0x164, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetIgnoreRemoteRequests(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x164, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -double _Application::InchesToPoints(double Inches) -{ - double result; - static BYTE parms[] = - VTS_R8; - InvokeHelper(0x43f, DISPATCH_METHOD, VT_R8, (void*)&result, parms, - Inches); - return result; -} - -VARIANT _Application::InputBox(LPCTSTR Prompt, const VARIANT& Title, const VARIANT& Default, const VARIANT& Left, const VARIANT& Top, const VARIANT& HelpFile, const VARIANT& HelpContextID, const VARIANT& Type) -{ - VARIANT result; - static BYTE parms[] = - VTS_BSTR VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x165, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - Prompt, &Title, &Default, &Left, &Top, &HelpFile, &HelpContextID, &Type); - return result; -} - -BOOL _Application::GetInteractive() -{ - BOOL result; - InvokeHelper(0x169, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetInteractive(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x169, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -VARIANT _Application::GetInternational(const VARIANT& Index) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x16a, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, - &Index); - return result; -} - -BOOL _Application::GetIteration() -{ - BOOL result; - InvokeHelper(0x16b, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetIteration(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x16b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -double _Application::GetLeft() -{ - double result; - InvokeHelper(0x7f, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL); - return result; -} - -void _Application::SetLeft(double newValue) -{ - static BYTE parms[] = - VTS_R8; - InvokeHelper(0x7f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - newValue); -} - -CString _Application::GetLibraryPath() -{ - CString result; - InvokeHelper(0x16e, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Application::MacroOptions(const VARIANT& Macro, const VARIANT& Description, const VARIANT& HasMenu, const VARIANT& MenuText, const VARIANT& HasShortcutKey, const VARIANT& ShortcutKey, const VARIANT& Category, const VARIANT& StatusBar, - const VARIANT& HelpContextID, const VARIANT& HelpFile) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x46f, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Macro, &Description, &HasMenu, &MenuText, &HasShortcutKey, &ShortcutKey, &Category, &StatusBar, &HelpContextID, &HelpFile); -} - -void _Application::MailLogoff() -{ - InvokeHelper(0x3b1, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void _Application::MailLogon(const VARIANT& Name, const VARIANT& Password, const VARIANT& DownloadNewMail) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x3af, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Name, &Password, &DownloadNewMail); -} - -VARIANT _Application::GetMailSession() -{ - VARIANT result; - InvokeHelper(0x3ae, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -long _Application::GetMailSystem() -{ - long result; - InvokeHelper(0x3cb, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -BOOL _Application::GetMathCoprocessorAvailable() -{ - BOOL result; - InvokeHelper(0x16f, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -double _Application::GetMaxChange() -{ - double result; - InvokeHelper(0x170, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL); - return result; -} - -void _Application::SetMaxChange(double newValue) -{ - static BYTE parms[] = - VTS_R8; - InvokeHelper(0x170, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - newValue); -} - -long _Application::GetMaxIterations() -{ - long result; - InvokeHelper(0x171, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetMaxIterations(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x171, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -long _Application::GetMemoryFree() -{ - long result; - InvokeHelper(0x172, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -long _Application::GetMemoryTotal() -{ - long result; - InvokeHelper(0x173, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -long _Application::GetMemoryUsed() -{ - long result; - InvokeHelper(0x174, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -BOOL _Application::GetMouseAvailable() -{ - BOOL result; - InvokeHelper(0x175, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -BOOL _Application::GetMoveAfterReturn() -{ - BOOL result; - InvokeHelper(0x176, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetMoveAfterReturn(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x176, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -long _Application::GetMoveAfterReturnDirection() -{ - long result; - InvokeHelper(0x478, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetMoveAfterReturnDirection(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x478, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -LPDISPATCH _Application::GetRecentFiles() -{ - LPDISPATCH result; - InvokeHelper(0x4b2, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -CString _Application::GetName() -{ - CString result; - InvokeHelper(0x6e, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::NextLetter() -{ - LPDISPATCH result; - InvokeHelper(0x3cc, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -CString _Application::GetNetworkTemplatesPath() -{ - CString result; - InvokeHelper(0x184, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetODBCErrors() -{ - LPDISPATCH result; - InvokeHelper(0x4b3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long _Application::GetODBCTimeout() -{ - long result; - InvokeHelper(0x4b4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetODBCTimeout(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x4b4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -void _Application::OnKey(LPCTSTR Key, const VARIANT& Procedure) -{ - static BYTE parms[] = - VTS_BSTR VTS_VARIANT; - InvokeHelper(0x272, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Key, &Procedure); -} - -void _Application::OnRepeat(LPCTSTR Text, LPCTSTR Procedure) -{ - static BYTE parms[] = - VTS_BSTR VTS_BSTR; - InvokeHelper(0x301, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Text, Procedure); -} - -void _Application::OnTime(const VARIANT& EarliestTime, LPCTSTR Procedure, const VARIANT& LatestTime, const VARIANT& Schedule) -{ - static BYTE parms[] = - VTS_VARIANT VTS_BSTR VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x270, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &EarliestTime, Procedure, &LatestTime, &Schedule); -} - -void _Application::OnUndo(LPCTSTR Text, LPCTSTR Procedure) -{ - static BYTE parms[] = - VTS_BSTR VTS_BSTR; - InvokeHelper(0x302, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Text, Procedure); -} - -CString _Application::GetOnWindow() -{ - CString result; - InvokeHelper(0x26f, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Application::SetOnWindow(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x26f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -CString _Application::GetOperatingSystem() -{ - CString result; - InvokeHelper(0x177, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -CString _Application::GetOrganizationName() -{ - CString result; - InvokeHelper(0x178, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -CString _Application::GetPath() -{ - CString result; - InvokeHelper(0x123, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -CString _Application::GetPathSeparator() -{ - CString result; - InvokeHelper(0x179, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -VARIANT _Application::GetPreviousSelections(const VARIANT& Index) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x17a, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, - &Index); - return result; -} - -BOOL _Application::GetPivotTableSelection() -{ - BOOL result; - InvokeHelper(0x4b5, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetPivotTableSelection(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x4b5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Application::GetPromptForSummaryInfo() -{ - BOOL result; - InvokeHelper(0x426, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetPromptForSummaryInfo(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x426, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Application::Quit() -{ - InvokeHelper(0x12e, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void _Application::RecordMacro(const VARIANT& BasicCode, const VARIANT& XlmCode) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x305, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &BasicCode, &XlmCode); -} - -BOOL _Application::GetRecordRelative() -{ - BOOL result; - InvokeHelper(0x17b, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -long _Application::GetReferenceStyle() -{ - long result; - InvokeHelper(0x17c, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetReferenceStyle(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x17c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -VARIANT _Application::GetRegisteredFunctions(const VARIANT& Index1, const VARIANT& Index2) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x307, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, - &Index1, &Index2); - return result; -} - -BOOL _Application::RegisterXLL(LPCTSTR Filename) -{ - BOOL result; - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x1e, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, - Filename); - return result; -} - -void _Application::Repeat() -{ - InvokeHelper(0x12d, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -BOOL _Application::GetRollZoom() -{ - BOOL result; - InvokeHelper(0x4b6, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetRollZoom(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x4b6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Application::SaveWorkspace(const VARIANT& Filename) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xd4, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Filename); -} - -BOOL _Application::GetScreenUpdating() -{ - BOOL result; - InvokeHelper(0x17e, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetScreenUpdating(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x17e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Application::SetDefaultChart(const VARIANT& FormatName, const VARIANT& Gallery) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0xdb, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &FormatName, &Gallery); -} - -long _Application::GetSheetsInNewWorkbook() -{ - long result; - InvokeHelper(0x3e1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetSheetsInNewWorkbook(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x3e1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -BOOL _Application::GetShowChartTipNames() -{ - BOOL result; - InvokeHelper(0x4b7, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetShowChartTipNames(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x4b7, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Application::GetShowChartTipValues() -{ - BOOL result; - InvokeHelper(0x4b8, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetShowChartTipValues(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x4b8, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -CString _Application::GetStandardFont() -{ - CString result; - InvokeHelper(0x39c, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Application::SetStandardFont(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x39c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -double _Application::GetStandardFontSize() -{ - double result; - InvokeHelper(0x39d, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL); - return result; -} - -void _Application::SetStandardFontSize(double newValue) -{ - static BYTE parms[] = - VTS_R8; - InvokeHelper(0x39d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - newValue); -} - -CString _Application::GetStartupPath() -{ - CString result; - InvokeHelper(0x181, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -VARIANT _Application::GetStatusBar() -{ - VARIANT result; - InvokeHelper(0x182, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void _Application::SetStatusBar(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x182, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -CString _Application::GetTemplatesPath() -{ - CString result; - InvokeHelper(0x17d, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -BOOL _Application::GetShowToolTips() -{ - BOOL result; - InvokeHelper(0x183, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetShowToolTips(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x183, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -double _Application::GetTop() -{ - double result; - InvokeHelper(0x7e, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL); - return result; -} - -void _Application::SetTop(double newValue) -{ - static BYTE parms[] = - VTS_R8; - InvokeHelper(0x7e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - newValue); -} - -long _Application::GetDefaultSaveFormat() -{ - long result; - InvokeHelper(0x4b9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetDefaultSaveFormat(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x4b9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -CString _Application::GetTransitionMenuKey() -{ - CString result; - InvokeHelper(0x136, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Application::SetTransitionMenuKey(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x136, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -long _Application::GetTransitionMenuKeyAction() -{ - long result; - InvokeHelper(0x137, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetTransitionMenuKeyAction(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x137, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -BOOL _Application::GetTransitionNavigKeys() -{ - BOOL result; - InvokeHelper(0x138, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetTransitionNavigKeys(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x138, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Application::Undo() -{ - InvokeHelper(0x12f, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -double _Application::GetUsableHeight() -{ - double result; - InvokeHelper(0x185, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL); - return result; -} - -double _Application::GetUsableWidth() -{ - double result; - InvokeHelper(0x186, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL); - return result; -} - -BOOL _Application::GetUserControl() -{ - BOOL result; - InvokeHelper(0x4ba, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetUserControl(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x4ba, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -CString _Application::GetUserName_() -{ - CString result; - InvokeHelper(0x187, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Application::SetUserName(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x187, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -CString _Application::GetValue() -{ - CString result; - InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Application::GetVbe() -{ - LPDISPATCH result; - InvokeHelper(0x4bb, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -CString _Application::GetVersion() -{ - CString result; - InvokeHelper(0x188, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -BOOL _Application::GetVisible() -{ - BOOL result; - InvokeHelper(0x22e, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetVisible(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x22e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Application::Volatile(const VARIANT& Volatile) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x314, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Volatile); -} - -void _Application::Wait(const VARIANT& Time) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x189, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Time); -} - -double _Application::GetWidth() -{ - double result; - InvokeHelper(0x7a, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL); - return result; -} - -void _Application::SetWidth(double newValue) -{ - static BYTE parms[] = - VTS_R8; - InvokeHelper(0x7a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - newValue); -} - -BOOL _Application::GetWindowsForPens() -{ - BOOL result; - InvokeHelper(0x18b, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -long _Application::GetWindowState() -{ - long result; - InvokeHelper(0x18c, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetWindowState(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x18c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -long _Application::GetUILanguage() -{ - long result; - InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetUILanguage(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -long _Application::GetDefaultSheetDirection() -{ - long result; - InvokeHelper(0xe5, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetDefaultSheetDirection(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0xe5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -long _Application::GetCursorMovement() -{ - long result; - InvokeHelper(0xe8, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetCursorMovement(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0xe8, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -long _Application::GetControlCharacters() -{ - long result; - InvokeHelper(0xe9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Application::SetControlCharacters(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0xe9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -BOOL _Application::GetEnableEvents() -{ - BOOL result; - InvokeHelper(0x4bc, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Application::SetEnableEvents(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x4bc, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - - -///////////////////////////////////////////////////////////////////////////// -// _Workbook properties - -///////////////////////////////////////////////////////////////////////////// -// _Workbook operations - -LPDISPATCH _Workbook::GetApplication() -{ - LPDISPATCH result; - InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long _Workbook::GetCreator() -{ - long result; - InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::GetParent() -{ - LPDISPATCH result; - InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetAcceptLabelsInFormulas() -{ - BOOL result; - InvokeHelper(0x5a1, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetAcceptLabelsInFormulas(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x5a1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Workbook::Activate() -{ - InvokeHelper(0x130, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH _Workbook::GetActiveChart() -{ - LPDISPATCH result; - InvokeHelper(0xb7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::GetActiveSheet() -{ - LPDISPATCH result; - InvokeHelper(0x133, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long _Workbook::GetAutoUpdateFrequency() -{ - long result; - InvokeHelper(0x5a2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Workbook::SetAutoUpdateFrequency(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x5a2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -BOOL _Workbook::GetAutoUpdateSaveChanges() -{ - BOOL result; - InvokeHelper(0x5a3, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetAutoUpdateSaveChanges(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x5a3, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -long _Workbook::GetChangeHistoryDuration() -{ - long result; - InvokeHelper(0x5a4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Workbook::SetChangeHistoryDuration(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x5a4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -LPDISPATCH _Workbook::GetBuiltinDocumentProperties() -{ - LPDISPATCH result; - InvokeHelper(0x498, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Workbook::ChangeFileAccess(long Mode, const VARIANT& WritePassword, const VARIANT& Notify) -{ - static BYTE parms[] = - VTS_I4 VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x3dd, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Mode, &WritePassword, &Notify); -} - -void _Workbook::ChangeLink(LPCTSTR Name, LPCTSTR NewName, long Type) -{ - static BYTE parms[] = - VTS_BSTR VTS_BSTR VTS_I4; - InvokeHelper(0x322, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Name, NewName, Type); -} - -LPDISPATCH _Workbook::GetCharts() -{ - LPDISPATCH result; - InvokeHelper(0x79, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Workbook::Close(const VARIANT& SaveChanges, const VARIANT& Filename, const VARIANT& RouteWorkbook) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x115, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &SaveChanges, &Filename, &RouteWorkbook); -} - -CString _Workbook::GetCodeName() -{ - CString result; - InvokeHelper(0x55d, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -CString _Workbook::Get_CodeName() -{ - CString result; - InvokeHelper(0x80010000, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Workbook::Set_CodeName(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x80010000, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -VARIANT _Workbook::GetColors(const VARIANT& Index) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x11e, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, - &Index); - return result; -} - -void _Workbook::SetColors(const VARIANT& Index, const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x11e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &Index, &newValue); -} - -LPDISPATCH _Workbook::GetCommandBars() -{ - LPDISPATCH result; - InvokeHelper(0x59f, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long _Workbook::GetConflictResolution() -{ - long result; - InvokeHelper(0x497, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Workbook::SetConflictResolution(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x497, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -LPDISPATCH _Workbook::GetContainer() -{ - LPDISPATCH result; - InvokeHelper(0x4a6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetCreateBackup() -{ - BOOL result; - InvokeHelper(0x11f, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::GetCustomDocumentProperties() -{ - LPDISPATCH result; - InvokeHelper(0x499, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetDate1904() -{ - BOOL result; - InvokeHelper(0x193, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetDate1904(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x193, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Workbook::DeleteNumberFormat(LPCTSTR NumberFormat) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x18d, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - NumberFormat); -} - -long _Workbook::GetDisplayDrawingObjects() -{ - long result; - InvokeHelper(0x194, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Workbook::SetDisplayDrawingObjects(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x194, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -BOOL _Workbook::ExclusiveAccess() -{ - BOOL result; - InvokeHelper(0x490, DISPATCH_METHOD, VT_BOOL, (void*)&result, NULL); - return result; -} - -long _Workbook::GetFileFormat() -{ - long result; - InvokeHelper(0x120, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Workbook::ForwardMailer() -{ - InvokeHelper(0x3cd, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -CString _Workbook::GetFullName() -{ - CString result; - InvokeHelper(0x121, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetHasPassword() -{ - BOOL result; - InvokeHelper(0x122, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetHasRoutingSlip() -{ - BOOL result; - InvokeHelper(0x3b6, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetHasRoutingSlip(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x3b6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Workbook::GetIsAddin() -{ - BOOL result; - InvokeHelper(0x5a5, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetIsAddin(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x5a5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -VARIANT _Workbook::LinkInfo(LPCTSTR Name, long LinkInfo, const VARIANT& Type, const VARIANT& EditionRef) -{ - VARIANT result; - static BYTE parms[] = - VTS_BSTR VTS_I4 VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x327, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - Name, LinkInfo, &Type, &EditionRef); - return result; -} - -VARIANT _Workbook::LinkSources(const VARIANT& Type) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x328, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &Type); - return result; -} - -LPDISPATCH _Workbook::GetMailer() -{ - LPDISPATCH result; - InvokeHelper(0x3d3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Workbook::MergeWorkbook(const VARIANT& Filename) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x5a6, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Filename); -} - -BOOL _Workbook::GetMultiUserEditing() -{ - BOOL result; - InvokeHelper(0x491, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -CString _Workbook::GetName() -{ - CString result; - InvokeHelper(0x6e, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::GetNames() -{ - LPDISPATCH result; - InvokeHelper(0x1ba, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::NewWindow() -{ - LPDISPATCH result; - InvokeHelper(0x118, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Workbook::OpenLinks(LPCTSTR Name, const VARIANT& ReadOnly, const VARIANT& Type) -{ - static BYTE parms[] = - VTS_BSTR VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x323, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Name, &ReadOnly, &Type); -} - -CString _Workbook::GetPath() -{ - CString result; - InvokeHelper(0x123, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetPersonalViewListSettings() -{ - BOOL result; - InvokeHelper(0x5a7, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetPersonalViewListSettings(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x5a7, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Workbook::GetPersonalViewPrintSettings() -{ - BOOL result; - InvokeHelper(0x5a8, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetPersonalViewPrintSettings(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x5a8, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -LPDISPATCH _Workbook::PivotCaches() -{ - LPDISPATCH result; - InvokeHelper(0x5a9, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Workbook::Post(const VARIANT& DestName) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x48e, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &DestName); -} - -BOOL _Workbook::GetPrecisionAsDisplayed() -{ - BOOL result; - InvokeHelper(0x195, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetPrecisionAsDisplayed(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x195, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Workbook::PrintOut(const VARIANT& From, const VARIANT& To, const VARIANT& Copies, const VARIANT& Preview, const VARIANT& ActivePrinter, const VARIANT& PrintToFile, const VARIANT& Collate) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x389, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &From, &To, &Copies, &Preview, &ActivePrinter, &PrintToFile, &Collate); -} - -void _Workbook::PrintPreview(const VARIANT& EnableChanges) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x119, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &EnableChanges); -} - -void _Workbook::Protect(const VARIANT& Password, const VARIANT& Structure, const VARIANT& Windows) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x11a, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Password, &Structure, &Windows); -} - -void _Workbook::ProtectSharing(const VARIANT& Filename, const VARIANT& Password, const VARIANT& WriteResPassword, const VARIANT& ReadOnlyRecommended, const VARIANT& CreateBackup, const VARIANT& SharingPassword) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x5aa, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Filename, &Password, &WriteResPassword, &ReadOnlyRecommended, &CreateBackup, &SharingPassword); -} - -BOOL _Workbook::GetProtectStructure() -{ - BOOL result; - InvokeHelper(0x24c, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetProtectWindows() -{ - BOOL result; - InvokeHelper(0x127, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetReadOnly() -{ - BOOL result; - InvokeHelper(0x128, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetReadOnlyRecommended() -{ - BOOL result; - InvokeHelper(0x129, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::RefreshAll() -{ - InvokeHelper(0x5ac, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void _Workbook::Reply() -{ - InvokeHelper(0x3d1, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void _Workbook::ReplyAll() -{ - InvokeHelper(0x3d2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void _Workbook::RemoveUser(long Index) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x5ad, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Index); -} - -long _Workbook::GetRevisionNumber() -{ - long result; - InvokeHelper(0x494, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Workbook::Route() -{ - InvokeHelper(0x3b2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -BOOL _Workbook::GetRouted() -{ - BOOL result; - InvokeHelper(0x3b7, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::GetRoutingSlip() -{ - LPDISPATCH result; - InvokeHelper(0x3b5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Workbook::RunAutoMacros(long Which) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x27a, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Which); -} - -void _Workbook::Save() -{ - InvokeHelper(0x11b, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void _Workbook::SaveAs(const VARIANT& Filename, const VARIANT& FileFormat, const VARIANT& Password, const VARIANT& WriteResPassword, const VARIANT& ReadOnlyRecommended, const VARIANT& CreateBackup, long AccessMode, const VARIANT& ConflictResolution, - const VARIANT& AddToMru, const VARIANT& TextCodepage, const VARIANT& TextVisualLayout) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x11c, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Filename, &FileFormat, &Password, &WriteResPassword, &ReadOnlyRecommended, &CreateBackup, AccessMode, &ConflictResolution, &AddToMru, &TextCodepage, &TextVisualLayout); -} - -void _Workbook::SaveCopyAs(const VARIANT& Filename) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xaf, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Filename); -} - -BOOL _Workbook::GetSaved() -{ - BOOL result; - InvokeHelper(0x12a, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetSaved(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x12a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Workbook::GetSaveLinkValues() -{ - BOOL result; - InvokeHelper(0x196, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetSaveLinkValues(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x196, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Workbook::SendMail(const VARIANT& Recipients, const VARIANT& Subject, const VARIANT& ReturnReceipt) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x3b3, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Recipients, &Subject, &ReturnReceipt); -} - -void _Workbook::SendMailer(const VARIANT& FileFormat, long Priority) -{ - static BYTE parms[] = - VTS_VARIANT VTS_I4; - InvokeHelper(0x3d4, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &FileFormat, Priority); -} - -void _Workbook::SetLinkOnData(LPCTSTR Name, const VARIANT& Procedure) -{ - static BYTE parms[] = - VTS_BSTR VTS_VARIANT; - InvokeHelper(0x329, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Name, &Procedure); -} - -LPDISPATCH _Workbook::GetSheets() -{ - LPDISPATCH result; - InvokeHelper(0x1e5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetShowConflictHistory() -{ - BOOL result; - InvokeHelper(0x493, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetShowConflictHistory(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x493, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -LPDISPATCH _Workbook::GetStyles() -{ - LPDISPATCH result; - InvokeHelper(0x1ed, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Workbook::Unprotect(const VARIANT& Password) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x11d, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Password); -} - -void _Workbook::UnprotectSharing(const VARIANT& SharingPassword) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x5af, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &SharingPassword); -} - -void _Workbook::UpdateFromFile() -{ - InvokeHelper(0x3e3, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void _Workbook::UpdateLink(const VARIANT& Name, const VARIANT& Type) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x324, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Name, &Type); -} - -BOOL _Workbook::GetUpdateRemoteReferences() -{ - BOOL result; - InvokeHelper(0x19b, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetUpdateRemoteReferences(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x19b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -VARIANT _Workbook::GetUserStatus() -{ - VARIANT result; - InvokeHelper(0x495, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::GetCustomViews() -{ - LPDISPATCH result; - InvokeHelper(0x5b0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::GetWindows() -{ - LPDISPATCH result; - InvokeHelper(0x1ae, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::GetWorksheets() -{ - LPDISPATCH result; - InvokeHelper(0x1ee, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetWriteReserved() -{ - BOOL result; - InvokeHelper(0x12b, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -CString _Workbook::GetWriteReservedBy() -{ - CString result; - InvokeHelper(0x12c, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::GetExcel4IntlMacroSheets() -{ - LPDISPATCH result; - InvokeHelper(0x245, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Workbook::GetExcel4MacroSheets() -{ - LPDISPATCH result; - InvokeHelper(0x243, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -BOOL _Workbook::GetTemplateRemoveExtData() -{ - BOOL result; - InvokeHelper(0x5b1, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetTemplateRemoveExtData(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x5b1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Workbook::HighlightChangesOptions(const VARIANT& When, const VARIANT& Who, const VARIANT& Where) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x5b2, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &When, &Who, &Where); -} - -BOOL _Workbook::GetHighlightChangesOnScreen() -{ - BOOL result; - InvokeHelper(0x5b5, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetHighlightChangesOnScreen(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x5b5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Workbook::GetKeepChangeHistory() -{ - BOOL result; - InvokeHelper(0x5b6, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetKeepChangeHistory(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x5b6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Workbook::GetListChangesOnNewSheet() -{ - BOOL result; - InvokeHelper(0x5b7, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Workbook::SetListChangesOnNewSheet(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x5b7, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Workbook::PurgeChangeHistoryNow(long Days, const VARIANT& SharingPassword) -{ - static BYTE parms[] = - VTS_I4 VTS_VARIANT; - InvokeHelper(0x5b8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Days, &SharingPassword); -} - -void _Workbook::AcceptAllChanges(const VARIANT& When, const VARIANT& Who, const VARIANT& Where) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x5ba, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &When, &Who, &Where); -} - -void _Workbook::RejectAllChanges(const VARIANT& When, const VARIANT& Who, const VARIANT& Where) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x5bb, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &When, &Who, &Where); -} - -void _Workbook::ResetColors() -{ - InvokeHelper(0x5bc, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH _Workbook::GetVBProject() -{ - LPDISPATCH result; - InvokeHelper(0x5bd, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Workbook::FollowHyperlink(LPCTSTR Address, const VARIANT& SubAddress, const VARIANT& NewWindow, const VARIANT& AddHistory, const VARIANT& ExtraInfo, const VARIANT& Method, const VARIANT& HeaderInfo) -{ - static BYTE parms[] = - VTS_BSTR VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x5be, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Address, &SubAddress, &NewWindow, &AddHistory, &ExtraInfo, &Method, &HeaderInfo); -} - -void _Workbook::AddToFavorites() -{ - InvokeHelper(0x5c4, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -BOOL _Workbook::GetIsInplace() -{ - BOOL result; - InvokeHelper(0x6f4, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - - -///////////////////////////////////////////////////////////////////////////// -// _Worksheet properties - -///////////////////////////////////////////////////////////////////////////// -// _Worksheet operations - -LPDISPATCH _Worksheet::GetApplication() -{ - LPDISPATCH result; - InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long _Worksheet::GetCreator() -{ - long result; - InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::GetParent() -{ - LPDISPATCH result; - InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Worksheet::Activate() -{ - InvokeHelper(0x130, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void _Worksheet::Copy(const VARIANT& Before, const VARIANT& After) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x227, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Before, &After); -} - -void _Worksheet::Delete() -{ - InvokeHelper(0x75, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -CString _Worksheet::GetCodeName() -{ - CString result; - InvokeHelper(0x55d, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -CString _Worksheet::Get_CodeName() -{ - CString result; - InvokeHelper(0x80010000, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Worksheet::Set_CodeName(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x80010000, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -long _Worksheet::GetIndex() -{ - long result; - InvokeHelper(0x1e6, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Worksheet::Move(const VARIANT& Before, const VARIANT& After) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x27d, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Before, &After); -} - -CString _Worksheet::GetName() -{ - CString result; - InvokeHelper(0x6e, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetName(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x6e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -LPDISPATCH _Worksheet::GetNext() -{ - LPDISPATCH result; - InvokeHelper(0x1f6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::GetPageSetup() -{ - LPDISPATCH result; - InvokeHelper(0x3e6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::GetPrevious() -{ - LPDISPATCH result; - InvokeHelper(0x1f7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Worksheet::PrintOut(const VARIANT& From, const VARIANT& To, const VARIANT& Copies, const VARIANT& Preview, const VARIANT& ActivePrinter, const VARIANT& PrintToFile, const VARIANT& Collate) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x389, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &From, &To, &Copies, &Preview, &ActivePrinter, &PrintToFile, &Collate); -} - -void _Worksheet::PrintPreview(const VARIANT& EnableChanges) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x119, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &EnableChanges); -} - -void _Worksheet::Protect(const VARIANT& Password, const VARIANT& DrawingObjects, const VARIANT& Contents, const VARIANT& Scenarios, const VARIANT& UserInterfaceOnly) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x11a, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Password, &DrawingObjects, &Contents, &Scenarios, &UserInterfaceOnly); -} - -BOOL _Worksheet::GetProtectContents() -{ - BOOL result; - InvokeHelper(0x124, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -BOOL _Worksheet::GetProtectDrawingObjects() -{ - BOOL result; - InvokeHelper(0x125, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -BOOL _Worksheet::GetProtectionMode() -{ - BOOL result; - InvokeHelper(0x487, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -BOOL _Worksheet::GetProtectScenarios() -{ - BOOL result; - InvokeHelper(0x126, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Worksheet::SaveAs(LPCTSTR Filename, const VARIANT& FileFormat, const VARIANT& Password, const VARIANT& WriteResPassword, const VARIANT& ReadOnlyRecommended, const VARIANT& CreateBackup, const VARIANT& AddToMru, const VARIANT& TextCodepage, - const VARIANT& TextVisualLayout) -{ - static BYTE parms[] = - VTS_BSTR VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x11c, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Filename, &FileFormat, &Password, &WriteResPassword, &ReadOnlyRecommended, &CreateBackup, &AddToMru, &TextCodepage, &TextVisualLayout); -} - -void _Worksheet::Select(const VARIANT& Replace) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xeb, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Replace); -} - -void _Worksheet::Unprotect(const VARIANT& Password) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x11d, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Password); -} - -long _Worksheet::GetVisible() -{ - long result; - InvokeHelper(0x22e, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetVisible(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x22e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -LPDISPATCH _Worksheet::GetShapes() -{ - LPDISPATCH result; - InvokeHelper(0x561, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -BOOL _Worksheet::GetTransitionExpEval() -{ - BOOL result; - InvokeHelper(0x191, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetTransitionExpEval(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x191, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Worksheet::GetAutoFilterMode() -{ - BOOL result; - InvokeHelper(0x318, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetAutoFilterMode(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x318, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -void _Worksheet::SetBackgroundPicture(LPCTSTR Filename) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x4a4, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Filename); -} - -void _Worksheet::Calculate() -{ - InvokeHelper(0x117, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -BOOL _Worksheet::GetEnableCalculation() -{ - BOOL result; - InvokeHelper(0x590, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetEnableCalculation(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x590, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -LPDISPATCH _Worksheet::GetCells() -{ - LPDISPATCH result; - InvokeHelper(0xee, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::ChartObjects(const VARIANT& Index) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x424, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &Index); - return result; -} - -void _Worksheet::CheckSpelling(const VARIANT& CustomDictionary, const VARIANT& IgnoreUppercase, const VARIANT& AlwaysSuggest, const VARIANT& IgnoreInitialAlefHamza, const VARIANT& IgnoreFinalYaa, const VARIANT& SpellScript) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1f9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &CustomDictionary, &IgnoreUppercase, &AlwaysSuggest, &IgnoreInitialAlefHamza, &IgnoreFinalYaa, &SpellScript); -} - -LPDISPATCH _Worksheet::GetCircularReference() -{ - LPDISPATCH result; - InvokeHelper(0x42d, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Worksheet::ClearArrows() -{ - InvokeHelper(0x3ca, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH _Worksheet::GetColumns() -{ - LPDISPATCH result; - InvokeHelper(0xf1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long _Worksheet::GetConsolidationFunction() -{ - long result; - InvokeHelper(0x315, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -VARIANT _Worksheet::GetConsolidationOptions() -{ - VARIANT result; - InvokeHelper(0x316, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -VARIANT _Worksheet::GetConsolidationSources() -{ - VARIANT result; - InvokeHelper(0x317, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -BOOL _Worksheet::GetEnableAutoFilter() -{ - BOOL result; - InvokeHelper(0x484, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetEnableAutoFilter(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x484, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -long _Worksheet::GetEnableSelection() -{ - long result; - InvokeHelper(0x591, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetEnableSelection(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x591, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -BOOL _Worksheet::GetEnableOutlining() -{ - BOOL result; - InvokeHelper(0x485, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetEnableOutlining(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x485, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -BOOL _Worksheet::GetEnablePivotTable() -{ - BOOL result; - InvokeHelper(0x486, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetEnablePivotTable(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x486, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -VARIANT _Worksheet::Evaluate(const VARIANT& Name) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x1, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &Name); - return result; -} - -VARIANT _Worksheet::_Evaluate(const VARIANT& Name) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xfffffffb, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &Name); - return result; -} - -BOOL _Worksheet::GetFilterMode() -{ - BOOL result; - InvokeHelper(0x320, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Worksheet::ResetAllPageBreaks() -{ - InvokeHelper(0x592, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH _Worksheet::GetNames() -{ - LPDISPATCH result; - InvokeHelper(0x1ba, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::OLEObjects(const VARIANT& Index) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x31f, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &Index); - return result; -} - -LPDISPATCH _Worksheet::GetOutline() -{ - LPDISPATCH result; - InvokeHelper(0x66, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Worksheet::Paste(const VARIANT& Destination, const VARIANT& Link) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0xd3, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Destination, &Link); -} - -void _Worksheet::PasteSpecial(const VARIANT& Format, const VARIANT& Link, const VARIANT& DisplayAsIcon, const VARIANT& IconFileName, const VARIANT& IconIndex, const VARIANT& IconLabel) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x403, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Format, &Link, &DisplayAsIcon, &IconFileName, &IconIndex, &IconLabel); -} - -LPDISPATCH _Worksheet::PivotTables(const VARIANT& Index) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x2b2, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &Index); - return result; -} - -LPDISPATCH _Worksheet::PivotTableWizard(const VARIANT& SourceType, const VARIANT& SourceData, const VARIANT& TableDestination, const VARIANT& TableName, const VARIANT& RowGrand, const VARIANT& ColumnGrand, const VARIANT& SaveData, - const VARIANT& HasAutoFormat, const VARIANT& AutoPage, const VARIANT& Reserved, const VARIANT& BackgroundQuery, const VARIANT& OptimizeCache, const VARIANT& PageFieldOrder, const VARIANT& PageFieldWrapCount, const VARIANT& ReadData, - const VARIANT& Connection) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x2ac, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &SourceType, &SourceData, &TableDestination, &TableName, &RowGrand, &ColumnGrand, &SaveData, &HasAutoFormat, &AutoPage, &Reserved, &BackgroundQuery, &OptimizeCache, &PageFieldOrder, &PageFieldWrapCount, &ReadData, &Connection); - return result; -} - -LPDISPATCH _Worksheet::GetRange(const VARIANT& Cell1, const VARIANT& Cell2) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0xc5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - &Cell1, &Cell2); - return result; -} - -LPDISPATCH _Worksheet::GetRows() -{ - LPDISPATCH result; - InvokeHelper(0x102, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::Scenarios(const VARIANT& Index) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x38c, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &Index); - return result; -} - -CString _Worksheet::GetScrollArea() -{ - CString result; - InvokeHelper(0x599, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetScrollArea(LPCTSTR lpszNewValue) -{ - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x599, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - lpszNewValue); -} - -void _Worksheet::ShowAllData() -{ - InvokeHelper(0x31a, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void _Worksheet::ShowDataForm() -{ - InvokeHelper(0x199, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -double _Worksheet::GetStandardHeight() -{ - double result; - InvokeHelper(0x197, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL); - return result; -} - -double _Worksheet::GetStandardWidth() -{ - double result; - InvokeHelper(0x198, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetStandardWidth(double newValue) -{ - static BYTE parms[] = - VTS_R8; - InvokeHelper(0x198, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - newValue); -} - -BOOL _Worksheet::GetTransitionFormEntry() -{ - BOOL result; - InvokeHelper(0x192, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetTransitionFormEntry(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x192, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -long _Worksheet::GetType() -{ - long result; - InvokeHelper(0x6c, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::GetUsedRange() -{ - LPDISPATCH result; - InvokeHelper(0x19c, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::GetHPageBreaks() -{ - LPDISPATCH result; - InvokeHelper(0x58a, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::GetVPageBreaks() -{ - LPDISPATCH result; - InvokeHelper(0x58b, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::GetQueryTables() -{ - LPDISPATCH result; - InvokeHelper(0x59a, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -BOOL _Worksheet::GetDisplayPageBreaks() -{ - BOOL result; - InvokeHelper(0x59b, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); - return result; -} - -void _Worksheet::SetDisplayPageBreaks(BOOL bNewValue) -{ - static BYTE parms[] = - VTS_BOOL; - InvokeHelper(0x59b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - bNewValue); -} - -LPDISPATCH _Worksheet::GetComments() -{ - LPDISPATCH result; - InvokeHelper(0x23f, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH _Worksheet::GetHyperlinks() -{ - LPDISPATCH result; - InvokeHelper(0x571, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void _Worksheet::ClearCircles() -{ - InvokeHelper(0x59c, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void _Worksheet::CircleInvalid() -{ - InvokeHelper(0x59d, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH _Worksheet::GetAutoFilter() -{ - LPDISPATCH result; - InvokeHelper(0x319, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - - -///////////////////////////////////////////////////////////////////////////// -// Range properties - -///////////////////////////////////////////////////////////////////////////// -// Range operations - -LPDISPATCH Range::GetApplication() -{ - LPDISPATCH result; - InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long Range::GetCreator() -{ - long result; - InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetParent() -{ - LPDISPATCH result; - InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void Range::Activate() -{ - InvokeHelper(0x130, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -VARIANT Range::GetAddIndent() -{ - VARIANT result; - InvokeHelper(0x427, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetAddIndent(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x427, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -CString Range::GetAddress(const VARIANT& RowAbsolute, const VARIANT& ColumnAbsolute, long ReferenceStyle, const VARIANT& External, const VARIANT& RelativeTo) -{ - CString result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_I4 VTS_VARIANT VTS_VARIANT; - InvokeHelper(0xec, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, parms, - &RowAbsolute, &ColumnAbsolute, ReferenceStyle, &External, &RelativeTo); - return result; -} - -CString Range::GetAddressLocal(const VARIANT& RowAbsolute, const VARIANT& ColumnAbsolute, long ReferenceStyle, const VARIANT& External, const VARIANT& RelativeTo) -{ - CString result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_I4 VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1b5, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, parms, - &RowAbsolute, &ColumnAbsolute, ReferenceStyle, &External, &RelativeTo); - return result; -} - -void Range::AdvancedFilter(long Action, const VARIANT& CriteriaRange, const VARIANT& CopyToRange, const VARIANT& Unique) -{ - static BYTE parms[] = - VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x36c, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Action, &CriteriaRange, &CopyToRange, &Unique); -} - -void Range::ApplyNames(const VARIANT& Names, const VARIANT& IgnoreRelativeAbsolute, const VARIANT& UseRowColumnNames, const VARIANT& OmitColumn, const VARIANT& OmitRow, long Order, const VARIANT& AppendLast) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_I4 VTS_VARIANT; - InvokeHelper(0x1b9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Names, &IgnoreRelativeAbsolute, &UseRowColumnNames, &OmitColumn, &OmitRow, Order, &AppendLast); -} - -void Range::ApplyOutlineStyles() -{ - InvokeHelper(0x1c0, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH Range::GetAreas() -{ - LPDISPATCH result; - InvokeHelper(0x238, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -CString Range::AutoComplete(LPCTSTR String) -{ - CString result; - static BYTE parms[] = - VTS_BSTR; - InvokeHelper(0x4a1, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, - String); - return result; -} - -void Range::AutoFill(LPDISPATCH Destination, long Type) -{ - static BYTE parms[] = - VTS_DISPATCH VTS_I4; - InvokeHelper(0x1c1, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Destination, Type); -} - -void Range::AutoFilter(const VARIANT& Field, const VARIANT& Criteria1, long Operator, const VARIANT& Criteria2, const VARIANT& VisibleDropDown) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_I4 VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x319, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Field, &Criteria1, Operator, &Criteria2, &VisibleDropDown); -} - -void Range::AutoFit() -{ - InvokeHelper(0xed, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::AutoFormat(long Format, const VARIANT& Number, const VARIANT& Font, const VARIANT& Alignment, const VARIANT& Border, const VARIANT& Pattern, const VARIANT& Width) -{ - static BYTE parms[] = - VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x72, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Format, &Number, &Font, &Alignment, &Border, &Pattern, &Width); -} - -void Range::AutoOutline() -{ - InvokeHelper(0x40c, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::BorderAround(const VARIANT& LineStyle, long Weight, long ColorIndex, const VARIANT& Color) -{ - static BYTE parms[] = - VTS_VARIANT VTS_I4 VTS_I4 VTS_VARIANT; - InvokeHelper(0x42b, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &LineStyle, Weight, ColorIndex, &Color); -} - -LPDISPATCH Range::GetBorders() -{ - LPDISPATCH result; - InvokeHelper(0x1b3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void Range::Calculate() -{ - InvokeHelper(0x117, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH Range::GetCells() -{ - LPDISPATCH result; - InvokeHelper(0xee, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetCharacters(const VARIANT& Start, const VARIANT& Length) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x25b, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - &Start, &Length); - return result; -} - -void Range::CheckSpelling(const VARIANT& CustomDictionary, const VARIANT& IgnoreUppercase, const VARIANT& AlwaysSuggest, const VARIANT& IgnoreInitialAlefHamza, const VARIANT& IgnoreFinalYaa, const VARIANT& SpellScript) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1f9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &CustomDictionary, &IgnoreUppercase, &AlwaysSuggest, &IgnoreInitialAlefHamza, &IgnoreFinalYaa, &SpellScript); -} - -void Range::Clear() -{ - InvokeHelper(0x6f, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::ClearContents() -{ - InvokeHelper(0x71, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::ClearFormats() -{ - InvokeHelper(0x70, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::ClearNotes() -{ - InvokeHelper(0xef, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::ClearOutline() -{ - InvokeHelper(0x40d, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -long Range::GetColumn() -{ - long result; - InvokeHelper(0xf0, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::ColumnDifferences(const VARIANT& Comparison) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x1fe, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &Comparison); - return result; -} - -LPDISPATCH Range::GetColumns() -{ - LPDISPATCH result; - InvokeHelper(0xf1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetColumnWidth() -{ - VARIANT result; - InvokeHelper(0xf2, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetColumnWidth(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xf2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -void Range::Consolidate(const VARIANT& Sources, const VARIANT& Function, const VARIANT& TopRow, const VARIANT& LeftColumn, const VARIANT& CreateLinks) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1e2, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Sources, &Function, &TopRow, &LeftColumn, &CreateLinks); -} - -void Range::Copy(const VARIANT& Destination) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x227, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Destination); -} - -long Range::CopyFromRecordset(LPUNKNOWN Data, const VARIANT& MaxRows, const VARIANT& MaxColumns) -{ - long result; - static BYTE parms[] = - VTS_UNKNOWN VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x480, DISPATCH_METHOD, VT_I4, (void*)&result, parms, - Data, &MaxRows, &MaxColumns); - return result; -} - -void Range::CopyPicture(long Appearance, long Format) -{ - static BYTE parms[] = - VTS_I4 VTS_I4; - InvokeHelper(0xd5, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Appearance, Format); -} - -long Range::GetCount() -{ - long result; - InvokeHelper(0x76, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void Range::CreateNames(const VARIANT& Top, const VARIANT& Left, const VARIANT& Bottom, const VARIANT& Right) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1c9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Top, &Left, &Bottom, &Right); -} - -void Range::CreatePublisher(const VARIANT& Edition, long Appearance, const VARIANT& ContainsPICT, const VARIANT& ContainsBIFF, const VARIANT& ContainsRTF, const VARIANT& ContainsVALU) -{ - static BYTE parms[] = - VTS_VARIANT VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1ca, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Edition, Appearance, &ContainsPICT, &ContainsBIFF, &ContainsRTF, &ContainsVALU); -} - -LPDISPATCH Range::GetCurrentArray() -{ - LPDISPATCH result; - InvokeHelper(0x1f5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetCurrentRegion() -{ - LPDISPATCH result; - InvokeHelper(0xf3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void Range::Cut(const VARIANT& Destination) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x235, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Destination); -} - -void Range::DataSeries(const VARIANT& Rowcol, long Type, long Date, const VARIANT& Step, const VARIANT& Stop, const VARIANT& Trend) -{ - static BYTE parms[] = - VTS_VARIANT VTS_I4 VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1d0, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Rowcol, Type, Date, &Step, &Stop, &Trend); -} - -VARIANT Range::Get_Default(const VARIANT& RowIndex, const VARIANT& ColumnIndex) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, - &RowIndex, &ColumnIndex); - return result; -} - -void Range::Set_Default(const VARIANT& RowIndex, const VARIANT& ColumnIndex, const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x0, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &RowIndex, &ColumnIndex, &newValue); -} - -void Range::Delete(const VARIANT& Shift) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x75, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Shift); -} - -LPDISPATCH Range::GetDependents() -{ - LPDISPATCH result; - InvokeHelper(0x21f, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Range::DialogBox_() -{ - VARIANT result; - InvokeHelper(0xf5, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetDirectDependents() -{ - LPDISPATCH result; - InvokeHelper(0x221, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetDirectPrecedents() -{ - LPDISPATCH result; - InvokeHelper(0x222, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Range::EditionOptions(long Type, long Option, const VARIANT& Name, const VARIANT& Reference, long Appearance, long ChartSize, const VARIANT& Format) -{ - VARIANT result; - static BYTE parms[] = - VTS_I4 VTS_I4 VTS_VARIANT VTS_VARIANT VTS_I4 VTS_I4 VTS_VARIANT; - InvokeHelper(0x46b, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - Type, Option, &Name, &Reference, Appearance, ChartSize, &Format); - return result; -} - -LPDISPATCH Range::GetEnd(long Direction) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x1f4, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - Direction); - return result; -} - -LPDISPATCH Range::GetEntireColumn() -{ - LPDISPATCH result; - InvokeHelper(0xf6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetEntireRow() -{ - LPDISPATCH result; - InvokeHelper(0xf7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void Range::FillDown() -{ - InvokeHelper(0xf8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::FillLeft() -{ - InvokeHelper(0xf9, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::FillRight() -{ - InvokeHelper(0xfa, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::FillUp() -{ - InvokeHelper(0xfb, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH Range::Find(const VARIANT& What, const VARIANT& After, const VARIANT& LookIn, const VARIANT& LookAt, const VARIANT& SearchOrder, long SearchDirection, const VARIANT& MatchCase, const VARIANT& MatchByte, - const VARIANT& MatchControlCharacters, const VARIANT& MatchDiacritics, const VARIANT& MatchKashida, const VARIANT& MatchAlefHamza) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x18e, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &What, &After, &LookIn, &LookAt, &SearchOrder, SearchDirection, &MatchCase, &MatchByte, &MatchControlCharacters, &MatchDiacritics, &MatchKashida, &MatchAlefHamza); - return result; -} - -LPDISPATCH Range::FindNext(const VARIANT& After) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x18f, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &After); - return result; -} - -LPDISPATCH Range::FindPrevious(const VARIANT& After) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x190, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &After); - return result; -} - -LPDISPATCH Range::GetFont() -{ - LPDISPATCH result; - InvokeHelper(0x92, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetFormula() -{ - VARIANT result; - InvokeHelper(0x105, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetFormula(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x105, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetFormulaArray() -{ - VARIANT result; - InvokeHelper(0x24a, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetFormulaArray(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x24a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -long Range::GetFormulaLabel() -{ - long result; - InvokeHelper(0x564, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void Range::SetFormulaLabel(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x564, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -VARIANT Range::GetFormulaHidden() -{ - VARIANT result; - InvokeHelper(0x106, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetFormulaHidden(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x106, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetFormulaLocal() -{ - VARIANT result; - InvokeHelper(0x107, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetFormulaLocal(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x107, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetFormulaR1C1() -{ - VARIANT result; - InvokeHelper(0x108, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetFormulaR1C1(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x108, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetFormulaR1C1Local() -{ - VARIANT result; - InvokeHelper(0x109, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetFormulaR1C1Local(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x109, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -void Range::FunctionWizard() -{ - InvokeHelper(0x23b, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -BOOL Range::GoalSeek(const VARIANT& Goal, LPDISPATCH ChangingCell) -{ - BOOL result; - static BYTE parms[] = - VTS_VARIANT VTS_DISPATCH; - InvokeHelper(0x1d8, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, - &Goal, ChangingCell); - return result; -} - -VARIANT Range::Group(const VARIANT& Start, const VARIANT& End, const VARIANT& By, const VARIANT& Periods) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x2e, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &Start, &End, &By, &Periods); - return result; -} - -VARIANT Range::GetHasArray() -{ - VARIANT result; - InvokeHelper(0x10a, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetHasFormula() -{ - VARIANT result; - InvokeHelper(0x10b, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetHeight() -{ - VARIANT result; - InvokeHelper(0x7b, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetHidden() -{ - VARIANT result; - InvokeHelper(0x10c, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetHidden(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x10c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetHorizontalAlignment() -{ - VARIANT result; - InvokeHelper(0x88, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetHorizontalAlignment(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x88, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetIndentLevel() -{ - VARIANT result; - InvokeHelper(0xc9, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetIndentLevel(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xc9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -void Range::InsertIndent(long InsertAmount) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x565, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - InsertAmount); -} - -void Range::Insert(const VARIANT& Shift) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xfc, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Shift); -} - -LPDISPATCH Range::GetInterior() -{ - LPDISPATCH result; - InvokeHelper(0x81, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetItem(const VARIANT& RowIndex, const VARIANT& ColumnIndex) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0xaa, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, - &RowIndex, &ColumnIndex); - return result; -} - -void Range::SetItem(const VARIANT& RowIndex, const VARIANT& ColumnIndex, const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0xaa, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &RowIndex, &ColumnIndex, &newValue); -} - -void Range::Justify() -{ - InvokeHelper(0x1ef, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -VARIANT Range::GetLeft() -{ - VARIANT result; - InvokeHelper(0x7f, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -long Range::GetListHeaderRows() -{ - long result; - InvokeHelper(0x4a3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void Range::ListNames() -{ - InvokeHelper(0xfd, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -long Range::GetLocationInTable() -{ - long result; - InvokeHelper(0x2b3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetLocked() -{ - VARIANT result; - InvokeHelper(0x10d, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetLocked(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x10d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -void Range::Merge(const VARIANT& Across) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x234, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Across); -} - -void Range::UnMerge() -{ - InvokeHelper(0x568, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH Range::GetMergeArea() -{ - LPDISPATCH result; - InvokeHelper(0x569, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetMergeCells() -{ - VARIANT result; - InvokeHelper(0xd0, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetMergeCells(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xd0, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetName() -{ - VARIANT result; - InvokeHelper(0x6e, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetName(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x6e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -void Range::NavigateArrow(const VARIANT& TowardPrecedent, const VARIANT& ArrowNumber, const VARIANT& LinkNumber) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x408, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &TowardPrecedent, &ArrowNumber, &LinkNumber); -} - -LPUNKNOWN Range::Get_NewEnum() -{ - LPUNKNOWN result; - InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetNext() -{ - LPDISPATCH result; - InvokeHelper(0x1f6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -CString Range::NoteText(const VARIANT& Text, const VARIANT& Start, const VARIANT& Length) -{ - CString result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x467, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, - &Text, &Start, &Length); - return result; -} - -VARIANT Range::GetNumberFormat() -{ - VARIANT result; - InvokeHelper(0xc1, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetNumberFormat(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xc1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetNumberFormatLocal() -{ - VARIANT result; - InvokeHelper(0x449, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetNumberFormatLocal(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x449, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -LPDISPATCH Range::GetOffset(const VARIANT& RowOffset, const VARIANT& ColumnOffset) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0xfe, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - &RowOffset, &ColumnOffset); - return result; -} - -VARIANT Range::GetOrientation() -{ - VARIANT result; - InvokeHelper(0x86, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetOrientation(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x86, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetOutlineLevel() -{ - VARIANT result; - InvokeHelper(0x10f, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetOutlineLevel(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x10f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -long Range::GetPageBreak() -{ - long result; - InvokeHelper(0xff, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void Range::SetPageBreak(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0xff, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -void Range::Parse(const VARIANT& ParseLine, const VARIANT& Destination) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1dd, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &ParseLine, &Destination); -} - -void Range::PasteSpecial(long Paste, long Operation, const VARIANT& SkipBlanks, const VARIANT& Transpose) -{ - static BYTE parms[] = - VTS_I4 VTS_I4 VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x403, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Paste, Operation, &SkipBlanks, &Transpose); -} - -LPDISPATCH Range::GetPivotField() -{ - LPDISPATCH result; - InvokeHelper(0x2db, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetPivotItem() -{ - LPDISPATCH result; - InvokeHelper(0x2e4, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetPivotTable() -{ - LPDISPATCH result; - InvokeHelper(0x2cc, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetPrecedents() -{ - LPDISPATCH result; - InvokeHelper(0x220, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetPrefixCharacter() -{ - VARIANT result; - InvokeHelper(0x1f8, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetPrevious() -{ - LPDISPATCH result; - InvokeHelper(0x1f7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void Range::PrintOut(const VARIANT& From, const VARIANT& To, const VARIANT& Copies, const VARIANT& Preview, const VARIANT& ActivePrinter, const VARIANT& PrintToFile, const VARIANT& Collate) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x389, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &From, &To, &Copies, &Preview, &ActivePrinter, &PrintToFile, &Collate); -} - -void Range::PrintPreview(const VARIANT& EnableChanges) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x119, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &EnableChanges); -} - -LPDISPATCH Range::GetQueryTable() -{ - LPDISPATCH result; - InvokeHelper(0x56a, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetRange(const VARIANT& Cell1, const VARIANT& Cell2) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0xc5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - &Cell1, &Cell2); - return result; -} - -void Range::RemoveSubtotal() -{ - InvokeHelper(0x373, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -BOOL Range::Replace(const VARIANT& What, const VARIANT& Replacement, const VARIANT& LookAt, const VARIANT& SearchOrder, const VARIANT& MatchCase, const VARIANT& MatchByte, const VARIANT& MatchControlCharacters, const VARIANT& MatchDiacritics, - const VARIANT& MatchKashida, const VARIANT& MatchAlefHamza) -{ - BOOL result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0xe2, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, - &What, &Replacement, &LookAt, &SearchOrder, &MatchCase, &MatchByte, &MatchControlCharacters, &MatchDiacritics, &MatchKashida, &MatchAlefHamza); - return result; -} - -LPDISPATCH Range::GetResize(const VARIANT& RowSize, const VARIANT& ColumnSize) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x100, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - &RowSize, &ColumnSize); - return result; -} - -long Range::GetRow() -{ - long result; - InvokeHelper(0x101, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::RowDifferences(const VARIANT& Comparison) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x1ff, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &Comparison); - return result; -} - -VARIANT Range::GetRowHeight() -{ - VARIANT result; - InvokeHelper(0x110, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetRowHeight(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x110, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -LPDISPATCH Range::GetRows() -{ - LPDISPATCH result; - InvokeHelper(0x102, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Range::Run(const VARIANT& Arg1, const VARIANT& Arg2, const VARIANT& Arg3, const VARIANT& Arg4, const VARIANT& Arg5, const VARIANT& Arg6, const VARIANT& Arg7, const VARIANT& Arg8, const VARIANT& Arg9, const VARIANT& Arg10, - const VARIANT& Arg11, const VARIANT& Arg12, const VARIANT& Arg13, const VARIANT& Arg14, const VARIANT& Arg15, const VARIANT& Arg16, const VARIANT& Arg17, const VARIANT& Arg18, const VARIANT& Arg19, const VARIANT& Arg20, - const VARIANT& Arg21, const VARIANT& Arg22, const VARIANT& Arg23, const VARIANT& Arg24, const VARIANT& Arg25, const VARIANT& Arg26, const VARIANT& Arg27, const VARIANT& Arg28, const VARIANT& Arg29, const VARIANT& Arg30) -{ - VARIANT result; - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT - VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x103, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, - &Arg1, &Arg2, &Arg3, &Arg4, &Arg5, &Arg6, &Arg7, &Arg8, &Arg9, &Arg10, &Arg11, &Arg12, &Arg13, &Arg14, &Arg15, &Arg16, &Arg17, &Arg18, &Arg19, &Arg20, &Arg21, &Arg22, &Arg23, &Arg24, &Arg25, &Arg26, &Arg27, &Arg28, &Arg29, &Arg30); - return result; -} - -void Range::Select() -{ - InvokeHelper(0xeb, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::Show() -{ - InvokeHelper(0x1f0, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::ShowDependents(const VARIANT& Remove) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x36d, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Remove); -} - -VARIANT Range::GetShowDetail() -{ - VARIANT result; - InvokeHelper(0x249, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetShowDetail(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x249, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -void Range::ShowErrors() -{ - InvokeHelper(0x36e, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -void Range::ShowPrecedents(const VARIANT& Remove) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x36f, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Remove); -} - -VARIANT Range::GetShrinkToFit() -{ - VARIANT result; - InvokeHelper(0xd1, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetShrinkToFit(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0xd1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -void Range::Sort(const VARIANT& Key1, long Order1, const VARIANT& Key2, const VARIANT& Type, long Order2, const VARIANT& Key3, long Order3, long Header, const VARIANT& OrderCustom, const VARIANT& MatchCase, long Orientation, long SortMethod, - const VARIANT& IgnoreControlCharacters, const VARIANT& IgnoreDiacritics, const VARIANT& IgnoreKashida) -{ - static BYTE parms[] = - VTS_VARIANT VTS_I4 VTS_VARIANT VTS_VARIANT VTS_I4 VTS_VARIANT VTS_I4 VTS_I4 VTS_VARIANT VTS_VARIANT VTS_I4 VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x370, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Key1, Order1, &Key2, &Type, Order2, &Key3, Order3, Header, &OrderCustom, &MatchCase, Orientation, SortMethod, &IgnoreControlCharacters, &IgnoreDiacritics, &IgnoreKashida); -} - -void Range::SortSpecial(long SortMethod, const VARIANT& Key1, long Order1, const VARIANT& Type, const VARIANT& Key2, long Order2, const VARIANT& Key3, long Order3, long Header, const VARIANT& OrderCustom, const VARIANT& MatchCase, long Orientation) -{ - static BYTE parms[] = - VTS_I4 VTS_VARIANT VTS_I4 VTS_VARIANT VTS_VARIANT VTS_I4 VTS_VARIANT VTS_I4 VTS_I4 VTS_VARIANT VTS_VARIANT VTS_I4; - InvokeHelper(0x371, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - SortMethod, &Key1, Order1, &Type, &Key2, Order2, &Key3, Order3, Header, &OrderCustom, &MatchCase, Orientation); -} - -LPDISPATCH Range::GetSoundNote() -{ - LPDISPATCH result; - InvokeHelper(0x394, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::SpecialCells(long Type, const VARIANT& Value) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_I4 VTS_VARIANT; - InvokeHelper(0x19a, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - Type, &Value); - return result; -} - -VARIANT Range::GetStyle() -{ - VARIANT result; - InvokeHelper(0x104, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetStyle(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x104, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -void Range::SubscribeTo(LPCTSTR Edition, long Format) -{ - static BYTE parms[] = - VTS_BSTR VTS_I4; - InvokeHelper(0x1e1, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - Edition, Format); -} - -void Range::Subtotal(long GroupBy, long Function, const VARIANT& TotalList, const VARIANT& Replace, const VARIANT& PageBreaks, long SummaryBelowData) -{ - static BYTE parms[] = - VTS_I4 VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_I4; - InvokeHelper(0x372, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - GroupBy, Function, &TotalList, &Replace, &PageBreaks, SummaryBelowData); -} - -VARIANT Range::GetSummary() -{ - VARIANT result; - InvokeHelper(0x111, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::Table(const VARIANT& RowInput, const VARIANT& ColumnInput) -{ - static BYTE parms[] = - VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x1f1, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &RowInput, &ColumnInput); -} - -VARIANT Range::GetText() -{ - VARIANT result; - InvokeHelper(0x8a, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::TextToColumns(const VARIANT& Destination, long DataType, long TextQualifier, const VARIANT& ConsecutiveDelimiter, const VARIANT& Tab, const VARIANT& Semicolon, const VARIANT& Comma, const VARIANT& Space, const VARIANT& Other, - const VARIANT& OtherChar, const VARIANT& FieldInfo) -{ - static BYTE parms[] = - VTS_VARIANT VTS_I4 VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; - InvokeHelper(0x410, DISPATCH_METHOD, VT_EMPTY, NULL, parms, - &Destination, DataType, TextQualifier, &ConsecutiveDelimiter, &Tab, &Semicolon, &Comma, &Space, &Other, &OtherChar, &FieldInfo); -} - -VARIANT Range::GetTop() -{ - VARIANT result; - InvokeHelper(0x7e, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::Ungroup() -{ - InvokeHelper(0xf4, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -VARIANT Range::GetUseStandardHeight() -{ - VARIANT result; - InvokeHelper(0x112, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetUseStandardHeight(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x112, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetUseStandardWidth() -{ - VARIANT result; - InvokeHelper(0x113, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetUseStandardWidth(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x113, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -LPDISPATCH Range::GetValidation() -{ - LPDISPATCH result; - InvokeHelper(0x56b, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetValue() -{ - VARIANT result; - InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetValue(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetValue2() -{ - VARIANT result; - InvokeHelper(0x56c, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetValue2(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x56c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetVerticalAlignment() -{ - VARIANT result; - InvokeHelper(0x89, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetVerticalAlignment(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x89, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Range::GetWidth() -{ - VARIANT result; - InvokeHelper(0x7a, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetWorksheet() -{ - LPDISPATCH result; - InvokeHelper(0x15c, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Range::GetWrapText() -{ - VARIANT result; - InvokeHelper(0x114, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Range::SetWrapText(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x114, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -LPDISPATCH Range::AddComment(const VARIANT& Text) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x56d, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, - &Text); - return result; -} - -LPDISPATCH Range::GetComment() -{ - LPDISPATCH result; - InvokeHelper(0x38e, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -void Range::ClearComments() -{ - InvokeHelper(0x56e, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); -} - -LPDISPATCH Range::GetPhonetic() -{ - LPDISPATCH result; - InvokeHelper(0x56f, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -LPDISPATCH Range::GetFormatConditions() -{ - LPDISPATCH result; - InvokeHelper(0x570, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long Range::GetReadingOrder() -{ - long result; - InvokeHelper(0x3cf, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -void Range::SetReadingOrder(long nNewValue) -{ - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x3cf, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - nNewValue); -} - -LPDISPATCH Range::GetHyperlinks() -{ - LPDISPATCH result; - InvokeHelper(0x571, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - - -///////////////////////////////////////////////////////////////////////////// -// Border properties - -///////////////////////////////////////////////////////////////////////////// -// Border operations - -LPDISPATCH Border::GetApplication() -{ - LPDISPATCH result; - InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long Border::GetCreator() -{ - long result; - InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH Border::GetParent() -{ - LPDISPATCH result; - InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Border::GetColor() -{ - VARIANT result; - InvokeHelper(0x63, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Border::SetColor(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x63, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Border::GetColorIndex() -{ - VARIANT result; - InvokeHelper(0x61, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Border::SetColorIndex(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x61, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Border::GetLineStyle() -{ - VARIANT result; - InvokeHelper(0x77, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Border::SetLineStyle(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x77, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Border::GetWeight() -{ - VARIANT result; - InvokeHelper(0x78, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Border::SetWeight(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x78, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - - -///////////////////////////////////////////////////////////////////////////// -// Borders properties - -///////////////////////////////////////////////////////////////////////////// -// Borders operations - -LPDISPATCH Borders::GetApplication() -{ - LPDISPATCH result; - InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long Borders::GetCreator() -{ - long result; - InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH Borders::GetParent() -{ - LPDISPATCH result; - InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Borders::GetColor() -{ - VARIANT result; - InvokeHelper(0x63, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Borders::SetColor(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x63, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Borders::GetColorIndex() -{ - VARIANT result; - InvokeHelper(0x61, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Borders::SetColorIndex(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x61, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -long Borders::GetCount() -{ - long result; - InvokeHelper(0x76, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH Borders::GetItem(long Index) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_I4; - InvokeHelper(0xaa, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - Index); - return result; -} - -VARIANT Borders::GetLineStyle() -{ - VARIANT result; - InvokeHelper(0x77, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Borders::SetLineStyle(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x77, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -LPUNKNOWN Borders::Get_NewEnum() -{ - LPUNKNOWN result; - InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL); - return result; -} - -VARIANT Borders::GetValue() -{ - VARIANT result; - InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Borders::SetValue(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Borders::GetWeight() -{ - VARIANT result; - InvokeHelper(0x78, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Borders::SetWeight(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x78, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -LPDISPATCH Borders::Get_Default(long Index) -{ - LPDISPATCH result; - static BYTE parms[] = - VTS_I4; - InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, - Index); - return result; -} - - -///////////////////////////////////////////////////////////////////////////// -// Interior properties - -///////////////////////////////////////////////////////////////////////////// -// Interior operations - -LPDISPATCH Interior::GetApplication() -{ - LPDISPATCH result; - InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -long Interior::GetCreator() -{ - long result; - InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); - return result; -} - -LPDISPATCH Interior::GetParent() -{ - LPDISPATCH result; - InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); - return result; -} - -VARIANT Interior::GetColor() -{ - VARIANT result; - InvokeHelper(0x63, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Interior::SetColor(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x63, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Interior::GetColorIndex() -{ - VARIANT result; - InvokeHelper(0x61, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Interior::SetColorIndex(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x61, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Interior::GetInvertIfNegative() -{ - VARIANT result; - InvokeHelper(0x84, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Interior::SetInvertIfNegative(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x84, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Interior::GetPattern() -{ - VARIANT result; - InvokeHelper(0x5f, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Interior::SetPattern(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x5f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Interior::GetPatternColor() -{ - VARIANT result; - InvokeHelper(0x64, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Interior::SetPatternColor(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x64, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} - -VARIANT Interior::GetPatternColorIndex() -{ - VARIANT result; - InvokeHelper(0x62, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); - return result; -} - -void Interior::SetPatternColorIndex(const VARIANT& newValue) -{ - static BYTE parms[] = - VTS_VARIANT; - InvokeHelper(0x62, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, - &newValue); -} diff --git a/Generals/Code/Tools/Babylon/excel8.h b/Generals/Code/Tools/Babylon/excel8.h deleted file mode 100644 index 1a04df750e5..00000000000 --- a/Generals/Code/Tools/Babylon/excel8.h +++ /dev/null @@ -1,884 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// Machine generated IDispatch wrapper class(es) created with ClassWizard -///////////////////////////////////////////////////////////////////////////// -// Workbooks wrapper class - -class Workbooks : public COleDispatchDriver -{ -public: - Workbooks() {} // Calls COleDispatchDriver default constructor - Workbooks(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} - Workbooks(const Workbooks& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} - -// Attributes -public: - -// Operations -public: - LPDISPATCH GetApplication(); - long GetCreator(); - LPDISPATCH GetParent(); - LPDISPATCH Add(const VARIANT& Template); - void Close(); - long GetCount(); - LPDISPATCH GetItem(const VARIANT& Index); - LPUNKNOWN Get_NewEnum(); - LPDISPATCH Open(LPCTSTR Filename, const VARIANT& UpdateLinks, const VARIANT& ReadOnly, const VARIANT& Format, const VARIANT& Password, const VARIANT& WriteResPassword, const VARIANT& IgnoreReadOnlyRecommended, const VARIANT& Origin, - const VARIANT& Delimiter, const VARIANT& Editable, const VARIANT& Notify, const VARIANT& Converter, const VARIANT& AddToMru); - void OpenText(LPCTSTR Filename, const VARIANT& Origin, const VARIANT& StartRow, const VARIANT& DataType, long TextQualifier, const VARIANT& ConsecutiveDelimiter, const VARIANT& Tab, const VARIANT& Semicolon, const VARIANT& Comma, - const VARIANT& Space, const VARIANT& Other, const VARIANT& OtherChar, const VARIANT& FieldInfo, const VARIANT& TextVisualLayout); - LPDISPATCH Get_Default(const VARIANT& Index); -}; -///////////////////////////////////////////////////////////////////////////// -// _Application wrapper class - -class _Application : public COleDispatchDriver -{ -public: - _Application() {} // Calls COleDispatchDriver default constructor - _Application(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} - _Application(const _Application& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} - -// Attributes -public: - -// Operations -public: - LPDISPATCH GetApplication(); - long GetCreator(); - LPDISPATCH GetParent(); - LPDISPATCH GetActiveCell(); - LPDISPATCH GetActiveChart(); - CString GetActivePrinter(); - void SetActivePrinter(LPCTSTR lpszNewValue); - LPDISPATCH GetActiveSheet(); - LPDISPATCH GetActiveWindow(); - LPDISPATCH GetActiveWorkbook(); - LPDISPATCH GetAddIns(); - LPDISPATCH GetAssistant(); - void Calculate(); - LPDISPATCH GetCells(); - LPDISPATCH GetCharts(); - LPDISPATCH GetColumns(); - LPDISPATCH GetCommandBars(); - long GetDDEAppReturnCode(); - void DDEExecute(long Channel, LPCTSTR String); - long DDEInitiate(LPCTSTR App, LPCTSTR Topic); - void DDEPoke(long Channel, const VARIANT& Item, const VARIANT& Data); - VARIANT DDERequest(long Channel, LPCTSTR Item); - void DDETerminate(long Channel); - VARIANT Evaluate(const VARIANT& Name); - VARIANT _Evaluate(const VARIANT& Name); - VARIANT ExecuteExcel4Macro(LPCTSTR String); - LPDISPATCH Intersect(LPDISPATCH Arg1, LPDISPATCH Arg2, const VARIANT& Arg3, const VARIANT& Arg4, const VARIANT& Arg5, const VARIANT& Arg6, const VARIANT& Arg7, const VARIANT& Arg8, const VARIANT& Arg9, const VARIANT& Arg10, - const VARIANT& Arg11, const VARIANT& Arg12, const VARIANT& Arg13, const VARIANT& Arg14, const VARIANT& Arg15, const VARIANT& Arg16, const VARIANT& Arg17, const VARIANT& Arg18, const VARIANT& Arg19, const VARIANT& Arg20, - const VARIANT& Arg21, const VARIANT& Arg22, const VARIANT& Arg23, const VARIANT& Arg24, const VARIANT& Arg25, const VARIANT& Arg26, const VARIANT& Arg27, const VARIANT& Arg28, const VARIANT& Arg29, const VARIANT& Arg30); - LPDISPATCH GetNames(); - LPDISPATCH GetRange(const VARIANT& Cell1, const VARIANT& Cell2); - LPDISPATCH GetRows(); - VARIANT Run(const VARIANT& Macro, const VARIANT& Arg1, const VARIANT& Arg2, const VARIANT& Arg3, const VARIANT& Arg4, const VARIANT& Arg5, const VARIANT& Arg6, const VARIANT& Arg7, const VARIANT& Arg8, const VARIANT& Arg9, - const VARIANT& Arg10, const VARIANT& Arg11, const VARIANT& Arg12, const VARIANT& Arg13, const VARIANT& Arg14, const VARIANT& Arg15, const VARIANT& Arg16, const VARIANT& Arg17, const VARIANT& Arg18, const VARIANT& Arg19, - const VARIANT& Arg20, const VARIANT& Arg21, const VARIANT& Arg22, const VARIANT& Arg23, const VARIANT& Arg24, const VARIANT& Arg25, const VARIANT& Arg26, const VARIANT& Arg27, const VARIANT& Arg28, const VARIANT& Arg29, - const VARIANT& Arg30); - VARIANT _Run2(const VARIANT& Macro, const VARIANT& Arg1, const VARIANT& Arg2, const VARIANT& Arg3, const VARIANT& Arg4, const VARIANT& Arg5, const VARIANT& Arg6, const VARIANT& Arg7, const VARIANT& Arg8, const VARIANT& Arg9, - const VARIANT& Arg10, const VARIANT& Arg11, const VARIANT& Arg12, const VARIANT& Arg13, const VARIANT& Arg14, const VARIANT& Arg15, const VARIANT& Arg16, const VARIANT& Arg17, const VARIANT& Arg18, const VARIANT& Arg19, - const VARIANT& Arg20, const VARIANT& Arg21, const VARIANT& Arg22, const VARIANT& Arg23, const VARIANT& Arg24, const VARIANT& Arg25, const VARIANT& Arg26, const VARIANT& Arg27, const VARIANT& Arg28, const VARIANT& Arg29, - const VARIANT& Arg30); - LPDISPATCH GetSelection(); - void SendKeys(const VARIANT& Keys, const VARIANT& Wait); - LPDISPATCH GetSheets(); - LPDISPATCH GetThisWorkbook(); - LPDISPATCH Union(LPDISPATCH Arg1, LPDISPATCH Arg2, const VARIANT& Arg3, const VARIANT& Arg4, const VARIANT& Arg5, const VARIANT& Arg6, const VARIANT& Arg7, const VARIANT& Arg8, const VARIANT& Arg9, const VARIANT& Arg10, const VARIANT& Arg11, - const VARIANT& Arg12, const VARIANT& Arg13, const VARIANT& Arg14, const VARIANT& Arg15, const VARIANT& Arg16, const VARIANT& Arg17, const VARIANT& Arg18, const VARIANT& Arg19, const VARIANT& Arg20, const VARIANT& Arg21, - const VARIANT& Arg22, const VARIANT& Arg23, const VARIANT& Arg24, const VARIANT& Arg25, const VARIANT& Arg26, const VARIANT& Arg27, const VARIANT& Arg28, const VARIANT& Arg29, const VARIANT& Arg30); - LPDISPATCH GetWindows(); - LPDISPATCH GetWorkbooks(); - LPDISPATCH GetWorksheetFunction(); - LPDISPATCH GetWorksheets(); - LPDISPATCH GetExcel4IntlMacroSheets(); - LPDISPATCH GetExcel4MacroSheets(); - void ActivateMicrosoftApp(long Index); - void AddChartAutoFormat(const VARIANT& Chart, LPCTSTR Name, const VARIANT& Description); - void AddCustomList(const VARIANT& ListArray, const VARIANT& ByRow); - BOOL GetAlertBeforeOverwriting(); - void SetAlertBeforeOverwriting(BOOL bNewValue); - CString GetAltStartupPath(); - void SetAltStartupPath(LPCTSTR lpszNewValue); - BOOL GetAskToUpdateLinks(); - void SetAskToUpdateLinks(BOOL bNewValue); - BOOL GetEnableAnimations(); - void SetEnableAnimations(BOOL bNewValue); - LPDISPATCH GetAutoCorrect(); - long GetBuild(); - BOOL GetCalculateBeforeSave(); - void SetCalculateBeforeSave(BOOL bNewValue); - long GetCalculation(); - void SetCalculation(long nNewValue); - VARIANT GetCaller(const VARIANT& Index); - BOOL GetCanPlaySounds(); - BOOL GetCanRecordSounds(); - CString GetCaption(); - void SetCaption(LPCTSTR lpszNewValue); - BOOL GetCellDragAndDrop(); - void SetCellDragAndDrop(BOOL bNewValue); - double CentimetersToPoints(double Centimeters); - BOOL CheckSpelling(LPCTSTR Word, const VARIANT& CustomDictionary, const VARIANT& IgnoreUppercase); - VARIANT GetClipboardFormats(const VARIANT& Index); - BOOL GetDisplayClipboardWindow(); - void SetDisplayClipboardWindow(BOOL bNewValue); - long GetCommandUnderlines(); - void SetCommandUnderlines(long nNewValue); - BOOL GetConstrainNumeric(); - void SetConstrainNumeric(BOOL bNewValue); - VARIANT ConvertFormula(const VARIANT& Formula, long FromReferenceStyle, const VARIANT& ToReferenceStyle, const VARIANT& ToAbsolute, const VARIANT& RelativeTo); - BOOL GetCopyObjectsWithCells(); - void SetCopyObjectsWithCells(BOOL bNewValue); - long GetCursor(); - void SetCursor(long nNewValue); - long GetCustomListCount(); - long GetCutCopyMode(); - void SetCutCopyMode(long nNewValue); - long GetDataEntryMode(); - void SetDataEntryMode(long nNewValue); - CString Get_Default(); - CString GetDefaultFilePath(); - void SetDefaultFilePath(LPCTSTR lpszNewValue); - void DeleteChartAutoFormat(LPCTSTR Name); - void DeleteCustomList(long ListNum); - LPDISPATCH GetDialogs(); - BOOL GetDisplayAlerts(); - void SetDisplayAlerts(BOOL bNewValue); - BOOL GetDisplayFormulaBar(); - void SetDisplayFormulaBar(BOOL bNewValue); - BOOL GetDisplayFullScreen(); - void SetDisplayFullScreen(BOOL bNewValue); - BOOL GetDisplayNoteIndicator(); - void SetDisplayNoteIndicator(BOOL bNewValue); - long GetDisplayCommentIndicator(); - void SetDisplayCommentIndicator(long nNewValue); - BOOL GetDisplayExcel4Menus(); - void SetDisplayExcel4Menus(BOOL bNewValue); - BOOL GetDisplayRecentFiles(); - void SetDisplayRecentFiles(BOOL bNewValue); - BOOL GetDisplayScrollBars(); - void SetDisplayScrollBars(BOOL bNewValue); - BOOL GetDisplayStatusBar(); - void SetDisplayStatusBar(BOOL bNewValue); - void DoubleClick(); - BOOL GetEditDirectlyInCell(); - void SetEditDirectlyInCell(BOOL bNewValue); - BOOL GetEnableAutoComplete(); - void SetEnableAutoComplete(BOOL bNewValue); - long GetEnableCancelKey(); - void SetEnableCancelKey(long nNewValue); - BOOL GetEnableSound(); - void SetEnableSound(BOOL bNewValue); - VARIANT GetFileConverters(const VARIANT& Index1, const VARIANT& Index2); - LPDISPATCH GetFileSearch(); - LPDISPATCH GetFileFind(); - void FindFile(); - BOOL GetFixedDecimal(); - void SetFixedDecimal(BOOL bNewValue); - long GetFixedDecimalPlaces(); - void SetFixedDecimalPlaces(long nNewValue); - VARIANT GetCustomListContents(long ListNum); - long GetCustomListNum(const VARIANT& ListArray); - VARIANT GetOpenFilename(const VARIANT& FileFilter, const VARIANT& FilterIndex, const VARIANT& Title, const VARIANT& ButtonText, const VARIANT& MultiSelect); - VARIANT GetSaveAsFilename(const VARIANT& InitialFilename, const VARIANT& FileFilter, const VARIANT& FilterIndex, const VARIANT& Title, const VARIANT& ButtonText); - void Goto(const VARIANT& Reference, const VARIANT& Scroll); - double GetHeight(); - void SetHeight(double newValue); - void Help(const VARIANT& HelpFile, const VARIANT& HelpContextID); - BOOL GetIgnoreRemoteRequests(); - void SetIgnoreRemoteRequests(BOOL bNewValue); - double InchesToPoints(double Inches); - VARIANT InputBox(LPCTSTR Prompt, const VARIANT& Title, const VARIANT& Default, const VARIANT& Left, const VARIANT& Top, const VARIANT& HelpFile, const VARIANT& HelpContextID, const VARIANT& Type); - BOOL GetInteractive(); - void SetInteractive(BOOL bNewValue); - VARIANT GetInternational(const VARIANT& Index); - BOOL GetIteration(); - void SetIteration(BOOL bNewValue); - double GetLeft(); - void SetLeft(double newValue); - CString GetLibraryPath(); - void MacroOptions(const VARIANT& Macro, const VARIANT& Description, const VARIANT& HasMenu, const VARIANT& MenuText, const VARIANT& HasShortcutKey, const VARIANT& ShortcutKey, const VARIANT& Category, const VARIANT& StatusBar, - const VARIANT& HelpContextID, const VARIANT& HelpFile); - void MailLogoff(); - void MailLogon(const VARIANT& Name, const VARIANT& Password, const VARIANT& DownloadNewMail); - VARIANT GetMailSession(); - long GetMailSystem(); - BOOL GetMathCoprocessorAvailable(); - double GetMaxChange(); - void SetMaxChange(double newValue); - long GetMaxIterations(); - void SetMaxIterations(long nNewValue); - long GetMemoryFree(); - long GetMemoryTotal(); - long GetMemoryUsed(); - BOOL GetMouseAvailable(); - BOOL GetMoveAfterReturn(); - void SetMoveAfterReturn(BOOL bNewValue); - long GetMoveAfterReturnDirection(); - void SetMoveAfterReturnDirection(long nNewValue); - LPDISPATCH GetRecentFiles(); - CString GetName(); - LPDISPATCH NextLetter(); - CString GetNetworkTemplatesPath(); - LPDISPATCH GetODBCErrors(); - long GetODBCTimeout(); - void SetODBCTimeout(long nNewValue); - void OnKey(LPCTSTR Key, const VARIANT& Procedure); - void OnRepeat(LPCTSTR Text, LPCTSTR Procedure); - void OnTime(const VARIANT& EarliestTime, LPCTSTR Procedure, const VARIANT& LatestTime, const VARIANT& Schedule); - void OnUndo(LPCTSTR Text, LPCTSTR Procedure); - CString GetOnWindow(); - void SetOnWindow(LPCTSTR lpszNewValue); - CString GetOperatingSystem(); - CString GetOrganizationName(); - CString GetPath(); - CString GetPathSeparator(); - VARIANT GetPreviousSelections(const VARIANT& Index); - BOOL GetPivotTableSelection(); - void SetPivotTableSelection(BOOL bNewValue); - BOOL GetPromptForSummaryInfo(); - void SetPromptForSummaryInfo(BOOL bNewValue); - void Quit(); - void RecordMacro(const VARIANT& BasicCode, const VARIANT& XlmCode); - BOOL GetRecordRelative(); - long GetReferenceStyle(); - void SetReferenceStyle(long nNewValue); - VARIANT GetRegisteredFunctions(const VARIANT& Index1, const VARIANT& Index2); - BOOL RegisterXLL(LPCTSTR Filename); - void Repeat(); - BOOL GetRollZoom(); - void SetRollZoom(BOOL bNewValue); - void SaveWorkspace(const VARIANT& Filename); - BOOL GetScreenUpdating(); - void SetScreenUpdating(BOOL bNewValue); - void SetDefaultChart(const VARIANT& FormatName, const VARIANT& Gallery); - long GetSheetsInNewWorkbook(); - void SetSheetsInNewWorkbook(long nNewValue); - BOOL GetShowChartTipNames(); - void SetShowChartTipNames(BOOL bNewValue); - BOOL GetShowChartTipValues(); - void SetShowChartTipValues(BOOL bNewValue); - CString GetStandardFont(); - void SetStandardFont(LPCTSTR lpszNewValue); - double GetStandardFontSize(); - void SetStandardFontSize(double newValue); - CString GetStartupPath(); - VARIANT GetStatusBar(); - void SetStatusBar(const VARIANT& newValue); - CString GetTemplatesPath(); - BOOL GetShowToolTips(); - void SetShowToolTips(BOOL bNewValue); - double GetTop(); - void SetTop(double newValue); - long GetDefaultSaveFormat(); - void SetDefaultSaveFormat(long nNewValue); - CString GetTransitionMenuKey(); - void SetTransitionMenuKey(LPCTSTR lpszNewValue); - long GetTransitionMenuKeyAction(); - void SetTransitionMenuKeyAction(long nNewValue); - BOOL GetTransitionNavigKeys(); - void SetTransitionNavigKeys(BOOL bNewValue); - void Undo(); - double GetUsableHeight(); - double GetUsableWidth(); - BOOL GetUserControl(); - void SetUserControl(BOOL bNewValue); - CString GetUserName_(); - void SetUserName(LPCTSTR lpszNewValue); - CString GetValue(); - LPDISPATCH GetVbe(); - CString GetVersion(); - BOOL GetVisible(); - void SetVisible(BOOL bNewValue); - void Volatile(const VARIANT& Volatile); - void Wait(const VARIANT& Time); - double GetWidth(); - void SetWidth(double newValue); - BOOL GetWindowsForPens(); - long GetWindowState(); - void SetWindowState(long nNewValue); - long GetUILanguage(); - void SetUILanguage(long nNewValue); - long GetDefaultSheetDirection(); - void SetDefaultSheetDirection(long nNewValue); - long GetCursorMovement(); - void SetCursorMovement(long nNewValue); - long GetControlCharacters(); - void SetControlCharacters(long nNewValue); - BOOL GetEnableEvents(); - void SetEnableEvents(BOOL bNewValue); -}; -///////////////////////////////////////////////////////////////////////////// -// _Workbook wrapper class - -class _Workbook : public COleDispatchDriver -{ -public: - _Workbook() {} // Calls COleDispatchDriver default constructor - _Workbook(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} - _Workbook(const _Workbook& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} - -// Attributes -public: - -// Operations -public: - LPDISPATCH GetApplication(); - long GetCreator(); - LPDISPATCH GetParent(); - BOOL GetAcceptLabelsInFormulas(); - void SetAcceptLabelsInFormulas(BOOL bNewValue); - void Activate(); - LPDISPATCH GetActiveChart(); - LPDISPATCH GetActiveSheet(); - long GetAutoUpdateFrequency(); - void SetAutoUpdateFrequency(long nNewValue); - BOOL GetAutoUpdateSaveChanges(); - void SetAutoUpdateSaveChanges(BOOL bNewValue); - long GetChangeHistoryDuration(); - void SetChangeHistoryDuration(long nNewValue); - LPDISPATCH GetBuiltinDocumentProperties(); - void ChangeFileAccess(long Mode, const VARIANT& WritePassword, const VARIANT& Notify); - void ChangeLink(LPCTSTR Name, LPCTSTR NewName, long Type); - LPDISPATCH GetCharts(); - void Close(const VARIANT& SaveChanges, const VARIANT& Filename, const VARIANT& RouteWorkbook); - CString GetCodeName(); - CString Get_CodeName(); - void Set_CodeName(LPCTSTR lpszNewValue); - VARIANT GetColors(const VARIANT& Index); - void SetColors(const VARIANT& Index, const VARIANT& newValue); - LPDISPATCH GetCommandBars(); - long GetConflictResolution(); - void SetConflictResolution(long nNewValue); - LPDISPATCH GetContainer(); - BOOL GetCreateBackup(); - LPDISPATCH GetCustomDocumentProperties(); - BOOL GetDate1904(); - void SetDate1904(BOOL bNewValue); - void DeleteNumberFormat(LPCTSTR NumberFormat); - long GetDisplayDrawingObjects(); - void SetDisplayDrawingObjects(long nNewValue); - BOOL ExclusiveAccess(); - long GetFileFormat(); - void ForwardMailer(); - CString GetFullName(); - BOOL GetHasPassword(); - BOOL GetHasRoutingSlip(); - void SetHasRoutingSlip(BOOL bNewValue); - BOOL GetIsAddin(); - void SetIsAddin(BOOL bNewValue); - VARIANT LinkInfo(LPCTSTR Name, long LinkInfo, const VARIANT& Type, const VARIANT& EditionRef); - VARIANT LinkSources(const VARIANT& Type); - LPDISPATCH GetMailer(); - void MergeWorkbook(const VARIANT& Filename); - BOOL GetMultiUserEditing(); - CString GetName(); - LPDISPATCH GetNames(); - LPDISPATCH NewWindow(); - void OpenLinks(LPCTSTR Name, const VARIANT& ReadOnly, const VARIANT& Type); - CString GetPath(); - BOOL GetPersonalViewListSettings(); - void SetPersonalViewListSettings(BOOL bNewValue); - BOOL GetPersonalViewPrintSettings(); - void SetPersonalViewPrintSettings(BOOL bNewValue); - LPDISPATCH PivotCaches(); - void Post(const VARIANT& DestName); - BOOL GetPrecisionAsDisplayed(); - void SetPrecisionAsDisplayed(BOOL bNewValue); - void PrintOut(const VARIANT& From, const VARIANT& To, const VARIANT& Copies, const VARIANT& Preview, const VARIANT& ActivePrinter, const VARIANT& PrintToFile, const VARIANT& Collate); - void PrintPreview(const VARIANT& EnableChanges); - void Protect(const VARIANT& Password, const VARIANT& Structure, const VARIANT& Windows); - void ProtectSharing(const VARIANT& Filename, const VARIANT& Password, const VARIANT& WriteResPassword, const VARIANT& ReadOnlyRecommended, const VARIANT& CreateBackup, const VARIANT& SharingPassword); - BOOL GetProtectStructure(); - BOOL GetProtectWindows(); - BOOL GetReadOnly(); - BOOL GetReadOnlyRecommended(); - void RefreshAll(); - void Reply(); - void ReplyAll(); - void RemoveUser(long Index); - long GetRevisionNumber(); - void Route(); - BOOL GetRouted(); - LPDISPATCH GetRoutingSlip(); - void RunAutoMacros(long Which); - void Save(); - void SaveAs(const VARIANT& Filename, const VARIANT& FileFormat, const VARIANT& Password, const VARIANT& WriteResPassword, const VARIANT& ReadOnlyRecommended, const VARIANT& CreateBackup, long AccessMode, const VARIANT& ConflictResolution, - const VARIANT& AddToMru, const VARIANT& TextCodepage, const VARIANT& TextVisualLayout); - void SaveCopyAs(const VARIANT& Filename); - BOOL GetSaved(); - void SetSaved(BOOL bNewValue); - BOOL GetSaveLinkValues(); - void SetSaveLinkValues(BOOL bNewValue); - void SendMail(const VARIANT& Recipients, const VARIANT& Subject, const VARIANT& ReturnReceipt); - void SendMailer(const VARIANT& FileFormat, long Priority); - void SetLinkOnData(LPCTSTR Name, const VARIANT& Procedure); - LPDISPATCH GetSheets(); - BOOL GetShowConflictHistory(); - void SetShowConflictHistory(BOOL bNewValue); - LPDISPATCH GetStyles(); - void Unprotect(const VARIANT& Password); - void UnprotectSharing(const VARIANT& SharingPassword); - void UpdateFromFile(); - void UpdateLink(const VARIANT& Name, const VARIANT& Type); - BOOL GetUpdateRemoteReferences(); - void SetUpdateRemoteReferences(BOOL bNewValue); - VARIANT GetUserStatus(); - LPDISPATCH GetCustomViews(); - LPDISPATCH GetWindows(); - LPDISPATCH GetWorksheets(); - BOOL GetWriteReserved(); - CString GetWriteReservedBy(); - LPDISPATCH GetExcel4IntlMacroSheets(); - LPDISPATCH GetExcel4MacroSheets(); - BOOL GetTemplateRemoveExtData(); - void SetTemplateRemoveExtData(BOOL bNewValue); - void HighlightChangesOptions(const VARIANT& When, const VARIANT& Who, const VARIANT& Where); - BOOL GetHighlightChangesOnScreen(); - void SetHighlightChangesOnScreen(BOOL bNewValue); - BOOL GetKeepChangeHistory(); - void SetKeepChangeHistory(BOOL bNewValue); - BOOL GetListChangesOnNewSheet(); - void SetListChangesOnNewSheet(BOOL bNewValue); - void PurgeChangeHistoryNow(long Days, const VARIANT& SharingPassword); - void AcceptAllChanges(const VARIANT& When, const VARIANT& Who, const VARIANT& Where); - void RejectAllChanges(const VARIANT& When, const VARIANT& Who, const VARIANT& Where); - void ResetColors(); - LPDISPATCH GetVBProject(); - void FollowHyperlink(LPCTSTR Address, const VARIANT& SubAddress, const VARIANT& NewWindow, const VARIANT& AddHistory, const VARIANT& ExtraInfo, const VARIANT& Method, const VARIANT& HeaderInfo); - void AddToFavorites(); - BOOL GetIsInplace(); -}; -///////////////////////////////////////////////////////////////////////////// -// _Worksheet wrapper class - -class _Worksheet : public COleDispatchDriver -{ -public: - _Worksheet() {} // Calls COleDispatchDriver default constructor - _Worksheet(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} - _Worksheet(const _Worksheet& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} - -// Attributes -public: - -// Operations -public: - LPDISPATCH GetApplication(); - long GetCreator(); - LPDISPATCH GetParent(); - void Activate(); - void Copy(const VARIANT& Before, const VARIANT& After); - void Delete(); - CString GetCodeName(); - CString Get_CodeName(); - void Set_CodeName(LPCTSTR lpszNewValue); - long GetIndex(); - void Move(const VARIANT& Before, const VARIANT& After); - CString GetName(); - void SetName(LPCTSTR lpszNewValue); - LPDISPATCH GetNext(); - LPDISPATCH GetPageSetup(); - LPDISPATCH GetPrevious(); - void PrintOut(const VARIANT& From, const VARIANT& To, const VARIANT& Copies, const VARIANT& Preview, const VARIANT& ActivePrinter, const VARIANT& PrintToFile, const VARIANT& Collate); - void PrintPreview(const VARIANT& EnableChanges); - void Protect(const VARIANT& Password, const VARIANT& DrawingObjects, const VARIANT& Contents, const VARIANT& Scenarios, const VARIANT& UserInterfaceOnly); - BOOL GetProtectContents(); - BOOL GetProtectDrawingObjects(); - BOOL GetProtectionMode(); - BOOL GetProtectScenarios(); - void SaveAs(LPCTSTR Filename, const VARIANT& FileFormat, const VARIANT& Password, const VARIANT& WriteResPassword, const VARIANT& ReadOnlyRecommended, const VARIANT& CreateBackup, const VARIANT& AddToMru, const VARIANT& TextCodepage, - const VARIANT& TextVisualLayout); - void Select(const VARIANT& Replace); - void Unprotect(const VARIANT& Password); - long GetVisible(); - void SetVisible(long nNewValue); - LPDISPATCH GetShapes(); - BOOL GetTransitionExpEval(); - void SetTransitionExpEval(BOOL bNewValue); - BOOL GetAutoFilterMode(); - void SetAutoFilterMode(BOOL bNewValue); - void SetBackgroundPicture(LPCTSTR Filename); - void Calculate(); - BOOL GetEnableCalculation(); - void SetEnableCalculation(BOOL bNewValue); - LPDISPATCH GetCells(); - LPDISPATCH ChartObjects(const VARIANT& Index); - void CheckSpelling(const VARIANT& CustomDictionary, const VARIANT& IgnoreUppercase, const VARIANT& AlwaysSuggest, const VARIANT& IgnoreInitialAlefHamza, const VARIANT& IgnoreFinalYaa, const VARIANT& SpellScript); - LPDISPATCH GetCircularReference(); - void ClearArrows(); - LPDISPATCH GetColumns(); - long GetConsolidationFunction(); - VARIANT GetConsolidationOptions(); - VARIANT GetConsolidationSources(); - BOOL GetEnableAutoFilter(); - void SetEnableAutoFilter(BOOL bNewValue); - long GetEnableSelection(); - void SetEnableSelection(long nNewValue); - BOOL GetEnableOutlining(); - void SetEnableOutlining(BOOL bNewValue); - BOOL GetEnablePivotTable(); - void SetEnablePivotTable(BOOL bNewValue); - VARIANT Evaluate(const VARIANT& Name); - VARIANT _Evaluate(const VARIANT& Name); - BOOL GetFilterMode(); - void ResetAllPageBreaks(); - LPDISPATCH GetNames(); - LPDISPATCH OLEObjects(const VARIANT& Index); - LPDISPATCH GetOutline(); - void Paste(const VARIANT& Destination, const VARIANT& Link); - void PasteSpecial(const VARIANT& Format, const VARIANT& Link, const VARIANT& DisplayAsIcon, const VARIANT& IconFileName, const VARIANT& IconIndex, const VARIANT& IconLabel); - LPDISPATCH PivotTables(const VARIANT& Index); - LPDISPATCH PivotTableWizard(const VARIANT& SourceType, const VARIANT& SourceData, const VARIANT& TableDestination, const VARIANT& TableName, const VARIANT& RowGrand, const VARIANT& ColumnGrand, const VARIANT& SaveData, - const VARIANT& HasAutoFormat, const VARIANT& AutoPage, const VARIANT& Reserved, const VARIANT& BackgroundQuery, const VARIANT& OptimizeCache, const VARIANT& PageFieldOrder, const VARIANT& PageFieldWrapCount, const VARIANT& ReadData, - const VARIANT& Connection); - LPDISPATCH GetRange(const VARIANT& Cell1, const VARIANT& Cell2); - LPDISPATCH GetRows(); - LPDISPATCH Scenarios(const VARIANT& Index); - CString GetScrollArea(); - void SetScrollArea(LPCTSTR lpszNewValue); - void ShowAllData(); - void ShowDataForm(); - double GetStandardHeight(); - double GetStandardWidth(); - void SetStandardWidth(double newValue); - BOOL GetTransitionFormEntry(); - void SetTransitionFormEntry(BOOL bNewValue); - long GetType(); - LPDISPATCH GetUsedRange(); - LPDISPATCH GetHPageBreaks(); - LPDISPATCH GetVPageBreaks(); - LPDISPATCH GetQueryTables(); - BOOL GetDisplayPageBreaks(); - void SetDisplayPageBreaks(BOOL bNewValue); - LPDISPATCH GetComments(); - LPDISPATCH GetHyperlinks(); - void ClearCircles(); - void CircleInvalid(); - LPDISPATCH GetAutoFilter(); -}; -///////////////////////////////////////////////////////////////////////////// -// Range wrapper class - -class Range : public COleDispatchDriver -{ -public: - Range() {} // Calls COleDispatchDriver default constructor - Range(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} - Range(const Range& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} - -// Attributes -public: - -// Operations -public: - LPDISPATCH GetApplication(); - long GetCreator(); - LPDISPATCH GetParent(); - void Activate(); - VARIANT GetAddIndent(); - void SetAddIndent(const VARIANT& newValue); - CString GetAddress(const VARIANT& RowAbsolute, const VARIANT& ColumnAbsolute, long ReferenceStyle, const VARIANT& External, const VARIANT& RelativeTo); - CString GetAddressLocal(const VARIANT& RowAbsolute, const VARIANT& ColumnAbsolute, long ReferenceStyle, const VARIANT& External, const VARIANT& RelativeTo); - void AdvancedFilter(long Action, const VARIANT& CriteriaRange, const VARIANT& CopyToRange, const VARIANT& Unique); - void ApplyNames(const VARIANT& Names, const VARIANT& IgnoreRelativeAbsolute, const VARIANT& UseRowColumnNames, const VARIANT& OmitColumn, const VARIANT& OmitRow, long Order, const VARIANT& AppendLast); - void ApplyOutlineStyles(); - LPDISPATCH GetAreas(); - CString AutoComplete(LPCTSTR String); - void AutoFill(LPDISPATCH Destination, long Type); - void AutoFilter(const VARIANT& Field, const VARIANT& Criteria1, long Operator, const VARIANT& Criteria2, const VARIANT& VisibleDropDown); - void AutoFit(); - void AutoFormat(long Format, const VARIANT& Number, const VARIANT& Font, const VARIANT& Alignment, const VARIANT& Border, const VARIANT& Pattern, const VARIANT& Width); - void AutoOutline(); - void BorderAround(const VARIANT& LineStyle, long Weight, long ColorIndex, const VARIANT& Color); - LPDISPATCH GetBorders(); - void Calculate(); - LPDISPATCH GetCells(); - LPDISPATCH GetCharacters(const VARIANT& Start, const VARIANT& Length); - void CheckSpelling(const VARIANT& CustomDictionary, const VARIANT& IgnoreUppercase, const VARIANT& AlwaysSuggest, const VARIANT& IgnoreInitialAlefHamza, const VARIANT& IgnoreFinalYaa, const VARIANT& SpellScript); - void Clear(); - void ClearContents(); - void ClearFormats(); - void ClearNotes(); - void ClearOutline(); - long GetColumn(); - LPDISPATCH ColumnDifferences(const VARIANT& Comparison); - LPDISPATCH GetColumns(); - VARIANT GetColumnWidth(); - void SetColumnWidth(const VARIANT& newValue); - void Consolidate(const VARIANT& Sources, const VARIANT& Function, const VARIANT& TopRow, const VARIANT& LeftColumn, const VARIANT& CreateLinks); - void Copy(const VARIANT& Destination); - long CopyFromRecordset(LPUNKNOWN Data, const VARIANT& MaxRows, const VARIANT& MaxColumns); - void CopyPicture(long Appearance, long Format); - long GetCount(); - void CreateNames(const VARIANT& Top, const VARIANT& Left, const VARIANT& Bottom, const VARIANT& Right); - void CreatePublisher(const VARIANT& Edition, long Appearance, const VARIANT& ContainsPICT, const VARIANT& ContainsBIFF, const VARIANT& ContainsRTF, const VARIANT& ContainsVALU); - LPDISPATCH GetCurrentArray(); - LPDISPATCH GetCurrentRegion(); - void Cut(const VARIANT& Destination); - void DataSeries(const VARIANT& Rowcol, long Type, long Date, const VARIANT& Step, const VARIANT& Stop, const VARIANT& Trend); - VARIANT Get_Default(const VARIANT& RowIndex, const VARIANT& ColumnIndex); - void Set_Default(const VARIANT& RowIndex, const VARIANT& ColumnIndex, const VARIANT& newValue); - void Delete(const VARIANT& Shift); - LPDISPATCH GetDependents(); - VARIANT DialogBox_(); - LPDISPATCH GetDirectDependents(); - LPDISPATCH GetDirectPrecedents(); - VARIANT EditionOptions(long Type, long Option, const VARIANT& Name, const VARIANT& Reference, long Appearance, long ChartSize, const VARIANT& Format); - LPDISPATCH GetEnd(long Direction); - LPDISPATCH GetEntireColumn(); - LPDISPATCH GetEntireRow(); - void FillDown(); - void FillLeft(); - void FillRight(); - void FillUp(); - LPDISPATCH Find(const VARIANT& What, const VARIANT& After, const VARIANT& LookIn, const VARIANT& LookAt, const VARIANT& SearchOrder, long SearchDirection, const VARIANT& MatchCase, const VARIANT& MatchByte, - const VARIANT& MatchControlCharacters, const VARIANT& MatchDiacritics, const VARIANT& MatchKashida, const VARIANT& MatchAlefHamza); - LPDISPATCH FindNext(const VARIANT& After); - LPDISPATCH FindPrevious(const VARIANT& After); - LPDISPATCH GetFont(); - VARIANT GetFormula(); - void SetFormula(const VARIANT& newValue); - VARIANT GetFormulaArray(); - void SetFormulaArray(const VARIANT& newValue); - long GetFormulaLabel(); - void SetFormulaLabel(long nNewValue); - VARIANT GetFormulaHidden(); - void SetFormulaHidden(const VARIANT& newValue); - VARIANT GetFormulaLocal(); - void SetFormulaLocal(const VARIANT& newValue); - VARIANT GetFormulaR1C1(); - void SetFormulaR1C1(const VARIANT& newValue); - VARIANT GetFormulaR1C1Local(); - void SetFormulaR1C1Local(const VARIANT& newValue); - void FunctionWizard(); - BOOL GoalSeek(const VARIANT& Goal, LPDISPATCH ChangingCell); - VARIANT Group(const VARIANT& Start, const VARIANT& End, const VARIANT& By, const VARIANT& Periods); - VARIANT GetHasArray(); - VARIANT GetHasFormula(); - VARIANT GetHeight(); - VARIANT GetHidden(); - void SetHidden(const VARIANT& newValue); - VARIANT GetHorizontalAlignment(); - void SetHorizontalAlignment(const VARIANT& newValue); - VARIANT GetIndentLevel(); - void SetIndentLevel(const VARIANT& newValue); - void InsertIndent(long InsertAmount); - void Insert(const VARIANT& Shift); - LPDISPATCH GetInterior(); - VARIANT GetItem(const VARIANT& RowIndex, const VARIANT& ColumnIndex); - void SetItem(const VARIANT& RowIndex, const VARIANT& ColumnIndex, const VARIANT& newValue); - void Justify(); - VARIANT GetLeft(); - long GetListHeaderRows(); - void ListNames(); - long GetLocationInTable(); - VARIANT GetLocked(); - void SetLocked(const VARIANT& newValue); - void Merge(const VARIANT& Across); - void UnMerge(); - LPDISPATCH GetMergeArea(); - VARIANT GetMergeCells(); - void SetMergeCells(const VARIANT& newValue); - VARIANT GetName(); - void SetName(const VARIANT& newValue); - void NavigateArrow(const VARIANT& TowardPrecedent, const VARIANT& ArrowNumber, const VARIANT& LinkNumber); - LPUNKNOWN Get_NewEnum(); - LPDISPATCH GetNext(); - CString NoteText(const VARIANT& Text, const VARIANT& Start, const VARIANT& Length); - VARIANT GetNumberFormat(); - void SetNumberFormat(const VARIANT& newValue); - VARIANT GetNumberFormatLocal(); - void SetNumberFormatLocal(const VARIANT& newValue); - LPDISPATCH GetOffset(const VARIANT& RowOffset, const VARIANT& ColumnOffset); - VARIANT GetOrientation(); - void SetOrientation(const VARIANT& newValue); - VARIANT GetOutlineLevel(); - void SetOutlineLevel(const VARIANT& newValue); - long GetPageBreak(); - void SetPageBreak(long nNewValue); - void Parse(const VARIANT& ParseLine, const VARIANT& Destination); - void PasteSpecial(long Paste, long Operation, const VARIANT& SkipBlanks, const VARIANT& Transpose); - LPDISPATCH GetPivotField(); - LPDISPATCH GetPivotItem(); - LPDISPATCH GetPivotTable(); - LPDISPATCH GetPrecedents(); - VARIANT GetPrefixCharacter(); - LPDISPATCH GetPrevious(); - void PrintOut(const VARIANT& From, const VARIANT& To, const VARIANT& Copies, const VARIANT& Preview, const VARIANT& ActivePrinter, const VARIANT& PrintToFile, const VARIANT& Collate); - void PrintPreview(const VARIANT& EnableChanges); - LPDISPATCH GetQueryTable(); - LPDISPATCH GetRange(const VARIANT& Cell1, const VARIANT& Cell2); - void RemoveSubtotal(); - BOOL Replace(const VARIANT& What, const VARIANT& Replacement, const VARIANT& LookAt, const VARIANT& SearchOrder, const VARIANT& MatchCase, const VARIANT& MatchByte, const VARIANT& MatchControlCharacters, const VARIANT& MatchDiacritics, - const VARIANT& MatchKashida, const VARIANT& MatchAlefHamza); - LPDISPATCH GetResize(const VARIANT& RowSize, const VARIANT& ColumnSize); - long GetRow(); - LPDISPATCH RowDifferences(const VARIANT& Comparison); - VARIANT GetRowHeight(); - void SetRowHeight(const VARIANT& newValue); - LPDISPATCH GetRows(); - VARIANT Run(const VARIANT& Arg1, const VARIANT& Arg2, const VARIANT& Arg3, const VARIANT& Arg4, const VARIANT& Arg5, const VARIANT& Arg6, const VARIANT& Arg7, const VARIANT& Arg8, const VARIANT& Arg9, const VARIANT& Arg10, - const VARIANT& Arg11, const VARIANT& Arg12, const VARIANT& Arg13, const VARIANT& Arg14, const VARIANT& Arg15, const VARIANT& Arg16, const VARIANT& Arg17, const VARIANT& Arg18, const VARIANT& Arg19, const VARIANT& Arg20, - const VARIANT& Arg21, const VARIANT& Arg22, const VARIANT& Arg23, const VARIANT& Arg24, const VARIANT& Arg25, const VARIANT& Arg26, const VARIANT& Arg27, const VARIANT& Arg28, const VARIANT& Arg29, const VARIANT& Arg30); - void Select(); - void Show(); - void ShowDependents(const VARIANT& Remove); - VARIANT GetShowDetail(); - void SetShowDetail(const VARIANT& newValue); - void ShowErrors(); - void ShowPrecedents(const VARIANT& Remove); - VARIANT GetShrinkToFit(); - void SetShrinkToFit(const VARIANT& newValue); - void Sort(const VARIANT& Key1, long Order1, const VARIANT& Key2, const VARIANT& Type, long Order2, const VARIANT& Key3, long Order3, long Header, const VARIANT& OrderCustom, const VARIANT& MatchCase, long Orientation, long SortMethod, - const VARIANT& IgnoreControlCharacters, const VARIANT& IgnoreDiacritics, const VARIANT& IgnoreKashida); - void SortSpecial(long SortMethod, const VARIANT& Key1, long Order1, const VARIANT& Type, const VARIANT& Key2, long Order2, const VARIANT& Key3, long Order3, long Header, const VARIANT& OrderCustom, const VARIANT& MatchCase, long Orientation); - LPDISPATCH GetSoundNote(); - LPDISPATCH SpecialCells(long Type, const VARIANT& Value); - VARIANT GetStyle(); - void SetStyle(const VARIANT& newValue); - void SubscribeTo(LPCTSTR Edition, long Format); - void Subtotal(long GroupBy, long Function, const VARIANT& TotalList, const VARIANT& Replace, const VARIANT& PageBreaks, long SummaryBelowData); - VARIANT GetSummary(); - void Table(const VARIANT& RowInput, const VARIANT& ColumnInput); - VARIANT GetText(); - void TextToColumns(const VARIANT& Destination, long DataType, long TextQualifier, const VARIANT& ConsecutiveDelimiter, const VARIANT& Tab, const VARIANT& Semicolon, const VARIANT& Comma, const VARIANT& Space, const VARIANT& Other, - const VARIANT& OtherChar, const VARIANT& FieldInfo); - VARIANT GetTop(); - void Ungroup(); - VARIANT GetUseStandardHeight(); - void SetUseStandardHeight(const VARIANT& newValue); - VARIANT GetUseStandardWidth(); - void SetUseStandardWidth(const VARIANT& newValue); - LPDISPATCH GetValidation(); - VARIANT GetValue(); - void SetValue(const VARIANT& newValue); - VARIANT GetValue2(); - void SetValue2(const VARIANT& newValue); - VARIANT GetVerticalAlignment(); - void SetVerticalAlignment(const VARIANT& newValue); - VARIANT GetWidth(); - LPDISPATCH GetWorksheet(); - VARIANT GetWrapText(); - void SetWrapText(const VARIANT& newValue); - LPDISPATCH AddComment(const VARIANT& Text); - LPDISPATCH GetComment(); - void ClearComments(); - LPDISPATCH GetPhonetic(); - LPDISPATCH GetFormatConditions(); - long GetReadingOrder(); - void SetReadingOrder(long nNewValue); - LPDISPATCH GetHyperlinks(); -}; -///////////////////////////////////////////////////////////////////////////// -// Border wrapper class - -class Border : public COleDispatchDriver -{ -public: - Border() {} // Calls COleDispatchDriver default constructor - Border(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} - Border(const Border& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} - -// Attributes -public: - -// Operations -public: - LPDISPATCH GetApplication(); - long GetCreator(); - LPDISPATCH GetParent(); - VARIANT GetColor(); - void SetColor(const VARIANT& newValue); - VARIANT GetColorIndex(); - void SetColorIndex(const VARIANT& newValue); - VARIANT GetLineStyle(); - void SetLineStyle(const VARIANT& newValue); - VARIANT GetWeight(); - void SetWeight(const VARIANT& newValue); -}; -///////////////////////////////////////////////////////////////////////////// -// Borders wrapper class - -class Borders : public COleDispatchDriver -{ -public: - Borders() {} // Calls COleDispatchDriver default constructor - Borders(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} - Borders(const Borders& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} - -// Attributes -public: - -// Operations -public: - LPDISPATCH GetApplication(); - long GetCreator(); - LPDISPATCH GetParent(); - VARIANT GetColor(); - void SetColor(const VARIANT& newValue); - VARIANT GetColorIndex(); - void SetColorIndex(const VARIANT& newValue); - long GetCount(); - LPDISPATCH GetItem(long Index); - VARIANT GetLineStyle(); - void SetLineStyle(const VARIANT& newValue); - LPUNKNOWN Get_NewEnum(); - VARIANT GetValue(); - void SetValue(const VARIANT& newValue); - VARIANT GetWeight(); - void SetWeight(const VARIANT& newValue); - LPDISPATCH Get_Default(long Index); -}; -///////////////////////////////////////////////////////////////////////////// -// Interior wrapper class - -class Interior : public COleDispatchDriver -{ -public: - Interior() {} // Calls COleDispatchDriver default constructor - Interior(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} - Interior(const Interior& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} - -// Attributes -public: - -// Operations -public: - LPDISPATCH GetApplication(); - long GetCreator(); - LPDISPATCH GetParent(); - VARIANT GetColor(); - void SetColor(const VARIANT& newValue); - VARIANT GetColorIndex(); - void SetColorIndex(const VARIANT& newValue); - VARIANT GetInvertIfNegative(); - void SetInvertIfNegative(const VARIANT& newValue); - VARIANT GetPattern(); - void SetPattern(const VARIANT& newValue); - VARIANT GetPatternColor(); - void SetPatternColor(const VARIANT& newValue); - VARIANT GetPatternColorIndex(); - void SetPatternColorIndex(const VARIANT& newValue); -}; diff --git a/Generals/Code/Tools/Babylon/expimp.cpp b/Generals/Code/Tools/Babylon/expimp.cpp deleted file mode 100644 index 83f3b6e1284..00000000000 --- a/Generals/Code/Tools/Babylon/expimp.cpp +++ /dev/null @@ -1,1673 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// expimp.cpp -// - -#include "StdAfx.h" -#include "TransDB.h" -#include "XLStuff.h" -#include "noxstringDlg.h" -#include "VerifyTextDlg.h" -#include "noxstring.h" -#include "expimp.h" -#include "direct.h" -#include "fileops.h" -#include "olestring.h" - -static char buffer[100*1024]; -static char buffer2[100*1024]; -static OLECHAR olebuf[100*1024]; -static OLECHAR olebuf2[100*1024]; -static OLECHAR oletrans[100*1024]; - -static CNoxstringDlg *progress_dlg; -static int progress_count; - -static void progress_cb ( void ) -{ - progress_count ++; - - if ( progress_dlg ) - { - progress_dlg->SetProgress ( progress_count ); - } -} - -static FILE *cb_file; - -static void print_to_file ( const char *text ) -{ - - fprintf ( cb_file, "\t\t\tString %s\n", text ); - -} - -static void reverseWord ( OLECHAR *fp, OLECHAR *lp ) -{ - int first = TRUE; - OLECHAR f, l; - - while ( TRUE ) - { - if ( fp >= lp ) - { - return; - } - - f = *fp; - l = *lp; - - if ( first ) - { - if ( f >= 'A' && f <= 'Z' ) - { - if ( l >= 'a' && l <= 'z' ) - { - f = (f - 'A') + 'a'; - l = (l - 'a') + 'A'; - } - } - - first = FALSE; - } - - *lp-- = f; - *fp++ = l; - - } - -} - - -static void translateCopy( OLECHAR *outbuf, OLECHAR *inbuf ) -{ - int slash = FALSE; - - { - static OLECHAR buffer[100*1024]; - OLECHAR *firstLetter = NULL, *lastLetter; - OLECHAR *b = buffer; - int formatWord = FALSE; - OLECHAR ch; - - while ( (ch = *inbuf++)) - { - if ( ! (( ch >= 'a' && ch <= 'z') || ( ch >= 'A' && ch <= 'Z' ))) - { - if ( firstLetter ) - { - if ( !formatWord ) - { - lastLetter = b-1; - reverseWord ( firstLetter, lastLetter ); - } - firstLetter = NULL; - formatWord = FALSE; - } - *b++ = ch; - if ( ch == '\\' ) - { - *b++ = *inbuf++; - } - if ( ch == '%' ) - { - while ( (ch = *inbuf++) && !IsFormatTypeChar ( ch ) && ch != '%') - { - *b++ = ch; - } - *b++ = ch; - } - } - else - { - if ( !firstLetter ) - { - firstLetter = b; - } - - *b++ = ch; - - } - } - - if ( firstLetter ) - { - lastLetter = b-1; - reverseWord ( firstLetter, lastLetter ); - } - - *b++ = 0; - inbuf = buffer; - - } - - - - while( *inbuf != '\0' ) - { - - *outbuf++ = *inbuf++; - } - *outbuf= 0; -} - - -static void writeLabel ( NoxLabel *label, int row ) -{ - PutCell ( row, CELL_LABEL, label->Name (), 0); - wcscpy ( olebuf, label->Comment()); - EncodeFormat ( olebuf ); - PutCell ( row, CELL_COMMENT, olebuf, 0); - wcscpy ( olebuf, label->Context()); - EncodeFormat ( olebuf ); - PutCell ( row, CELL_CONTEXT, olebuf, 0); - wcscpy ( olebuf, label->Speaker()); - EncodeFormat ( olebuf ); - PutCell ( row, CELL_SPEAKER, olebuf, 0); - wcscpy ( olebuf, label->Listener()); - EncodeFormat ( olebuf ); - PutCell ( row, CELL_LISTENER, olebuf , 0); -} - -static void writeText ( NoxText *text, int row ) -{ - NoxLabel *label = text->Label (); - int maxlen = label->MaxLen (); - OLECHAR buffer[100]; - - if ( !maxlen ) - { - maxlen = 10000; - } - - wcscpy ( olebuf, text->Get()); - EncodeFormat ( olebuf ); - PutCell ( row, CELL_ENGLISH, olebuf , 0); - PutCell ( row, CELL_MAXLEN, NULL , maxlen ); - - swprintf ( buffer, L"=LEN(%c%d)",'A' + CELL_LOCALIZED -1, row ); - PutCell ( row, CELL_STRLEN, buffer , 0); - swprintf ( buffer, L"=IF(%c%d>%c%d,\"Too long!\",\" \")", 'A' + CELL_STRLEN -1, row, 'A' + CELL_MAXLEN -1, row ); - PutCell ( row, CELL_LENCHECK ,buffer , 0); - PutCell ( row, CELL_REVISION , 0, text->Revision ()); - PutCell ( row, CELL_STRINGID , 0, text->ID ()); - - writeLabel ( label, row ); -} - -static int export_trans ( TransDB *db, LangID langid, TROPTIONS *options, void (*cb) (void ), int write ) -{ - NoxLabel *label; - NoxText *text; - Translation *trans; - ListSearch sh_label, sh_text; - int count = 0; - int limit = FALSE; - int all = TRUE; - int row; - LANGINFO *linfo; - - linfo = GetLangInfo ( langid ); - - if ( options->filter == TR_SAMPLE ) - { - limit = TRUE; - } - else if ( options->filter == TR_CHANGES ) - { - all = FALSE; - } - - if ( write ) - { - OLECHAR buffer[100]; - - swprintf ( buffer, L"%S", GetLangName ( langid )); - PutCell ( ROW_LANGUAGE, COLUMN_LANGUAGE,buffer,0); - - swprintf ( buffer, L"%S Translation", GetLangName ( langid )); - PutCell ( 2, CELL_LOCALIZED,buffer,0); - } - - row = 3; - label = db->FirstLabel ( sh_label ); - - while ( label ) - { - int label_written = FALSE; - text = label->FirstText ( sh_text ); - - while ( text ) - { - int do_export; - int bad_format = FALSE; - int too_long = FALSE; - - trans = text->GetTranslation ( langid ); - - if ( options->filter == TR_UNSENT ) - { - do_export = !text->IsSent (); - } - else if ( options->filter == TR_NONDIALOG ) - { - do_export = !text->IsDialog (); - } - else if ( options->filter == TR_UNVERIFIED ) - { - do_export = text->IsDialog() && text->DialogIsPresent( DialogPath, langid) && !text->DialogIsValid( DialogPath, langid); - } - else if ( options->filter == TR_MISSING_DIALOG ) - { - do_export = text->IsDialog() && !text->DialogIsPresent( DialogPath, langid); - } - else if ( options->filter == TR_DIALOG ) - { - do_export = text->IsDialog (); - } - else - { - if ( ! (do_export = all) ) - { - if ( !trans ) - { - do_export = TRUE; - } - else - { - if ( text->Revision () > trans->Revision ()) - { - do_export = TRUE; - } - else if ( trans->TooLong ( label->MaxLen ()) ) - { - do_export = TRUE; - too_long = TRUE; - } - else if ( !trans->ValidateFormat ( text ) ) - { - do_export = TRUE; - bad_format = TRUE; - } - } - } - } - - if ( do_export && text->Len () ) - { - count++; - if ( cb ) - { - cb (); - } - - if ( write ) - { - static OLECHAR buffer[100*1024]; - - if ( !label_written ) - { - // write out the lable - //PutSeparator ( row++ ); - //writeLabel ( label, row ); - label_written = TRUE; - } - - // write out text - writeText ( text, row ); - if ( text->IsDialog ()) - { - swprintf ( buffer, L"%s%S.wav", text->Wave (), linfo->character ); - wcsupr ( buffer ); - PutCell ( row, CELL_WAVEFILE , buffer, 0); - } - - { - Translation *trans = text->GetTranslation ( langid ); - - if ( langid == LANGID_JABBER || (trans && ( options->include_translations || too_long || bad_format ))) - { - - if ( langid == LANGID_JABBER ) - { - translateCopy ( olebuf, text->Get() ); - } - else - { - wcscpy ( olebuf, trans->Get()); - } - - EncodeFormat ( olebuf ); - PutCell ( row, CELL_LOCALIZED, olebuf, 0); - if ( bad_format || too_long) - { - wcscpy ( olebuf, L"ERROR: " ); - if ( too_long ) - { - wcscat ( olebuf, L"too long" ); - if ( bad_format ) - { - wcscat ( olebuf, L"and " ); - } - } - - if ( bad_format ) - { - wcscat ( olebuf, L"bad format" ); - } - - PutCell ( row, CELL_COMMENT, olebuf , 0); - } - } - } - row++; - } - } - - text = label->NextText ( sh_text ); - } - - if ( limit && count > 50 ) - { - break; - } - - label = db->NextLabel ( sh_label ); - } - - if ( write ) - { - PutCell ( row, CELL_STRINGID, NULL, -1 ); - PutCell ( ROW_COUNT, COLUMN_COUNT, NULL, count ); - } - - return count; -} - - -int ExportTranslations ( TransDB *db, const char *filename, LangID langid, TROPTIONS *options, CNoxstringDlg *dlg ) -{ - int exports ; - exports = export_trans ( db, langid, options, NULL, FALSE ); - - if ( !exports ) - { - if ( dlg ) - { - AfxMessageBox ( "Nothing to export." ); - dlg->Ready (); - } - - return 0; - } - - if ( (progress_dlg = dlg) ) - { - const char *format; - dlg->InitProgress ( exports ); - - dlg->Log (""); - - switch (options->filter ) - { - case TR_ALL: - format = "Exporting all strings"; - break; - case TR_CHANGES: - format = "Exporting all strings that require %s translation"; - break; - case TR_SAMPLE: - format = "Exporting a sample %s translation file"; - break; - case TR_DIALOG: - format = "Exporting dialog only %s translation file"; - break; - case TR_NONDIALOG: - format = "Exporting non-dialog %s translation file"; - break; - case TR_UNVERIFIED: - format = "Exporting all unverified %s dialog"; - break; - case TR_MISSING_DIALOG: - format = "Exporting all missing %s dialog"; - break; - - - default: - format = "Undefined switch"; - break; - - - } - strcpy ( buffer2, format ); - if ( options->include_comments && options->include_translations ) - { - strcat ( buffer2, " with current %s translations and translator comments" ); - } - else if ( options->include_comments ) - { - strcat ( buffer2, " with %s translator comments" ); - } - else if ( options->include_translations ) - { - strcat ( buffer2, " with current %s translations" ); - } - strcat ( buffer2, "..." ); - sprintf ( buffer, buffer2, GetLangName ( langid ), GetLangName ( langid ) ); - dlg->Status ( buffer ); - } - - _getcwd ( buffer, sizeof ( buffer ) -1 ); - - strcat ( buffer, "\\babylon.xlt" ); - - if ( !FileExists ( buffer ) ) - { - if ( dlg ) - { - dlg->Log ("FAILED", SAME_LINE ); - sprintf ( buffer2, "Template file \"%s\" is missing. Cannot export.", buffer ); - AfxMessageBox ( buffer2 ); - dlg->Log ( buffer2 ); - dlg->Ready(); - } - return -1; - } - - progress_count = 0; - exports = -1; - - if ( NewWorkBook ( buffer ) ) - { - if ( (exports = export_trans ( db, langid, options, progress_cb, TRUE )) != -1 ) - { - if ( SaveWorkBook ( filename, TRUE ) ) - { - if ( dlg ) - { - dlg->Log ("DONE", SAME_LINE ); - } - } - else - { - if ( dlg ) - { - dlg->Log ("FAILED", SAME_LINE ); - sprintf ( buffer2, "Failed to save export!"); - AfxMessageBox ( buffer2 ); - dlg->Log ( buffer2 ); - } - exports = -1; - } - } - CloseWorkBook ( ); - } - else - { - if ( dlg ) - { - dlg->Log ("FAILED", SAME_LINE ); - sprintf ( buffer2, "Failed to create new work book. File \"%s\" may be corrupt", buffer ); - AfxMessageBox ( buffer2 ); - dlg->Log ( buffer2 ); - } - } - - if ( dlg ) - { - dlg->Ready(); - } - - return exports; -} - - -static int import_trans ( TransDB *db, LangID langid, void (*cb) ( void ), CNoxstringDlg *dlg ) -{ - int row = 3; - int id; - int count = 0; - int new_count = 0; - int changes_count = 0; - int missing_count = 0; - int mismatch_count = 0; - int stale_count = 0; - int first_mismatch = TRUE; - int bad_id = FALSE; - int error_count = 0; - int revision; - - while ( (id = GetInt ( row, CELL_STRINGID )) != -1) - { - if ( id == 0 ) - { - goto skip; - } - - NoxText *text; - - if ( (text = db->FindText ( id )) == NULL ) - { - // string is no longer in database - stale_count++; - goto next; - } - - revision = GetInt ( row, CELL_REVISION ); - - if ( text->Revision() > revision ) - { - // old translation - stale_count++; - goto next; - } - - if ( text->Revision() < revision ) - { - if ( dlg ) - { - sprintf ( buffer, "ERROR: expecting revision %d for string ID %d but found revision %d. Possible bad ID!", text->Revision (), id, revision ); - dlg->Log ( buffer ); - } - error_count++; - goto next; - } - - // first see if there is any translation there - GetString ( row, CELL_LOCALIZED, oletrans ); - DecodeFormat ( oletrans ); - - if ( !oletrans[0] ) - { - missing_count++; - goto next; - } - - // verify that the translated engish is the same as the current english - GetString ( row, CELL_ENGLISH, olebuf ); - DecodeFormat ( olebuf ); - - if ( wcscmp ( text->Get(), olebuf ) ) - { - // they are two possible reasons for the text to mismatch - // 1. text was modified but not re-translated - // 2. the IDs are wrong - // - // to check for the first case we search for the label in the xl file - // and make sure it is the same. If not then we have problems - - int nrow = row; - - olebuf2[0] = 0; - while ( nrow > 0 ) - { - GetString ( nrow, CELL_LABEL, olebuf2 ); - if ( olebuf2[0] ) - { - break; - } - nrow--; - } - - - if ( !olebuf2[0] || wcscmp ( text->Label ()->Name(), olebuf2)) - { - sprintf ( buffer, "%S", olebuf ); - CVerifyTextDlg dlg(buffer, text->GetSB()); - - // didnt find label or label doesn't match - // It is possible that the xl was resorted so ask user to do a visual confirmation - - bad_id = dlg.DoModal ()==IDNO; - } - else if ( text->Label()->FindText( olebuf )) - { - // we did find the label but text other than the current ID sourced text matches with the import text - // this means the ID is definitely wrong - bad_id = TRUE; - } - else - { - bad_id = FALSE; - } - - if ( bad_id ) - { - goto done; - } - - } - - // ok import the translation - - Translation *trans; - - if ( ! (trans = text->GetTranslation ( langid ))) - { - new_count++; - - trans = new Translation (); - trans->SetLangID ( langid ); - text->AddTranslation ( trans ); - } - - - if ( trans->Revision () == revision && !wcscmp ( trans->Get (), oletrans )) - { - // already up to date - goto next; - } - - trans->Set ( oletrans ); - trans->WaveInfo.SetValid ( FALSE ); - trans->SetRevision ( revision ); - changes_count++; - - - next: - count++; - - if ( cb ) - { - cb (); - } - - skip: - row++; - } - -done: - - if ( dlg ) - { - sprintf ( buffer, "Total found : %d", count ); - dlg->Log ( buffer ); - - { - sprintf ( buffer, "New : %d", new_count); - dlg->Log ( buffer ); - } - { - sprintf ( buffer, "Updates : %d", (changes_count - new_count)); - dlg->Log ( buffer ); - } - if ( missing_count ) - { - sprintf ( buffer, "Missing : %d", missing_count ); - dlg->Log ( buffer ); - } - if ( stale_count ) - { - sprintf ( buffer, "Unmatched : %d", stale_count); - dlg->Log ( buffer ); - } - - } - - if ( bad_id ) - { - if ( dlg ) - { - sprintf ( buffer, "Aborting import: BAD IDs"); - dlg->Log ( buffer ); - } - - AfxMessageBox ("The imported translation file has bad string IDs! Fix the string IDs and re-import" ); - } - return count; -} - -static int update_sent_trans ( TransDB *db, LangID langid, void (*cb) ( void ), CNoxstringDlg *dlg ) -{ - int row = 3; - int id; - int count = 0; - int new_count = 0; - int matched = 0; - int unmatched = 0; - int changed = 0; - int first_mismatch = TRUE; - int bad_id = FALSE; - int error_count = 0; - int revision; - - while ( (id = GetInt ( row, CELL_STRINGID )) != -1) - { - if ( id == 0 ) - { - goto skip; - } - - NoxText *text; - - if ( (text = db->FindText ( id )) == NULL ) - { - // string is no longer in database - unmatched++; - goto next; - } - - revision = GetInt ( row, CELL_REVISION ); - - if ( text->Revision() > revision ) - { - // old translation - changed++; - goto next; - } - - if ( text->Revision() < revision ) - { - if ( dlg ) - { - sprintf ( buffer, "ERROR: expecting revision %d for string ID %d but found revision %d. Possible bad ID!", text->Revision (), id, revision ); - dlg->Log ( buffer ); - } - error_count++; - goto next; - } - - - // verify that the translated engish is the same as the current english - GetString ( row, CELL_ENGLISH, olebuf ); - DecodeFormat ( olebuf ); - - if ( wcscmp ( text->Get(), olebuf ) ) - { - // they are two possible reasons for the text to mismatch - // 1. text was modified but not re-translated - // 2. the IDs are wrong - // - // to check for the first case we search for the label in the xl file - // and make sure it is the same. If not then we have problems - - int nrow = row; - - olebuf2[0] = 0; - while ( nrow > 0 ) - { - GetString ( nrow, CELL_LABEL, olebuf2 ); - if ( olebuf2[0] ) - { - break; - } - nrow--; - } - - - if ( !olebuf2[0] || wcscmp ( text->Label ()->Name(), olebuf2)) - { - sprintf ( buffer, "%S", olebuf ); - CVerifyTextDlg dlg(buffer, text->GetSB()); - - // didnt find label or label doesn't match - // It is possible that the xl was resorted so ask user to do a visual confirmation - - bad_id = dlg.DoModal ()==IDNO; - } - else if ( text->Label()->FindText( olebuf )) - { - // we did find the label but text other than the current ID sourced text matches with the import text - // this means the ID is definitely wrong - bad_id = TRUE; - } - else - { - bad_id = FALSE; - } - - if ( bad_id ) - { - goto done; - } - - } - else - { - // text is still the same - text->Sent ( TRUE ); - matched++; - - } - - next: - count++; - - if ( cb ) - { - cb (); - } - - skip: - row++; - } - -done: - - if ( dlg ) - { - sprintf ( buffer, "Total found : %d", count ); - dlg->Log ( buffer ); - - { - sprintf ( buffer, "Matched : %d", matched); - dlg->Log ( buffer ); - } - { - sprintf ( buffer, "Unmatched : %d", unmatched); - dlg->Log ( buffer ); - } - - if ( changed ) - { - sprintf ( buffer, "changed : %d", changed); - dlg->Log ( buffer ); - } - - } - - if ( bad_id ) - { - if ( dlg ) - { - sprintf ( buffer, "Aborting import: BAD IDs"); - dlg->Log ( buffer ); - } - - AfxMessageBox ("The imported translation file has bad string IDs! Fix the string IDs and re-import" ); - } - return count; -} - -int ImportTranslations ( TransDB *db, const char *filename, CNoxstringDlg *dlg ) -{ - int imports = -1; - - progress_dlg = dlg; - if ( dlg ) - { - dlg->Log (""); - sprintf ( buffer, "Importing \"%s\"...", filename ); - dlg->Status ( buffer ); - } - - if ( OpenWorkBook ( filename ) ) - { - int num_strings; - LANGINFO *info; - - num_strings = GetInt ( ROW_COUNT, COLUMN_COUNT ); - GetString ( ROW_LANGUAGE, COLUMN_LANGUAGE, olebuf ); - sprintf ( buffer, "%S", olebuf ); - info = GetLangInfo ( buffer ); - - if ( !info ) - { - if ( dlg ) - { - AfxMessageBox ( "Import file is of an unknown language or is not a translation file" ); - dlg->Log ( "FAILED", SAME_LINE ); - dlg->Ready(); - } - CloseWorkBook (); - return -1; - } - - - if ( dlg ) - { - dlg->InitProgress ( num_strings ); - progress_count = 0; - sprintf ( buffer, "...%s", info->name ); - dlg->Log ( buffer, SAME_LINE ); - } - - imports = import_trans ( db, info->langid, progress_cb, dlg ); - - CloseWorkBook ( ); - } - else - { - if ( dlg ) - { - dlg->Log ("FAILED", SAME_LINE ); - sprintf ( buffer2, "Failed to open \"%s\"", buffer ); - AfxMessageBox ( buffer2 ); - dlg->Log ( buffer2 ); - } - } - - if ( dlg ) - { - dlg->Ready(); - } - - return imports; -} - -static int generate_noxstr ( TransDB *db, const char *filename, LangID langid, GNOPTIONS *options ) -{ - int ok = FALSE; - FILE *file; - - if ( ! ( file = fopen ( filename, "wt" ) )) - { - goto error; - } - - fprintf ( file, "// Generated by %s\n", AppTitle ); - fprintf ( file, "// Generated on %s %s\n\n\n", __DATE__, __TIME__ ); - - { - NoxLabel *label; - NoxText *text; - Translation *trans; - ListSearch sh_label, sh_text; - - label = db->FirstLabel ( sh_label ); - - while ( label ) - { - text = label->FirstText ( sh_text ); - - fprintf ( file, "\n\n%s\n", label->NameSB ()); - - while ( text ) - { - const char *string; - - trans = text->GetTranslation ( langid ); - - if ( !trans ) - { - if ( langid == LANGID_US ) - { - string = text->GetSB (); - } - else - { - if ( text->Len ()) - { - if ( options->untranslated == GN_USEIDS ) - { - string = buffer2; - sprintf (buffer2, "%d", text->ID ()); - } - else - { - string = text->GetSB(); - } - } - else - { - string = ""; - } - } - } - else - { - string = trans->GetSB (); - } - - if ( text->Len() == 0 ) - { - string = ""; - } - - fprintf ( file, "\"%s\" %s\n", string, text->WaveSB() ); - text = label->NextText ( sh_text ); - } - - fprintf ( file, "END\n" ); - label = db->NextLabel ( sh_label ); - } - - ok = TRUE; - } -error: - - if ( file ) - { - fclose ( file ); - } - - return ok; -} - -static int writeCSFLabel ( FILE *file, NoxLabel *label ) -{ - int id = CSF_LABEL; - int len = strlen ( label->NameSB() ); - int strings = label->NumStrings (); - - if ( fwrite ( &id, sizeof ( int ), 1, file ) != 1 ) - { - return FALSE; - } - - if ( fwrite ( &strings, sizeof ( int ), 1, file ) != 1 ) - { - return FALSE; - } - - if ( fwrite ( &len, sizeof ( int ), 1, file ) != 1 ) - { - return FALSE; - } - - if ( !len ) - { - return FALSE; - } - - if ( fwrite ( label->NameSB(), len, 1, file ) != 1 ) - { - return FALSE; - } - - return TRUE; -} - -static int writeCSFString ( FILE *file, const OLECHAR *string, char *wave, LANGINFO *linfo ) -{ - int id = CSF_STRING; - int len ; - int wlen = strlen ( wave ); - - if ( wlen ) - { - id = CSF_STRINGWITHWAVE; - } - - wcscpy ( olebuf, string ); - StripSpaces ( olebuf ); - ConvertMetaChars ( olebuf ); - len = wcslen ( olebuf ); - - { - OLECHAR *ptr = olebuf; - - while ( *ptr) - { - *ptr = ~*ptr++; - } - - } - - if ( fwrite ( &id, sizeof ( int ), 1, file ) != 1 ) - { - return FALSE; - } - - if ( fwrite ( &len, sizeof ( int ), 1, file ) != 1 ) - { - return FALSE; - } - - if ( len ) - { - if ( fwrite ( olebuf, len*sizeof(OLECHAR), 1, file ) != 1 ) - { - return FALSE; - } - } - if ( wlen ) - { - wlen++; - if ( fwrite ( &wlen, sizeof ( int ), 1, file ) != 1 ) - { - return FALSE; - } - - if ( fwrite ( wave, wlen-1, 1, file ) != 1 ) - { - return FALSE; - } - if ( fwrite ( linfo->character, 1, 1, file ) != 1 ) - { - return FALSE; - } - } - return TRUE; -} - -static int generate_csf ( TransDB *db, const char *filename, LangID langid, GNOPTIONS *options ) -{ - CSF_HEADER header; - int header_size; - int ok = FALSE; - FILE *file; - LANGINFO *linfo = GetLangInfo ( langid); - - if ( ! ( file = fopen ( filename, "w+b" ) )) - { - goto error; - } - - header.id = CSF_ID; - header.version = CSF_VERSION; - header.skip = 0; - header.num_labels = 0; - header.num_strings = 0; - header.langid = langid; - header_size = sizeof ( header ); - - fseek ( file, header_size, SEEK_SET ); - - { - NoxLabel *label; - NoxText *text; - Translation *trans; - ListSearch sh_label, sh_text; - - label = db->FirstLabel ( sh_label ); - - while ( label ) - { - text = label->FirstText ( sh_text ); - - if ( !writeCSFLabel ( file, label ) ) - { - goto error; - } - header.num_labels++; - - while ( text ) - { - const OLECHAR *string; - - trans = text->GetTranslation ( langid ); - - if ( !trans ) - { - if ( langid == LANGID_US ) - { - string = text->Get (); - } - else - { - if ( text->Len ()) - { - if ( options->untranslated == GN_USEIDS ) - { - string = olebuf2; - swprintf (olebuf2, L"%d", text->ID ()); - } - else - { - string = text->Get(); - } - } - else - { - string = L""; - } - } - } - else - { - string = trans->Get (); - } - - if ( !writeCSFString ( file, string, text->WaveSB (), linfo ) ) - { - goto error; - } - header.num_strings ++; - - text = label->NextText ( sh_text ); - } - - label = db->NextLabel ( sh_label ); - } - - fseek ( file, 0, SEEK_SET ); - if ( fwrite ( &header, header_size, 1, file ) != 1 ) - { - goto error; - } - - fseek ( file, 0, SEEK_END ); - - ok = TRUE; - } - -error: - - if ( file ) - { - fclose ( file ); - } - - - return ok; -} - - -int GenerateGameFiles ( TransDB *db, const char *filepattern, GNOPTIONS *options, LangID *languages, CNoxstringDlg *dlg) -{ - static char filename[2*1024]; - LangID langid; - int count= 0 ; - int num; - - if ( dlg ) - { - LangID *temp = languages; - num = 0; - while ( *temp++ != LANGID_UNKNOWN ) - { - num++; - } - - dlg->Log ( "" ); - dlg->Status ( "Generating game files:" ); - dlg->InitProgress ( num ); - num = 0; - } - while ( (langid = *languages++) != LANGID_UNKNOWN ) - { - LANGINFO *info; - TRNREPORT trnreport; - DLGREPORT dlgreport; - int dlgwarning; - int trnwarning; - int done; - - info = GetLangInfo ( langid ); - - sprintf ( filename, "%s_%s.%s", filepattern, info->initials, options->format == GN_NOXSTR ? "str" : "csf" ); - strlwr ( filename ); - - if ( dlg ) - { - sprintf ( buffer, "Writing: %s - %s...", filename, GetLangName ( langid )); - dlg->Status ( buffer ); - dlgwarning = db->ReportDialog ( &dlgreport, langid ); - trnwarning = db->ReportTranslations ( &trnreport, langid ); - } - - - if ( options->format == GN_NOXSTR ) - { - done = generate_noxstr ( db, filename, langid, options ); - } - else - { - done = generate_csf ( db, filename, langid, options ); - } - - if ( done ) - { - count++; - if ( dlg ) - { - if ( trnwarning || dlgwarning ) - { - dlg->Log ( "WARNING", SAME_LINE ); - - if ( trnwarning ) - { - int missing; - - if ( (missing = trnreport.missing + trnreport.retranslate) ) - { - sprintf ( buffer, "%d translation%s missing", missing, missing > 1 ? "s are" : " is" ); - dlg->Log ( buffer ); - } - - if ( trnreport.too_big ) - { - sprintf ( buffer, "%d string%s too big", trnreport.too_big, trnreport.too_big > 1 ? "s are" : " is" ); - dlg->Log ( buffer ); - } - - if ( trnreport.bad_format ) - { - sprintf ( buffer, "%d translation%s bad format", trnreport.bad_format, trnreport.bad_format > 1 ? "s have a" : " has a" ); - dlg->Log ( buffer ); - } - } - - if ( dlgwarning ) - { - if ( dlgreport.missing ) - { - sprintf ( buffer, "%d dialog%s missing", dlgreport.missing, dlgreport.missing > 1 ? "s are" : " is" ); - dlg->Log ( buffer ); - } - - if ( dlgreport.unresolved ) - { - sprintf ( buffer, "%d dialog%s not verified", dlgreport.unresolved, dlgreport.unresolved> 1 ? "s are" : " is" ); - dlg->Log ( buffer ); - } - } - } - else - { - dlg->Log ( "OK", SAME_LINE ); - } - } - } - else - { - if ( dlg ) - { - dlg->Log ( "FAILED", SAME_LINE ); - } - } - - if ( dlg ) - { - dlg->SetProgress ( ++num ); - } - - } - - if ( dlg ) - { - dlg->Ready (); - } - return count; -} - -void ProcessWaves ( TransDB *db, const char *filename, CNoxstringDlg *dlg ) -{ - int imports = -1; - - progress_dlg = dlg; - - if ( dlg ) - { - dlg->Log (""); - sprintf ( buffer, "Processing wavefile \"%s\"...", filename ); - dlg->Status ( buffer ); - } - - if ( OpenWorkBook ( filename ) ) - { - int row = 1; - int last_row = 1; - int matches = 0; - int unmatched = 0; - FILE *file = NULL; - char *ptr; - - strcpy ( buffer, filename ); - - if ( (ptr = strchr ( buffer, '.' )) ) - { - *ptr = 0; - } - - strcat ( buffer, ".txt" ); - - if ( (file = fopen (buffer, "wt" ))) - { - - while ( row - last_row < 1000 ) - { - NoxText *text; - - GetString ( row, 'J' - 'A' + 1, olebuf ); - - wcslwr ( olebuf ); - - if ( wcsstr ( olebuf, L".wav" ) ) - { - last_row = row; - - fprintf ( file, "%S : ", olebuf ); - GetString ( row, 'K' -'A' + 1, olebuf ); - StripSpaces ( olebuf ); - - if ( (text = db->FindSubText ( olebuf ) )) - { - fprintf ( file, "%6d", text->LineNumber () ); - } - else - { - fprintf ( file, "??????" ); - } - - fprintf ( file, " - \"%S\"\n", olebuf ); - } - - row++; - } - - fclose ( file ); - } - - CloseWorkBook ( ); - } - else - { - if ( dlg ) - { - dlg->Log ("FAILED", SAME_LINE ); - sprintf ( buffer2, "Failed to open \"%s\"", buffer ); - AfxMessageBox ( buffer2 ); - dlg->Log ( buffer2 ); - } - } - - if ( dlg ) - { - dlg->Ready(); - } - -} - - -int GenerateReport ( TransDB *db, const char *filename, RPOPTIONS *options, LangID *languages, CNoxstringDlg *dlg) -{ - LangID langid; - int count= 0 ; - int num; - FILE *file = NULL; - - if ( dlg ) - { - LangID *temp = languages; - num = 0; - while ( *temp++ != LANGID_UNKNOWN ) - { - num++; - } - - dlg->Log ( "" ); - dlg->Status ( "Generating Report:" ); - dlg->InitProgress ( num ); - num = 0; - } - - if ( ! ( file = fopen ( filename, "wt" ))) - { - static char buffer[500]; - - sprintf ( buffer, "Unable to open file \"%s\".\n\nCannot create report!", filename); - AfxMessageBox ( buffer ); - - if ( dlg ) - { - dlg->Log ( "FAILED", SAME_LINE ); - dlg->Ready (); - } - return 0; - } - - cb_file = file; - - { - char date[50]; - char time[50]; - _strtime ( time ); - _strdate ( date ); - fprintf ( file, "Noxstring Report: %s %s\n", date, time); - } - - - - while ( (langid = *languages++) != LANGID_UNKNOWN ) - { - LANGINFO *info; - TRNREPORT tr_report; - DLGREPORT dlg_report; - - info = GetLangInfo ( langid ); - - fprintf ( file, "\n\n%s Status:\n", info->name ); - - - if ( options->translations ) - { - int count; - - count = db->ReportTranslations ( &tr_report, langid ); - - fprintf ( file, "\n\tText Summary: %s\n", info->name ); - fprintf ( file, "\t-------------\n\n"); - - fprintf ( file, "\t\tErrors: %d\n", tr_report.errors); - - if ( langid != LANGID_US ) - { - fprintf ( file, "\t\tNot translated: %d\n", tr_report.missing); - fprintf ( file, "\t\tRetranslation: %d\n", tr_report.retranslate); - fprintf ( file, "\t\tTranslated: %d\n", tr_report.translated ); - } - fprintf ( file, "\t\tTotal text: %d\n", tr_report.numstrings ); - - if ( count && count < options->limit ) - { - fprintf ( file, "\n\tText Details: %s\n", info->name); - fprintf ( file, "\t------------\n\n" ); - db->ReportTranslations ( &tr_report, langid, print_to_file ); - } - - } - - if ( options->dialog ) - { - int count; - - count = db->ReportDialog ( &dlg_report, langid ); - - fprintf ( file, "\n\tDialog Summary: %s\n", info->name ); - fprintf ( file, "\t-------------\n\n"); - - fprintf ( file, "\t\tMissing Audio: %d\n", dlg_report.missing); - fprintf ( file, "\t\tNot verified: %d\n", dlg_report.unresolved); - fprintf ( file, "\t\tVerified: %d\n", dlg_report.resolved); - fprintf ( file, "\t\tTotal dialog: %d\n", dlg_report.numdialog ); - - if ( count && count < options->limit ) - { - fprintf ( file, "\n\tDialog Details: %s\n", info->name ); - fprintf ( file, "\t------------\n\n" ); - db->ReportDialog ( &dlg_report, langid, print_to_file ); - } - } - - if ( dlg ) - { - dlg->SetProgress ( ++num ); - } - - } - - if ( dlg ) - { - dlg->Ready (); - } - - fclose ( file ); - - return count; -} - -int UpdateSentTranslations ( TransDB *db, const char *filename, CNoxstringDlg *dlg ) -{ - int imports = -1; - - progress_dlg = dlg; - if ( dlg ) - { - dlg->Log (""); - sprintf ( buffer, "Importing \"%s\"...", filename ); - dlg->Status ( buffer ); - } - - if ( OpenWorkBook ( filename ) ) - { - int num_strings; - LANGINFO *info; - - num_strings = GetInt ( ROW_COUNT, COLUMN_COUNT ); - GetString ( ROW_LANGUAGE, COLUMN_LANGUAGE, olebuf ); - sprintf ( buffer, "%S", olebuf ); - info = GetLangInfo ( buffer ); - - if ( !info ) - { - if ( dlg ) - { - AfxMessageBox ( "Import file is of an unknown language or is not a translation file" ); - dlg->Log ( "FAILED", SAME_LINE ); - dlg->Ready(); - } - CloseWorkBook (); - return -1; - } - - - if ( dlg ) - { - dlg->InitProgress ( num_strings ); - progress_count = 0; - sprintf ( buffer, "...%s", info->name ); - dlg->Log ( buffer, SAME_LINE ); - } - - imports = update_sent_trans ( db, info->langid, progress_cb, dlg ); - - CloseWorkBook ( ); - } - else - { - if ( dlg ) - { - dlg->Log ("FAILED", SAME_LINE ); - sprintf ( buffer2, "Failed to open \"%s\"", buffer ); - AfxMessageBox ( buffer2 ); - dlg->Log ( buffer2 ); - } - } - - if ( dlg ) - { - dlg->Ready(); - } - - return imports; -} - diff --git a/Generals/Code/Tools/Babylon/expimp.h b/Generals/Code/Tools/Babylon/expimp.h deleted file mode 100644 index cb652b48b34..00000000000 --- a/Generals/Code/Tools/Babylon/expimp.h +++ /dev/null @@ -1,110 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// expimp.h -// - -#ifndef __EXPIMP_H -#define __EXPIMP_H - -#include "TransDB.h" -#include "noxstringDlg.h" - -typedef enum -{ - TR_ALL, - TR_CHANGES, - TR_DIALOG, - TR_NONDIALOG, - TR_SAMPLE, - TR_MISSING_DIALOG, - TR_UNVERIFIED, - TR_UNSENT -} TrFilter; - -typedef struct -{ - TrFilter filter; - int include_comments; - int include_translations; - -} TROPTIONS; - -typedef enum -{ - GN_UNICODE, - GN_NOXSTR, -} GnFormat; - -typedef enum -{ - GN_USEIDS, - GN_USEORIGINAL, -} GnUntranslated; - -typedef struct -{ - GnFormat format; // what file format to generate - GnUntranslated untranslated; // what to do with untranslated text - -} GNOPTIONS; - -typedef struct -{ - int translations; - int dialog; - int limit; - -} RPOPTIONS; - - -#define CSF_ID ( ('C'<<24) | ('S'<<16) | ('F'<<8) | (' ') ) -#define CSF_LABEL ( ('L'<<24) | ('B'<<16) | ('L'<<8) | (' ') ) -#define CSF_STRING ( ('S'<<24) | ('T'<<16) | ('R'<<8) | (' ') ) -#define CSF_STRINGWITHWAVE ( ('S'<<24) | ('T'<<16) | ('R'<<8) | ('W') ) -#define CSF_VERSION 3 - -typedef struct -{ - int id; - int version; - int num_labels; - int num_strings; - int skip; - -} CSF_HEADER_V1; - -typedef struct -{ - int id; - int version; - int num_labels; - int num_strings; - int skip; - int langid; - -} CSF_HEADER; - -int ExportTranslations ( TransDB *db, const char *filename, LangID langid, TROPTIONS *options, CNoxstringDlg *dlg = NULL ); -int ImportTranslations ( TransDB *db, const char *filename, CNoxstringDlg *dlg = NULL ); -int UpdateSentTranslations ( TransDB *db, const char *filename, CNoxstringDlg *dlg = NULL ); -int GenerateGameFiles ( TransDB *db, const char *filename, GNOPTIONS *option, LangID *languages, CNoxstringDlg *dlg = NULL ); -int GenerateReport ( TransDB *db, const char *filename, RPOPTIONS *options, LangID *languages, CNoxstringDlg *dlg = NULL ); -void ProcessWaves ( TransDB *db, const char *filename, CNoxstringDlg *dlg ); -#endif \ No newline at end of file diff --git a/Generals/Code/Tools/Babylon/fileops.cpp b/Generals/Code/Tools/Babylon/fileops.cpp deleted file mode 100644 index da7d57a50f6..00000000000 --- a/Generals/Code/Tools/Babylon/fileops.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// fileops.cpp -// - -#include "StdAfx.h" -#include "fileops.h" - - - - -int FileExists ( const char *filename ) -{ - int fa = FileAttribs ( filename ); - - return ! ( (fa == FA_NOFILE) || (fa & FA_DIRECTORY )); -} - - -int FileAttribs ( const char *filename ) -{ - WIN32_FIND_DATA fi; - HANDLE handle; - int fa = FA_NOFILE; - - handle = FindFirstFile ( filename, &fi ); - - if ( handle != INVALID_HANDLE_VALUE ) - { - if ( fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) - { - fa |= FA_DIRECTORY; - } - if ( fi.dwFileAttributes & FILE_ATTRIBUTE_READONLY ) - { - fa |= FA_READONLY; - } - else - { - fa |= FA_WRITEABLE; - } - - FindClose ( handle ); - } - - return fa; -} - -static void make_bk_name ( char *bkname, const char *filename ) -{ - const char *ext; - char *ext1; - - strcpy ( bkname, filename ); - - ext = strchr ( filename, '.' ); - ext1 = strchr ( bkname, '.' ); - - if ( ext ) - { - strcpy ( ext1, "_back_up" ); - strcat ( ext1, ext ); - } - else - { - strcat ( bkname, "_back_up" ); - } - -} - -void MakeBackupFile ( const char *filename ) -{ - char bkname[256]; - - make_bk_name ( bkname, filename ); - - CopyFile ( filename, bkname, FALSE ); - -} - -void RestoreBackupFile ( const char *filename ) -{ - char bkname[256]; - - make_bk_name ( bkname, filename ); - - if ( FileExists ( bkname )) - { - CopyFile ( bkname, filename, FALSE ); - } - -} \ No newline at end of file diff --git a/Generals/Code/Tools/Babylon/fileops.h b/Generals/Code/Tools/Babylon/fileops.h deleted file mode 100644 index a7fc9e7a711..00000000000 --- a/Generals/Code/Tools/Babylon/fileops.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// File IO support -// - -#ifndef __FILEOPS_H -#define __FILEOPS_H - -static const int FA_NOFILE = 0; -static const int FA_READONLY = 0x00000001; -static const int FA_DIRECTORY = 0x00000002; -static const int FA_WRITEABLE = 0x00000004; - - -int FileExists ( const char *filename ); -int FileAttribs ( const char *filename ); -void MakeBackupFile ( const char *filename ); -void RestoreBackupFile ( const char *filename ); - - -#endif // __FILEIO_H \ No newline at end of file diff --git a/Generals/Code/Tools/Babylon/iff.cpp b/Generals/Code/Tools/Babylon/iff.cpp deleted file mode 100644 index 0498b161806..00000000000 --- a/Generals/Code/Tools/Babylon/iff.cpp +++ /dev/null @@ -1,553 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - - -#include "StdAfx.h" -#include "sys/stat.h" -#include "iff.h" -#include -#include -#include -#include - -#define IFF_RAWREAD(iff,data,size,label) {if ( IFF_rawread ( (iff), (data), (size)) != (size)) goto label;} - - -int IFF_rawread ( IFF_FILE *iff, void *buffer, int bytes ) -{ - if ( ! (iff->flags & mIFF_FILE_LOADED ) ) - { - return _read ( iff->fp, buffer, bytes ); - } - - if ( iff->file_size < (iff->file_pos + bytes) ) - { - bytes = iff->file_size - iff->file_pos; - } - memcpy ( buffer, &iff->mem_file[iff->file_pos], bytes ); - iff->file_pos += bytes; - return bytes; -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -int IFF_seek ( IFF_FILE *iff, int pos, int mode ) -{ - - if ( ! (iff->flags & mIFF_FILE_LOADED )) - { - return lseek ( iff->fp, pos, mode ); - } - - switch ( mode ) - { - case SEEK_CUR: - iff->file_pos += pos; - break; - case SEEK_END: - iff->file_pos = iff->file_size - pos; - break; - case SEEK_SET: - iff->file_pos = pos; - break; - } - - if ( iff->file_pos < 0 ) - { - iff->file_pos = 0; - } - else - { - if ( iff->file_pos > iff->file_size ) - { - iff->file_pos = iff->file_size; - } - } - - return iff->file_pos; -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -IFF_FILE *IFF_Open ( const char *name ) -{ - IFF_FILE *iff = NULL; - - - if ( ! (iff = (IFF_FILE *) malloc ( sizeof (IFF_FILE)))) - { - goto error; - } - - iff->fp = -1; - memset ( iff, 0, sizeof ( IFF_FILE )); - - if ((iff->fp = open ( name, _O_BINARY | _O_RDONLY )) == -1 ) - { - goto error; - } - - - return iff; - -error: - - if (iff) - { - IFF_Close ( iff ); - } - - return NULL; -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -IFF_FILE *IFF_Load ( const char *name ) -{ - IFF_FILE *iff = NULL; - - if ( ! (iff = (IFF_FILE *) malloc ( sizeof (IFF_FILE)))) - { - goto error; - } - - memset ( iff, 0, sizeof ( IFF_FILE )); - iff->fp = -1; - - if ((iff->fp = open ( name, _O_BINARY | _O_RDONLY )) == -1 ) - { - goto error; - } - - iff->file_size = lseek ( iff->fp, 0, SEEK_END ); - lseek ( iff->fp, 0, SEEK_SET ); - - if ( !(iff->mem_file = ( char *) malloc ( iff->file_size) ) ) - { - goto error; - } - - DO_READ ( iff->fp, iff->mem_file, iff->file_size, error ); - - iff->flags |= mIFF_FILE_LOADED; - - return iff; - -error: - - if (iff) - { - IFF_Close ( iff ); - } - - return NULL; -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -void IFF_Reset ( IFF_FILE *iff ) -{ - IFF_seek ( iff, 0, SEEK_SET ); - iff->pad_form = 0; - iff->pad_chunk = 0; - iff->FormSize = 0; - iff->ChunkSize = 0; - iff->next_byte = 0; - iff->chunk_size_pos = 0; - iff->form_size_pos = 0; - -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -void IFF_goto_form_end ( IFF_FILE *iff ) -{ - - iff->FormSize += iff->pad_form; - iff->pad_form = 0; - if (iff->FormSize) - { - IFF_seek ( iff, iff->FormSize, SEEK_CUR ); - iff->next_byte += iff->FormSize; - iff->FormSize = 0; - iff->ChunkSize = 0; - } - -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -void IFF_goto_chunk_end ( IFF_FILE *iff ) -{ - - iff->ChunkSize += iff->pad_chunk; - iff->pad_chunk = 0; - if (iff->ChunkSize) - { - IFF_seek ( iff, iff->ChunkSize, SEEK_CUR ); - iff->next_byte += iff->ChunkSize; - iff->FormSize -= iff->ChunkSize; - iff->ChunkSize = 0; - } -} - - - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -int IFF_NextForm ( IFF_FILE *iff ) -{ - IFF_CHUNK chunk; - int form; - - IFF_goto_form_end ( iff ); - - IFF_RAWREAD (iff, &chunk, sizeof( IFF_CHUNK ), error ); - - chunk.Size = BgEn32 (chunk.Size); - chunk.ID = BgEn32 (chunk.ID); - - iff->pad_form = (int) (chunk.Size & 0x0001); - - if (chunk.ID != vIFF_ID_FORM ) - { - goto error; - } - - IFF_RAWREAD (iff, &form, sizeof( int ), error); - - iff->FormID = (int) BgEn32 (form); - - iff->flags |= mIFF_FILE_FORMOPEN; - iff->next_byte += sizeof( int ) + sizeof ( IFF_CHUNK ); - iff->FormSize = (int) chunk.Size - sizeof ( int ); - iff->ChunkSize = 0; - iff->pad_chunk = 0; - - return TRUE; - -error: - - return FALSE; -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -int IFF_NextChunk ( IFF_FILE *iff ) -{ - IFF_CHUNK chunk; - - IFF_goto_chunk_end ( iff ); - - if (iff->FormSize==0) - { - goto error; - } - - IFF_RAWREAD ( iff, &chunk, sizeof( IFF_CHUNK ), error ); - - chunk.Size = BgEn32 (chunk.Size); - chunk.ID = BgEn32 (chunk.ID); - - iff->pad_chunk = (int) (chunk.Size & 0x0001); - - iff->flags |= mIFF_FILE_CHUNKOPEN; - iff->ChunkID = (int) chunk.ID; - iff->ChunkSize = (int) chunk.Size; - iff->next_byte += sizeof ( IFF_CHUNK ); - iff->FormSize -= sizeof ( IFF_CHUNK ); - - return TRUE; - -error: - - return FALSE; -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -void IFF_Close ( IFF_FILE *iff ) -{ - if (iff->fp != -1) - { - _close (iff->fp); - } - - if ( iff->mem_file ) - { - free ( iff->mem_file ); - } - - free ( iff ); -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -int IFF_Read ( IFF_FILE *iff, void *buff, int size ) -{ - int read =0; - - if ( size>iff->ChunkSize ) - { - size = iff->ChunkSize; - } - - read = IFF_rawread ( iff, buff, size); - - if (read==-1) - { - read = 0; - } - - iff->ChunkSize -= read; - iff->FormSize -= read; - iff->next_byte += read; - - - return read; -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -IFF_FILE *IFF_New ( const char *name ) -{ - IFF_FILE *iff = NULL; - - - if ( ! (iff = (IFF_FILE *) malloc ( sizeof (IFF_FILE)))) - { - goto error; - } - - memset ( iff, 0, sizeof ( IFF_FILE )); - iff->fp = -1; - - if ((iff->fp = _open ( name, _O_BINARY | _O_RDWR | _O_CREAT | _O_TRUNC, _S_IREAD | _S_IWRITE )) == -1 ) - { - goto error; - } - - return iff; - -error: - - if (iff) - { - IFF_Close ( iff ); - } - - return NULL; -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -int IFF_NewForm ( IFF_FILE *iff, int id ) -{ - IFF_CHUNK chunk; - - chunk.ID = BgEn32 (vIFF_ID_FORM); - chunk.Size = BgEn32 (90000); - - iff->FormSize = 0; - iff->ChunkSize = 0; - iff->FormID = id; - - DO_WRITE ( iff->fp, &chunk, sizeof (IFF_CHUNK), error); - - chunk.ID = BgEn32 ( (int) iff->FormID); - DO_WRITE ( iff->fp, &chunk.ID, sizeof (int), error ); - - iff->flags |= mIFF_FILE_FORMOPEN; - iff->form_size_pos = iff->next_byte + sizeof (int); - iff->next_byte += sizeof ( IFF_CHUNK ) + sizeof (int); - - return TRUE; - -error: - - return FALSE; -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -int IFF_NewChunk ( IFF_FILE *iff, int id ) -{ - IFF_CHUNK chunk; - - chunk.Size = BgEn32 (90000); - chunk.ID = BgEn32 ( (int) id); - - - DO_WRITE ( iff->fp, &chunk, sizeof ( IFF_CHUNK ), error ); - - iff->flags |= mIFF_FILE_CHUNKOPEN; - iff->chunk_size_pos = iff->next_byte + sizeof (int); - iff->next_byte += sizeof ( IFF_CHUNK ) ; - iff->FormSize += sizeof ( IFF_CHUNK ) ; - iff->ChunkSize = 0; - iff->ChunkID = id; - - return TRUE; - -error: - - return FALSE; - -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -int IFF_Write ( IFF_FILE *iff, void *buff, int size ) -{ - int val =0; - - val = _write ( iff->fp, buff, size); - - if (val==-1) - { - val = 0; - } - - iff->ChunkSize += val; - iff->FormSize += val; - iff->next_byte += val; - - - return val; -} - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -int IFF_CloseForm ( IFF_FILE *iff ) -{ - int fp; - int off; - int size; - int pad = 0; - - if (iff && ((fp = iff->fp) != -1)) - { - - if (iff->FormSize&0x0001) - { - DO_WRITE (fp, &pad, 1, error ); - iff->next_byte++; - } - - off = iff->next_byte - iff->form_size_pos; - - size = BgEn32 ( (int) (iff->FormSize+sizeof ( int ))); - - if (lseek (fp, -off, SEEK_CUR)==iff->form_size_pos) - { - DO_WRITE ( fp, &size, sizeof (int), error ); - lseek ( fp, 0, SEEK_END); - return TRUE; - } - } - -error: - - return FALSE; -} - - -/******************************************************************/ -/* */ -/* */ -/******************************************************************/ - -int IFF_CloseChunk ( IFF_FILE *iff ) -{ - int fp; - int off; - int size; - int pad = 0; - - if (iff && ((fp = iff->fp) != -1 )) - { - - if (iff->ChunkSize&0x0001) - { - DO_WRITE (fp, &pad, 1, error ); - iff->next_byte++; - iff->FormSize++; - } - - off = iff->next_byte - iff->chunk_size_pos; - - size = BgEn32 ((int) iff->ChunkSize); - - if (lseek (fp, -off, SEEK_CUR)==iff->chunk_size_pos) - { - DO_WRITE ( fp, &size, sizeof (int), error ); - lseek ( fp, 0, SEEK_END); - return TRUE; - } - } - -error: - - return TRUE; -} - diff --git a/Generals/Code/Tools/Babylon/iff.h b/Generals/Code/Tools/Babylon/iff.h deleted file mode 100644 index e7d5af4ecbc..00000000000 --- a/Generals/Code/Tools/Babylon/iff.h +++ /dev/null @@ -1,127 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - - -#ifndef __IFF_H -#define __IFF_H - -#define MakeID(a,b,c,d) ( (int) ( ( (int) (a) ) << 24 | ( (int) (b) ) << 16 | \ - ( (int) (c) ) << 8 | ( (int) (d) ) ) ) - - -#define vIFF_ID_FORM MakeID('F','O','R','M') -#define vIFF_ID_CAT MakeID('C','A','T',' ') -#define vIFF_ID_LIST MakeID('L','I','S','T') -#define vIFF_ID_PROP MakeID('P','R','O','P') -#define vIFF_ID_FILLER W_MakeID(' ',' ',' ',' ') - -/* IFF_FILE: - IFF File handling structure -*/ - -/* defines for IFF_FILE->flags */ -#define mIFF_FILE_FORMOPEN (1<<0) /* in a form */ -#define mIFF_FILE_CHUNKOPEN (1<<1) /* in a chunk */ -#define mIFF_FILE_LOADED (1<<2) /* file is in memory */ - - -typedef struct -{ - int ID; /* Chunk ID */ - int Size; /* Chunk size in bytes */ - -} IFF_CHUNK; - -typedef struct { - - /* public fields */ - int FormID; - int ChunkID; - int FormSize; - int ChunkSize; - - /* private fields */ - - int fp; - int flags; - int next_byte; - int chunk_size_pos; - int form_size_pos; - int pad_form; - int pad_chunk; - int file_size; - int file_pos; - char *mem_file; - - -} IFF_FILE; - -IFF_FILE* IFF_Open ( const char * ); -IFF_FILE* IFF_Load ( const char * ); -VOID IFF_Reset ( IFF_FILE * ); -VOID IFF_Close ( IFF_FILE * ); - -VOID IFF_goto_form_end ( IFF_FILE *); -VOID IFF_goto_chunk_end ( IFF_FILE *); - -int IFF_NextForm ( IFF_FILE *); -int IFF_NextChunk ( IFF_FILE *); - -int IFF_Read ( IFF_FILE *, void *, int ); -int IFF_Write ( IFF_FILE *, void *, int ); - -IFF_FILE* IFF_New ( const char * ); -int IFF_NewForm ( IFF_FILE *, int ); -int IFF_NewChunk ( IFF_FILE *, int ); -int IFF_CloseForm ( IFF_FILE * ); -int IFF_CloseChunk ( IFF_FILE * ); - -#define DO_OPEN(P,N,F,E) {if (!((P)=open(N,(F)))) goto E;} -#define DO_READ(P,B,S,E) {if ( read((P),(B),(S))!=(S)) goto E;} -#define DO_WRITE(P,B,S,E) {if ( write((P),(B),(S))!=(S)) goto E;} - -#define IFF_READ(iff,data,size,label) {if ( IFF_Read ( (iff), (data), (size)) != (size)) goto label;} -#define IFF_WRITE(iff,data,size,label) {if ( IFF_Write ( (iff), (data), (size)) != (size)) goto label;} -#define IFF_NEWCHUNK(iff,id,label) { if ( !IFF_NewChunk ( (iff), (id))) goto label; } -#define IFF_NEWFORM(iff,id,label) { if ( !IFF_NewForm ( (iff), (id))) goto label; } - -#define Reverse32(L) ( (( (L)>>24 ) & 0xff) | (((L)>>8) &0xff00) | (((L)<<8)&0xff0000) | (((L)<<24)&0xff000000)) -#define Reverse16(L) ( (( (L)>>8 ) & 0xff) | (((L)<<8)&0xff00) ) - -#define __CPU_BIG_ENDIAN__ 0 - -#if __CPU_BIG_ENDIAN__ - - #define BgEn32(L) (L) - #define BgEn16(L) (L) - - #define LtEn32(L) Reverse32(L) - #define LtEn16(L) Reverse16(L) - -#else - - #define BgEn32(L) Reverse32(L) - #define BgEn16(L) Reverse16(L) - - #define LtEn32(L) (L) - #define LtEn16(L) (L) - -#endif - - -#endif /* __IFF_H */ diff --git a/Generals/Code/Tools/Babylon/list.cpp b/Generals/Code/Tools/Babylon/list.cpp deleted file mode 100644 index b8fdc0bf33a..00000000000 --- a/Generals/Code/Tools/Babylon/list.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// list.cpp -// - - -#include "StdAfx.h" -#include -#include "list.h" - -ListNode::ListNode ( void ) -{ - prev = next = this; - pri = NORMAL_PRIORITY; - item = NULL; -} - -void ListNode::Append ( ListNode *new_node ) -{ - assert ( ! new_node->InList()); /* node is already in a list or was not initialized*/ - - new_node->prev = this; - new_node->next = next; - next = new_node; - new_node->next->prev = new_node; - -} - -void ListNode::Prepend ( ListNode *new_node ) -{ - - assert ( !new_node->InList() ); /* node is already in a list or was not initialized*/ - - new_node->prev = prev; - new_node->next = this; - prev = new_node; - new_node->prev->next = new_node; - -} -void ListNode::Link ( ListNode *node) -{ - next = node; - node->prev = next; -} - -void ListNode::Remove ( void ) -{ - prev->next = next; - next->prev = prev; - prev = next = this; /* so we know that the node is not in a list */ -} - -ListNode* ListNode::Next ( void ) -{ - if ( next->IsHead ( ) ) - { - return NULL; - } - - return next; -} - -ListNode* ListNode::Prev ( void ) -{ - if ( prev->IsHead () ) - { - return NULL; - } - - return prev; -} - -ListNode* ListNode::NextLoop ( void ) -{ - ListNode *next_node = next; - - if ( next_node->IsHead ( )) - { - /* skip head node */ - next_node = next_node->next; - if ( next_node->IsHead ( )) - { - return NULL; /* it is an empty list */ - } - } - - return next_node; - -} - -ListNode* ListNode::PrevLoop ( void ) -{ - ListNode *prev_node = prev; - - if ( prev_node->IsHead ( )) - { - /* skip head node */ - prev_node = prev_node->prev; - if ( prev_node->IsHead ( )) - { - return NULL; /* it is an empty list */ - } - } - - return prev_node; -} - -void* ListNode::Item ( void ) -{ - - assert ( !IsHead () ); - - return item; - -} - -void ListNode::SetItem ( void *new_item ) -{ - assert ( !IsHead () ); - item = new_item ; -} - -int ListNode::InList ( void ) -{ - - return prev != this; -} - -int ListNode::IsHead ( void ) -{ - return item == &this->item; -} - -int ListNode::Priority ( void ) -{ - return pri; - -} -void ListNode::SetPriority ( int new_pri ) -{ - - assert ( new_pri <= HIGHEST_PRIORITY ); - assert ( new_pri >= LOWEST_PRIORITY ); - pri = new_pri; - -} - -List::List ( void ) -{ - - SetItem ( &this->item ); - -} - -void List::AddToTail ( ListNode *node ) -{ - assert ( IsHead ()); - Prepend ( node ); -} - -void List::AddToHead ( ListNode *node ) -{ - assert ( IsHead ()); - Append ( node ); -} - -void List::Add ( ListNode *new_node ) -{ - ListNode* node; - int pri; - - assert ( IsHead ()); - assert ( !new_node->InList ()); - - pri = new_node->Priority(); - node = FirstNode ( ); - - while( node ) - { - if (node->Priority() <= pri ) - { - node->Prepend ( new_node ); - return; - } - - node = node->Next (); - } - - Prepend ( new_node ); - -} - -void List::Merge ( List *list ) -{ - ListNode *first, - *last, - *node; - - assert ( IsHead ()); - - first = list->Next(); - last = list->Prev(); - - if ( !first || !last ) - { - return; - } - - node = Prev(); - node->Link ( first ); - last->Link ( this ); - - list->Empty (); - -} - -int List::NumItems ( void ) -{ - int count = 0; - ListNode *node; - - assert ( IsHead ()); - node = FirstNode(); - - while ( node ) - { - count++; - node = node->Next (); - } - - return count; -} - -void* List::Item ( int list_index ) -{ - ListNode *node; - - assert ( IsHead ()); - node = FirstNode(); - - while (list_index && node ) - { - list_index--; - node = node->Next (); - } - if ( node ) - { - return node->Item(); - } - - return NULL; -} - -ListNode* List::FirstNode ( void ) -{ - assert ( IsHead ()); - return Next (); - -} - -ListNode* List::LastNode ( void ) -{ - assert ( IsHead ()); - return Prev (); - -} - -int List::IsEmpty ( void ) -{ - assert ( IsHead ()); - - return !InList(); - -} - -void List::Empty ( void ) -{ - assert ( IsHead ()); - Remove (); -} - - -ListNode* List::Find ( void *item ) -{ - ListNode *node; - - node = FirstNode (); - - while ( node ) - { - if ( node->Item () == item ) - { - return node; - } - - node = node->Next (); - } - return NULL; -} diff --git a/Generals/Code/Tools/Babylon/list.h b/Generals/Code/Tools/Babylon/list.h deleted file mode 100644 index c53f172b2b9..00000000000 --- a/Generals/Code/Tools/Babylon/list.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - - -#ifndef __LIST_H -#define __LIST_H - - -const int LOWEST_PRIORITY = (int ) 0x80000000; -const int HIGHEST_PRIORITY = (int) 0x7fffffff; -const int NORMAL_PRIORITY = 0; - -class ListNode -{ - private: - ListNode *next; - ListNode *prev; - int pri; // node's priority - - protected: - void *item; // item - - public: - - ListNode ( void ); - void Append ( ListNode *node ); - void Prepend ( ListNode *node ); - void Link ( ListNode *node); - void Remove ( void ); - ListNode* Next ( void ); - ListNode* Prev ( void ); - ListNode* NextLoop ( void ); - ListNode* PrevLoop ( void ); - void* Item ( void ); - void SetItem ( void *item ); - int InList ( void ); - int IsHead ( void ); - int Priority ( void ); - void SetPriority ( int new_pri ); - - -}; - -class List: public ListNode -{ - - public: - List ( void ); - void AddToTail ( ListNode *node ); - void AddToHead ( ListNode *node ); - void Add ( ListNode *node ); - void Merge ( List *list ); - int NumItems ( void ); - void* Item ( int list_index ); - ListNode* FirstNode ( void ); - ListNode* LastNode ( void ); - int IsEmpty ( void ); - void Empty ( void ); - ListNode* Find ( void *item ); - -}; - -class ListSearch -{ - List *head; - ListNode *node; - - public: - - ListNode* Next ( void ) { if (node) { node = node->Next ();} return node;}; - ListNode* Prev ( void ) { if (node) { node = node->Prev ();} return node;}; - ListNode* FirstNode ( void ) { node = head; return Next (); }; - ListNode* LastNode ( void ) { node = head; return Prev (); }; - ListNode* FirstNode ( List *new_head ) { node = head = new_head; return Next (); }; - ListNode* LastNode ( List *new_head) { node = head = new_head; return Prev (); }; - -}; - - -#endif // __LIST_H diff --git a/Generals/Code/Tools/Babylon/loadsave.cpp b/Generals/Code/Tools/Babylon/loadsave.cpp deleted file mode 100644 index f1275f412ae..00000000000 --- a/Generals/Code/Tools/Babylon/loadsave.cpp +++ /dev/null @@ -1,656 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// loadsave.cpp -// - -#include "StdAfx.h" -#include "iff.h" -#include "TransDB.h" -#include "noxstringDlg.h" - -#define FORM_NOXDB MakeID ('N','X','D','B') -#define FORM_LABEL MakeID ('N','L','B','L') -#define FORM_TEXT MakeID ('N','T','X','T') -#define FORM_TRANS MakeID ('N','T','R','N') -#define CHUNK_COMMENT MakeID ('C','M','N','T') -#define CHUNK_CONTEXT MakeID ('C','T','X','T') -#define CHUNK_SPEAKER MakeID ('S','P','K','R') -#define CHUNK_LISTENER MakeID ('L','T','N','R') -#define CHUNK_TEXT MakeID ('T','E','X','T') -#define CHUNK_WAVE MakeID ('W','A','V','E') -#define CHUNK_WAVE_INFO MakeID ('W','V','I','N') -#define CHUNK_INFO MakeID ('I','N','F','O') -#define CHUNK_NAME MakeID ('N','A','M','E') - -#define MAX_BUFFER (100*1024) - -static OLECHAR buffer[MAX_BUFFER]; -typedef struct -{ - int num_labels; - int next_id; - -} DBINFO; - -typedef struct -{ - int max_len; - -} LBINFO; - -typedef struct -{ - int id; - int revision; - -} TXINFO; - -typedef struct -{ - LangID lang; - int revision; - -} TRINFO; - -typedef struct -{ - int valid; - DWORD lo; - DWORD hi; - -} WVINFO; - - -static int writeString ( IFF_FILE *iff, OLECHAR *string, int chunk_id ) -{ - int len = (wcslen ( string ) ); - int bytes = (len+1)*sizeof(OLECHAR); - - if ( len ) - { - IFF_NEWCHUNK ( iff, chunk_id, error ); - IFF_WRITE ( iff, string, bytes, error); - IFF_CloseChunk ( iff ); - - } - - return TRUE; - -error: - - return FALSE; -} - -static int readString ( IFF_FILE *iff, OLECHAR *string ) -{ - - *string = 0; - - IFF_READ ( iff, string, iff->ChunkSize, error); - - return TRUE; - -error: - - return FALSE; -} - -static int writeTransForm ( IFF_FILE *iff, Translation *trans ) -{ - TRINFO trinfo; - WVINFO wvinfo; - - if ( !IFF_NewForm ( iff, FORM_TRANS )) - { - goto error; - } - - trinfo.lang = trans->GetLangID (); - trinfo.revision = trans->Revision (); - - if ( !IFF_NewChunk ( iff, CHUNK_INFO )) - { - goto error; - } - - IFF_Write ( iff, &trinfo, sizeof ( trinfo )); - - IFF_CloseChunk ( iff ); - - writeString ( iff, trans->Get (), CHUNK_TEXT ); - writeString ( iff, trans->Comment (), CHUNK_COMMENT ); - - if ( (wvinfo.valid = trans->WaveInfo.Valid()) ) - { - wvinfo.lo = trans->WaveInfo.Lo (); - wvinfo.hi = trans->WaveInfo.Hi (); - - if ( !IFF_NewChunk ( iff, CHUNK_WAVE_INFO )) - { - goto error; - } - - IFF_Write ( iff, &wvinfo, sizeof ( wvinfo )); - - IFF_CloseChunk ( iff ); - } - - IFF_CloseForm ( iff ); - - return TRUE; -error: - - return FALSE; - -} - -static int writeTextForm ( IFF_FILE *iff, NoxText *text ) -{ - TXINFO txinfo; - WVINFO wvinfo; - - if ( !IFF_NewForm ( iff, FORM_TEXT )) - { - goto error; - } - - txinfo.id = text->ID (); - txinfo.revision = text->Revision (); - - if ( !IFF_NewChunk ( iff, CHUNK_INFO )) - { - goto error; - } - - IFF_Write ( iff, &txinfo, sizeof ( txinfo )); - - IFF_CloseChunk ( iff ); - writeString ( iff, text->Get (), CHUNK_TEXT ); - writeString ( iff, text->Wave (), CHUNK_WAVE ); - - if ( (wvinfo.valid = text->WaveInfo.Valid()) ) - { - wvinfo.lo = text->WaveInfo.Lo (); - wvinfo.hi = text->WaveInfo.Hi (); - - if ( !IFF_NewChunk ( iff, CHUNK_WAVE_INFO )) - { - goto error; - } - - IFF_Write ( iff, &wvinfo, sizeof ( wvinfo )); - - IFF_CloseChunk ( iff ); - } - - IFF_CloseForm ( iff ); - - return TRUE; -error: - - return FALSE; - -} - -int WriteMainDB(TransDB *db, const char *filename, CNoxstringDlg *dlg ) -{ - NoxText *text; - NoxLabel *label; - ListSearch sh_label; - ListSearch sh_text; - int count = 0; - IFF_FILE *iff = NULL; - DBINFO dbinfo; - int ok = FALSE; - - if ( dlg ) - { - dlg->InitProgress ( db->NumLabels ()); - } - - - if ( !( iff = IFF_New ( filename ))) - { - goto error; - } - - if ( !IFF_NewForm ( iff, FORM_NOXDB ) ) - { - goto error; - } - - dbinfo.next_id = db->ID (); - dbinfo.num_labels = db->NumLabels (); - - if ( !IFF_NewChunk ( iff, CHUNK_INFO )) - { - goto error; - } - - IFF_Write ( iff, &dbinfo, sizeof ( dbinfo )); - - IFF_CloseChunk ( iff ); - IFF_CloseForm ( iff ); - - text = db->FirstObsolete ( sh_text ); - - while ( text ) - { - if ( !writeTextForm ( iff, text ) ) - { - goto error; - } - text = db->NextObsolete ( sh_text ); - } - - - - label = db->FirstLabel ( sh_label ); - - while ( label ) - { - LBINFO lbinfo; - - if ( !IFF_NewForm ( iff, FORM_LABEL )) - { - goto error; - } - - lbinfo.max_len = label->MaxLen (); - - if ( !IFF_NewChunk ( iff, CHUNK_INFO )) - { - goto error; - } - - IFF_Write ( iff, &lbinfo, sizeof ( lbinfo )); - - IFF_CloseChunk ( iff ); - - writeString ( iff, label->Name (), CHUNK_NAME ); - writeString ( iff, label->Comment (), CHUNK_COMMENT ); - writeString ( iff, label->Context (), CHUNK_CONTEXT ); - writeString ( iff, label->Speaker (), CHUNK_SPEAKER ); - writeString ( iff, label->Listener (), CHUNK_LISTENER ); - IFF_CloseForm ( iff ); - - text = label->FirstText ( sh_text ); - - while ( text ) - { - Translation *trans; - ListSearch sh_trans; - if ( !writeTextForm ( iff, text ) ) - { - goto error; - } - - trans = text->FirstTranslation ( sh_trans ); - - while ( trans ) - { - if ( !writeTransForm ( iff, trans ) ) - { - goto error; - } - - trans = text->NextTranslation ( sh_trans ); - } - - text = label->NextText ( sh_text ); - } - - count++; - if ( dlg ) - { - dlg->SetProgress ( count ); - } - label = db->NextLabel ( sh_label ); - } - - ok = TRUE; - db->ClearChanges (); - -error: - if ( iff ) - { - IFF_Close ( iff ); - } - - return ok; -} - -int LoadMainDB(TransDB *db, const char *filename, void (*cb) (void) ) -{ - NoxLabel *label = NULL; - NoxText *text = NULL; - Translation *trans = NULL; - int count = 0; - IFF_FILE *iff = NULL; - DBINFO dbinfo; - int ok = FALSE; - - - if ( !(iff = IFF_Load ( filename ) ) ) - { - goto error; - } - - if ( !IFF_NextForm ( iff ) || iff->FormID != FORM_NOXDB ) - { - goto error; - } - - dbinfo.next_id = -1; - dbinfo.num_labels = 0; - - while ( IFF_NextChunk ( iff )) - { - switch (iff->ChunkID ) - { - case CHUNK_INFO: - IFF_READ ( iff, &dbinfo, sizeof ( dbinfo ), error ); - break; - } - } - - db->SetID ( dbinfo.next_id ); - - while ( IFF_NextForm ( iff ) ) - { - switch ( iff->FormID ) - { - case FORM_LABEL: - { - LBINFO lbinfo; - // new label - - if ( text ) - { - if ( label ) - { - label->AddText ( text ); - } - else - { - db->AddObsolete ( text ); - } - - text = NULL; - } - - if ( label ) - { - count++; - db->AddLabel ( label ); - label = NULL; - if ( cb ) - { - cb (); - } - } - - if ( ! (label = new NoxLabel ())) - { - goto error; - } - - while ( IFF_NextChunk ( iff )) - { - switch ( iff->ChunkID ) - { - case CHUNK_INFO: - IFF_READ ( iff, &lbinfo, sizeof (lbinfo), error ); - label->SetMaxLen ( lbinfo.max_len ); - break; - case CHUNK_COMMENT: - readString ( iff, buffer ); - label->SetComment ( buffer ); - break; - case CHUNK_CONTEXT: - readString ( iff, buffer ); - label->SetContext ( buffer ); - break; - case CHUNK_SPEAKER: - readString ( iff, buffer ); - label->SetSpeaker ( buffer ); - break; - case CHUNK_LISTENER: - readString ( iff, buffer ); - label->SetListener ( buffer ); - break; - case CHUNK_NAME: - readString ( iff, buffer ); - label->SetName ( buffer ); - break; - } - } - break; - } - case FORM_TEXT: - { - TXINFO txinfo; - - if ( text ) - { - if ( label ) - { - label->AddText ( text ); - } - else - { - db->AddObsolete ( text ); - } - - text = NULL; - } - - if ( ! (text = new NoxText ())) - { - goto error; - } - - while ( IFF_NextChunk ( iff )) - { - switch ( iff->ChunkID ) - { - case CHUNK_INFO: - IFF_READ ( iff, &txinfo, sizeof (txinfo), error ); - text->SetID ( txinfo.id ); - text->SetRevision ( txinfo.revision ); - break; - case CHUNK_TEXT: - readString ( iff, buffer ); - text->Set ( buffer ); - break; - - case CHUNK_WAVE: - readString ( iff, buffer ); - text->SetWave ( buffer ); - break; - case CHUNK_WAVE_INFO: - { - WVINFO wvinfo; - IFF_READ ( iff, &wvinfo, sizeof (wvinfo), error ); - text->WaveInfo.SetValid ( wvinfo.valid ); - text->WaveInfo.SetLo ( wvinfo.lo ); - text->WaveInfo.SetHi ( wvinfo.hi ); - break; - } - } - - } - break; - } - case FORM_TRANS: - { - TRINFO trinfo; - - if ( ! (trans = new Translation ())) - { - goto error; - } - - while ( IFF_NextChunk ( iff )) - { - switch ( iff->ChunkID ) - { - case CHUNK_INFO: - IFF_READ ( iff, &trinfo, sizeof (trinfo), error ); - trans->SetLangID ( trinfo.lang ); - trans->SetRevision ( trinfo.revision ); - break; - case CHUNK_TEXT: - readString ( iff, buffer ); - trans->Set ( buffer ); - break; - - case CHUNK_COMMENT: - readString ( iff, buffer ); - trans->SetComment ( buffer ); - break; - case CHUNK_WAVE_INFO: - { - WVINFO wvinfo; - IFF_READ ( iff, &wvinfo, sizeof (wvinfo), error ); - trans->WaveInfo.SetValid ( wvinfo.valid ); - trans->WaveInfo.SetLo ( wvinfo.lo ); - trans->WaveInfo.SetHi ( wvinfo.hi ); - } - break; - - } - - } - if ( text ) - { - text->AddTranslation ( trans ); - } - else - { - delete trans; - } - trans = NULL; - - break; - } - } - } - - if ( text ) - { - if ( label ) - { - label->AddText ( text ); - } - else - { - db->AddObsolete ( text ); - } - - text = NULL; - } - - if ( label ) - { - count++; - db->AddLabel ( label ); - label = NULL; - if ( cb ) - { - cb (); - } - } - - ok = TRUE; - -error: - - if ( label ) - { - delete label; - } - - if ( text ) - { - delete text; - } - - if ( trans ) - { - delete trans; - } - - if ( iff ) - { - IFF_Close ( iff ); - } - - db->ClearChanges (); - - if ( !ok ) - { - db->Clear (); - } - - return ok; -} - - -int GetLabelCountDB ( char *filename ) -{ - IFF_FILE *iff = NULL; - DBINFO dbinfo; - int count = 0; - - - if ( !(iff = IFF_Open ( filename ) ) ) - { - goto error; - } - - if ( !IFF_NextForm ( iff ) || iff->FormID != FORM_NOXDB ) - { - goto error; - } - - dbinfo.next_id = -1; - dbinfo.num_labels = 0; - - while ( IFF_NextChunk ( iff )) - { - switch (iff->ChunkID ) - { - case CHUNK_INFO: - IFF_READ ( iff, &dbinfo, sizeof ( dbinfo ), error ); - break; - } - } - - - count = dbinfo.num_labels; - -error: - if ( iff ) - { - IFF_Close ( iff ); - } - return count; -} \ No newline at end of file diff --git a/Generals/Code/Tools/Babylon/loadsave.h b/Generals/Code/Tools/Babylon/loadsave.h deleted file mode 100644 index 5c7f14c9fee..00000000000 --- a/Generals/Code/Tools/Babylon/loadsave.h +++ /dev/null @@ -1,31 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// loadsave.h -// - -#ifndef __LOADSAVE_H -#define __LOADSAVE_H - -int WriteMainDB(TransDB *db, const char *filename, CNoxstringDlg *dlg ); -int LoadMainDB(TransDB *db, const char *filename, void (*cb) (void ) = NULL ); -int GetLabelCountDB ( char *filename ); - - -#endif \ No newline at end of file diff --git a/Generals/Code/Tools/Babylon/noxstring.cpp b/Generals/Code/Tools/Babylon/noxstring.cpp deleted file mode 100644 index 1b598cc7897..00000000000 --- a/Generals/Code/Tools/Babylon/noxstring.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// noxstring.cpp : Defines the class behaviors for the application. -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "noxstringDlg.h" -#include "XLStuff.h" - -#include -#include -#include - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -char AppTitle[200]; -CNoxstringDlg *MainDLG = NULL; - -static const char *AppName = "Babylon:"; -static int AlreadyRunning( void ); -static HWND FoundWindow = NULL; -///////////////////////////////////////////////////////////////////////////// -// CNoxstringApp - -BEGIN_MESSAGE_MAP(CNoxstringApp, CWinApp) - //{{AFX_MSG_MAP(CNoxstringApp) - //}}AFX_MSG_MAP - ON_COMMAND(ID_HELP, CWinApp::OnHelp) -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CNoxstringApp construction - -CNoxstringApp::CNoxstringApp() -{ - // TODO: add construction code here, - // Place all significant initialization in InitInstance -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CNoxstringApp object - -CNoxstringApp theApp; -TransDB *NoxstrDB = NULL; -TransDB *MainDB = NULL; -char NoxstrFilename[_MAX_PATH]; -char MainXLSFilename[_MAX_PATH]; -char DialogPath[_MAX_PATH]; -char RootPath[_MAX_PATH]; -LangID CurrentLanguage = LANGID_US; - - -///////////////////////////////////////////////////////////////////////////// -// CNoxstringApp initialization - -BOOL CNoxstringApp::InitInstance() -{ - // Initialize OLE libraries - if (!AfxOleInit()) - { - AfxMessageBox(IDP_OLE_INIT_FAILED); - return FALSE; - } - - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - -#ifdef _AFXDLL - Enable3dControls(); // Call this when using MFC in a shared DLL -#else - Enable3dControlsStatic(); // Call this when linking to MFC statically -#endif - - // Parse the command line to see if launched as OLE server - if (RunEmbedded() || RunAutomated()) - { - // Register all OLE server (factories) as running. This enables the - // OLE libraries to create objects from other applications. - COleTemplateServer::RegisterAll(); - } - else - { - // When a server application is launched stand-alone, it is a good idea - // to update the system registry in case it has been damaged. - COleObjectFactory::UpdateRegistryAll(); - } - - MainDB = new TransDB ( "Main" ); - NoxstrDB = new TransDB ( "Generals.str" ); - MainDB->EnableIDs (); - - if ( !AfxInitRichEdit( ) ) - { - AfxMessageBox ( "Error initializing Rich Edit" ); - } - - sprintf (AppTitle, "%s Built on %s - %s", AppName, __DATE__, __TIME__ ); - - if ( !_getcwd( RootPath, _MAX_PATH ) ) - { - AfxMessageBox ( "Failed to obtain current working directoy!\n\n Set directoy path to \"c:\\Babylon\"." ); - strcpy ( (char *) RootPath, "c:\\Babylon" ); - } - strlwr ( RootPath ); - - strcpy ( (char *) NoxstrFilename, RootPath ); - strcat ( (char *) NoxstrFilename, "\\Data\\Generals.str" ); - strcpy ( (char *) MainXLSFilename, RootPath ); - strcat ( (char *) MainXLSFilename, "\\Data\\main.db" ); - strcpy ( (char *) DialogPath, RootPath ); - strcat ( (char *) DialogPath, "\\dialog" ); - - if ( AlreadyRunning () ) - { - if ( FoundWindow ) - { - SetForegroundWindow ( FoundWindow ); - } - } - else if ( OpenExcel ( ) ) - { - CNoxstringDlg dlg; - m_pMainWnd = &dlg; - MainDLG = &dlg; - - int nResponse = dlg.DoModal(); - - CloseExcel (); - } - - delete NoxstrDB ; - delete MainDB; - // Since the dialog has been closed, return FALSE so that we exit the - // application, rather than start the application's message pump. - return FALSE; -} - -//DEL void CNoxstringApp::OnDropFiles(HDROP hDropInfo) -//DEL { -//DEL // TODO: Add your message handler code here and/or call default -//DEL -//DEL CWinApp::OnDropFiles(hDropInfo); -//DEL } - -static BOOL CALLBACK EnumAllWindowsProc(HWND hWnd, LPARAM lParam); -static BOOL CALLBACK EnumAllWindowsProcExact(HWND hWnd, LPARAM lParam); -static const char *szSearchTitle; - -static int AlreadyRunning( void ) -{ - BOOL found = FALSE; - - szSearchTitle = AppName; - - EnumWindows((WNDENUMPROC) EnumAllWindowsProcExact, (LPARAM) &found); - - return found; -} - -//-------------------------------------------------------------------------------- - -int ExcelRunning( void ) -{ - BOOL found = FALSE; - - szSearchTitle = "Microsoft Excel"; - - EnumWindows((WNDENUMPROC) EnumAllWindowsProc, (LPARAM) &found); - - return found; -} - -//-------------------------------------------------------------------------------- - -BOOL CALLBACK EnumAllWindowsProc(HWND hWnd, LPARAM lParam) -{ - char szText[256]; - - GetWindowText(hWnd, szText, sizeof(szText)); - - if ( strstr(szText, szSearchTitle)) - { - * (BOOL *) lParam = TRUE; - FoundWindow = hWnd; - return FALSE; - } - - FoundWindow = NULL; - return TRUE; -} - -//-------------------------------------------------------------------------------- - -BOOL CALLBACK EnumAllWindowsProcExact(HWND hWnd, LPARAM lParam) -{ - char szText[256]; - - GetWindowText(hWnd, szText, sizeof(szText)); - - if ( !strncmp (szText, szSearchTitle, strlen ( szSearchTitle))) - { - * (BOOL *) lParam = TRUE; - FoundWindow = hWnd; - return FALSE; - } - - FoundWindow = NULL; - return TRUE; -} - diff --git a/Generals/Code/Tools/Babylon/noxstring.h b/Generals/Code/Tools/Babylon/noxstring.h deleted file mode 100644 index 07a9273a2fb..00000000000 --- a/Generals/Code/Tools/Babylon/noxstring.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// noxstring.h : main header file for the NOXSTRING application -// - -#if !defined(AFX_NOXSTRING_H__2BF3124B_3BA1_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_NOXSTRING_H__2BF3124B_3BA1_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#ifndef __AFXWIN_H__ - #error include 'stdafx.h' before including this file for PCH -#endif - -#include "resource.h" // main symbols -#include "TransDB.h" - -///////////////////////////////////////////////////////////////////////////// -// CNoxstringApp: -// See noxstring.cpp for the implementation of this class -// - -class CNoxstringApp : public CWinApp -{ -public: - CNoxstringApp(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CNoxstringApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL - -// Implementation - - //{{AFX_MSG(CNoxstringApp) - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -int ExcelRunning( void ); -extern TransDB *NoxstrDB; -extern TransDB *MainDB; -extern char NoxstrFilename[]; -extern char MainXLSFilename[]; -extern char RootPath[]; -extern char DialogPath[]; -extern LangID CurrentLanguage; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_NOXSTRING_H__2BF3124B_3BA1_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/noxstring.odl b/Generals/Code/Tools/Babylon/noxstring.odl deleted file mode 100644 index baa8a6b5742..00000000000 --- a/Generals/Code/Tools/Babylon/noxstring.odl +++ /dev/null @@ -1,42 +0,0 @@ -// noxstring.odl : type library source for noxstring.exe - -// This file will be processed by the MIDL compiler to produce the -// type library (noxstring.tlb). - -[ uuid(2BF31247-3BA1-11D3-B9DA-006097B90D93), version(1.0) ] -library Noxstring -{ - importlib("stdole32.tlb"); - importlib("stdole2.tlb"); - - - // Primary dispatch interface for CNoxstringDoc - - [ uuid(2BF31248-3BA1-11D3-B9DA-006097B90D93) ] - dispinterface INoxstring - { - properties: - // NOTE - ClassWizard will maintain property information here. - // Use extreme caution when editing this section. - //{{AFX_ODL_PROP(CNoxstringDlgAutoProxy) - //}}AFX_ODL_PROP - - methods: - // NOTE - ClassWizard will maintain method information here. - // Use extreme caution when editing this section. - //{{AFX_ODL_METHOD(CNoxstringDlgAutoProxy) - //}}AFX_ODL_METHOD - - }; - - // Class information for CNoxstringDoc - - [ uuid(2BF31246-3BA1-11D3-B9DA-006097B90D93) ] - coclass Noxstring - { - [default] dispinterface INoxstring; - }; - - //{{AFX_APPEND_ODL}} - //}}AFX_APPEND_ODL}} -}; diff --git a/Generals/Code/Tools/Babylon/noxstring.rc b/Generals/Code/Tools/Babylon/noxstring.rc deleted file mode 100644 index b2c1c68447f..00000000000 --- a/Generals/Code/Tools/Babylon/noxstring.rc +++ /dev/null @@ -1,566 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -// Generated Help ID header file -#define APSTUDIO_HIDDEN_SYMBOLS -#include "resource.hm" -#undef APSTUDIO_HIDDEN_SYMBOLS - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif //_WIN32\r\n" - "#include ""res\\noxstring.rc2"" // non-Microsoft Visual C++ edited resources\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "res\\noxstring.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About Babylon" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Babylon Version 1.0",IDC_STATIC,40,10,76,8,SS_NOPREFIX - DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP,WS_EX_STATICEDGE - LTEXT "Static",IDC_BUILD,7,37,221,11 - ICON IDR_MAINFRAME,IDM_PIC,13,13,20,20 - PUSHBUTTON "CP",IDC_BUTTON1,119,7,50,14,0,WS_EX_STATICEDGE -END - -IDD_NOXSTRING_DIALOG DIALOGEX 0, 0, 320, 257 -STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_MINIMIZEBOX | WS_POPUP | - WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_APPWINDOW -FONT 8, "MS Sans Serif" -BEGIN - CONTROL "Ready",IDC_STATUS,"Static",SS_LEFTNOWORDWRAP | - SS_SUNKEN | WS_GROUP,13,186,291,11,0,HIDC_STATUS - CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",PBS_SMOOTH | - WS_BORDER,13,174,263,9,0,HIDC_PROGRESS1 - GROUPBOX "",IDC_STATIC,7,7,306,243 - PUSHBUTTON "&Reload",IDC_RELOAD,19,24,48,15 - CONTROL "",IDC_LOG,"RICHEDIT",ES_MULTILINE | ES_AUTOVSCROLL | - ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | ES_NUMBER | - WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,13,75,291,95, - WS_EX_STATICEDGE - PUSHBUTTON "&DBs",IDC_VIEWDBS,19,54,26,15 - GROUPBOX "DataBase",IDC_STATIC,14,15,169,27 - PUSHBUTTON "&Update",IDC_UPDATE,74,24,48,15 - PUSHBUTTON "&Save",IDC_SAVE,129,24,48,15 - GROUPBOX "View",IDC_STATIC,13,45,88,27 - PUSHBUTTON "E&xport",IDC_EXPORT,196,24,48,15 - PUSHBUTTON "&Import",IDC_IMPORT,251,24,48,15 - PUSHBUTTON "&Generate New Game Files",IDC_GENERATE,13,228,291,17,0, - WS_EX_STATICEDGE - PUSHBUTTON "&Warnings",IDC_WARNINGS,221,54,41,15 - PUSHBUTTON "&Changes",IDC_CHANGES,50,54,43,15 - PUSHBUTTON "&Errors",IDC_ERRORS,267,54,32,15 - GROUPBOX "Translations",IDC_STATIC,189,15,115,27 - RTEXT "100% ",IDC_PERCENT,280,174,24,9,SS_CENTERIMAGE | - SS_SUNKEN - GROUPBOX "Generals.Str",IDC_STATIC,215,45,89,27 - PUSHBUTTON "Dialo&g",IDC_DIALOG,212,208,40,15 - PUSHBUTTON "Report",IDC_REPORTS,145,54,49,15 - GROUPBOX "Verify",IDC_STATIC,13,198,291,28 - COMBOBOX IDC_COMBOLANG,75,209,125,88,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Text",IDC_TRANSLATIONS,259,208,40,15 - GROUPBOX "Create",IDC_STATIC,137,45,65,27 - PUSHBUTTON "Reset",IDC_RESET,18,208,44,15,0,WS_EX_CLIENTEDGE - PUSHBUTTON "Sent",IDC_SENT,105,52,24,15 -END - -IDD_VIEWDBS DIALOG DISCARDABLE 0, 0, 361, 173 -STYLE DS_MODALFRAME | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | - WS_SYSMENU -CAPTION "View Internal Databases" -FONT 8, "MS Sans Serif" -BEGIN - GROUPBOX "",IDC_STATIC,7,7,347,159 - CONTROL "Tree1",IDC_TREEVIEW,"SysTreeView32",TVS_HASBUTTONS | - TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, - 13,16,334,143 -END - -IDD_EXPORT DIALOGEX 0, 0, 277, 117 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Export Translations" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - PUSHBUTTON "&Export",IDOK,170,56,94,20,0,WS_EX_STATICEDGE - DEFPUSHBUTTON "&Cancel",IDCANCEL,170,83,94,14,0,WS_EX_STATICEDGE - COMBOBOX IDC_COMBOLANG,175,18,89,92,CBS_DROPDOWN | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - GROUPBOX "",IDC_STATIC,7,7,263,103 - GROUPBOX "Include",IDC_STATIC,14,14,123,22 - CONTROL "Translations",IDC_CHECKTRANS,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,22,23,84,13 - CONTROL "&All strings",IDC_RADIOALL,"Button",BS_AUTORADIOBUTTON, - 24,66,45,10 - CONTROL "C&hanges only",IDC_RADIOCHANGES,"Button", - BS_AUTORADIOBUTTON,24,54,59,10 - GROUPBOX "Export",IDC_STATIC,14,42,124,62 - EDITTEXT IDC_FILENAME,184,35,80,13,ES_AUTOHSCROLL - LTEXT "Filename:",IDC_STATIC,150,37,31,8 - LTEXT "Language:",IDC_STATIC,140,20,35,8 - CONTROL "&Sample",IDC_RADIOSAMPLE,"Button",BS_AUTORADIOBUTTON,85, - 78,39,10 - CONTROL "&Dialog only",IDC_RADIODIALOG,"Button", - BS_AUTORADIOBUTTON,85,66,51,10 - CONTROL "&Non dialog",IDC_RADIONONDIALOG,"Button", - BS_AUTORADIOBUTTON,85,54,50,10 - CONTROL "&Unverified dialog",IDC_RADIOUNVERIFIED,"Button", - BS_AUTORADIOBUTTON,24,90,67,10 - CONTROL "&Missing dialog",IDC_RADIOMISSING,"Button", - BS_AUTORADIOBUTTON,24,78,58,10 - CONTROL "Unsen&t",IDC_RADIOUNSENT,"Button",BS_AUTORADIOBUTTON,93, - 90,39,10 -END - -IDD_GENERATE DIALOGEX 0, 0, 249, 185 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Generate Game Files" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "Generate Files",IDOK,139,124,97,25,0,WS_EX_STATICEDGE - DEFPUSHBUTTON "Cancel",IDCANCEL,139,154,97,14,0,WS_EX_STATICEDGE - GROUPBOX "",IDC_STATIC,7,7,235,171 - PUSHBUTTON "&Invert",IDC_INVERT,19,149,47,13,0,WS_EX_STATICEDGE - PUSHBUTTON "Select &All",IDC_SELECTALL,78,149,43,13,0, - WS_EX_STATICEDGE - CONTROL "CSF Format",IDC_UNICODE,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,145,25,53,10 - CONTROL """.str"" Format",IDC_NOXSTR,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,145,36,55,10 - GROUPBOX "Languages",IDC_STATIC,13,14,118,153 - EDITTEXT IDC_PREFIX,170,49,52,12,ES_AUTOHSCROLL - GROUPBOX "File Options",IDC_STATIC,139,14,97,67 - LTEXT "Prefix:",IDC_STATIC,146,52,20,8 - CONTROL "Static",IDC_FILENAME,"Static",SS_LEFTNOWORDWRAP | - SS_SUNKEN | WS_GROUP,145,65,85,11 - LISTBOX IDC_LANGUAGE,19,25,102,117,LBS_SORT | LBS_MULTIPLESEL | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - CONTROL "Show string IDs",IDC_IDS,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,145,95,88,10 - CONTROL "Show orignal text",IDC_ORIGINAL,"Button", - BS_AUTORADIOBUTTON | WS_GROUP,145,105,70,10 - GROUPBOX "For missing translations",IDC_STATIC,139,85,97,34 -END - -IDD_SETTINGS DIALOGEX 0, 0, 270, 157 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Settings" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - DEFPUSHBUTTON "OK",IDOK,194,126,50,14 - PUSHBUTTON "Cancel",IDCANCEL,17,127,50,14 - GROUPBOX "",IDC_STATIC,7,7,256,143 - EDITTEXT IDC_EDIT1,97,25,90,12,ES_AUTOHSCROLL - LTEXT "Static",IDC_STATIC,27,26,59,8 - PUSHBUTTON "File...",IDC_BUTTON1,191,25,50,14,0,WS_EX_STATICEDGE -END - -IDD_MATCHDIALOG DIALOGEX 0, 0, 340, 213 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Verify Dialog" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - PUSHBUTTON "Matches",IDOK,196,176,131,24,0,WS_EX_STATICEDGE - DEFPUSHBUTTON "Stop Verifying",IDCANCEL,13,175,56,25,0, - WS_EX_STATICEDGE - GROUPBOX "",IDC_WAVENAME,7,7,326,199 - GROUPBOX "Text",IDC_TEXT_TITLE,14,19,313,137 - LTEXT "",IDC_TEXT,19,30,302,121,SS_SUNKEN - CONTROL "Slider1",IDC_SLIDER,"msctls_trackbar32",TBS_BOTH | - TBS_NOTICKS | WS_TABSTOP,14,161,266,11,WS_EX_STATICEDGE - CONTROL "IDB_STOP",IDC_STOP,"Button",BS_OWNERDRAW | BS_BITMAP | - WS_TABSTOP,284,162,11,8 - CONTROL "IDB_PAUSE",IDC_PAUSE,"Button",BS_OWNERDRAW | BS_BITMAP | - WS_TABSTOP,300,162,11,8 - CONTROL "IDB_PLAY",IDC_PLAY,"Button",BS_OWNERDRAW | BS_BITMAP | - WS_TABSTOP,316,162,11,8 - PUSHBUTTON "Does not match",IDC_NOMATCH,81,182,68,18,0, - WS_EX_STATICEDGE -END - -IDD_PROCEED DIALOG DISCARDABLE 0, 0, 250, 118 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Proceed?" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "&Yes",IDC_YES,26,90,50,14 - LTEXT "",IDC_MESSAGE,15,18,220,66 - PUSHBUTTON "Yes &Always",IDC_ALWAYS,98,90,50,14 - PUSHBUTTON "&No",IDC_BUTTON_NO,170,90,50,14 -END - -IDD_MATCH DIALOGEX 0, 0, 423, 183 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Retranslate changed text?" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - DEFPUSHBUTTON "Skip &All",IDCANCEL,13,142,53,28,0,WS_EX_STATICEDGE - GROUPBOX "",IDC_STATIC,7,7,409,169 - GROUPBOX "Unmatched Text",IDC_STATIC,13,19,193,118 - GROUPBOX "Current Match",IDC_STATIC,211,19,193,151 - PUSHBUTTON "&No Match",IDC_NOMATCH,69,142,53,14,0,WS_EX_STATICEDGE - COMBOBOX IDC_MATCHCOMBO,222,152,174,58,CBS_DROPDOWNLIST | - CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP, - WS_EX_STATICEDGE - PUSHBUTTON "&Match",IDC_MATCH,135,156,70,14,0,WS_EX_STATICEDGE - LTEXT "",IDC_NEWTEXT,21,33,174,95,SS_SUNKEN - LTEXT "",IDC_MATCHTEXT,223,33,174,95,SS_SUNKEN - LTEXT "Possible Matches",IDC_STATIC,223,140,159,10 - CONTROL "Re-translate",IDC_CHECKRETRANSLATE,"Button", - BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,149,143,54,10 - PUSHBUTTON "&Skip",IDC_SKIP,69,158,53,12,0,WS_EX_STATICEDGE -END - -IDD_VERIFYTEXT DIALOGEX 0, 0, 420, 226 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Translated text mismatch" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - GROUPBOX "",IDC_STATIC,7,7,406,212 - GROUPBOX "Translated Text",IDC_STATIC,13,19,191,193 - GROUPBOX "Database Text",IDC_STATIC,215,19,189,172 - DEFPUSHBUTTON "&Doesn't Match",IDC_NOMATCH,21,191,70,15,0, - WS_EX_STATICEDGE - PUSHBUTTON "&Matches",IDC_MATCH,125,191,70,15,0,WS_EX_STATICEDGE - LTEXT "",IDC_TRANS,21,33,174,151,SS_SUNKEN - LTEXT "",IDC_ORIG,223,33,174,151,SS_SUNKEN - LTEXT "Do the CONTENTS of the above text match? (i.e. apart from gramatical or spelling differences, are they the same?)", - IDC_STATIC,215,194,189,18 -END - -IDD_CREATE_REPORTS DIALOGEX 0, 0, 249, 185 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Create Report" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - PUSHBUTTON "Create &Report",IDOK,139,124,97,25,0,WS_EX_STATICEDGE - DEFPUSHBUTTON "&Cancel",IDCANCEL,139,154,97,14,0,WS_EX_STATICEDGE - GROUPBOX "",IDC_STATIC,7,7,235,171 - PUSHBUTTON "&Invert",IDC_INVERT,19,149,47,13,0,WS_EX_STATICEDGE - PUSHBUTTON "Select &All",IDC_SELECTALL,78,149,43,13,0, - WS_EX_STATICEDGE - GROUPBOX "Languages",IDC_STATIC,13,14,118,153 - LISTBOX IDC_LANGUAGE,20,25,102,117,LBS_SORT | LBS_MULTIPLESEL | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Report",IDC_STATIC,139,14,97,104 - CONTROL "&Translation status",IDC_TRANSLATION_STATUS,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,145,26,87,10 - CONTROL "&Dialog status",IDC_DIALOG_STATUS,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,145,36,87,10 - CONTROL "&Show details",IDC_SHOW_DETAILS,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,145,46,87,10 - EDITTEXT IDC_LIMIT,167,68,17,12,ES_AUTOHSCROLL | ES_WANTRETURN | - ES_NUMBER - LTEXT "items",IDC_ITEMS,187,70,17,8 - CONTROL "If less than",IDC_IFLESS,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,157,57,50,10 -END - -IDD_CHARSET DIALOG DISCARDABLE 0, 0, 186, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Dialog" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,129,7,50,14 - PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14 -END - -IDD_RETRANSLATE DIALOGEX 0, 0, 423, 183 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Resolve Umatched Text" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - DEFPUSHBUTTON "Skip &All changes",IDCANCEL,13,142,73,28,0, - WS_EX_STATICEDGE - GROUPBOX "",-1,7,7,409,169 - GROUPBOX "New text",-1,13,19,193,118 - GROUPBOX "Old Text",-1,211,19,193,118 - PUSHBUTTON "&No need to Retranslate",IDC_NOMATCH,111,149,95,14,0, - WS_EX_STATICEDGE - PUSHBUTTON "Requires &Retranslation",IDC_MATCH,309,146,95,20,0, - WS_EX_STATICEDGE - LTEXT "",IDC_NEWTEXT,21,33,174,95,SS_SUNKEN - LTEXT "",IDC_OLDTEXT,223,33,174,95,SS_SUNKEN - PUSHBUTTON "&Skip",IDC_SKIP,231,149,53,14,0,WS_EX_STATICEDGE -END - - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "\0" - VALUE "FileDescription", "noxstring MFC Application\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "noxstring\0" - VALUE "LegalCopyright", "Copyright (C) 1999\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "noxstring.EXE\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "noxstring Application\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_ABOUTBOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 228 - TOPMARGIN, 7 - BOTTOMMARGIN, 48 - END - - IDD_NOXSTRING_DIALOG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 313 - TOPMARGIN, 7 - BOTTOMMARGIN, 250 - END - - IDD_VIEWDBS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 354 - TOPMARGIN, 7 - BOTTOMMARGIN, 166 - END - - IDD_EXPORT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 270 - TOPMARGIN, 7 - BOTTOMMARGIN, 110 - END - - IDD_GENERATE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 242 - TOPMARGIN, 7 - BOTTOMMARGIN, 178 - END - - IDD_SETTINGS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 263 - TOPMARGIN, 7 - BOTTOMMARGIN, 150 - END - - IDD_MATCHDIALOG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 333 - TOPMARGIN, 7 - BOTTOMMARGIN, 206 - END - - IDD_PROCEED, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 243 - TOPMARGIN, 7 - BOTTOMMARGIN, 111 - END - - IDD_MATCH, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 416 - TOPMARGIN, 7 - BOTTOMMARGIN, 176 - END - - IDD_VERIFYTEXT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 413 - TOPMARGIN, 7 - BOTTOMMARGIN, 219 - END - - IDD_CREATE_REPORTS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 242 - TOPMARGIN, 7 - BOTTOMMARGIN, 178 - END - - IDD_CHARSET, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 88 - END - - IDD_RETRANSLATE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 416 - TOPMARGIN, 7 - BOTTOMMARGIN, 176 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_STOPU BITMAP DISCARDABLE "res\\stop.bmp" -IDB_STOPD BITMAP DISCARDABLE "res\\bitmap1.bmp" -IDB_PLAYU BITMAP DISCARDABLE "res\\playu.bmp" -IDB_PLAYD BITMAP DISCARDABLE "res\\playd.bmp" -IDB_PAUSEU BITMAP DISCARDABLE "res\\pause.bmp" -IDB_PAUSED BITMAP DISCARDABLE "res\\paused.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE DISCARDABLE -BEGIN - IDP_OLE_INIT_FAILED "OLE initialization failed. Make sure that the OLE libraries are the correct version." - IDS_ABOUTBOX "&About Babylon..." -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif //_WIN32 -#include "res\noxstring.rc2" // non-Microsoft Visual C++ edited resources -#include "afxres.rc" // Standard components -#endif - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Generals/Code/Tools/Babylon/noxstring.reg b/Generals/Code/Tools/Babylon/noxstring.reg deleted file mode 100644 index 14b7c037748..00000000000 --- a/Generals/Code/Tools/Babylon/noxstring.reg +++ /dev/null @@ -1,13 +0,0 @@ -REGEDIT -; This .REG file may be used by your SETUP program. -; If a SETUP program is not available, the entries below will be -; registered in your InitInstance automatically with a call to -; CWinApp::RegisterShellFileTypes and COleObjectFactory::UpdateRegistryAll. - - -HKEY_CLASSES_ROOT\Noxstring.Application = Noxstring Application -HKEY_CLASSES_ROOT\Noxstring.Application\CLSID = {2BF31246-3BA1-11D3-B9DA-006097B90D93} - -HKEY_CLASSES_ROOT\CLSID\{2BF31246-3BA1-11D3-B9DA-006097B90D93} = Noxstring Application -HKEY_CLASSES_ROOT\CLSID\{2BF31246-3BA1-11D3-B9DA-006097B90D93}\ProgId = Noxstring.Application -HKEY_CLASSES_ROOT\CLSID\{2BF31246-3BA1-11D3-B9DA-006097B90D93}\LocalServer32 = NOXSTRING.EXE diff --git a/Generals/Code/Tools/Babylon/noxstringDlg.cpp b/Generals/Code/Tools/Babylon/noxstringDlg.cpp deleted file mode 100644 index aedc8c261f9..00000000000 --- a/Generals/Code/Tools/Babylon/noxstringDlg.cpp +++ /dev/null @@ -1,2578 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - - -// noxstringDlg.cpp : implementation file -// - -#include "StdAfx.h" -#include "noxstring.h" -#include "noxstringDlg.h" -#include "VIEWDBSII.h" -#include "VerifyDlg.h" -#include "ExportDlg.h" -#include "Report.h" -#include "MatchDlg.h" -#include "RetranslateDlg.h" -#include "GenerateDlg.h" -#include "DlgProxy.h" -#include "XLStuff.h" -#include "fileops.h" -#include -#include "iff.h" -#include "loadsave.h" -#include "expimp.h" -#include "ProceedDlg.h" -#include "transcs.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -static char buffer[100*1024]; -static char buffer2[100*1024]; -static char buffer3[100*1024]; -static const int INCREMENTS = 100; -static const int MAX_INFO_LEN = 2*1024; -static int found_error; -static int cb_count; -static CNoxstringDlg *mainDlg; - -static void print_to_log ( const char *text ) -{ - if ( !found_error ) - { - mainDlg->Log ("FAILED", SAME_LINE ); - found_error = TRUE; - } - - sprintf ( buffer, "String %s", text); - mainDlg->Log ( buffer ); - - -} - -static void print_to_log_and_update_progress ( const char *text ) -{ - print_to_log ( text ); - cb_count++; - mainDlg->SetProgress ( cb_count ); -} - -static void cb_progress ( void ) -{ - cb_count++; - mainDlg->SetProgress ( cb_count ); - -} - -typedef struct -{ - char comment[MAX_INFO_LEN+1]; - char context[MAX_INFO_LEN+1]; - char speaker[MAX_INFO_LEN+1]; - char listener[MAX_INFO_LEN+1]; - char wave[MAX_INFO_LEN+1]; - int maxlen; - -} INFO; - -static INFO global_info; -static INFO local_info; - -static void init_info ( INFO *info ) -{ - info->comment[0] = 0; - info->context[0] = 0; - info->speaker[0] = 0; - info->listener[0] = 0; - info->wave[0] = 0; - info->maxlen = 0; -} - -static int progress_count; - -static void progress_cb ( void ) -{ - progress_count++; - if ( MainDLG ) - { - MainDLG->SetProgress ( progress_count ); - } -} - - -static void removeLeadingAndTrailing ( char *buffer ) -{ - char *first, *ptr; - char ch; - - ptr = first = buffer; - - while ( (ch = *first) && iswspace ( ch )) - { - first++; - } - - while ( *ptr++ = *first++ ); - - ptr -= 2;; - - while ( (ptr > buffer) && (ch = *ptr) && iswspace ( ch ) ) - { - ptr--; - } - - ptr++; - *ptr = 0; -} - -///////////////////////////////////////////////////////////////////////////// -// CAboutDlg dialog used for App About - -class CAboutDlg : public CDialog -{ -public: - CAboutDlg(); - -// Dialog Data - //{{AFX_DATA(CAboutDlg) - enum { IDD = IDD_ABOUTBOX }; - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CAboutDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - //{{AFX_MSG(CAboutDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnButton1(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) -{ - //{{AFX_DATA_INIT(CAboutDlg) - //}}AFX_DATA_INIT -} - -void CAboutDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CAboutDlg) - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) - //{{AFX_MSG_MAP(CAboutDlg) - ON_BN_CLICKED(IDC_BUTTON1, OnButton1) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CNoxstringDlg dialog - -IMPLEMENT_DYNAMIC(CNoxstringDlg, CDialog); - -CNoxstringDlg::CNoxstringDlg(CWnd* pParent /*=NULL*/) - : CDialog(CNoxstringDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CNoxstringDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT - // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 - m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); - m_pAutoProxy = NULL; -} - -CNoxstringDlg::~CNoxstringDlg() -{ - // If there is an automation proxy for this dialog, set - // its back pointer to this dialog to NULL, so it knows - // the dialog has been deleted. - if (m_pAutoProxy != NULL) - m_pAutoProxy->m_pDialog = NULL; - -} - -void CNoxstringDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CNoxstringDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CNoxstringDlg, CDialog) - //{{AFX_MSG_MAP(CNoxstringDlg) - ON_WM_SYSCOMMAND() - ON_WM_PAINT() - ON_WM_QUERYDRAGICON() - ON_WM_CLOSE() - ON_WM_DROPFILES() - ON_BN_CLICKED(IDC_VIEWDBS, OnViewdbs) - ON_BN_CLICKED(IDC_RELOAD, OnReload) - ON_BN_CLICKED(IDC_UPDATE, OnUpdate) - ON_BN_CLICKED(IDC_SAVE, OnSave) - ON_BN_CLICKED(IDC_WARNINGS, OnWarnings) - ON_BN_CLICKED(IDC_ERRORS, OnErrors) - ON_BN_CLICKED(IDC_CHANGES, OnChanges) - ON_BN_CLICKED(IDC_EXPORT, OnExport) - ON_BN_CLICKED(IDC_IMPORT, OnImport) - ON_BN_CLICKED(IDC_GENERATE, OnGenerate) - ON_BN_CLICKED(IDC_DIALOG, OnVerifyDialog) - ON_BN_CLICKED(IDC_TRANSLATIONS, OnTranslations) - ON_CBN_SELCHANGE(IDC_COMBOLANG, OnSelchangeCombolang) - ON_BN_CLICKED(IDC_REPORTS, OnReports) - ON_CBN_DBLCLK(IDC_COMBOLANG, OnDblclkCombolang) - ON_BN_CLICKED(IDC_RESET, OnReset) - ON_BN_CLICKED(IDC_SENT, OnSent) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CNoxstringDlg message handlers - -BOOL CNoxstringDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - // Add "About..." menu item to system menu. - - // IDM_ABOUTBOX must be in the system command range. - ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); - ASSERT(IDM_ABOUTBOX < 0xF000); - - CMenu* pSysMenu = GetSystemMenu(FALSE); - if (pSysMenu != NULL) - { - CString strAboutMenu; - strAboutMenu.LoadString(IDS_ABOUTBOX); - if (!strAboutMenu.IsEmpty()) - { - pSysMenu->AppendMenu(MF_SEPARATOR); - pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); - } - } - - // Set the icon for this dialog. The framework does this automatically - // when the application's main window is not a dialog - SetIcon(m_hIcon, TRUE); // Set big icon - SetIcon(m_hIcon, FALSE); // Set small icon - - // TODO: Add extra initialization here - progress = (CProgressCtrl *) GetDlgItem ( IDC_PROGRESS1 ); - percent = (CStatic *) GetDlgItem ( IDC_PERCENT ); - SetWindowText ( AppTitle ); - Log ( AppTitle ); - { - char buffer[100]; - char date[50]; - char time[50]; - _strtime ( time ); - _strdate ( date ); - sprintf ( buffer, "Session Date: %s %s\n", date, time); - Log ( buffer ); - } - - Status ("Initializing dialog"); - operate_always = FALSE; - combo = ( CComboBox *)GetDlgItem ( IDC_COMBOLANG ); - - int index = 0; - int lang_index = 0; - LANGINFO *info; - while ( (info = GetLangInfo ( lang_index )) ) - { - combo->InsertString ( index, info->name ); - combo->SetItemDataPtr ( index, info ); - index++; - lang_index++; - } - max_index = index; - combo->SetCurSel ( 0 ); - - // do any initialization -#if 0 - // initialize audio - if ( !AIL_quick_startup ( TRUE, FALSE, 22050, 16, 2 ) ) - { - sprintf ( buffer, "Falied to init audio.\n\nReason:%s\n", AIL_last_error ()); - AfxMessageBox ( buffer ); - - } - else - { - onexit ( (_onexit_t ) AIL_quick_shutdown ); - } -#endif - - - Ready();; - - PostMessage ( WM_COMMAND, MAKEWPARAM ( IDC_RELOAD, BN_CLICKED )); - - return TRUE; // return TRUE unless you set the focus to a control -} - -void CNoxstringDlg::OnSysCommand(UINT nID, LPARAM lParam) -{ - if ((nID & 0xFFF0) == IDM_ABOUTBOX) - { - CAboutDlg dlgAbout; - dlgAbout.DoModal(); - } - else - { - CDialog::OnSysCommand(nID, lParam); - } -} - -// If you add a minimize button to your dialog, you will need the code below -// to draw the icon. For MFC applications using the document/view model, -// this is automatically done for you by the framework. - -void CNoxstringDlg::OnPaint() -{ - if (IsIconic()) - { - CPaintDC dc(this); // device context for painting - - SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); - - // Center icon in client rectangle - int cxIcon = GetSystemMetrics(SM_CXICON); - int cyIcon = GetSystemMetrics(SM_CYICON); - CRect rect; - GetClientRect(&rect); - int x = (rect.Width() - cxIcon + 1) / 2; - int y = (rect.Height() - cyIcon + 1) / 2; - - // Draw the icon - dc.DrawIcon(x, y, m_hIcon); - } - else - { - CDialog::OnPaint(); - } -} - -// The system calls this to obtain the cursor to display while the user drags -// the minimized window. -HCURSOR CNoxstringDlg::OnQueryDragIcon() -{ - return (HCURSOR) m_hIcon; -} - -// Automation servers should not exit when a user closes the UI -// if a controller still holds on to one of its objects. These -// message handlers make sure that if the proxy is still in use, -// then the UI is hidden but the dialog remains around if it -// is dismissed. - -void CNoxstringDlg::OnClose() -{ - if (CanExit()) - { - if ( !CanProceed ()) - { - return ; - } - - CDialog::OnOK(); - if ( !SaveLog () ) - { - AfxMessageBox ("Failed to save log!\n\nMake sure babylon.log is writable"); - } - } - -} - -//DEL void CNoxstringDlg::OnOK() -//DEL { -//DEL if (CanExit()) -//DEL CDialog::OnOK(); -//DEL } - -//DEL void CNoxstringDlg::OnCancel() -//DEL { -//DEL if (CanExit()) -//DEL CDialog::OnCancel(); -//DEL } - -BOOL CNoxstringDlg::CanExit() -{ - // If the proxy object is still around, then the automation - // controller is still holding on to this application. Leave - // the dialog around, but hide its UI. - if (m_pAutoProxy != NULL) - { - ShowWindow(SW_HIDE); - return FALSE; - } - - return TRUE; -} - -//DEL void CNoxstringDlg::OnBrowse() -//DEL { -//DEL static char szFilter[] = "XL Files (*.XLS)\0*.xls\0\0\0"; -//DEL -//DEL // TODO: Add your control notification handler code here -//DEL CFileDialog *dlg = new CFileDialog ( TRUE, "xls", "*.xls", OFN_FILEMUSTEXIST, szFilter, this ); -//DEL if ( dlg ) -//DEL { -//DEL dlg->DoModal (); -//DEL if ( dlg->GetPathName() != "*.xls" ) -//DEL { -//DEL SelectFile ( LPCTSTR ( dlg->GetPathName() )); -//DEL } -//DEL else -//DEL { -//DEL SelectFile ( NULL ); -//DEL } -//DEL delete dlg; -//DEL } -//DEL } - -//DEL void CNoxstringDlg::OnChangeXlFilename() -//DEL { -//DEL // TODO: If this is a RICHEDIT control, the control will not -//DEL // send this notification unless you override the CDialog::OnInitDialog() -//DEL // function and call CRichEditCtrl().SetEventMask() -//DEL // with the ENM_CHANGE flag ORed into the mask. -//DEL -//DEL // TODO: Add your control notification handler code here -//DEL -//DEL } - -void CNoxstringDlg::OnExport() -{ - if ( CanOperate ()) - { - CExportDlg dlg; - - if ( dlg.DoModal () == IDOK ) - { - ExportTranslations ( MainDB, dlg.Filename (), dlg.Language(), dlg.Options(), this ); - } - } -} - -BOOL CAboutDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - // TODO: Add extra initialization here - - char string[200]; - - sprintf ( string, "Built: %s, %s", __DATE__, __TIME__ ); - SetDlgItemText ( IDC_BUILD, string ); - - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void CNoxstringDlg::OnDropFiles(HDROP hDropInfo) -{ - // TODO: Add your message handler code here and/or call default -// char buffer[1024]; -// -// if ( DragQueryFile(hDropInfo, 0, buffer, sizeof ( buffer )-1)) -// { -// -// if ( ConvertStrFile ( buffer ) ) -// { -// return; -// } -// -// if ( SelectFile ( buffer ) ) -// { -// OnExport (); -// } -// } -} - - -//DEL int CNoxstringDlg::SelectFile ( const char *buffer ) -//DEL { -//DEL char *p; -//DEL CWnd *wnd = GetDlgItem ( IDC_EXPORT ); -//DEL -//DEL if ( buffer && (p = strchr ( buffer, '.' )) && !stricmp ( p, ".xls")) -//DEL { -//DEL SetDlgItemText ( IDC_XLFILE, buffer ); -//DEL SetDlgItemText ( IDC_STATUS, "File selected: Click 'convert' to start process"); -//DEL wnd->EnableWindow ( TRUE ); -//DEL return TRUE; -//DEL } -//DEL if ( buffer ) -//DEL { -//DEL AfxMessageBox ("Must be an Excel file"); -//DEL } -//DEL wnd->EnableWindow ( FALSE ); -//DEL SetDlgItemText ( IDC_STATUS, "Select excel file..."); -//DEL SetDlgItemText ( IDC_XLFILE, "Browse or drop excel file to be convertered" ); -//DEL -//DEL return FALSE; -//DEL } - -//DEL int CNoxstringDlg::ConvertStrFile ( const char *buffer ) -//DEL { -//DEL char *p; -//DEL char filename[400]; -//DEL -//DEL if ( buffer && (p = strchr ( buffer, '.' )) && !stricmp ( p, ".str")) -//DEL { -//DEL ParseDB db; -//DEL SetDlgItemText ( IDC_XLFILE, buffer ); -//DEL EnableWindow ( FALSE ); -//DEL SetDlgItemText ( IDC_STATUS, "Parsing .str file"); -//DEL -//DEL if ( db.ParseStrFile ( buffer, this ) ) -//DEL { -//DEL SetDlgItemText ( IDC_STATUS, "Creating .xls file"); -//DEL strcpy ( filename, buffer ); -//DEL p = strchr ( filename, '.' ); -//DEL strcpy ( p, ".xls" ); -//DEL -//DEL if ( db.CreateXLFile ( filename, this ) ) -//DEL { -//DEL SetDlgItemText ( IDC_STATUS, "Created .xls file"); -//DEL } -//DEL else -//DEL { -//DEL SetDlgItemText ( IDC_STATUS, "Falied to create .xls file"); -//DEL } -//DEL -//DEL } -//DEL else -//DEL { -//DEL SetDlgItemText ( IDC_STATUS, "Failed to parse .str file"); -//DEL -//DEL } -//DEL -//DEL EnableWindow ( TRUE ); -//DEL return TRUE; -//DEL } -//DEL return FALSE; -//DEL } - -static int bytes_copied; -static int done_copy; -static int start_copy; -static LogFormat cpy_format; - -static DWORD CALLBACK streamin_cb ( DWORD dwCookie, LPBYTE pbBuff, LONG bytes, LONG *transfered ) -{ - char *src = (char *) dwCookie; - int count = 0; - - src += bytes_copied; - - if ( bytes && start_copy ) - { - if ( cpy_format == NEW_LINE ) - { - *pbBuff++ = '\n'; - count++; - bytes--; - } - start_copy = FALSE; - } - - - while ( bytes-- ) - { - if ( !*src ) - { - done_copy = TRUE; - break; - } - *pbBuff++ = *src++; - bytes_copied++; - count++; - } - *transfered = count; - return 0; -} - -static DWORD CALLBACK streamout_cb ( DWORD dwCookie, LPBYTE pbBuff, LONG bytes, LONG *transfered ) -{ - FILE *log = (FILE *) dwCookie; - int count = 0; - - *transfered = fwrite ( pbBuff, 1, bytes, log ); - return *transfered == -1; -} - -void CNoxstringDlg::Log( const char *string, LogFormat format) -{ - CRichEditCtrl *rec; - EDITSTREAM es; - int lines; - int end_pos; - - rec = (CRichEditCtrl*)GetDlgItem ( IDC_LOG ); - - lines = rec->GetLineCount ( ); - end_pos = rec->LineIndex ( lines ); - - rec->SetSel ( end_pos, end_pos ); - - - //rec->SetReadOnly ( FALSE ); - es.dwCookie = (DWORD) string; - es.dwError = 0; - es.pfnCallback = streamin_cb; - bytes_copied = 0; - done_copy = FALSE; - start_copy = TRUE; - cpy_format = format; - - rec->StreamIn ( SF_TEXT | SFF_SELECTION, es ); - //rec->SetReadOnly ( TRUE ); - lines = rec->GetLineCount ( ); - rec->LineScroll ( -lines, 0 ); - rec->LineScroll ( lines - 10, 0 ); -} - - -void CNoxstringDlg::Status( const char *string, int log ) -{ - char buffer[200]; - int max_len; - - if ( log ) - { - Log ( string ); - } - - max_len = sizeof ( buffer ) -1; - - strcpy ( buffer, "Status: "); - max_len -= strlen ( buffer ); - strncat ( buffer, string, max_len ); - - SetDlgItemText ( IDC_STATUS, buffer ); - -} - -int CNoxstringDlg::SaveLog() -{ - FILE *log = NULL; - EDITSTREAM es; - CRichEditCtrl *rec = (CRichEditCtrl *) GetDlgItem ( IDC_LOG ); - int ok = FALSE; - - - if ( ! (log = fopen ("babylon.log", "a+t" ))) - { - goto error; - } - - { - const char *buffer = "\nLOG START ******************\n\n"; - fwrite ( buffer, 1, strlen ( buffer ), log ); - } - - es.dwCookie = (DWORD) log; - es.dwError = 0; - es.pfnCallback = streamout_cb; - bytes_copied = 0; - done_copy = FALSE; - - rec->StreamOut ( SF_TEXT, es ); - if ( es.dwError ) - { - goto error; - } - - { - const char *buffer = "\nQuiting Babylon\n\nLOG END ******************\n\n"; - fwrite ( buffer, 1, strlen ( buffer ), log ); - } - - ok = TRUE; - -error: - - if ( log ) - { - fclose ( log ); - } - - - return ok; -} - -void CNoxstringDlg::OnViewdbs() -{ - // TODO: Add your control notification handler code here - VIEWDBSII dlg; - - ViewChanges = FALSE; - - dlg.DoModal (); - - -} - -static int readToEndOfQuote( FILE *file, char *in, char *out, char *wavefile, int maxBufLen, int in_comment ) -{ - int slash = FALSE; - int state = 0; - int line_start = FALSE; - char ch; - int new_lines = 0; - int ccount = 0; - - while ( maxBufLen ) - { - // get next char - - if ( in ) - { - if ( !(ch = *in++)) - { - in = NULL; // have exhausted the input buffer - ch = getc ( file ); - } - } - else - { - ch = getc ( file ); - } - - if ( ch == EOF ) - { - AfxMessageBox ( "Missing terminating quote"); - return new_lines; - } - - if ( ch == '\n' ) - { - line_start = TRUE; - if ( !in ) - { - new_lines++; - } - slash = FALSE; - ccount = 0; - ch = ' '; - } - else if ( line_start && ( ch == '/' || iswspace ( ch )) ) - { - continue; - } - else if ( ch == '\\' && !slash) - { - slash = TRUE; - } - else if ( ch == '\\' && slash) - { - slash = FALSE; - } - else if ( ch == '"' && !slash ) - { - break; // done - } - else - { - slash = FALSE; - } - - if ( iswspace ( ch )) - { - ch = ' '; - } - else - { - line_start = FALSE; - } - - *out++ = ch; - maxBufLen--; - } - - *out = 0; - - if ( !wavefile ) - { - return new_lines; - } - - int len = 0; - while ( TRUE ) - { - // get next char - - if ( in ) - { - if ( !(ch = *in++)) - { - in = NULL; // have exhausted the input buffer - ch = getc ( file ); - } - } - else - { - ch = getc ( file ); - } - - if ( ch == '\n' || ch == EOF ) - { - if ( !in ) - { - new_lines++; - } - break; - } - - switch ( state ) - { - - case 0: - if ( iswspace ( ch ) || ch == '=' ) - { - break; - } - - state = 1; - case 1: - if ( (( ch >= 'a' && ch <= 'z') || ( ch >= 'A' && ch <='Z') || (ch >= '0' && ch <= '9') || ch == '_') ) - { - *wavefile++ = ch; - len++; - break; - } - state = 2; - case 2: - break; - } - } - - *wavefile = 0; - if ( len ) - { - if ( ( ch = *(wavefile-1)) < '0' || ch > '9' ) - { - // remove last character - *(wavefile-1) = 0; - } - - } - - return new_lines; -} - -enum -{ - START, - TOKEN, - COLON, - ARG -}; - -static int getString ( FILE *file, char *in, char *out ) -{ - int bytes = MAX_INFO_LEN; - int new_lines = 0; - char ch; - char *ptr = out; - - { - - while ( (ch = *in++) && ch != '\n' && bytes ) - { - *ptr++ = ch; - bytes--; - } - } - - *ptr = 0; - - ConvertMetaChars ( out ); - StripSpaces ( out ); - return new_lines; -} - -static char *getToken ( char *buffer, char *token, int bytes ) -{ - char ch; - int state = START; - *token = 0; - - while ( (ch = *buffer) && ch != '\n' && bytes ) - { - switch ( state ) - { - case START: - if ( ch == '/' || iswspace ( ch )) - { - break; - } - state = TOKEN; - case TOKEN: - if ( !iswspace ( ch ) && ch !=':' ) - { - *token++ = ch; - bytes--; - break; - } - *token = 0; - state = COLON; - case COLON: - if ( ch != ':' ) - { - break; - } - state = ARG; - break; - case ARG: - if ( iswspace ( ch ) ) - { - break; - } - return buffer; - } - buffer++; - } - - *token = 0; - return buffer; - -} - -static int parseComment ( FILE *file, char *buffer, INFO *info ) -{ - char token[256]; - int new_lines = 0; - - buffer = getToken ( buffer, token, sizeof (token) -1 ); - - if ( !token ) - { - return new_lines; - } - - if ( !stricmp ( token, "COMMENT" ) ) - { - new_lines += getString ( file, buffer, info->comment ); - } - else if ( !stricmp ( token, "CONTEXT" ) ) - { - new_lines += getString ( file, buffer, info->context ); - } - else if ( !stricmp ( token, "SPEAKER" ) ) - { - new_lines += getString ( file, buffer, info->speaker ); - } - else if ( !stricmp ( token, "LISTENER" ) ) - { - new_lines += getString ( file, buffer, info->listener ); - } - else if ( !stricmp ( token, "MAXLEN" ) ) - { - info->maxlen = atoi ( buffer ); - } - else if ( !stricmp ( token, "WAVE" ) ) - { - new_lines += getString ( file, buffer, info->wave ); - } - - - return new_lines; -} - -static int getLabelCount( char *filename ) -{ - int count = 0; - FILE *fp; - - if ( ! ( fp = fopen ( filename, "rt" ))) - { - return 0; - } - - while(TRUE) - { - if( fscanf( fp, "%s", buffer ) == EOF ) - break; - - if ( !stricmp( buffer, "END" ) ) - { - count++; - } - } - - fclose ( fp ); - - return count; -} - -int CNoxstringDlg::LoadStrFile ( TransDB *db, const char *filename, void (*cb) ( void ) ) -{ - FILE *file = NULL; - NoxLabel *label = NULL; - int status = FALSE; - int line_number = 0; - int label_count = 0; - int text_dup_count = 0; - int label_dup_count = 0; - - init_info ( &global_info ); - - if ( !(file = fopen ( filename, "rt" ) )) - { - goto exit; - } - - while ( fgets ( buffer, sizeof(buffer)-1, file ) ) - { - - line_number++; - removeLeadingAndTrailing ( buffer ); - - if ( !buffer[0] || (buffer[0] == '/' && buffer[1] == '/') ) - { - line_number += parseComment ( file, buffer, &global_info ); - continue; - } - - label = new NoxLabel ( ); - label->SetName ( buffer ); - label->LockName (); - label->SetLineNumber ( line_number ); - db->AddLabel ( label ); - - local_info = global_info; - local_info.wave[0] = 0; // wave file name is only locally set - while( TRUE ) - { - if ( !fgets ( buffer, sizeof(buffer)-1, file )) - { - AfxMessageBox ( "Unexpected end of file" ); - goto exit; - } - - line_number++; - removeLeadingAndTrailing ( buffer ); - - if ( !stricmp ( buffer, "END" ) ) - { - break; - } - - if ( !buffer[0] || (buffer[0] == '/' && buffer[1] == '/') ) - { - line_number += parseComment ( file, buffer, &local_info ); - continue; - } - - if ( buffer[0] == '"' ) - { - int line = line_number; - strcat ( buffer, "\n" ); - line_number += readToEndOfQuote( file, &buffer[1], buffer2, buffer3, sizeof(buffer2)-1, FALSE ); - NoxText *text = new NoxText ( ); - text->Set ( buffer2 ); - text->FormatMetaString (); - text->LockText (); - if ( buffer3[0] ) - { - text->SetWave ( buffer3 ); - } - else - { - text->SetWave ( local_info.wave ); - } - text->SetLineNumber ( line ); - label->AddText ( text ); - - - } - } - - label->SetComment ( local_info.comment ); - label->SetContext ( local_info.context ); - label->SetSpeaker ( local_info.speaker ); - label->SetListener ( local_info.listener ); - label->SetMaxLen ( local_info.maxlen ); - - if ( cb ) - { - cb (); - } - label = NULL; - - } - status = TRUE; - - -exit: - - db->ClearChanges (); - - if ( label ) - { - delete label; - } - - if ( file ) - { - fclose ( file ); - } - - return status; - -} - -int CNoxstringDlg::CanProceed ( void ) -{ - - if ( MainDB->IsChanged ()) - { - -retry: - int result = AfxMessageBox ( "Main database has changed!\n\n Do you wish to save it before proceeding?", MB_YESNOCANCEL ); - - if ( result == IDCANCEL ) - { - return FALSE; - } - else if ( result == IDYES ) - { - if ( !SaveMainDB () ) - { - AfxMessageBox ("Save failed!\n\nCanceling operation"); - return FALSE; - } - } - else - { - int result = AfxMessageBox ( "Are you sure you don't want to save?\n\nAll current changes will be lost", MB_YESNO ); - if ( result == IDNO ) - { - goto retry; - } - } - } - - return TRUE; -} - - -int CNoxstringDlg::CanOperate ( void ) -{ - if ( operate_always ) - { - return TRUE; - } - - if ( NoxstrDB->IsChanged() || NoxstrDB->HasErrors () ) - { - const char *string = "Unknown problem!\n\n\nProceed anyway?"; - - if ( NoxstrDB->HasErrors ()) - { - string = "Generals.str has errors! As a result the translation database is not up to date!\n\nRecommend you fix problems in Nox.str before proceeding.\n\n\n\nDo you wish to continue anyway?"; - } - - if ( NoxstrDB->IsChanged ()) - { - string = "The translation database is not up to date! Generals.str has changed since the last time the database was updated.\n\nRecommend you update the database before proceeding.\n\n\n\nDo you wish to continue anyway?"; - } - - ProceedDlg dlg ( string ); - - int result = dlg.DoModal (); - - if ( result == IDALWAYS ) - { - operate_always = TRUE; - } - - return result != IDNO; - } - - return TRUE; -} - -void CNoxstringDlg::OnReload() -{ - int num_errors; - int num_warnings; - int count = 0; - int str_loaded = FALSE; - int db_loaded = FALSE; - int db_readonly = FALSE; - int db_error = FALSE; - int do_update = FALSE; - int errors; - CWnd *win; - - // TODO: Add your control notification handler code here - - if ( !CanProceed ()) - { - return; - } - NoxstrDB->Clear (); - NoxstrDB->ClearChanges (); - MainDB->Clear (); - MainDB->ClearChanges (); - - count += getLabelCount ( NoxstrFilename ); - count += GetLabelCountDB ( MainXLSFilename ); - progress_count = 0; - - win = GetDlgItem ( IDC_ERRORS ); - win->EnableWindow ( FALSE ); - win = GetDlgItem ( IDC_WARNINGS ); - win->EnableWindow ( FALSE ); - win = GetDlgItem ( IDC_UPDATE ); - win->EnableWindow ( TRUE); - win = GetDlgItem ( IDC_SAVE ); - win->EnableWindow ( TRUE); - win = GetDlgItem ( IDC_IMPORT ); - win->EnableWindow ( TRUE); - win = GetDlgItem ( IDC_EXPORT ); - win->EnableWindow ( TRUE); - - InitProgress ( count ); - Log ("" ); - - if ( FileExists ( NoxstrFilename )) - { - if ( (errors = ValidateStrFile ( NoxstrFilename )) ) - { - if ( errors == -1 ) - { - if ( AfxMessageBox ( "Unable to verify string file!\n\nMake sure \"strcheck.exe\" is in your path and \"strcheck.rst\" is writeable.\n\nDo you wish to continue loading? \n\nWarning: Any errors in the string file could cause inappropiate updates to the database.", MB_YESNO ) == IDYES ) - { - errors = 0; - } - } - else - { - sprintf ( buffer, "\"%s\" has %d formating error%s!\n\nFile will not be loaded.", NoxstrFilename, errors, errors == 1 ? "" : "s" ); - AfxMessageBox ( buffer ); - } - } - if ( !errors ) - { - sprintf ( buffer, "Loading \"%s\"...", NoxstrFilename ); - Status ( buffer ); - - if ( !(str_loaded = LoadStrFile ( NoxstrDB, NoxstrFilename, progress_cb )) ) - { - Log ( "FAILED", SAME_LINE ); - NoxstrDB->Clear (); - NoxstrDB->ClearChanges (); - } - } - else - { - sprintf ( buffer, "Loading \"%s\"...NOT LOADED", NoxstrFilename ); - Log ( buffer ); - } - } - else - { - sprintf ( buffer, "Loading \"%s\"...", NoxstrFilename ); - Status ( buffer ); - Log ( "FILE NOT FOUND", SAME_LINE ); - } - - if ( str_loaded ) - { - sprintf ( buffer, "Validating \"%s\"...", NoxstrFilename ); - Status ( buffer, FALSE ); - - if ( (num_errors = NoxstrDB->Errors ( ))) - { - sprintf ( buffer, "Generals.str has %d error(s):\n\nClick \"Errors\" for a detailed list.\n\nAll errors must be fixed before \"Update\" will be enabled.", num_errors ); - AfxMessageBox ( buffer ); - win = GetDlgItem ( IDC_UPDATE ); - win->EnableWindow ( FALSE); - win = GetDlgItem ( IDC_ERRORS ); - win->EnableWindow ( TRUE ); - } - - if ( (num_warnings = NoxstrDB->Warnings())) - { - win = GetDlgItem ( IDC_WARNINGS ); - win->EnableWindow ( TRUE ); - } - - if ( !num_errors && !num_warnings ) - { - Log ( "OK", SAME_LINE ); - } - else - { - sprintf ( buffer, "%d errors, %d warnings OK", num_errors, num_warnings ); - Log ( buffer, SAME_LINE ); - } - } - - sprintf ( buffer, "Loading \"%s\"...", MainXLSFilename ); - Status ( buffer ); - - if ( FileExists ( MainXLSFilename )) - { - if ( !(db_loaded = LoadMainDB ( MainDB, MainXLSFilename, progress_cb )) ) - { - Log ( "FAILED", SAME_LINE ); - MainDB->Clear (); - MainDB->ClearChanges (); - db_error = TRUE; - win = GetDlgItem ( IDC_UPDATE ); - win->EnableWindow ( FALSE); - win = GetDlgItem ( IDC_SAVE ); - win->EnableWindow ( FALSE); - win = GetDlgItem ( IDC_EXPORT ); - win->EnableWindow ( FALSE); - win = GetDlgItem ( IDC_IMPORT ); - win->EnableWindow ( FALSE); - } - else - { - if ( FileAttribs ( MainXLSFilename ) & FA_READONLY ) - { - AfxMessageBox ( "Database file is readonly!\n\nNo updates will be allowed.\n\nCheckout the database file and reload."); - db_readonly = TRUE; - win = GetDlgItem ( IDC_UPDATE ); - win->EnableWindow ( FALSE); - win = GetDlgItem ( IDC_SAVE ); - win->EnableWindow ( FALSE); - win = GetDlgItem ( IDC_IMPORT ); - win->EnableWindow ( FALSE); - Log ( "READONLY", SAME_LINE ); - } - else - { - Log ( "OK", SAME_LINE ); - } - } - } - else - { - Log ( "FILE NOT FOUND", SAME_LINE ); - } - - if ( str_loaded && !db_error && !num_errors ) - { - if ( UpdateDB ( NoxstrDB, MainDB, FALSE ) ) - { - NoxstrDB->Changed (); - if ( db_loaded ) - { - if ( db_readonly ) - { - sprintf ( buffer, "\"%s\" has changed!\n\nHowever, as the database is READ ONLY you cannot update the changes.", NoxstrFilename); - } - else - { - sprintf ( buffer, "\"%s\" has changed!\n\nRecomended that you update the database with these new changes.\n\nDo you wish to update now?", NoxstrFilename); - } - } - else - { - sprintf ( buffer, "New Database!\n\nRecomended that you update the new database.\n\nDo you wish to update now?", NoxstrFilename); - } - - if ( db_readonly ) - { - do_update = FALSE; - AfxMessageBox ( buffer ); - - } - else - { - do_update = (AfxMessageBox ( buffer, MB_YESNO ) == IDYES); - } - } - } - ProgressComplete (); - Ready (); - - if ( do_update ) - { - OnUpdate (); - } -} - -void CNoxstringDlg::InitProgress(int range) -{ - - if ( (progress_range = range) <= 0 ) - { - progress_range = 1; - } - - progress->SetRange ( 0, INCREMENTS ); - progress_pos = -1; - progress->SetPos ( 0 ); -} - -void CNoxstringDlg::SetProgress(int pos) -{ - char string[20]; - - int new_pos = (pos * 100 ) / progress_range; - - if ( new_pos > 100 ) - { - new_pos = 100; - } - else if ( new_pos < 0 ) - { - new_pos = 0; - } - - if ( new_pos == progress_pos ) - { - return; - } - - progress->SetPos ( new_pos ); - progress_pos = new_pos; - sprintf ( string, "%d%% ", progress_pos ); - percent->SetWindowText ( string ); - -} - -void CNoxstringDlg::ProgressComplete() -{ - progress->SetPos ( 100 ); - percent->SetWindowText ( "100% "); -} - -void CNoxstringDlg::OnUpdate() -{ - // TODO: Add your control notification handler code here - - UpdateDB ( NoxstrDB, MainDB ); - -} - -#define MACRO_UPDATE(field,count) { if ( wcsicmp ( source->##field () , destination->##field ())) \ - { \ - if ( update ) \ - { \ - destination->Set##field ( source->##field () ); \ - } \ - label_modified = TRUE; \ - info.changes++; \ - (count)++; \ - } \ - } - - -int CNoxstringDlg::UpdateLabel( NoxLabel *source, NoxLabel *destination, UPDATEINFO &info, int update, int skip ) -{ - NoxText *stext, *dtext; - ListSearch sh; - TransDB *destDB, *srcDB; - int label_modified = FALSE; - - destination->ClearMatched (); - source->ClearMatched (); - destDB = destination->DB(); - srcDB = source->DB (); - - // first go through and match up as many strings as possible - - stext = source->FirstText ( sh ); - - while ( stext ) - { - - dtext = destDB->FindText ( stext->Get ()); - - // remember FindText() spans labels so keep looking till we find - // one that belongs to the label we are checking - while ( dtext && (dtext->Label () != destination) ) - { - dtext = destDB->FindNextText (); - } - - if ( dtext && dtext->Matched ()) - { - AfxMessageBox ( "Fatal error: substring already matched" ); - return FALSE; - } - - if ( dtext ) - { - // we have a matching string so mark it - dtext->Match ( stext ); - stext->Match ( dtext ); - - } - - stext = source->NextText ( sh ); - } - - - // ask the user to resolve remaing unmatched strings - - { - - stext = source->FirstText ( sh ); - - while ( stext ) - { - if ( destination->AllMatched ()) - { - // no point trying to match anymore - break; - } - - if ( !stext->Matched () ) - { - int result; - NoxText *match = NULL; - - if ( update && !skip ) - { - if ( destination->DB()->MultiTextAllowed()) - { - result = MatchText ( stext, destination, &match ); - } - else - { - ListSearch tsh; - NoxText *oldtext = destination->FirstText ( tsh ); - if ( !oldtext ) - { - break; - } - result = RetranslateText ( stext, oldtext ); - match = oldtext; - } - } - else - { - result = IDSKIP; - } - - if ( result == IDCANCEL || result == IDSKIP) - { - return result; - } - - if ( match ) - { - stext->Match ( match ); - match->Match ( stext ); - } - stext->Processed (); - } - stext = source->NextText ( sh ); - } - } - - - // go through all matched strings and update them accordingly - - dtext = destination->FirstText ( sh ); - - while ( dtext ) - { - - if ( (stext = (NoxText *) dtext->Matched ()) ) - { - // stext is the newer version; - if ( wcscmp ( dtext->Get (), stext->Get ())) - { - if ( update ) - { - dtext->Set ( stext->Get ()); - } - info.modified_strings++; - label_modified = TRUE; - info.changes ++; - } - if ( wcsicmp ( dtext->Wave (), stext->Wave ())) - { - if ( update ) - { - dtext->SetWave ( stext->Wave ()); - } - info.updated_waves++; - label_modified = TRUE; - info.changes ++; - } - if ( dtext->Retranslate ()) - { - if ( update ) - { - dtext->IncRevision (); - } - label_modified = TRUE; - } - dtext->SetRetranslate ( FALSE ); - } - - dtext = destination->NextText ( sh ); - } - - - // any remaining umatched text in the source are new strings - // any remaining umatched text in the destination are now obsolete - - // delete old strings from destination - - dtext = destination->FirstText ( sh ); - - while ( dtext ) - { - NoxText *next = destination->NextText ( sh ); - - if ( !dtext->Matched ()) - { - if ( update ) - { - dtext->Remove (); - destDB->AddObsolete ( dtext ); - } - info.deleted_strings++; - label_modified = TRUE; - info.changes ++; - } - - dtext = next; - } - - // add new strings from source - - stext = source->FirstText ( sh ); - - while ( stext ) - { - - if ( !stext->Matched ()) - { - if ( update ) - { - dtext = stext->Clone (); - destination->AddText ( dtext ); - } - info.new_strings++; - label_modified = TRUE; - info.changes ++; - } - - stext = source->NextText ( sh ); - } - - // finally update label info - MACRO_UPDATE(Comment, info.updated_comments); - MACRO_UPDATE(Context, info.updated_contexts); - MACRO_UPDATE(Speaker, info.updated_speakers); - MACRO_UPDATE(Listener, info.updated_listeners); - - if ( destination->MaxLen () != source->MaxLen ()) - { - if ( update ) - { - destination->SetMaxLen ( source->MaxLen ()); - } - label_modified = TRUE; - info.updated_maxlen++; - info.changes ++; - } - - - if ( label_modified ) - { - if ( update ) - { - source->ClearChanges (); - } - else - { - source->Changed (); - } - - info.modified_labels ++; - } - - return IDOK; - -} - -int CNoxstringDlg::UpdateDB(TransDB *source, TransDB *destination, int update ) -{ - NoxLabel *slabel; - NoxLabel *dlabel; - ListSearch sh; - int count = 0; - int result = IDOK; - UPDATEINFO info; - int changes = FALSE; - int diffs = 0; - int skip_all = FALSE; - - memset ( &info, 0, sizeof ( info )); - if ( update ) - { - sprintf ( buffer, "Updating \"%s\" from \"%s\"...", destination->Name(), source->Name()); - Log(""); - Status ( buffer ); - } - else - { - Status ("Checking for changes...", FALSE ); - } - - source->ClearProcessed (); - destination->ClearProcessed (); - - if ( update ) - { - InitProgress ( source->NumLabels() ); - } - slabel = source->FirstLabel ( sh ); - - while ( slabel ) - { - if ( (dlabel = destination->FindLabel ( slabel->Name ()))) - { - dlabel->Processed (); - - result = UpdateLabel ( slabel, dlabel, info, update, skip_all ); - - if ( result == IDCANCEL ) - { - skip_all = TRUE; - } - - if ( result == IDOK ) - { - if ( update ) - { - slabel->ClearChanges (); - } - } - else - { - info.skipped_labels ++; - info.changes ++; - if ( !update ) - { - slabel->Changed(); - } - } - } - else - { - NoxLabel *clone; - - if ( update ) - { - clone = slabel->Clone (); - destination->AddLabel ( clone ); - clone->Processed (); - slabel->ClearChanges (); - } - else - { - slabel->Changed (); - } - info.new_strings += slabel->NumStrings (); - info.changes += slabel->NumStrings (); - info.new_labels++; - info.changes++; - } - - count++; - if ( update ) - { - SetProgress ( count ); - } - - slabel->Processed (); - slabel = source->NextLabel ( sh ); - } - - // go through all unprocessed labels in the destination database and remove them. - dlabel = destination->FirstLabel ( sh ); - - while ( dlabel ) - { - NoxLabel *next_label = destination->NextLabel ( sh ); - - if ( !dlabel->IsProcessed ()) - { - // this label was not matched so is obsolete - ListSearch sh_text; - NoxText *dtext = dlabel->FirstText ( sh_text); - - while ( dtext ) - { - NoxText *next = dlabel->NextText ( sh_text ); - - if ( update ) - { - dtext->Remove (); - destination->AddObsolete ( dtext ); - } - - info.deleted_strings++; - info.changes ++; - - dtext = next; - } - - if ( update ) - { - dlabel->Remove (); - delete dlabel; - } - - info.deleted_labels++; - } - - dlabel = next_label; - } - - - if ( update ) - { - if ( info.new_labels ) - { - sprintf ( buffer, "Added %d new label%c", info.new_labels, info.new_labels==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.deleted_labels ) - { - sprintf ( buffer, "Deleted %d label%c", info.deleted_labels, info.deleted_labels==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.modified_labels ) - { - sprintf ( buffer, "Modified %d label%c", info.modified_labels, info.modified_labels==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.new_strings ) - { - sprintf ( buffer, "Added %d new string%c", info.new_strings, info.new_strings==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.deleted_strings ) - { - sprintf ( buffer, "Deleted %d string%c", info.deleted_strings, info.deleted_strings==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.modified_strings ) - { - sprintf ( buffer, "Modified %d string%c", info.modified_strings, info.modified_strings==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.skipped_labels ) - { - sprintf ( buffer, "Skipped %d label%c", info.skipped_labels, info.skipped_labels==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.updated_comments ) - { - sprintf ( buffer, "Updated %d comment%c", info.updated_comments, info.updated_comments==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.updated_contexts ) - { - sprintf ( buffer, "Updated %d context%c", info.updated_contexts, info.updated_contexts==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.updated_speakers ) - { - sprintf ( buffer, "Updated %d speaker%c", info.updated_speakers, info.updated_speakers==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.updated_listeners ) - { - sprintf ( buffer, "Updated %d listener%c", info.updated_listeners, info.updated_listeners==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.updated_maxlen ) - { - sprintf ( buffer, "Updated %d max length%c", info.updated_maxlen, info.updated_maxlen==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( info.updated_waves ) - { - sprintf ( buffer, "Updated %d speech file%c", info.updated_waves, info.updated_waves==1?' ':'s' ); - Log ( buffer ); - changes = TRUE; - } - - if ( !changes ) - { - if ( !slabel && !info.skipped_labels) - { - Log ( "No differences found" ); - } - else - { - Log ( "No changes made" ); - } - } - - if ( result == IDCANCEL ) - { - Log ("Update aborted by user!" ); - InitProgress ( 100 ); - } - else - { - if ( !info.skipped_labels ) - { - source->ClearChanges (); - } - } - } // update - - - Ready (); - - return info.changes; -} - -void CNoxstringDlg::OnSave() -{ - - if ( CanOperate ()) - { - SaveMainDB ( ); - } -} - -int CNoxstringDlg::SaveMainDB( ) -{ - TransDB *db = MainDB; - const char *filename = MainXLSFilename; - int attribs; - - if ( !db ) - { - return TRUE; - } - - if ( !db->IsChanged ()) - { - return TRUE; - } - - attribs = FileAttribs ( filename ); - - if ( attribs & FA_READONLY ) - { - char buffer[100]; - sprintf ( buffer, "Cannot save changes!\n\nFile \"%s\" is read only", filename ); - AfxMessageBox ( buffer ); - sprintf ( buffer, "Cannot save to \"%s\". File is read only", filename ); - Log ( buffer ); - Status ("Save failed", FALSE ); - return FALSE; - } - - Log(""); - Status ( "Saving main database..." ); - - if ( attribs != FA_NOFILE ) - { - MakeBackupFile ( filename ); - } - - if ( !WriteMainDB ( db, filename, this ) ) - { - RestoreBackupFile ( filename ); - Log ("FAILED", SAME_LINE ); - Status ("Save failed", FALSE ); - return FALSE; - } - else - { - Log ("OK", SAME_LINE ); - } - - Ready(); - return TRUE; -} - - -void CNoxstringDlg::OnWarnings() -{ - // TODO: Add your control notification handler code here - if ( NoxstrDB ) - { - NoxstrDB->Warnings ( this ); - } - -} - - -void CNoxstringDlg::OnErrors() -{ - // TODO: Add your control notification handler code here - if ( NoxstrDB ) - { - NoxstrDB->Errors ( this ); - } -} - - -int CNoxstringDlg::MatchText ( NoxText *text, NoxLabel *label, NoxText **match ) -{ - CMatchDlg dlg; - int result; - - *match = NULL; - sprintf ( buffer, "Text: %s\n\nLabel:%s\n", text->GetSB (), label->NameSB () ); - - // TODO: Add your control notification handler code here - - MatchOriginalText = text; - MatchLabel = label; - - result = dlg.DoModal (); - - if ( result != IDCANCEL ) - { - *match = MatchingNoxText; - } - - return result; - -} - -int CNoxstringDlg::RetranslateText ( NoxText *newtext, NoxText *oldtext ) -{ - RetranslateDlg dlg; - int result; - - // TODO: Add your control notification handler code here - - dlg.newtext = newtext; - dlg.oldtext = oldtext; - - result = dlg.DoModal ( ); - - return result; - -} -void CNoxstringDlg::OnChanges() -{ - // TODO: Add your control notification handler code here - - VIEWDBSII dlg; - - ViewChanges = TRUE; - - dlg.DoModal (); - - - -} - -void CNoxstringDlg::OnImport() -{ - if ( CanOperate ()) - { - CFileDialog fd ( TRUE , NULL, "*.xls", OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR ); - - if ( fd.DoModal () == IDOK ) - { - if (ImportTranslations ( MainDB, (LPCSTR ) fd.GetPathName (), this ) == -1 ) - { -// ProcessWaves ( NoxstrDB, fd.GetPathName (), this ); - } - } - } -} - -void CNoxstringDlg::OnGenerate() -{ - if ( CanOperate ()) - { - CGenerateDlg dlg; - - if ( dlg.DoModal () == IDOK ) - { - GenerateGameFiles ( MainDB, dlg.FilePrefix(), dlg.Options(), dlg.Langauges(), this ); - } - } -} - -int CNoxstringDlg::ValidateStrFile( const char *filename) -{ - STARTUPINFO StartupInfo = { 0 }; - PROCESS_INFORMATION ProcessInfo; - const char *results = "strcheck.rst"; - int errors = 0; - FILE *file = NULL; - - StartupInfo.cb = sizeof(STARTUPINFO); - StartupInfo.dwFlags = STARTF_USESHOWWINDOW; - StartupInfo.wShowWindow = SW_SHOWMINNOACTIVE; - - Log (""); - sprintf ( buffer, "Verifying \"%s\"...", filename ); - Status ( buffer ); - if ( FileExists ( results )) - { - DeleteFile ( results ); - } - - sprintf ( buffer, "strcheck %s %s", filename, results ); - - if (!CreateProcess( - NULL, - buffer, - NULL, - NULL, - FALSE, - 0, - NULL, - NULL, - &StartupInfo, - &ProcessInfo)) - { - goto error; - } - - - WaitForSingleObject(ProcessInfo.hProcess, INFINITE); - - //this->SetForegroundWindow (); - //this->RedrawWindow (); - - if ( !(file = fopen ( results, "rt" ))) - { - goto error; - } - - while ( fgets ( buffer, sizeof(buffer), file ) ) - { - strlwr ( buffer ); - if ( strstr ( buffer, "error") || strstr ( buffer, "warning" )) - { - errors++; - } - } - - if ( errors ) - { - sprintf ( buffer, "%d ERROR%s", errors, errors == 1 ? "" : "S" ); - Log (buffer, SAME_LINE ); - fseek ( file, 0, SEEK_SET ); - while ( fgets ( buffer, sizeof(buffer), file ) ) - { - sprintf ( buffer2, " strcheck> %s", buffer ); - strlwr ( buffer ); - if ( strstr ( buffer2, "error") || strstr ( buffer, "warning" ) ) - { - int len = strlen ( buffer2 ); - - if ( buffer2[len-1] == '\n' ) - { - buffer2[len-1] = 0; - } - Log ( buffer2 ); - } - } - - - } - else - { - Log ("OK", SAME_LINE ); - } - - -done: - - if ( FileExists ( results )) - { - DeleteFile ( results ); - } - - if (file ) - { - fclose (file ); - } - - return errors; - -error: - Log ( "UNABLE TO VERIFY", SAME_LINE ); - errors = -1; - goto done; -} - -void CNoxstringDlg::OnVerifyDialog() -{ - if ( MainDB && CanOperate () ) - { - VerifyDialog ( MainDB, CurrentLanguage ); - } - -} - -void CNoxstringDlg::VerifyDialog( TransDB *db, LangID langid ) -{ - NoxLabel *label; - ListSearch sh_label; - int count = 0; - DLGREPORT _info; - DLGREPORT *info = &_info; - - Log (""); - - sprintf ( buffer, "Verifying %s dialog...", GetLangName ( langid ) ); - Status ( buffer ); - - InitProgress ( db->NumLabels () ); - cb_count = 0; - mainDlg = this; - db->VerifyDialog ( langid, cb_progress ); - db->ReportDialog ( info, langid); - - if ( info->unresolved ) - { - Status ( "Verification", FALSE); - - InitProgress ( info->unresolved ); - - label = db->FirstLabel ( sh_label ); - - while ( label ) - { - NoxText *text; - ListSearch sh_text; - - text = label->FirstText ( sh_text ); - - while ( text ) - { - if ( text->IsDialog ()) - { - if ( text->DialogIsPresent ( DialogPath, langid )) - { - if ( !text->DialogIsValid ( DialogPath, langid, FALSE ) ) - { - VerifyDlg dlg(text, langid, DialogPath); - int result; - - result = dlg.DoModal (); - - if ( result == IDCANCEL ) - { - goto done; - } - if ( result == IDOK ) - { - text->ValidateDialog ( DialogPath, langid ); - } - - count++; - SetProgress ( count ); - } - } - } - - text = label->NextText ( sh_text ); - } - - label = db->NextLabel ( sh_label ); - } - } - -done: - Ready (); - - Status ( "Collecting stats...", FALSE ); - - count = db->ReportDialog ( info, langid ); - - if ( count < 100 ) - { - InitProgress ( count ); - - cb_count = 0; - found_error = FALSE; - mainDlg = this; - db->ReportDialog ( info, langid, print_to_log_and_update_progress ); - } - - if ( info->numdialog ) - { - if ( info->errors || info->missing || info->unresolved ) - { - if ( !found_error ) - { - Log ( "FAILED", SAME_LINE ); - } - - if ( info->errors ) - { - sprintf ( buffer, "Errors : %d", info->errors ); - Log ( buffer ); - } - - if ( info->missing ) - { - sprintf ( buffer, "Missing dialog : %d", info->missing ); - Log ( buffer ); - } - - if ( info->unresolved ) - { - sprintf ( buffer, "Unverified dialog: %d", info->unresolved ); - Log ( buffer ); - } - - if ( info->resolved ) - { - sprintf ( buffer, "Verified dialog : %d", info->resolved ); - Log ( buffer ); - } - - } - else - { - Log ( "OK", SAME_LINE ); - - if ( info->resolved ) - { - sprintf ( buffer, "Verified dialog : %d", info->resolved ); - Log ( buffer ); - } - } - sprintf ( buffer, "Total dialog : %d", info->numdialog ); - Log ( buffer ); - } - else - { - Log ( "NO DIALOG FOUND", SAME_LINE ); - } - - Ready(); - -} - -void CNoxstringDlg::VerifyTranslations( TransDB *db, LangID langid ) -{ - int count = 0; - TRNREPORT _info; - TRNREPORT *info = &_info; - - Log (""); - sprintf ( buffer, "Verifying %s text...", GetLangName ( langid ) ); - Status ( buffer ); - - count = db->ReportTranslations ( info, langid ); - - if ( count < 100 ) - { - InitProgress ( count); - cb_count = 0; - found_error = FALSE; - mainDlg = this; - db->ReportTranslations ( info, langid, print_to_log_and_update_progress ); - } - - if ( info->numstrings ) - { - if ( info->too_big || info->missing || info->retranslate || info->bad_format ) - { - - if ( info->missing ) - { - sprintf ( buffer, "Missing translations: %d", info->missing ); - Log ( buffer ); - } - - if ( info->too_big ) - { - sprintf ( buffer, "Oversized strings : %d", info->too_big ); - Log ( buffer ); - } - - if ( info->retranslate ) - { - sprintf ( buffer, "Retranslations : %d", info->retranslate); - Log ( buffer ); - } - - if ( info->bad_format ) - { - sprintf ( buffer, "Badly formated translations: %d", info->bad_format); - Log ( buffer ); - } - - if ( langid == LANGID_US ) - { - sprintf ( buffer, "Recommemd editing \"%s\" to fix problems and reload", NoxstrFilename ); - } - else - { - sprintf ( buffer, "Recommemd exporting translations for update and re-import" ); - } - Log ( buffer ); - } - else - { - Log ( "OK", SAME_LINE ); - - } - } - else - { - Log ( "NO TEXT", SAME_LINE ); - } - - Ready(); -} - -void CNoxstringDlg::OnTranslations() -{ - if ( MainDB && CanOperate () ) - { - - VerifyTranslations ( MainDB, CurrentLanguage ); - } - - -} - -void CNoxstringDlg::OnSelchangeCombolang() -{ - LANGINFO *info = NULL; - int index; - - index = combo->GetCurSel (); - - if ( index >= 0 && index < max_index ) - { - info = (LANGINFO *) combo->GetItemDataPtr ( index ); - } - - if ( info ) - { - CurrentLanguage = info->langid; - } - else - { - CurrentLanguage = LANGID_UNKNOWN; - } - -} - -void CNoxstringDlg::OnReports() -{ - // TODO: Add your control notification handler code here - if ( CanOperate ()) - { - CReport dlg; - - if ( dlg.DoModal () == IDOK ) - { - GenerateReport ( MainDB, dlg.Filename(), dlg.Options(), dlg.Langauges(), this ); - } - } - -} - -void CNoxstringDlg::OnDblclkCombolang() -{ - // TODO: Add your control notification handler code here -} - -void CNoxstringDlg::OnReset() -{ - // TODO: Add your control notification handler code here - - if ( CurrentLanguage != LANGID_UNKNOWN ) - { - sprintf ( buffer, "Are you sure you want to invalidate all %s dialog?", GetLangName ( CurrentLanguage )); - if ( AfxMessageBox ( buffer, MB_YESNO) == IDYES ) - { - MainDB->InvalidateDialog ( CurrentLanguage ); - } - } -} - -void CNoxstringDlg::OnSent() -{ - // TODO: Add your control notification handler code here - if ( CanOperate ()) - { - CFileDialog fd ( TRUE , NULL, "*.xls", OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR ); - - if ( fd.DoModal () == IDOK ) - { - UpdateSentTranslations ( MainDB, (LPCSTR ) fd.GetPathName (), this ); - } - } -} - -void CAboutDlg::OnButton1() -{ - // TODO: Add your control notification handler code here - - CreateTranslationTable ( ); -} - diff --git a/Generals/Code/Tools/Babylon/noxstringDlg.h b/Generals/Code/Tools/Babylon/noxstringDlg.h deleted file mode 100644 index 03da2cbc4af..00000000000 --- a/Generals/Code/Tools/Babylon/noxstringDlg.h +++ /dev/null @@ -1,156 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// noxstringDlg.h : header file -// - -#if !defined(AFX_NOXSTRINGDLG_H__2BF3124D_3BA1_11D3_B9DA_006097B90D93__INCLUDED_) -#define AFX_NOXSTRINGDLG_H__2BF3124D_3BA1_11D3_B9DA_006097B90D93__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "resource.h" -#include "TransDB.h" - -typedef enum -{ - SAME_LINE, - NEW_LINE - -} LogFormat; - - -typedef struct -{ - int new_strings; - int deleted_strings; - int modified_strings; - int new_labels; - int deleted_labels; - int modified_labels; - int skipped_labels; - int updated_comments; - int updated_contexts; - int updated_waves; - int updated_speakers; - int updated_listeners; - int updated_maxlen; - int changes; - - - -} UPDATEINFO; - -class CNoxstringDlgAutoProxy; - -///////////////////////////////////////////////////////////////////////////// -// CNoxstringDlg dialog - -class CNoxstringDlg : public CDialog -{ - DECLARE_DYNAMIC(CNoxstringDlg); - friend class CNoxstringDlgAutoProxy; - CProgressCtrl *progress; - CStatic *percent; - int progress_pos; - int progress_range; - int max_index; - CComboBox *combo; - int operate_always; - - - -// Construction -public: - int ValidateStrFile ( const char *filename ); - int MatchText ( NoxText *text, NoxLabel *label, NoxText **match ); - int RetranslateText ( NoxText *text, NoxText *label ); - void VerifyDialog( TransDB *db, LangID langid); - void VerifyTranslations( TransDB *db, LangID langid ) ; - int CanProceed ( void ); - int CanOperate ( void ); - int SaveMainDB ( void ); - int UpdateLabel ( NoxLabel *source, NoxLabel *destination, UPDATEINFO &info, int update = TRUE, int skip = FALSE); - int UpdateDB ( TransDB *source, TransDB *destination, int update = TRUE); - void ProgressComplete ( void ); - void SetProgress ( int pos ); - void InitProgress ( int range ); - int SaveLog ( void ); - void Status ( const char *string, int log = TRUE); - void Log ( const char *string, LogFormat format = NEW_LINE ); - CNoxstringDlg(CWnd* pParent = NULL); // standard constructor - virtual ~CNoxstringDlg(); - int LoadStrFile ( TransDB *db, const char *fileaname, void (*cb ) (void ) = NULL ); - void Ready ( void ) { Status ( "Ready", FALSE ); ProgressComplete(); }; - -// Dialog Data - //{{AFX_DATA(CNoxstringDlg) - enum { IDD = IDD_NOXSTRING_DIALOG }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CNoxstringDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - CNoxstringDlgAutoProxy* m_pAutoProxy; - HICON m_hIcon; - - BOOL CanExit(); - - // Generated message map functions - //{{AFX_MSG(CNoxstringDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnSysCommand(UINT nID, LPARAM lParam); - afx_msg void OnPaint(); - afx_msg HCURSOR OnQueryDragIcon(); - afx_msg void OnClose(); - afx_msg void OnDropFiles(HDROP hDropInfo); - afx_msg void OnViewdbs(); - afx_msg void OnReload(); - afx_msg void OnUpdate(); - afx_msg void OnSave(); - afx_msg void OnWarnings(); - afx_msg void OnErrors(); - afx_msg void OnChanges(); - afx_msg void OnExport(); - afx_msg void OnImport(); - afx_msg void OnGenerate(); - afx_msg void OnVerifyDialog(); - afx_msg void OnTranslations(); - afx_msg void OnSelchangeCombolang(); - afx_msg void OnReports(); - afx_msg void OnDblclkCombolang(); - afx_msg void OnReset(); - afx_msg void OnSent(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -extern CNoxstringDlg *MainDLG; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_NOXSTRINGDLG_H__2BF3124D_3BA1_11D3_B9DA_006097B90D93__INCLUDED_) diff --git a/Generals/Code/Tools/Babylon/olestring.cpp b/Generals/Code/Tools/Babylon/olestring.cpp deleted file mode 100644 index b9681c5b9ec..00000000000 --- a/Generals/Code/Tools/Babylon/olestring.cpp +++ /dev/null @@ -1,424 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// OLEString.cpp -// - - -#include "StdAfx.h" -#include -#include "olestring.h" - -template void StripSpaces ( OLECHAR *string); -template void StripSpaces ( char *string ); -template void StripSpacesFromMetaString ( OLECHAR *string ); -template void StripSpacesFromMetaString ( char *string); -template void ConvertMetaChars ( OLECHAR *string); -template void ConvertMetaChars ( char *string); -template int SameFormat ( char *string1, char *string2 ); -template int SameFormat ( OLECHAR *string1, OLECHAR *string2 ); -template void EncodeFormat ( char *string ); -template void EncodeFormat ( OLECHAR *string ); -template void DecodeFormat ( char *string1 ); -template void DecodeFormat ( OLECHAR *string ); -template int IsFormatTypeChar ( char string1 ); -template int IsFormatTypeChar ( OLECHAR string ); - - - -static const char *format_type = "cCdiouxXeEfgGnpsS"; // printf type as in %.{h|l|i64|L} - -template int IsFormatTypeChar ( text ch ) -{ - const char *ptr = format_type; - - while ( *ptr ) - { - if ( (unsigned int)*ptr++ == (unsigned int) ch ) - { - return TRUE; - } - } - return FALSE; -} - - - -OLEString::OLEString ( void ) -{ - ole = NULL; - sb = NULL; - len = 0; - - Unlock (); - Set (""); - -} - -OLEString::~OLEString ( ) -{ - delete [] ole; - delete [] sb; - ole = NULL; - sb = NULL; - len = 0; - -} - -void OLEString::Set ( OLECHAR *new_ole ) -{ - - if ( !locked ) - { - delete [] ole; - delete [] sb; - ole = NULL; - sb = NULL; - - len = wcslen ( new_ole ); - { - ole = new OLECHAR[len+1]; - wcscpy ( ole, new_ole ); - sb = new char[len+1]; - sprintf ( sb, "%S", ole ); - } - } - -} - -void OLEString::Set ( const char *new_sb ) -{ - - if ( !locked ) - { - delete [] ole; - delete [] sb; - ole = NULL; - sb = NULL; - - len = strlen ( new_sb ); - - { - ole = new OLECHAR[len+1]; - swprintf ( ole, L"%S", new_sb ); - sb = new char[len+1]; - strcpy ( sb, new_sb ); - } - } -} - -void OLEString::StripSpaces ( void ) -{ - if ( locked ) - { - return; - } - - if ( ole ) - { - ::StripSpaces ( ole ); - } - if ( sb ) - { - ::StripSpaces ( sb ); - } -} - - -void OLEString::FormatMetaString ( void ) -{ - char *str, *ptr; - char ch, last = -1; - int skipall = TRUE; - int slash = FALSE; - - if ( !len || locked ) - { - return; - } - - char *string = new char[len*2]; - - str = string; - ptr = sb; - - while ( (ch = *ptr++) ) - { - if ( ch == ' ' ) - { - if ( last == ' ' ) - { - continue; - } - } - - skipall= FALSE; - - if ( ch == '\\' ) - { - char esc; - slash = !slash; - - if ( slash && ((esc = *ptr) == 'n' || esc == 't') ) - { - // remove last space - if ( last != ' ' ) - { - *str++ = ' '; - } - - *str++ = '\\'; - ptr++; - *str++ = esc; - last = *str++ = ' '; - continue; - } - } - else - { - slash = FALSE; - } - - last = *str++ = ch; - } - - if ( last == ' ' ) - { - str--; - } - - *str = 0; - - Set ( string ); - delete [] string; - string = NULL; -} - -template void StripSpaces ( text *string ) -{ - text *str, *ptr; - text ch, last = -1; - int skipall = TRUE; - - str = ptr = string; - - while ( (ch = *ptr++) ) - { - if ( ch == ' ' ) - { - if ( last == ' ' || skipall ) - { - continue; - } - } - - if ( ch == '\n' || ch == '\t' ) - { - // remove last space - if ( last == ' ' ) - { - str--; - } - - skipall = TRUE; // skip all spaces - last = *str++ = ch; - continue; - } - - last = *str++ = ch; - skipall = FALSE; - } - - if ( last == ' ' ) - { - str--; - } - - *str = 0; -} - -template void StripSpacesFromMetaString ( text *string ) -{ - text *str, *ptr; - text ch, last = -1; - int skipall = TRUE; - int slash = FALSE; - - str = ptr = string; - - while ( (ch = *ptr++) ) - { - if ( ch == ' ' ) - { - if ( last == ' ' || skipall ) - { - continue; - } - } - - skipall= FALSE; - - if ( ch == '\\' ) - { - text esc; - slash = !slash; - - if ( slash && (esc = *ptr) == 'n' || esc == 't' ) - { - // remove last space - if ( last == ' ' ) - { - str--; - } - - skipall = TRUE; // skip all spaces - *str++ = '\\'; - ptr++; - last = *str++ = esc; - continue; - } - } - else - { - slash = FALSE; - } - - last = *str++ = ch; - } - - if ( last == ' ' ) - { - str--; - } - - *str = 0; -} - - -template void ConvertMetaChars ( text *string ) -{ - text *ptr; - text ch; - - ptr = string; - - while ( (ch = *string++) ) - { - if ( ch == '\\' ) - { - if ( ch = *string ) - { - switch ( ch ) - { - case 'n': - case 'N': - ch = '\n'; - break; - case 't': - case 'T': - ch = '\t'; - break; - } - string++; - } - } - - *ptr++ = ch; - } - - *ptr = 0; -} - -template int SameFormat ( text *string1, text *string2 ) -{ - - while ( *string1 && *string2 ) - { - - while ( *string1 ) - { - if (*string1 == '%') - { - string1++; - break; - } - - if ( *string1 == '\\' ) - { - string1++; - } - - if ( *string1 ) - { - string1++; - } - } - - while ( *string2 ) - { - if (*string2 == '%') - { - string2++; - break; - } - - if ( *string2 == '\\' ) - { - string2++; - } - if ( *string2) - { - string2++; - } - } - - if ( !*string1 && !*string2) - { - return TRUE; - } - - int found_type = FALSE; - - while ( *string1 && *string2 && !found_type ) - { - found_type = IsFormatTypeChar ( *string1 ); - - if ( *string1 != *string2 ) - { - return FALSE; - } - - string1++; - string2++; - } - - } - return TRUE; -} - -template void EncodeFormat ( text *string ) -{ - -} - -template void DecodeFormat ( text *string ) -{ - -} - diff --git a/Generals/Code/Tools/Babylon/olestring.h b/Generals/Code/Tools/Babylon/olestring.h deleted file mode 100644 index c59afdbff73..00000000000 --- a/Generals/Code/Tools/Babylon/olestring.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// OLEString -// - -#ifndef __OLESTRING_H -#define __OLESTRING_H - -const unsigned int OLESTRING_DEFAULT_SIZE = 256; - -class OLEString -{ - - OLECHAR *ole; - char *sb; - unsigned int len; - int locked; - - public: - - OLEString ( void ) ; - ~OLEString (); - void Set ( OLECHAR *new_ole ); - void Set ( const char *new_sb ); - OLECHAR*Get ( void ) { return ole; }; - int Len ( void ) { return len; }; - char* GetSB ( void ) { return sb; }; - void StripSpaces ( void ); - void FormatMetaString ( void ); - void Lock ( void ) { locked = TRUE; }; - void Unlock ( void ) { locked = FALSE; }; -}; - -template void StripSpaces ( text *string ); -template void ConvertMetaChars ( text *string ); -template void StripSpacesFromMetaString ( text *string ); -template int SameFormat ( text *string1, text *string2 ); -template void EncodeFormat ( text *string ); -template void DecodeFormat ( text *string ); -template int IsFormatTypeChar( text string1 ); - - - -#endif // __OLESTRING_H \ No newline at end of file diff --git a/Generals/Code/Tools/Babylon/resource.h b/Generals/Code/Tools/Babylon/resource.h deleted file mode 100644 index e7e86784afd..00000000000 --- a/Generals/Code/Tools/Babylon/resource.h +++ /dev/null @@ -1,103 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by noxstring.rc -// -#define IDM_ABOUTBOX 0x0010 -#define IDM_PIC 0x0010 -#define IDD_ABOUTBOX 100 -#define IDP_OLE_INIT_FAILED 100 -#define IDS_ABOUTBOX 101 -#define IDD_NOXSTRING_DIALOG 102 -#define IDR_MAINFRAME 128 -#define IDD_VIEWDBS 129 -#define IDD_EXPORT 133 -#define IDD_GENERATE 135 -#define IDD_SETTINGS 136 -#define IDD_MATCHDIALOG 137 -#define IDD_PROCEED 145 -#define IDD_MATCH 146 -#define IDD_VERIFYTEXT 147 -#define IDD_CREATE_REPORTS 148 -#define IDD_CHARSET 149 -#define IDD_RETRANSLATE 150 -#define IDC_BUTTON1 1001 -#define IDC_TESTLOG 1001 -#define IDC_RELOAD 1001 -#define IDC_NOMATCH 1001 -#define IDC_INVERT 1001 -#define IDC_MATCH 1002 -#define IDC_ALWAYS 1002 -#define IDC_BUTTON_NO 1003 -#define IDC_PROGRESS1 1004 -#define IDC_BUILD 1005 -#define IDC_STATUS 1006 -#define IDC_LOG 1009 -#define IDC_VIEWDBS 1013 -#define IDC_TREEVIEW 1014 -#define IDC_WARNINGS 1014 -#define IDC_UPDATE 1015 -#define IDC_SAVE 1016 -#define IDC_EXPORT 1017 -#define IDC_IMPORT 1018 -#define IDC_GENERATE 1019 -#define IDC_MATCHCOMBO 1019 -#define IDC_CHANGES 1020 -#define IDC_ERRORS 1021 -#define IDC_NEWTEXT 1021 -#define IDC_MATCHTEXT 1022 -#define IDC_REPORTS 1022 -#define IDC_DIALOG_STATUS 1022 -#define IDC_CHECKRETRANSLATE 1023 -#define IDC_SHOW_DETAILS 1023 -#define IDC_SENT 1023 -#define IDC_SKIP 1024 -#define IDC_COMBOLANG 1026 -#define IDC_CHECKTRANS 1027 -#define IDC_RADIOALL 1028 -#define IDC_RADIOCHANGES 1029 -#define IDC_FILENAME 1031 -#define IDC_RADIOSAMPLE 1032 -#define IDC_RADIODIALOG 1033 -#define IDC_RADIONONDIALOG 1034 -#define IDC_RADIOUNVERIFIED 1035 -#define IDC_SELECTALL 1036 -#define IDC_RADIOMISSING 1036 -#define IDC_UNICODE 1037 -#define IDC_RADIOUNSENT 1037 -#define IDC_NOXSTR 1038 -#define IDC_PREFIX 1039 -#define IDC_LANGUAGE 1040 -#define IDC_PERCENT 1041 -#define IDC_DIALOG 1043 -#define IDC_TRANSLATIONS 1044 -#define IDC_EDIT1 1046 -#define IDC_TEXT 1047 -#define IDC_SLIDER 1048 -#define IDC_STOP 1049 -#define IDC_PAUSE 1050 -#define IDC_PLAY 1051 -#define IDC_WAVENAME 1052 -#define IDC_YES 1054 -#define IDC_MESSAGE 1055 -#define IDC_TEXT_TITLE 1056 -#define IDC_TRANS 1058 -#define IDC_ORIG 1059 -#define IDC_IDS 1060 -#define IDC_ORIGINAL 1061 -#define IDC_TRANSLATION_STATUS 1062 -#define IDC_LIMIT 1065 -#define IDC_IFLESS 1067 -#define IDC_ITEMS 1068 -#define IDC_RESET 1069 -#define IDC_OLDTEXT 1070 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 151 -#define _APS_NEXT_COMMAND_VALUE 32771 -#define _APS_NEXT_CONTROL_VALUE 1071 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/Generals/Code/Tools/Babylon/transcs.cpp b/Generals/Code/Tools/Babylon/transcs.cpp deleted file mode 100644 index 8784e13242f..00000000000 --- a/Generals/Code/Tools/Babylon/transcs.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// transcs.cpp -// - -#include "StdAfx.h" -#include -#include -#include -#include -#include -#include - -void CreateTranslationTable ( void ) -{ - int i; - FILE *out; - wchar_t wc; - wchar_t mb; - DWORD last_error; - - if ( ! ( out = fopen ( "utable.c", "wt" ))) - { - return; - } - - - fprintf (out, "static unsigned short Utable[0x10000] =\n{" ); - - for ( i = 0; i < 0x10000; i++ ) - { - - if ( ( i %32 ) == 0 ) - { - fprintf ( out, "\n\t/* 0x%04x */\t", i ); - } - - mb = i; - if ( MultiByteToWideChar (CP_ACP, MB_ERR_INVALID_CHARS, (LPCSTR) &mb, 2, &wc, 2 ) == 0 ) - { - wc = 0; - last_error = GetLastError ( ); - } - - fprintf (out, "0x%04x", wc ); - if ( i != 0xffff ) - { - fprintf (out, "," ); - } - } - - fprintf ( out, "\n};\n"); - - fclose ( out ); - -} diff --git a/Generals/Code/Tools/Babylon/transcs.h b/Generals/Code/Tools/Babylon/transcs.h deleted file mode 100644 index 45ee48b4f1b..00000000000 --- a/Generals/Code/Tools/Babylon/transcs.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -** Command & Conquer Generals(tm) -** Copyright 2025 Electronic Arts Inc. -** -** This program is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program. If not, see . -*/ - -// -// transcs.h Translate char set -// - -#ifndef _TRANSCS_H -#define _TRANSCS_H - - -void CreateTranslationTable ( void ); - -#endif // _TRANSCS_H diff --git a/Generals/Code/Tools/CMakeLists.txt b/Generals/Code/Tools/CMakeLists.txt index 5bf31943e5d..04cee100689 100644 --- a/Generals/Code/Tools/CMakeLists.txt +++ b/Generals/Code/Tools/CMakeLists.txt @@ -13,7 +13,6 @@ endif() # Build less useful tool/test binaries. if(RTS_BUILD_GENERALS_EXTRAS) add_subdirectory(Autorun) - add_subdirectory(Babylon) add_subdirectory(Launcher) add_subdirectory(mangler) add_subdirectory(PATCHGET) diff --git a/GeneralsMD/Code/Tools/Babylon/BABYLON.XLT b/GeneralsMD/Code/Tools/Babylon/BABYLON.XLT deleted file mode 100644 index 6ff3dbf62aa..00000000000 Binary files a/GeneralsMD/Code/Tools/Babylon/BABYLON.XLT and /dev/null differ diff --git a/GeneralsMD/Code/Tools/Babylon/res/bitmap1.bmp b/GeneralsMD/Code/Tools/Babylon/res/bitmap1.bmp deleted file mode 100644 index 3c0c2bc9f30..00000000000 Binary files a/GeneralsMD/Code/Tools/Babylon/res/bitmap1.bmp and /dev/null differ diff --git a/GeneralsMD/Code/Tools/Babylon/res/noxstring.ico b/GeneralsMD/Code/Tools/Babylon/res/noxstring.ico deleted file mode 100644 index 92531c01d7c..00000000000 Binary files a/GeneralsMD/Code/Tools/Babylon/res/noxstring.ico and /dev/null differ diff --git a/GeneralsMD/Code/Tools/Babylon/res/noxstring.rc2 b/GeneralsMD/Code/Tools/Babylon/res/noxstring.rc2 deleted file mode 100644 index 6abd7126cb9..00000000000 --- a/GeneralsMD/Code/Tools/Babylon/res/noxstring.rc2 +++ /dev/null @@ -1,13 +0,0 @@ -// -// NOXSTRING.RC2 - resources Microsoft Visual C++ does not edit directly -// - -#ifdef APSTUDIO_INVOKED - #error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// Add manually edited resources here... - -///////////////////////////////////////////////////////////////////////////// diff --git a/GeneralsMD/Code/Tools/Babylon/res/pause.bmp b/GeneralsMD/Code/Tools/Babylon/res/pause.bmp deleted file mode 100644 index 2c0f5b96582..00000000000 Binary files a/GeneralsMD/Code/Tools/Babylon/res/pause.bmp and /dev/null differ diff --git a/GeneralsMD/Code/Tools/Babylon/res/paused.bmp b/GeneralsMD/Code/Tools/Babylon/res/paused.bmp deleted file mode 100644 index aeb344abdae..00000000000 Binary files a/GeneralsMD/Code/Tools/Babylon/res/paused.bmp and /dev/null differ diff --git a/GeneralsMD/Code/Tools/Babylon/res/playd.bmp b/GeneralsMD/Code/Tools/Babylon/res/playd.bmp deleted file mode 100644 index 53565fdf2f5..00000000000 Binary files a/GeneralsMD/Code/Tools/Babylon/res/playd.bmp and /dev/null differ diff --git a/GeneralsMD/Code/Tools/Babylon/res/playu.bmp b/GeneralsMD/Code/Tools/Babylon/res/playu.bmp deleted file mode 100644 index d41825bb0cb..00000000000 Binary files a/GeneralsMD/Code/Tools/Babylon/res/playu.bmp and /dev/null differ diff --git a/GeneralsMD/Code/Tools/Babylon/res/stop.bmp b/GeneralsMD/Code/Tools/Babylon/res/stop.bmp deleted file mode 100644 index 3a1294796ad..00000000000 Binary files a/GeneralsMD/Code/Tools/Babylon/res/stop.bmp and /dev/null differ diff --git a/GeneralsMD/Code/Tools/Babylon/resource.hm b/GeneralsMD/Code/Tools/Babylon/resource.hm deleted file mode 100644 index a81ca514f18..00000000000 --- a/GeneralsMD/Code/Tools/Babylon/resource.hm +++ /dev/null @@ -1,5 +0,0 @@ -// Microsoft Developer Studio generated Help ID include file. -// Used by noxstring.rc -// -#define HIDC_PROGRESS1 0x806603ec // IDD_NOXSTRING_DIALOG -#define HIDC_STATUS 0x806603ee // IDD_NOXSTRING_DIALOG diff --git a/GeneralsMD/Code/Tools/CMakeLists.txt b/GeneralsMD/Code/Tools/CMakeLists.txt index 10c0722b01d..e39ebf89e6f 100644 --- a/GeneralsMD/Code/Tools/CMakeLists.txt +++ b/GeneralsMD/Code/Tools/CMakeLists.txt @@ -16,7 +16,6 @@ endif() if(RTS_BUILD_ZEROHOUR_EXTRAS) add_subdirectory(assetcull) add_subdirectory(Autorun) - add_subdirectory(Babylon) add_subdirectory(Launcher) add_subdirectory(mangler) add_subdirectory(PATCHGET)