X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7e9968f70242bde7240927593f8e9af0dd2a8d53..0ffc92133bd05ff86fa5947e14c211f75fec9b2b:/utils/tex2rtf/src/htmlutil.cpp diff --git a/utils/tex2rtf/src/htmlutil.cpp b/utils/tex2rtf/src/htmlutil.cpp index 380c837ea2..b68d0b5b2f 100644 --- a/utils/tex2rtf/src/htmlutil.cpp +++ b/utils/tex2rtf/src/htmlutil.cpp @@ -10,10 +10,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -1826,7 +1822,7 @@ void HTMLOnMacro(int macroId, int no_args, bool start) static bool CheckTypeRef() { wxString typeDecl = GetArgData(); - if( !typeDecl.IsEmpty() ) { + if( !typeDecl.empty() ) { typeDecl.Replace(wxT("\\"),wxT("")); wxString label = typeDecl; label.Replace(wxT("const"),wxT("")); @@ -2247,7 +2243,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) if (imageFile) delete[] imageFile; imageFile = NULL; - if (!f.IsEmpty()) + if (!f.empty()) { imageFile = copystring(f); } @@ -3031,223 +3027,222 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) bool HTMLGo(void) { - fileId = 0; - inVerbatim = false; - indentLevel = 0; - inTabular = false; - startRows = false; - tableVerticalLineLeft = false; - tableVerticalLineRight = false; - noColumns = 0; - - if (InputFile && OutputFile) - { - // Do some HTML-specific transformations on all the strings, - // recursively - Text2HTML(GetTopLevelChunk()); - - wxChar buf[300]; - if (truncateFilenames) - wxSnprintf(buf, sizeof(buf), _T("%s.htm"), FileRoot); - else - wxSnprintf(buf, sizeof(buf), _T("%s_contents.html"), FileRoot); - if (TitlepageName) delete[] TitlepageName; - TitlepageName = copystring(buf); - Titlepage = wxFopen(buf, _T("w")); + fileId = 0; + inVerbatim = false; + indentLevel = 0; + inTabular = false; + startRows = false; + tableVerticalLineLeft = false; + tableVerticalLineRight = false; + noColumns = 0; - if (truncateFilenames) - wxSnprintf(buf, sizeof(buf), _T("%s_fc.htm"), FileRoot); - else - wxSnprintf(buf, sizeof(buf), _T("%s_fcontents.html"), FileRoot); + if (!InputFile.empty() && !OutputFile.empty()) + { + // Do some HTML-specific transformations on all the strings, + // recursively + Text2HTML(GetTopLevelChunk()); - contentsFrameName = copystring(buf); + wxChar buf[300]; + if (truncateFilenames) + wxSnprintf(buf, sizeof(buf), _T("%s.htm"), FileRoot); + else + wxSnprintf(buf, sizeof(buf), _T("%s_contents.html"), FileRoot); + if (TitlepageName) delete[] TitlepageName; + TitlepageName = copystring(buf); + Titlepage = wxFopen(buf, _T("w")); - Contents = wxFopen(TmpContentsName, _T("w")); + if (truncateFilenames) + wxSnprintf(buf, sizeof(buf), _T("%s_fc.htm"), FileRoot); + else + wxSnprintf(buf, sizeof(buf), _T("%s_fcontents.html"), FileRoot); - if (htmlFrameContents) - { -// FrameContents = wxFopen(TmpFrameContentsName, _T("w")); - FrameContents = wxFopen(contentsFrameName, _T("w")); - wxFprintf(FrameContents, _T("\n
\n"), ContentsNameString); + if (htmlFrameContents) + { +// FrameContents = wxFopen(TmpFrameContentsName, _T("w")); + FrameContents = wxFopen(contentsFrameName, _T("w")); + wxFprintf(FrameContents, _T("\n
\n"), ContentsNameString); - TraverseDocument(); - wxFprintf(Contents, _T("