Internal xsltproc: small Windows adjustments

This commit is contained in:
Jean-Francois Dockes 2019-01-08 14:38:30 +01:00
parent 8f6a59783f
commit 3be55f4ad4
3 changed files with 40 additions and 38 deletions

View File

@ -237,6 +237,7 @@ bool MimeHandlerXslt::Internal::process_doc_or_string(
LOGERR("MimeHandlerXslt::set_document_file_impl: both ss empty??\n");
return false;
}
p->m_metaData[cstr_dj_keycharset] = cstr_utf8;
if (nullptr == bodySS) {
string md5;
if (apply_stylesheet(fn, string(), data, metaOrAllSS, result,

View File

@ -47,54 +47,43 @@ application/x-lzma = uncompress python rcluncomp.py 7z %f %t
# each filter, see the exemples below (ie: msword)
[index]
application/msword = execm python rcldoc.py
application/pdf = execm python rclpdf.py
application/vnd.ms-excel = execm python rclxls.py
application/vnd.ms-powerpoint = execm python rclppt.py
application/vnd.openxmlformats-officedocument.wordprocessingml.document = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.wordprocessingml.template = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.presentationml.template = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.presentationml.presentation = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.spreadsheetml.template =\
execm python rclopxml.py
application/vnd.oasis.opendocument.text = execm python rclsoff.py
application/vnd.oasis.opendocument.text-template = execm python rclsoff.py
application/vnd.oasis.opendocument.presentation = execm python rclsoff.py
application/vnd.oasis.opendocument.spreadsheet = execm python rclsoff.py
application/vnd.oasis.opendocument.graphics = execm python rclsoff.py
application/vnd.sun.xml.calc = execm python rclsoff.py
application/vnd.sun.xml.calc.template = execm python rclsoff.py
application/vnd.sun.xml.draw = execm python rclsoff.py
application/vnd.sun.xml.draw.template = execm python rclsoff.py
application/vnd.sun.xml.impress = execm python rclsoff.py
application/vnd.sun.xml.impress.template = execm python rclsoff.py
application/vnd.sun.xml.math = execm python rclsoff.py
application/vnd.sun.xml.writer = execm python rclsoff.py
application/vnd.sun.xml.writer.global = execm python rclsoff.py
application/vnd.sun.xml.writer.template = execm python rclsoff.py
application/pdf = execm python rclpdf.py
application/vnd.oasis.opendocument.text = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.oasis.opendocument.text-template = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.oasis.opendocument.presentation = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.oasis.opendocument.spreadsheet = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.oasis.opendocument.graphics = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.sun.xml.calc = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.sun.xml.calc.template = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.sun.xml.draw = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.sun.xml.draw.template = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.sun.xml.impress = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.sun.xml.impress.template = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.sun.xml.math = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.sun.xml.writer = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.sun.xml.writer.global = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.sun.xml.writer.template = internal xsltproc meta.xml opendoc-meta.xsl content.xml opendoc-body.xsl
application/vnd.wordperfect = exec wpd/wpd2html;mimetype=text/html
application/x-abiword = execm python rclabw.py
text/x-fictionbook = execm python rclfb2.py
application/x-abiword = internal xsltproc abiword.xsl
text/x-fictionbook = internal xsltproc fb2.xsl
application/vnd.openxmlformats-officedocument.wordprocessingml.document = \
execm python rclopxml.py
internal xsltproc docProps/core.xml openxml-meta.xsl word/document.xml openxml-word-body.xsl
application/vnd.openxmlformats-officedocument.wordprocessingml.template = \
execm python rclopxml.py
internal xsltproc docProps/core.xml openxml-meta.xsl word/document.xml openxml-word-body.xsl
application/vnd.openxmlformats-officedocument.presentationml.template = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.presentationml.presentation = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = \
execm python rclopxml.py
internal xsltproc docProps/core.xml openxml-meta.xsl xl/sharedStrings.xml openxml-xls-body.xsl
application/vnd.openxmlformats-officedocument.spreadsheetml.template =\
execm python rclopxml.py
internal xsltproc docProps/core.xml openxml-meta.xsl xl/sharedStrings.xml openxml-xls-body.xsl
application/epub+zip = execm python rclepub
# Returned by xdg-mime for .js. Future-proofing
@ -130,7 +119,7 @@ image/jp2 = execm python rclimg.py
image/jpeg = execm python rclimg.py
image/png = execm python rclimg.py
image/tiff = execm python rclimg.py
image/svg+xml = execm python rclsvg.py
image/svg+xml = internal xsltproc svg.xsl
#image/x-xcf = execm perl rclimg
inode/symlink = internal
application/x-zerosize = internal

View File

@ -14,6 +14,10 @@ DEFINES -= UNICODE
DEFINES -= _UNICODE
DEFINES += _MBCS
DEFINES += PSAPI_VERSION=1
DEFINES += READFILE_ENABLE_MINIZ
# This is necessary to avoid an undefined impl__xmlFree.
# See comment in libxml/xmlexports.h
DEFINES += LIBXML_STATIC
SOURCES += \
../../aspell/rclaspell.cpp \
@ -50,6 +54,7 @@ SOURCES += \
../../internfile/mh_mail.cpp \
../../internfile/mh_mbox.cpp \
../../internfile/mh_text.cpp \
../../internfile/mh_xslt.cpp \
../../internfile/mimehandler.cpp \
../../internfile/myhtmlparse.cpp \
../../internfile/txtdcode.cpp \
@ -105,6 +110,7 @@ SOURCES += \
../../utils/md5.cpp \
../../utils/md5ut.cpp \
../../utils/mimeparse.cpp \
../../utils/miniz.cpp \
../../utils/pathut.cpp \
../../utils/pxattr.cpp \
../../utils/rclionice.cpp \
@ -129,10 +135,16 @@ windows {
contains(QMAKE_CC, cl){
# Visual Studio
}
LIBS += c:/temp/xapian-core-1.4.5/.libs/libxapian-30.dll \
c:/temp/zlib-1.2.8/zlib1.dll -liconv -lshlwapi -lpsapi -lkernel32
LIBS += C:/recolldeps/libxslt/libxslt-1.1.29/win32/bin.mingw/libxslt.a \
C:/recolldeps/libxml2/libxml2-2.9.4+dfsg1/win32/bin.mingw/libxml2.a \
c:/recolldeps/xapian-core-1.4.5/.libs/libxapian-30.dll \
c:/recolldeps/zlib-1.2.8/zlib1.dll \
-liconv -lshlwapi -lpsapi -lkernel32
INCLUDEPATH += ../../windows \
C:/temp/xapian-core-1.4.5/include
C:/recolldeps/xapian-core-1.4.5/include \
C:/recolldeps/libxslt/libxslt-1.1.29/ \
C:/recolldeps/libxml2/libxml2-2.9.4+dfsg1/include
}
unix {