Ticket #4475: docx-ver2.patch

File docx-ver2.patch, 750 bytes (added by pelya, 9 months ago)
  • misc/ext.d/doc.sh.in

    diff --git a/misc/ext.d/doc.sh.in b/misc/ext.d/doc.sh.in
    index c296ca270..4f460aa9b 100644
    a b do_view_action() { 
    5252        fi 
    5353        ;; 
    5454    msdoc) 
    55         if which wvHtml >/dev/null 2>&1; then 
     55        OOFFICE=`get_ooffice_executable` 
     56        if [ -n "${OOFFICE}" ]; then 
     57            tmp=`mktemp -d ${TMPDIR:-/tmp}/tmp.XXXXXXXXXX` 
     58            "${OOFFICE}" "-env:UserInstallation=file://$tmp" --headless --cat "${MC_EXT_FILENAME}" 
     59            rm -rf "$tmp" 
     60        elif which wvHtml >/dev/null 2>&1; then 
    5661            tmp=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX` 
    5762            wvHtml "${MC_EXT_FILENAME}" --targetdir="$tmp" page.html 
    5863            elinks -dump "$tmp/page.html"