[commit] r1993 - trunk/Tools/TableEditor
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Fri Aug 3 14:00:04 CDT 2012
Author: ksmyth
Date: Fri Aug 3 14:00:04 2012
New Revision: 1993
Log:
Remove Parser/Dumper that didnt work
Deleted:
trunk/Tools/TableEditor/TableEditorDumper.cpp
trunk/Tools/TableEditor/TableEditorDumper.h
trunk/Tools/TableEditor/TableEditorParser.cpp
trunk/Tools/TableEditor/TableEditorParser.h
Modified:
trunk/Tools/TableEditor/Component.rc
trunk/Tools/TableEditor/GridDlg.cpp
trunk/Tools/TableEditor/GridDlg.h
trunk/Tools/TableEditor/Resource.h
trunk/Tools/TableEditor/TableEditor.vcxproj
trunk/Tools/TableEditor/TableEditor.vcxproj.filters
Modified: trunk/Tools/TableEditor/Component.rc
==============================================================================
--- trunk/Tools/TableEditor/Component.rc Fri Aug 3 11:06:16 2012 (r1992)
+++ trunk/Tools/TableEditor/Component.rc Fri Aug 3 14:00:04 2012 (r1993)
@@ -106,7 +106,6 @@
DEFPUSHBUTTON "OK",IDOK,14,324,50,14
PUSHBUTTON "Cancel",IDCANCEL,69,324,50,14
CONTROL "Custom1",IDC_GRID,"MFCGridCtrl",WS_TABSTOP,7,7,420,265
- PUSHBUTTON "Export...",IDC_BTNEXPORT,125,324,48,14
CONTROL "Display All Types",IDC_CHKALLTYPES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,64,295,69,10
CONTROL "Models",IDC_CHKMODEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,308,39,10
CONTROL "Atoms",IDC_CHKATOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,60,308,35,10
@@ -121,7 +120,6 @@
LTEXT "Type Filters:",IDC_STATIC_TYPE,13,295,46,10
LTEXT "Invoking the table editor with selected objects will display only those objects",IDC_STATIC_SELECTION,7,276,257,8
LTEXT "Filters:",IDC_STATIC_FILTERS,12,286,54,8
- PUSHBUTTON "Import...",IDC_BTNIMPORT,179,324,48,14
END
@@ -151,11 +149,6 @@
IDR_GRIDDLG_MENU MENU
BEGIN
- POPUP "&File"
- BEGIN
- MENUITEM "&Import ...", ID_FILE_IMPORT
- MENUITEM "&Export ...", ID_FILE_EXPORT
- END
POPUP "&View"
BEGIN
MENUITEM "&Recursively Show Items", ID_VIEW_RECURSIVELYSHOWITEMS
Modified: trunk/Tools/TableEditor/GridDlg.cpp
==============================================================================
--- trunk/Tools/TableEditor/GridDlg.cpp Fri Aug 3 11:06:16 2012 (r1992)
+++ trunk/Tools/TableEditor/GridDlg.cpp Fri Aug 3 14:00:04 2012 (r1993)
@@ -10,8 +10,8 @@
#include "NewCellTypes/GridCellFCO.h"
#include "NewCellTypes/GridCellMultiLine.h"
#include "NewCellTypes/GridCellAttrName.h"
-#include "TableEditorParser.h"
-#include "TableEditorDumper.h"
+//#include "TableEditorParser.h"
+//#include "TableEditorDumper.h"
#include <queue>
#include "Console.h"
@@ -631,11 +631,8 @@
BEGIN_MESSAGE_MAP(CGridDlg, CDialog)
//{{AFX_MSG_MAP(CGridDlg)
- ON_COMMAND(ID_FILE_IMPORT, OnBtnImport)
- ON_COMMAND(ID_FILE_EXPORT, OnBtnExport)
ON_COMMAND(ID_VIEW_RECURSIVELYSHOWITEMS, OnRecursivelyShowItems)
ON_WM_SIZE()
- ON_BN_CLICKED(IDC_BTNEXPORT, OnBtnExport)
ON_BN_CLICKED(IDC_BTNDISP, OnButtonDisplay)
ON_BN_CLICKED(IDC_CHECKALLKINDS, OnCheckAllKinds)
ON_BN_CLICKED(IDC_CHKALLTYPES, OnChkAllTypes)
@@ -644,7 +641,6 @@
ON_BN_CLICKED(IDC_CHKMODEL, OnChkModel)
ON_BN_CLICKED(IDC_CHKREF, OnChkRef)
ON_BN_CLICKED(IDC_CHKSET, OnChkSet)
- ON_BN_CLICKED(IDC_BTNIMPORT, OnBtnImport)
//}}AFX_MSG_MAP
ON_NOTIFY(NM_DBLCLK, IDC_GRID, OnGridDblClick)
ON_NOTIFY(NM_CLICK, IDC_GRID, OnGridClick)
@@ -997,97 +993,11 @@
wnd->MoveWindow(rect.left, rect.top+offset, rect.Width(), rect.Height(), FALSE);
}
-
-
-void CGridDlg::OnBtnExport()
-{
- //Export to .xml file for use in MS Excel
- CFileDialog FileSelector(FALSE,"xml",NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,"Excel formatted XML (*.xml)|*.xml||");
- if(FileSelector.DoModal() == IDOK)
- {
- int MaxRows = m_Grid.GetRowCount();
- int MaxCols = m_Grid.GetColumnCount();
- CString cell_type;
-
- TableEditorDumper dumper; // creates dumper
- dumper.InitDump(FileSelector.GetPathName(),MaxCols,MaxRows); // adds in proper excel header
- for( int i=0; i<MaxRows; i++ )
- {
- dumper.StartElem("Row");
- for( int j=0; j<MaxCols; j++ )
- {
- CString ClassName = m_Grid.GetCell(i,j)->GetRuntimeClass()->m_lpszClassName;
- CString cell_entry = m_Grid.GetItemText(i,j);
- CString cell_type = "String"; //default to String.
- BOOL multi = FALSE;
- BOOL boolean = FALSE;
-
- if( ClassName == "CGridCellComboBool" )
- {
- cell_type = "Boolean";
- boolean = TRUE;
- }
-
- if( ClassName == "CGridCellNumeric" || ClassName == "CGridCellDouble" )
- {
- cell_type = "Number";
- }
-
- if( ClassName == "CGridCell" )
- {
- cell_type = "String";
- }
-
- if( ClassName == "CGridCellMultiLine" )
- {
- cell_type = "String";
- multi = TRUE;
- }
-
- dumper.DumpCell(cell_type, cell_entry, multi, boolean);
- }
-
- dumper.EndElem("Row");
- }
-
- dumper.DoneDump();
-
- }
-}
-
void CGridDlg::OnRecursivelyShowItems()
{
ShowItemsRecursively();
}
-void CGridDlg::OnBtnImport()
-{
- CFileDialog FileSelector(TRUE,"xml",NULL, NULL,"EXCEL Exported XML (*.xml)|*.xml||");
- if(FileSelector.DoModal() == IDOK)
- {
- try
- {
- CTableEditorParser parser(m_Project);
- m_FCOs = parser.ParseExcelXML(m_Project,FileSelector.GetPathName());
- InitGrid();
- }
- catch(HRESULT)
- {
- //need better error handling
- AfxMessageBox("A GME COM error occurred on import. Does this file match the current project?");
- CDialog::OnCancel();
- throw; //rethrow, for the user to get a more detailed message from GME
- }
- catch(const XMLException &)
- {
- CDialog::OnCancel();
- }
-
- }
-
-}
-
-
BOOL CGridDlg::GetMultiLine(CComPtr<IMgaMetaAttribute> p_Meta)
{
Modified: trunk/Tools/TableEditor/GridDlg.h
==============================================================================
--- trunk/Tools/TableEditor/GridDlg.h Fri Aug 3 11:06:16 2012 (r1992)
+++ trunk/Tools/TableEditor/GridDlg.h Fri Aug 3 14:00:04 2012 (r1993)
@@ -95,7 +95,6 @@
//{{AFX_MSG(CGridDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnBtnExport();
afx_msg void OnRecursivelyShowItems();
afx_msg void OnButtonDisplay();
afx_msg void OnCheckAllKinds();
@@ -105,7 +104,6 @@
afx_msg void OnChkModel();
afx_msg void OnChkRef();
afx_msg void OnChkSet();
- afx_msg void OnBtnImport();
//}}AFX_MSG
afx_msg void OnGridDblClick(NMHDR *pNotifyStruct, LRESULT* pResult);
afx_msg void OnGridClick(NMHDR *pNotifyStruct, LRESULT* pResult);
Modified: trunk/Tools/TableEditor/Resource.h
==============================================================================
--- trunk/Tools/TableEditor/Resource.h Fri Aug 3 11:06:16 2012 (r1992)
+++ trunk/Tools/TableEditor/Resource.h Fri Aug 3 14:00:04 2012 (r1993)
@@ -23,9 +23,6 @@
#define IDC_STATIC_SELECTION 224
#define IDC_STATIC_FILTERS 225
#define IDC_BTNIMPORT 226
-#define ID_FILE_EXPORTAS 32768
-#define ID_FILE_IMPORT 32769
-#define ID_FILE_EXPORT 32770
#define ID_VIEW_RECURSIVELYSHOWITEMS 32771
// Next default values for new objects
Modified: trunk/Tools/TableEditor/TableEditor.vcxproj
==============================================================================
--- trunk/Tools/TableEditor/TableEditor.vcxproj Fri Aug 3 11:06:16 2012 (r1992)
+++ trunk/Tools/TableEditor/TableEditor.vcxproj Fri Aug 3 14:00:04 2012 (r1993)
@@ -80,7 +80,6 @@
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(GME_ROOT)/GME/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>Component.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -124,7 +123,6 @@
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(GME_ROOT)/GME/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>Component.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -146,8 +144,6 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
- <ClCompile Include="TableEditorDumper.cpp" />
- <ClCompile Include="TableEditorParser.cpp" />
<ClCompile Include="GridCtrl_src\GridCell.cpp" />
<ClCompile Include="GridCtrl_src\GridCellBase.cpp" />
<ClCompile Include="GridCtrl_src\GridCtrl.cpp" />
Modified: trunk/Tools/TableEditor/TableEditor.vcxproj.filters
==============================================================================
--- trunk/Tools/TableEditor/TableEditor.vcxproj.filters Fri Aug 3 11:06:16 2012 (r1992)
+++ trunk/Tools/TableEditor/TableEditor.vcxproj.filters Fri Aug 3 14:00:04 2012 (r1993)
@@ -51,12 +51,6 @@
<ClCompile Include="StdAfx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="TableEditorDumper.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TableEditorParser.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="GridCtrl_src\GridCell.cpp">
<Filter>GridCtrl</Filter>
</ClCompile>
More information about the gme-commit
mailing list