X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fad535eea353fa1ce2f15e3053fc3b96e9a0b02d..f2616db56739e4962f683f59ac9e207756efe23c:/utils/tex2rtf/src/tex2rtf.cpp?ds=inline diff --git a/utils/tex2rtf/src/tex2rtf.cpp b/utils/tex2rtf/src/tex2rtf.cpp index b7a9d99127..0e44e16304 100644 --- a/utils/tex2rtf/src/tex2rtf.cpp +++ b/utils/tex2rtf/src/tex2rtf.cpp @@ -596,6 +596,8 @@ void ShowOptions(void) OnInform(" -charset (default ansi)"); OnInform(" -twice"); OnInform(" -sync"); + OnInform(" -checkcurleybraces"); + OnInform(" -checksyntax"); OnInform(" -macros "); OnInform(" -winhelp"); OnInform(" -rtf"); @@ -663,7 +665,16 @@ void MyFrame::OnGo(wxCommandEvent& event) Tex2RTFYield(TRUE); Go(); - if (runTwice) + if (stopRunning) + { + SetStatusText("Build aborted!"); + wxString errBuf; + errBuf.Printf("\nErrors encountered during this pass: %lu\n", errorCount); + OnInform((char *)errBuf.c_str()); + } + + + if (runTwice && !stopRunning) { Tex2RTFYield(TRUE); Go(); @@ -905,7 +916,7 @@ bool Go(void) ChooseOutputFile(); #endif - if (!InputFile || !OutputFile) + if (!InputFile || !OutputFile || stopRunning) return FALSE; #ifndef NO_GUI @@ -979,6 +990,12 @@ bool Go(void) OnInform("Reading LaTeX file..."); TexLoadFile(InputFile); + if (stopRunning) + { + OkToClose = TRUE; + return FALSE; + } + switch (convertMode) { case TEX_RTF: @@ -1003,6 +1020,7 @@ bool Go(void) OnInform("*** Aborted by user."); success = FALSE; stopRunning = FALSE; + OkToClose = TRUE; } if (success) @@ -1046,7 +1064,9 @@ bool Go(void) TexCleanUp(); startedSections = FALSE; +#ifndef NO_GUI frame->SetStatusText("Aborted by user."); +#endif // GUI OnInform("Sorry, unsuccessful."); OkToClose = TRUE; @@ -1308,7 +1328,7 @@ char *Tex2RTFConnection::OnRequest(const wxString& topic, const wxString& item, #ifndef NO_GUI #ifndef __WXGTK__ -//void wxObject::Dump(ostream& str) +//void wxObject::Dump(wxSTD ostream& str) //{ // if (GetClassInfo() && GetClassInfo()->GetClassName()) // str << GetClassInfo()->GetClassName();