filter/source/config/fragments/types/generic_Text.xcu | 2 +- filter/source/textfilterdetect/filterdetect.cxx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
New commits: commit 86c7b2559eb1390fb72c97f8b54e41b6fdee0d7c Author: Maxim Monastirsky <momonas...@gmail.com> Date: Wed Dec 11 20:25:57 2013 +0200 Open .tab files with Calc .tab extension is a known extension for tab-separated values according to Wikipedia. Also add .tsv .tab files to the list of known text files, so XML detection code won't run on it, and won't output errors to console. Change-Id: Ifb8edc40900cb4669264e1e989c01efd61ff24bf Reviewed-on: https://gerrit.libreoffice.org/7039 Reviewed-by: Kohei Yoshida <libreoff...@kohei.us> Tested-by: Kohei Yoshida <libreoff...@kohei.us> diff --git a/filter/source/config/fragments/types/generic_Text.xcu b/filter/source/config/fragments/types/generic_Text.xcu index e0dc31d..45df03f 100644 --- a/filter/source/config/fragments/types/generic_Text.xcu +++ b/filter/source/config/fragments/types/generic_Text.xcu @@ -18,7 +18,7 @@ <node oor:name="generic_Text" oor:op="replace" > <prop oor:name="DetectService"><value>com.sun.star.comp.filters.PlainTextFilterDetect</value></prop> <prop oor:name="URLPattern"/> - <prop oor:name="Extensions"><value>csv txt</value></prop> + <prop oor:name="Extensions"><value>csv tsv tab txt</value></prop> <prop oor:name="MediaType"><value>text/plain</value></prop> <prop oor:name="Preferred"><value>false</value></prop> <prop oor:name="UIName"> diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx index 360d8d4..deaeecd8 100644 --- a/filter/source/textfilterdetect/filterdetect.cxx +++ b/filter/source/textfilterdetect/filterdetect.cxx @@ -89,6 +89,8 @@ OUString SAL_CALL PlainTextFilterDetect::detect(uno::Sequence<beans::PropertyVal setPropValue(lDescriptor, nFilter, "FilterName", OUString(CALC_TEXT_FILTER)); else if (aExt == "tsv") setPropValue(lDescriptor, nFilter, "FilterName", OUString(CALC_TEXT_FILTER)); + else if (aExt == "tab") + setPropValue(lDescriptor, nFilter, "FilterName", OUString(CALC_TEXT_FILTER)); else if (aExt == "xls") setPropValue(lDescriptor, nFilter, "FilterName", OUString(CALC_TEXT_FILTER)); else if (aExt == "txt") _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits