Patch: import/export suffix fixes


Subject: Patch: import/export suffix fixes
From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Fri May 25 2001 - 08:38:02 CDT


I noticed some of the importers and exporters didn't have
consistent suffix lists in all cases. Here's a patch:

Andrew Dunbar.

-- 
http://linguaphile.sourceforge.net

Index: src/wp/impexp/xp/ie_exp_HRText.cpp =================================================================== RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_exp_HRText.cpp,v retrieving revision 1.5 diff -u -r1.5 ie_exp_HRText.cpp --- src/wp/impexp/xp/ie_exp_HRText.cpp 2001/05/25 05:52:20 1.5 +++ src/wp/impexp/xp/ie_exp_HRText.cpp 2001/05/25 13:22:37 @@ -122,7 +122,7 @@ bool IE_Exp_HRText_Sniffer::recognizeSuffix(const char * szSuffix) { - return (UT_stricmp(szSuffix,".abw") == 0); + return (!UT_stricmp(szSuffix,".txt") || !UT_stricmp(szSuffix, ".text")); } UT_Error IE_Exp_HRText_Sniffer::constructExporter(PD_Document * pDocument, @@ -137,8 +137,8 @@ const char ** pszSuffixList, IEFileType * ft) { - *pszDesc = "Human Readable Text (.txt)"; - *pszSuffixList = "*.txt"; + *pszDesc = "Human Readable Text (.txt, .text)"; + *pszSuffixList = "*.text; *.txt"; *ft = getFileType(); return true; } Index: src/wp/impexp/xp/ie_exp_HTML.cpp =================================================================== RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_exp_HTML.cpp,v retrieving revision 1.65 diff -u -r1.65 ie_exp_HTML.cpp --- src/wp/impexp/xp/ie_exp_HTML.cpp 2001/05/25 05:52:20 1.65 +++ src/wp/impexp/xp/ie_exp_HTML.cpp 2001/05/25 13:22:43 @@ -116,7 +116,8 @@ bool IE_Exp_HTML_Sniffer::recognizeSuffix(const char * szSuffix) { - return (!UT_stricmp(szSuffix,".html") || !UT_stricmp(szSuffix, ".htm")); + return (!(UT_stricmp(szSuffix,".html")) || !(UT_stricmp(szSuffix,".xhtml")) + || !(UT_stricmp(szSuffix,".htm"))); } UT_Error IE_Exp_HTML_Sniffer::constructExporter(PD_Document * pDocument, @@ -131,8 +132,8 @@ const char ** pszSuffixList, IEFileType * ft) { - *pszDesc = "XHTML (.html)"; - *pszSuffixList = "*.htm; *.html"; + *pszDesc = "XHTML (.html, .htm, .xhtml)"; + *pszSuffixList = "*.html; *.htm; *.xhtml"; *ft = getFileType(); return true; }

_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com



This archive was generated by hypermail 2b25 : Sat May 26 2001 - 03:51:07 CDT