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;
}