/
MadDAD
/
alterplast
Обзор
Документация
Войти
/
MadDAD
/
alterplast
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
1cpp/Source/TableEx.h
113 строк
4 KB
trdm
+
24 мар 2017, 11:36
24 мар 2017, 11:36
f368595
Код
Авторство
О чём код?
////////////////////////////////////////////////////////////////////// // TableEx.h: interface for CTableEx class. // // �����������: ����� ������� aka artbear, mailto: artbear@inbox.ru // ������: 1.5 ////////////////////////////////////////////////////////////////////// #pragma once //#undef VK_1CPP_SourceTable #define VK_1CPP_SourceTable #ifdef VK_1CPP_SourceTable // ����� ��� ��������� ������� ������� // // artbear TODO ����� ���������� �� ������, ����� �������� �����, ��� ������-��������� � ��� ������-���������� ��������� �� ��������� � ����� ������, // �.�. ������ ���� �������� ����� ������� ������� (1�) � ������� ������ ������-����������� ��������� // class CTableWrapEx : public CBLContext // �� ����� ���� ��� CTableOutputContext { private: CSheetDoc* m_pSheetDocOut; //20 DWORD dwFlag1; //24 DWORD dwFlag2; //28 CSheetDoc* m_pSheetDocIn; //2C DWORD dwFlag3; //30 DWORD dwFlag4; //34 CSheet* m_pSheet; //38 DWORD dwFlag6; //3C DWORD dwFlag7; //40 DWORD dwFlag8; DWORD dwFlag9; DWORD dwFlag10; DWORD dwFlag11; public: virtual void DecrRef(void); virtual int GetNParams(int iMethNum)const; virtual int GetParamDefValue(int iMethNum,int iParamNum,CValue *)const; virtual int HasRetVal(int iMethNum)const; virtual int CallAsProc(int iMethNum,class CValue **ppValue); virtual int CallAsFunc(int iMethNum,class CValue & rValue,class CValue **ppValue); CSheetDoc* GetSheetDocOut() const { return m_pSheetDocOut; }; static void InitTableWrap(); private: enum CSetTableReturnValue { SET_TBL_SUCCESS = 0, // 0 - ������� ����������� SET_TBL_NEED_SYSTEM_CALL = 1, // 1 - ��������� ����� ������� ��������� SET_TBL_PATH_ERROR = 2, // 2 - ������ ���� SET_TBL_NAME_ERROR = 3, // 3 - ������ ����� ������� SET_TBL_OTHER_ERROR = 4, // 4 - ������ ������ SET_TBL_NEED_REPLACE_NAME_FROM_PATH_AND_NEED_SYSTEM_CALL = 5, // 5 - �������� ��� ������� �� ���� � ������� }; CSetTableReturnValue SetTable(const CString& strName, const CString& strPath); CSetTableReturnValue SetTableForMDInnerForms(CString& strName, const CString& strPath); CSetTableReturnValue SetTableForExternalFiles(CString& strName, const CString& strPath); bool SetTableForOpenedErtFile(CString& strName, const CString& strPath, CSetTableReturnValue& ResultValue); CSetTableReturnValue CTableWrapEx::SetTableForNotOpenedErtFile(CString& strName, const CString& strPath); static void ChangeTableOutputContextVirtualTable(); static void ChangeGroupContextVirtualTable(); bool RunSourceTableMethod(CValue& pNameValue, const CValue& pPathValue, const CValue& pExceptionFlagValue, CValue& rValue, int& ResultValue); int RunOptionsMethod(CValue** ppValues); static void ReplaceClassNameToMDName(CString& strPath); void SetSheetAndUpdateAllViewsForSheetDocIn(); static void DeleteOwnCreatedSheetDoc(CSheetDoc* pSheetDoc); static void IfEmptyNameThenSetFromFirstTableName(CWorkBookDoc* pDoc, CString& strName); bool FindDocumentByName(CWorkBookDoc* pDoc, LPCSTR szName); static bool IsMDInnerFormPath(const CString& strPath) { return !strPath.Left(3).CompareNoCase("MD."); }; static bool IsExternalMxlFilePath(const CString& strPath) { return !strPath.Right(3).CompareNoCase("MXL"); }; static int CallOriginalMethod_SourceTable(CBLContext* pCont, class CValue **ppValue); static int procAddAllMDInnerFormsName(class CString &str,long l1,long l2,enum PageType pt); static int iMethNum_SourceTable; static int iMethNum_Options; static DWORD dwCSheetDocVTable; static int iCountStream; static CMetaDataCont *pMetaDataCont; }; class CTableWrapExDbl : public CGroupContext { public: CSheetDoc* m_pSheetDocOut; //20 DWORD dwFlag1; //24 DWORD dwFlag2; //28 CSheetDoc* m_pSheetDocIn; //2C DWORD dwFlag3; //30 DWORD dwFlag4; //34 CSheet* m_pSheet; //38 DWORD dwFlag6; //3C DWORD dwFlag7; //40 DWORD dwFlag8; DWORD dwFlag9; DWORD dwFlag10; DWORD dwFlag11; virtual int CallAsProc(int iMethNum,class CValue **ppValue); }; #endif