]>
git.saurik.com Git - wxWidgets.git/blob - utils/tex2rtf/src/tex2rtf.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Converts Latex to linear/WinHelp RTF, HTML, wxHelp.
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
32 #if defined(NO_GUI) || defined(__UNIX__)
48 #if (defined(__WXGTK__) || defined(__WXMOTIF__)) && !defined(NO_GUI)
49 #include "tex2rtf.xpm"
52 const float versionNo
= 2.0;
54 TexChunk
*currentMember
= NULL
;
55 bool startedSections
= FALSE
;
56 char *contentsString
= NULL
;
57 bool suppressNameDecoration
= FALSE
;
58 bool OkToClose
= TRUE
;
63 extern char *BigBuffer
;
64 extern char *TexFileRoot
;
65 extern char *TexBibName
; // Bibliography output file name
66 extern char *TexTmpBibName
; // Temporary bibliography output file name
67 extern wxList ColourTable
;
68 extern TexChunk
*TopLevel
;
71 wxHelpController
*HelpInstance
= NULL
;
75 static char *ipc_buffer
= NULL
;
76 static char Tex2RTFLastStatus
[100];
77 Tex2RTFServer
*TheTex2RTFServer
= NULL
;
81 char *bulletFile
= NULL
;
83 FILE *Contents
= NULL
; // Contents page
84 FILE *Chapters
= NULL
; // Chapters (WinHelp RTF) or rest of file (linear RTF)
85 FILE *Sections
= NULL
;
86 FILE *Subsections
= NULL
;
87 FILE *Subsubsections
= NULL
;
89 FILE *WinHelpContentsFile
= NULL
;
91 char *InputFile
= NULL
;
92 char *OutputFile
= NULL
;
93 char *MacroFile
= copystring("tex2rtf.ini");
95 char *FileRoot
= NULL
;
96 char *ContentsName
= NULL
; // Contents page from last time around
97 char *TmpContentsName
= NULL
; // Current contents page
98 char *TmpFrameContentsName
= NULL
; // Current frame contents page
99 char *WinHelpContentsFileName
= NULL
; // WinHelp .cnt file
100 char *RefName
= NULL
; // Reference file name
102 char *RTFCharset
= copystring("ansi");
105 int BufSize
= 100; // Size of buffer in K
111 void ShowOptions(void);
115 #if wxUSE_GUI || !defined(__UNIX__)
116 // wxBase for Unix does not have wxBuffer
119 char *wxBuffer
; // we must init it, otherwise tex2rtf will crash
121 int main(int argc
, char **argv
)
123 wxMenuBar
*menuBar
= NULL
;
124 MyFrame
*frame
= NULL
;
126 // DECLARE_APP(MyApp)
129 // `Main program' equivalent, creating windows and returning main app frame
133 // Use default list of macros defined in tex2any.cc
134 DefineDefaultMacros();
135 AddMacroDef(ltHARDY
, "hardy", 0);
137 FileRoot
= new char[300];
138 ContentsName
= new char[300];
139 TmpContentsName
= new char[300];
140 TmpFrameContentsName
= new char[300];
141 WinHelpContentsFileName
= new char[300];
142 RefName
= new char[300];
144 ColourTable
.DeleteContents(TRUE
);
148 // Read input/output files
151 if (argv
[1][0] != '-')
158 if (argv
[2][0] != '-')
160 OutputFile
= argv
[2];
168 wxBuffer
= new char[1500];
169 // this is done in wxApp, but NO_GUI version doesn't call it :-(
171 if (!InputFile
|| !OutputFile
)
173 cout
<< "Tex2RTF: input or output file is missing.\n";
181 TexPathList
.EnsureFileAccessible(InputFile
);
183 if (!InputFile
|| !OutputFile
)
184 isInteractive
= TRUE
;
187 for (i
= n
; i
< argc
;)
189 if (strcmp(argv
[i
], "-winhelp") == 0)
192 convertMode
= TEX_RTF
;
196 else if (strcmp(argv
[i
], "-interactive") == 0)
199 isInteractive
= TRUE
;
202 else if (strcmp(argv
[i
], "-sync") == 0) // Don't yield
207 else if (strcmp(argv
[i
], "-rtf") == 0)
210 convertMode
= TEX_RTF
;
212 else if (strcmp(argv
[i
], "-html") == 0)
215 convertMode
= TEX_HTML
;
217 else if (strcmp(argv
[i
], "-xlp") == 0)
220 convertMode
= TEX_XLP
;
222 else if (strcmp(argv
[i
], "-twice") == 0)
227 else if (strcmp(argv
[i
], "-macros") == 0)
232 MacroFile
= copystring(argv
[i
]);
236 else if (strcmp(argv
[i
], "-bufsize") == 0)
241 BufSize
= atoi(argv
[i
]);
245 else if (strcmp(argv
[i
], "-charset") == 0)
252 if (strcmp(s
, "ansi") == 0 || strcmp(s
, "pc") == 0 || strcmp(s
, "mac") == 0 ||
253 strcmp(s
, "pca") == 0)
254 RTFCharset
= copystring(s
);
257 OnError("Incorrect argument for -charset");
265 sprintf(buf
, "Invalid switch %s.\n", argv
[i
]);
276 #if defined(__WXMSW__) && !defined(NO_GUI)
278 Tex2RTFLastStatus
[0] = 0; // DDE connection return value
279 TheTex2RTFServer
= new Tex2RTFServer
;
280 TheTex2RTFServer
->Create("TEX2RTF");
283 #if defined(__WXMSW__) && defined(__WIN16__)
284 // Limit to max Windows array size
285 if (BufSize
> 64) BufSize
= 64;
288 TexInitialize(BufSize
);
289 ResetContentsLevels(0);
297 // Create the main frame window
298 frame
= new MyFrame(NULL
, -1, "Tex2RTF", wxPoint(-1, -1), wxSize(400, 300));
299 frame
->CreateStatusBar(2);
302 // TODO: uncomment this when we have tex2rtf.xpm
303 frame
->SetIcon(wxICON(tex2rtf
));
307 sprintf(buf
, "Tex2RTF [%s]", FileNameFromPath(InputFile
));
308 frame
->SetTitle(buf
);
312 wxMenu
*file_menu
= new wxMenu
;
313 file_menu
->Append(TEX_GO
, "&Go", "Run converter");
314 file_menu
->Append(TEX_SET_INPUT
, "Set &Input File", "Set the LaTeX input file");
315 file_menu
->Append(TEX_SET_OUTPUT
, "Set &Output File", "Set the output file");
316 file_menu
->AppendSeparator();
317 file_menu
->Append(TEX_VIEW_LATEX
, "View &LaTeX File", "View the LaTeX input file");
318 file_menu
->Append(TEX_VIEW_OUTPUT
, "View Output &File", "View output file");
319 file_menu
->Append(TEX_SAVE_FILE
, "&Save log file", "Save displayed text into file");
320 file_menu
->AppendSeparator();
321 file_menu
->Append(TEX_QUIT
, "E&xit", "Exit Tex2RTF");
323 wxMenu
*macro_menu
= new wxMenu
;
325 macro_menu
->Append(TEX_LOAD_CUSTOM_MACROS
, "&Load Custom Macros", "Load custom LaTeX macro file");
326 macro_menu
->Append(TEX_VIEW_CUSTOM_MACROS
, "View &Custom Macros", "View custom LaTeX macros");
328 wxMenu
*mode_menu
= new wxMenu
;
330 mode_menu
->Append(TEX_MODE_RTF
, "Output linear &RTF", "Wordprocessor-compatible RTF");
331 mode_menu
->Append(TEX_MODE_WINHELP
, "Output &WinHelp RTF", "WinHelp-compatible RTF");
332 mode_menu
->Append(TEX_MODE_HTML
, "Output &HTML", "HTML World Wide Web hypertext file");
333 mode_menu
->Append(TEX_MODE_XLP
, "Output &XLP", "wxHelp hypertext help file");
335 wxMenu
*help_menu
= new wxMenu
;
337 help_menu
->Append(TEX_HELP
, "&Help", "Tex2RTF Contents Page");
338 help_menu
->Append(TEX_ABOUT
, "&About Tex2RTF", "About Tex2RTF");
340 menuBar
= new wxMenuBar
;
341 menuBar
->Append(file_menu
, "&File");
342 menuBar
->Append(macro_menu
, "&Macros");
343 menuBar
->Append(mode_menu
, "&Conversion Mode");
344 menuBar
->Append(help_menu
, "&Help");
346 frame
->SetMenuBar(menuBar
);
347 frame
->textWindow
= new wxTextCtrl(frame
, -1, "", wxPoint(-1, -1), wxSize(-1, -1), wxTE_READONLY
|wxTE_MULTILINE
);
349 (*frame
->textWindow
) << "Welcome to Julian Smart's LaTeX to RTF converter.\n";
353 HelpInstance
= new wxHelpController();
354 HelpInstance
->Initialize("tex2rtf");
358 * Read macro/initialisation file
363 if ((path
= TexPathList
.FindValidPath(MacroFile
)) != "")
364 ReadCustomMacros((char*) (const char*) path
);
368 if (winHelp
&& (convertMode
== TEX_RTF
))
369 strcat(buf
, "WinHelp RTF");
370 else if (!winHelp
&& (convertMode
== TEX_RTF
))
371 strcat(buf
, "linear RTF");
372 else if (convertMode
== TEX_HTML
) strcat(buf
, "HTML");
373 else if (convertMode
== TEX_XLP
) strcat(buf
, "XLP");
374 strcat(buf
, " mode.");
375 frame
->SetStatusText(buf
, 1);
384 * Read macro/initialisation file
389 if ((path
= TexPathList
.FindValidPath(MacroFile
)) != "")
390 ReadCustomMacros((char*) (const char*) path
);
402 // Return the main frame window
413 wxNode
*node
= CustomMacroList
.First();
416 CustomMacro
*macro
= (CustomMacro
*)node
->Data();
419 node
= CustomMacroList
.First();
421 MacroDefs
.BeginFind();
422 node
= MacroDefs
.Next();
425 TexMacroDef
* def
= (TexMacroDef
*) node
->Data();
427 node
= MacroDefs
.Next();
431 delete TheTex2RTFServer
;
446 delete currentArgData
;
447 currentArgData
= NULL
;
461 delete TexTmpBibName
;
462 TexTmpBibName
= NULL
;
476 delete TmpContentsName
;
477 TmpContentsName
= NULL
;
479 if (TmpFrameContentsName
)
481 delete TmpFrameContentsName
;
482 TmpFrameContentsName
= NULL
;
484 if (WinHelpContentsFileName
)
486 delete WinHelpContentsFileName
;
487 WinHelpContentsFileName
= NULL
;
510 // TODO: this simulates zero-memory leaks!
511 // Otherwise there are just too many...
513 wxDebugContext::SetCheckpoint();
519 void ShowOptions(void)
522 sprintf(buf
, "Tex2RTF version %.2f", versionNo
);
524 OnInform("Usage: tex2rtf [input] [output] [switches]\n");
525 OnInform("where valid switches are");
526 OnInform(" -interactive");
527 OnInform(" -bufsize <size in K>");
528 OnInform(" -charset <pc | pca | ansi | mac> (default ansi)");
531 OnInform(" -macros <filename>");
532 OnInform(" -winhelp");
540 BEGIN_EVENT_TABLE(MyFrame
, wxFrame
)
541 EVT_CLOSE(MyFrame::OnCloseWindow
)
542 EVT_MENU(TEX_QUIT
, MyFrame::OnExit
)
543 EVT_MENU(TEX_GO
, MyFrame::OnGo
)
544 EVT_MENU(TEX_SET_INPUT
, MyFrame::OnSetInput
)
545 EVT_MENU(TEX_SET_OUTPUT
, MyFrame::OnSetOutput
)
546 EVT_MENU(TEX_SAVE_FILE
, MyFrame::OnSaveFile
)
547 EVT_MENU(TEX_VIEW_LATEX
, MyFrame::OnViewLatex
)
548 EVT_MENU(TEX_VIEW_OUTPUT
, MyFrame::OnViewOutput
)
549 EVT_MENU(TEX_VIEW_CUSTOM_MACROS
, MyFrame::OnShowMacros
)
550 EVT_MENU(TEX_LOAD_CUSTOM_MACROS
, MyFrame::OnLoadMacros
)
551 EVT_MENU(TEX_MODE_RTF
, MyFrame::OnModeRTF
)
552 EVT_MENU(TEX_MODE_WINHELP
, MyFrame::OnModeWinHelp
)
553 EVT_MENU(TEX_MODE_HTML
, MyFrame::OnModeHTML
)
554 EVT_MENU(TEX_MODE_XLP
, MyFrame::OnModeXLP
)
555 EVT_MENU(TEX_HELP
, MyFrame::OnHelp
)
556 EVT_MENU(TEX_ABOUT
, MyFrame::OnAbout
)
559 // My frame constructor
560 MyFrame::MyFrame(wxFrame
*frame
, wxWindowID id
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
):
561 wxFrame(frame
, id
, title
, pos
, size
)
564 void MyFrame::OnCloseWindow(wxCloseEvent
& event
)
566 if (!stopRunning
&& !OkToClose
)
578 void MyFrame::OnExit(wxCommandEvent
& event
)
584 void MyFrame::OnGo(wxCommandEvent
& event
)
587 menuBar
->EnableTop(0, FALSE
);
588 menuBar
->EnableTop(1, FALSE
);
589 menuBar
->EnableTop(2, FALSE
);
590 menuBar
->EnableTop(3, FALSE
);
600 menuBar
->EnableTop(0, TRUE
);
601 menuBar
->EnableTop(1, TRUE
);
602 menuBar
->EnableTop(2, TRUE
);
603 menuBar
->EnableTop(3, TRUE
);
606 void MyFrame::OnSetInput(wxCommandEvent
& event
)
608 ChooseInputFile(TRUE
);
611 void MyFrame::OnSetOutput(wxCommandEvent
& event
)
613 ChooseOutputFile(TRUE
);
616 void MyFrame::OnSaveFile(wxCommandEvent
& event
)
618 wxString s
= wxFileSelector("Save text to file", "", "", "txt", "*.txt");
621 textWindow
->SaveFile(s
);
623 sprintf(buf
, "Saved text to %s", (const char*) s
);
624 frame
->SetStatusText(buf
, 0);
628 void MyFrame::OnViewOutput(wxCommandEvent
& event
)
631 if (OutputFile
&& wxFileExists(OutputFile
))
633 textWindow
->LoadFile(OutputFile
);
635 wxString
str(wxFileNameFromPath(OutputFile
));
636 sprintf(buf
, "Tex2RTF [%s]", (const char*) str
);
637 frame
->SetTitle(buf
);
641 void MyFrame::OnViewLatex(wxCommandEvent
& event
)
644 if (InputFile
&& wxFileExists(InputFile
))
646 textWindow
->LoadFile(InputFile
);
648 wxString
str(wxFileNameFromPath(OutputFile
));
649 sprintf(buf
, "Tex2RTF [%s]", (const char*) str
);
650 frame
->SetTitle(buf
);
654 void MyFrame::OnLoadMacros(wxCommandEvent
& event
)
657 wxString s
= wxFileSelector("Choose custom macro file", wxPathOnly(MacroFile
), wxFileNameFromPath(MacroFile
), "ini", "*.ini");
658 if (s
!= "" && wxFileExists(s
))
660 MacroFile
= copystring(s
);
661 ReadCustomMacros((char*) (const char*) s
);
666 void MyFrame::OnShowMacros(wxCommandEvent
& event
)
673 void MyFrame::OnModeRTF(wxCommandEvent
& event
)
675 convertMode
= TEX_RTF
;
679 SetStatusText("In linear RTF mode.", 1);
682 void MyFrame::OnModeWinHelp(wxCommandEvent
& event
)
684 convertMode
= TEX_RTF
;
688 SetStatusText("In WinHelp RTF mode.", 1);
691 void MyFrame::OnModeHTML(wxCommandEvent
& event
)
693 convertMode
= TEX_HTML
;
697 SetStatusText("In HTML mode.", 1);
700 void MyFrame::OnModeXLP(wxCommandEvent
& event
)
702 convertMode
= TEX_XLP
;
705 SetStatusText("In XLP mode.", 1);
708 void MyFrame::OnHelp(wxCommandEvent
& event
)
711 HelpInstance
->LoadFile();
712 HelpInstance
->DisplayContents();
716 void MyFrame::OnAbout(wxCommandEvent
& event
)
720 char *platform
= " (32-bit)";
723 char *platform
= " (16-bit)";
728 sprintf(buf
, "Tex2RTF Version %.2f%s\nLaTeX to RTF, WinHelp, HTML and wxHelp Conversion\n\n(c) Julian Smart 1999", versionNo
, platform
);
729 wxMessageBox(buf
, "About Tex2RTF");
732 void ChooseInputFile(bool force
)
734 if (force
|| !InputFile
)
736 wxString s
= wxFileSelector("Choose LaTeX input file", wxPathOnly(InputFile
), wxFileNameFromPath(InputFile
), "tex", "*.tex");
739 // Different file, so clear index entries.
741 ResetContentsLevels(0);
744 InputFile
= copystring(s
);
745 wxString str
= wxFileNameFromPath(InputFile
);
746 sprintf(buf
, "Tex2RTF [%s]", (const char*) str
);
747 frame
->SetTitle(buf
);
753 void ChooseOutputFile(bool force
)
755 char extensionBuf
[10];
757 strcpy(wildBuf
, "*.");
760 path
= wxPathOnly(OutputFile
);
762 path
= wxPathOnly(InputFile
);
768 strcpy(extensionBuf
, "rtf");
769 strcat(wildBuf
, "rtf");
774 strcpy(extensionBuf
, "xlp");
775 strcat(wildBuf
, "xlp");
780 #if defined(__WXMSW__) && defined(__WIN16__)
781 strcpy(extensionBuf
, "htm");
782 strcat(wildBuf
, "htm");
784 strcpy(extensionBuf
, "html");
785 strcat(wildBuf
, "html");
790 if (force
|| !OutputFile
)
792 wxString s
= wxFileSelector("Choose output file", path
, wxFileNameFromPath(OutputFile
),
793 extensionBuf
, wildBuf
);
795 OutputFile
= copystring(s
);
807 if (!InputFile
|| !OutputFile
)
814 wxString str
= wxFileNameFromPath(InputFile
);
816 sprintf(buf
, "Tex2RTF [%s]", (const char*) str
);
817 frame
->SetTitle(buf
);
823 // Find extension-less filename
824 strcpy(FileRoot
, OutputFile
);
825 StripExtension(FileRoot
);
827 if (truncateFilenames
&& convertMode
== TEX_HTML
)
829 // Truncate to five characters. This ensures that
830 // we can generate DOS filenames such as thing999. But 1000 files
831 // may not be enough, of course...
832 char* sName
= wxFileNameFromPath( FileRoot
); // this Julian's method is non-destructive reference
835 if(strlen( sName
) > 5)
836 sName
[5] = '\0'; // that should do!
839 sprintf(ContentsName
, "%s.con", FileRoot
);
840 sprintf(TmpContentsName
, "%s.cn1", FileRoot
);
841 sprintf(TmpFrameContentsName
, "%s.frc", FileRoot
);
842 sprintf(WinHelpContentsFileName
, "%s.cnt", FileRoot
);
843 sprintf(RefName
, "%s.ref", FileRoot
);
845 TexPathList
.EnsureFileAccessible(InputFile
);
848 wxString s
= TexPathList
.FindValidPath("bullet.bmp");
851 wxString str
= wxFileNameFromPath(s
);
852 bulletFile
= copystring(str
);
856 if (wxFileExists(RefName
))
857 ReadTexReferences(RefName
);
859 bool success
= FALSE
;
861 if (InputFile
&& OutputFile
)
863 if (!FileExists(InputFile
))
865 OnError("Cannot open input file!");
873 sprintf(buf
, "Working, pass %d...", passNumber
);
874 frame
->SetStatusText(buf
);
878 OnInform("Reading LaTeX file...");
879 TexLoadFile(InputFile
);
902 OnInform("*** Aborted by user.");
909 WriteTexReferences(RefName
);
911 startedSections
= FALSE
;
915 long tim
= wxGetElapsedTime();
916 sprintf(buf
, "Finished PASS #%d in %ld seconds.\n", passNumber
, (long)(tim
/1000.0));
920 sprintf(buf
, "Done, %d %s.", passNumber
, (passNumber
> 1) ? "passes" : "pass");
921 frame
->SetStatusText(buf
);
924 sprintf(buf
, "Done, %d %s.", passNumber
, (passNumber
> 1) ? "passes" : "pass");
933 startedSections
= FALSE
;
935 OnInform("Sorry, unsuccessful.");
940 void OnError(char *msg
)
943 cerr
<< "Error: " << msg
<< "\n";
946 if (isInteractive
&& frame
)
947 (*frame
->textWindow
) << "Error: " << msg
<< "\n";
951 cerr
<< "Error: " << msg
<< "\n";
962 void OnInform(char *msg
)
968 if (isInteractive
&& frame
)
969 (*frame
->textWindow
) << msg
<< "\n";
987 void OnMacro(int macroId
, int no_args
, bool start
)
993 RTFOnMacro(macroId
, no_args
, start
);
998 XLPOnMacro(macroId
, no_args
, start
);
1003 HTMLOnMacro(macroId
, no_args
, start
);
1009 bool OnArgument(int macroId
, int arg_no
, bool start
)
1011 switch (convertMode
)
1015 return RTFOnArgument(macroId
, arg_no
, start
);
1020 return XLPOnArgument(macroId
, arg_no
, start
);
1025 return HTMLOnArgument(macroId
, arg_no
, start
);
1035 #if defined(__WXMSW__) && !defined(NO_GUI)
1041 wxConnectionBase
*Tex2RTFServer::OnAcceptConnection(const wxString
& topic
)
1043 if (topic
== "TEX2RTF")
1046 ipc_buffer
= new char[1000];
1048 return new Tex2RTFConnection(ipc_buffer
, 4000);
1058 Tex2RTFConnection::Tex2RTFConnection(char *buf
, int size
):wxDDEConnection(buf
, size
)
1062 Tex2RTFConnection::~Tex2RTFConnection(void)
1066 bool SplitCommand(char *data
, char *firstArg
, char *secondArg
)
1071 int len
= strlen(data
);
1073 // Find first argument (command name)
1076 if (data
[i
] == ' ' || data
[i
] == 0)
1080 firstArg
[i
] = data
[i
];
1087 // Find second argument
1090 while (data
[i
] != 0)
1092 secondArg
[j
] = data
[i
];
1101 bool Tex2RTFConnection::OnExecute(const wxString
& topic
, char *data
, int size
, int format
)
1103 strcpy(Tex2RTFLastStatus
, "OK");
1106 char secondArg
[300];
1107 if (SplitCommand(data
, firstArg
, secondArg
))
1109 bool hasArg
= (strlen(secondArg
) > 0);
1110 if (strcmp(firstArg
, "INPUT") == 0 && hasArg
)
1112 if (InputFile
) delete[] InputFile
;
1113 InputFile
= copystring(secondArg
);
1117 wxString str
= wxFileNameFromPath(InputFile
);
1118 sprintf(buf
, "Tex2RTF [%s]", (const char*) str
);
1119 frame
->SetTitle(buf
);
1122 else if (strcmp(firstArg
, "OUTPUT") == 0 && hasArg
)
1124 if (OutputFile
) delete[] OutputFile
;
1125 OutputFile
= copystring(secondArg
);
1127 else if (strcmp(firstArg
, "GO") == 0)
1129 strcpy(Tex2RTFLastStatus
, "WORKING");
1131 strcpy(Tex2RTFLastStatus
, "CONVERSION ERROR");
1133 strcpy(Tex2RTFLastStatus
, "OK");
1135 else if (strcmp(firstArg
, "EXIT") == 0)
1137 if (frame
) frame
->Close();
1139 else if (strcmp(firstArg
, "MINIMIZE") == 0 || strcmp(firstArg
, "ICONIZE") == 0)
1142 frame
->Iconize(TRUE
);
1144 else if (strcmp(firstArg
, "SHOW") == 0 || strcmp(firstArg
, "RESTORE") == 0)
1148 frame
->Iconize(FALSE
);
1154 // Try for a setting
1155 strcpy(Tex2RTFLastStatus
, RegisterSetting(firstArg
, secondArg
, FALSE
));
1157 if (frame
&& strcmp(firstArg
, "conversionMode") == 0)
1162 if (winHelp
&& (convertMode
== TEX_RTF
))
1163 strcat(buf
, "WinHelp RTF");
1164 else if (!winHelp
&& (convertMode
== TEX_RTF
))
1165 strcat(buf
, "linear RTF");
1166 else if (convertMode
== TEX_HTML
) strcat(buf
, "HTML");
1167 else if (convertMode
== TEX_XLP
) strcat(buf
, "XLP");
1168 strcat(buf
, " mode.");
1169 frame
->SetStatusText(buf
, 1);
1177 char *Tex2RTFConnection::OnRequest(const wxString
& topic
, const wxString
& item
, int *size
, int format
)
1179 return Tex2RTFLastStatus
;
1186 //void wxObject::Dump(ostream& str)
1188 // if (GetClassInfo() && GetClassInfo()->GetClassName())
1189 // str << GetClassInfo()->GetClassName();
1191 // str << "unknown object class";