[GME-commit] GMESRC/GME/MgaUtil MgaXsltFileSel.rgs,NONE,1.1
XsltDial.cpp,NONE,1.1 XsltDial.h,NONE,1.1 XsltFileSel.cpp,NONE,1.1
XsltFileSel.h,NONE,1.1 MgaUtil.dsp,1.21,1.22 MgaUtil.rc,1.33,1.34
MgaUtilApp.cpp,1.6,1.7 MgaUtilLib.idl,1.5,1.6 resource.h,1.20,1.21
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Thu Apr 8 14:02:58 CDT 2004
- Previous message: [GME-commit] GMESRC/GME/Interfaces InterfaceVersion.h,1.38,1.39
MgaUtil.idl,1.30,1.31 Parser.idl,1.4,1.5
- Next message: [GME-commit]
GMESRC/GME/Parser MgaXslt.cpp,NONE,1.1 MgaXslt.h,NONE,1.1
MgaXslt.rgs,NONE,1.1 Parser.cpp,1.3,1.4 Parser.dsp,1.10,1.11
Parser.rc,1.5,1.6 ParserLib.idl,1.3,1.4 resource.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/gme/GMESRC/GME/MgaUtil
In directory braindrain:/tmp/cvs-serv26784/MgaUtil
Modified Files:
MgaUtil.dsp MgaUtil.rc MgaUtilApp.cpp MgaUtilLib.idl
resource.h
Added Files:
MgaXsltFileSel.rgs XsltDial.cpp XsltDial.h XsltFileSel.cpp
XsltFileSel.h
Log Message:
Adding XSLT related files into MgaUtil and Parser.
Interfaces changed: Parser.idl, MgaUtil.idl
Modified Files:
Common/CommonError.h Gme/GMEApp.cpp
Interfaces/InterfaceVersion.h Interfaces/MgaUtil.idl
Interfaces/Parser.idl MgaUtil/MgaUtil.dsp MgaUtil/MgaUtil.rc
MgaUtil/MgaUtilApp.cpp MgaUtil/MgaUtilLib.idl
MgaUtil/resource.h Parser/Parser.cpp Parser/Parser.dsp
Parser/Parser.rc Parser/ParserLib.idl Parser/resource.h
Added Files:
MgaUtil/MgaXsltFileSel.rgs MgaUtil/XsltDial.cpp
MgaUtil/XsltDial.h MgaUtil/XsltFileSel.cpp
MgaUtil/XsltFileSel.h Parser/MgaXslt.cpp Parser/MgaXslt.h
Parser/MgaXslt.rgs
CVS User: zolmol
--- NEW FILE: MgaXsltFileSel.rgs ---
HKCR
{
Mga.MgaXsltFileSel.1 = s 'MgaXsltFileSel Class'
{
CLSID = s '{0B989673-7179-46ba-9352-D1EDB0222B7E}'
}
Mga.MgaXsltFileSel = s 'MgaXsltFileSel Class'
{
CLSID = s '{0B989673-7179-46ba-9352-D1EDB0222B7E}'
CurVer = s 'Mga.MgaXsltFileSel.1'
}
NoRemove CLSID
{
ForceRemove {0B989673-7179-46ba-9352-D1EDB0222B7E} = s 'MgaXsltFileSel Class'
{
ProgID = s 'Mga.MgaXsltFileSel.1'
VersionIndependentProgID = s 'Mga.MgaXsltFileSel'
ForceRemove 'Programmable'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
'TypeLib' = s '{461F30AE-3BF0-11D4-B3F0-005004D38590}'
}
}
}
--- NEW FILE: XsltDial.cpp ---
// XSLTDial.cpp : implementation file
//
#include "stdafx.h"
#include "mgautil.h"
#include "XSLTDial.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CXSLTDial dialog
CXSLTDial::CXSLTDial(CWnd* pParent /*=NULL*/)
: CDialog(CXSLTDial::IDD, pParent)
{
//{{AFX_DATA_INIT(CXSLTDial)
m_stylesheetFileName = _T("");
m_inputXmlFileName = _T("");
m_outputXmlFileName = _T("");
//}}AFX_DATA_INIT
}
void CXSLTDial::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CXSLTDial)
DDX_Text(pDX, IDC_EDIT1, m_stylesheetFileName);
DDX_Text(pDX, IDC_EDIT2, m_inputXmlFileName);
DDX_Text(pDX, IDC_EDIT3, m_outputXmlFileName);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CXSLTDial, CDialog)
//{{AFX_MSG_MAP(CXSLTDial)
ON_BN_CLICKED(IDC_BUTTON1, OnFileSelection1)
ON_BN_CLICKED(IDC_BUTTON2, OnFileSelection2)
ON_BN_CLICKED(IDC_BUTTON3, OnFileSelection3)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CXSLTDial message handlers
void CXSLTDial::OnFileSelection1()
{
CWaitCursor wait;
CFileDialog dlg(TRUE, "xsl", "",
OFN_EXPLORER,
"XSL Stylesheet Files (*.xsl)|*.xsl|All Files (*.*)|*.*||");
if( dlg.DoModal() == IDOK)
{
//m_styleSheetFile.SetWindowText( dlg.GetPathName());
m_stylesheetFileName = dlg.GetPathName();
int idx = m_stylesheetFileName.ReverseFind('\\');
CString dir;
if ( idx != -1)
dir = m_stylesheetFileName.Left( idx + 1);
m_outputXmlFileName = dir;
if ( m_inputXmlFileName.IsEmpty())
m_inputXmlFileName = dir;
this->UpdateData( false);
}
else // IDCANCEL , using default name
{
}
}
void CXSLTDial::OnFileSelection2()
{
CWaitCursor wait;
CFileDialog dlg(TRUE, "xme", "",
OFN_EXPLORER,
"GME Exported Files (*.xme;*.xml)|*.xme; *.xml|All Files (*.*)|*.*||");
if( dlg.DoModal() == IDOK)
{
//m_inputXmlFile.SetWindowText( dlg.GetPathName());
m_inputXmlFileName = dlg.GetPathName();
this->UpdateData( false);
}
else // IDCANCEL , using default name
{
}
}
void CXSLTDial::OnFileSelection3()
{
CWaitCursor wait;
CFileDialog dlg(FALSE, "xme", "",
OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"GME Exported Files (*.xme;*.xml)|*.xme; *.xml|All Files (*.*)|*.*||");
if( dlg.DoModal() == IDOK)
{
//m_outputXmlFile.SetWindowText( dlg.GetPathName());
m_outputXmlFileName = dlg.GetPathName();
this->UpdateData( false);
}
else // IDCANCEL , using default name
{
}
}
void CXSLTDial::OnOK()
{
// TODO: Add extra validation here
this->UpdateData( TRUE);
if ( m_inputXmlFileName == ""
|| m_outputXmlFileName == ""
|| m_stylesheetFileName == "")
{
AfxMessageBox("Please select input and output files!", MB_ICONEXCLAMATION | MB_OK);
return;
}
CDialog::OnOK();
}
--- NEW FILE: XsltDial.h ---
#if !defined(AFX_XSLTDIAL_H__92B9B425_E2C1_49E3_96AF_961C570AF5AB__INCLUDED_)
#define AFX_XSLTDIAL_H__92B9B425_E2C1_49E3_96AF_961C570AF5AB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// XSLTDial.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CXSLTDial dialog
class CXSLTDial : public CDialog
{
// Construction
public:
CXSLTDial(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CXSLTDial)
enum { IDD = IDD_XSLTDIAL };
CString m_stylesheetFileName;
CString m_inputXmlFileName;
CString m_outputXmlFileName;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CXSLTDial)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CXSLTDial)
afx_msg void OnFileSelection1();
afx_msg void OnFileSelection2();
afx_msg void OnFileSelection3();
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_XSLTDIAL_H__92B9B425_E2C1_49E3_96AF_961C570AF5AB__INCLUDED_)
--- NEW FILE: XsltFileSel.cpp ---
#include "stdafx.h"
#include "XsltFileSel.h"
#include "XsltDial.h"
STDMETHODIMP CXsltFileSel::StartXslt( BSTR def_in_f_name, BSTR* out)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CWaitCursor w;
CXSLTDial dlg;
CopyTo( def_in_f_name, dlg.m_inputXmlFileName);
if ( dlg.DoModal() == IDOK)
{
w.Restore();
//CComBstrObj error_msg; // will contain the error msg if XML error occurs
try
{
CComPtr<IMgaXslt> xslt;
COMTHROW( xslt.CoCreateInstance(L"Mga.MgaXslt") );
ASSERT( xslt != NULL );
COMTHROW( xslt->ApplyXslt( PutInBstr( dlg.m_stylesheetFileName),
PutInBstr( dlg.m_inputXmlFileName),
PutInBstr( dlg.m_outputXmlFileName)/*,
PutOut( error_msg)*/));
CopyTo( dlg.m_outputXmlFileName, out);
AfxMessageBox( "XSLT script applied. " + dlg.m_outputXmlFileName + " generated.", MB_ICONINFORMATION);
return S_OK;
}
catch(hresult_exception &e)
{
/*CString err;
CopyTo( error_msg.p, err);
if ( !err.IsEmpty())
AfxMessageBox("XSLT error: " + err, MB_ICONSTOP);
else*/
AfxMessageBox("Xslt error.", MB_ICONSTOP);
return e.hr;
}
}
return E_XSLTFILESEL_USER_ABORTED;
}
--- NEW FILE: XsltFileSel.h ---
#ifndef XSLTFILESEL_H
#define XSLTFILESEL_H
#include "XSLTDial.h"
// --------------------------- CXsltFileSel
//
class ATL_NO_VTABLE CXsltFileSel
: public CComObjectRootEx<CComSingleThreadModel>
, public CComCoClass<CXsltFileSel, &CLSID_MgaXsltFileSel>
, public IMgaXsltFileSel
{
public:
CXsltFileSel() { }
~CXsltFileSel() { }
DECLARE_REGISTRY_RESOURCEID(IDR_MGAXSLTFILESEL)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CXsltFileSel)
COM_INTERFACE_ENTRY(IMgaXsltFileSel)
END_COM_MAP()
// ------- Properties
STDMETHOD(StartXslt)( BSTR in, BSTR * out);
// ------- Attributes and Methods
public:
};
#endif // XSLTFILESEL_H
Index: MgaUtil.dsp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaUtil.dsp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** MgaUtil.dsp 20 Mar 2003 14:21:56 -0000 1.21
--- MgaUtil.dsp 8 Apr 2004 18:02:55 -0000 1.22
***************
*** 263,266 ****
--- 263,274 ----
# ADD CPP /Yc"stdafx.h"
# End Source File
+ # Begin Source File
+
+ SOURCE=.\XsltDial.cpp
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\XsltFileSel.cpp
+ # End Source File
# End Group
# Begin Group "Header Files"
***************
*** 387,390 ****
--- 395,406 ----
SOURCE=.\StdAfx.h
# End Source File
+ # Begin Source File
+
+ SOURCE=.\XsltDial.h
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\XsltFileSel.h
+ # End Source File
# End Group
# Begin Group "Resource Files"
***************
*** 450,453 ****
--- 466,473 ----
SOURCE=.\MgaUtilLib.rgs
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\MgaXsltFileSel.rgs
# End Source File
# End Group
Index: MgaUtil.rc
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaUtil.rc,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** MgaUtil.rc 2 Mar 2004 21:51:28 -0000 1.33
--- MgaUtil.rc 8 Apr 2004 18:02:55 -0000 1.34
***************
*** 415,418 ****
--- 415,436 ----
END
+ IDD_XSLTDIAL DIALOG DISCARDABLE 0, 0, 372, 151
+ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+ CAPTION "XSL Transformation"
+ FONT 8, "MS Sans Serif"
+ BEGIN
+ LTEXT "Input XSL stylesheet",IDC_STATIC,20,9,120,8
+ EDITTEXT IDC_EDIT1,20,20,320,12,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_BUTTON1,345,20,15,12
+ LTEXT "Input GME xme file",IDC_STATIC,20,45,123,8
+ EDITTEXT IDC_EDIT2,20,56,320,12,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_BUTTON2,345,56,15,12
+ LTEXT "Output GME xme file",IDC_STATIC,19,81,120,8
+ EDITTEXT IDC_EDIT3,20,92,320,12,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_BUTTON3,345,92,15,12
+ DEFPUSHBUTTON "OK",IDOK,70,130,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,240,130,50,14
+ END
+
#ifdef APSTUDIO_INVOKED
***************
*** 508,511 ****
--- 526,530 ----
IDR_MGAPROGRESSDLG REGISTRY DISCARDABLE "MgaProgressDlg.rgs"
IDR_COMPONENTPROXY REGISTRY DISCARDABLE "ComponentProxy.rgs"
+ IDR_MGAXSLTFILESEL REGISTRY DISCARDABLE "MgaXsltFileSel.rgs"
/////////////////////////////////////////////////////////////////////////////
***************
*** 613,616 ****
--- 632,643 ----
TOPMARGIN, 7
BOTTOMMARGIN, 264
+ END
+
+ IDD_XSLTDIAL, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 365
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 144
END
END
Index: MgaUtilApp.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaUtilApp.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MgaUtilApp.cpp 7 Jan 2002 16:32:00 -0000 1.6
--- MgaUtilApp.cpp 8 Apr 2004 18:02:55 -0000 1.7
***************
*** 15,18 ****
--- 15,19 ----
#include "MgaProgressDlg.h"
#include "ComponentProxy.h"
+ #include "XsltFileSel.h"
#ifdef _DEBUG
***************
*** 82,85 ****
--- 83,87 ----
OBJECT_ENTRY(CLSID_MgaProgressDlg, CMgaProgressDlg)
OBJECT_ENTRY(CLSID_ComponentProxy, CComponentProxy)
+ OBJECT_ENTRY(CLSID_MgaXsltFileSel, CXsltFileSel)
END_OBJECT_MAP()
Index: MgaUtilLib.idl
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaUtilLib.idl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MgaUtilLib.idl 29 Nov 2001 20:06:00 -0000 1.5
--- MgaUtilLib.idl 8 Apr 2004 18:02:55 -0000 1.6
***************
*** 58,61 ****
--- 58,62 ----
[default] interface IMgaProgressDlg;
};
+
[
uuid(789C184D-B3E3-4B35-B3AE-665DA236F59C),
***************
*** 70,73 ****
--- 71,75 ----
[default, source] dispinterface IMgaComponentDispatch;
};
+
[
uuid(BEBD0575-BB6F-48ea-8373-7436F04EFEEC),
***************
*** 78,81 ****
--- 80,93 ----
[default] interface IMgaComponentDispatch;
}
+
+ [
+ uuid(0B989673-7179-46ba-9352-D1EDB0222B7E),
+ helpstring("MgaXsltFileSel Class")
+ ]
+ coclass MgaXsltFileSel
+ {
+ [default] interface IMgaXsltFileSel;
+ };
+ //interface IMgaVersionInfo;
};
Index: resource.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/resource.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** resource.h 2 Mar 2004 21:51:28 -0000 1.20
--- resource.h 8 Apr 2004 18:02:55 -0000 1.21
***************
*** 73,76 ****
--- 73,78 ----
#define IDD_FOLDERPROPERTIES_DIALOG 2057
#define IDD_ANNOTATION_BROWSER 2058
+ #define IDD_XSLTDIAL 2059
+ #define IDR_MGAXSLTFILESEL 2060
#define IDR_COMPONENTPROXY 2090
#define IDC_PROGRESS1 2150
***************
*** 136,142 ****
--- 138,149 ----
#define IDC_AUTOSAVE_DIR_BUTTON 2218
#define IDC_MULTIPLE_OPEN 2219
+ #define IDC_BUTTON2 2219
#define IDC_EVENT_LOGGING 2220
+ #define IDC_EDIT1 2220
+ #define IDC_EDIT2 2221
#define IDC_AUTOSAVE_ENABLED 2221
+ #define IDC_EDIT3 2222
#define IDC_AUTOSAVE_FREQ 2222
+ #define IDC_BUTTON3 2223
#define IDC_AUTOSAVE_DIR 2223
#define IDC_EXT_ENABLE 2224
***************
*** 150,154 ****
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
! #define _APS_NEXT_RESOURCE_VALUE 2058
#define _APS_NEXT_COMMAND_VALUE 32778
#define _APS_NEXT_CONTROL_VALUE 2225
--- 157,161 ----
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
! #define _APS_NEXT_RESOURCE_VALUE 2063
#define _APS_NEXT_COMMAND_VALUE 32778
#define _APS_NEXT_CONTROL_VALUE 2225
- Previous message: [GME-commit] GMESRC/GME/Interfaces InterfaceVersion.h,1.38,1.39
MgaUtil.idl,1.30,1.31 Parser.idl,1.4,1.5
- Next message: [GME-commit]
GMESRC/GME/Parser MgaXslt.cpp,NONE,1.1 MgaXslt.h,NONE,1.1
MgaXslt.rgs,NONE,1.1 Parser.cpp,1.3,1.4 Parser.dsp,1.10,1.11
Parser.rc,1.5,1.6 ParserLib.idl,1.3,1.4 resource.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list