From f3b66682f272645bef8f270f766cc6e70392da25 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Mon, 31 Jul 2006 17:43:59 +0000 Subject: [PATCH] Add converter to plain text and fix child format buglet * src/graph.C (Graph::getReachable): Only add a child format to only viewable formats if the child or parent has a viewer. Previously a child format was also added when there was no viewer at all. * lib/configure.py (checkFormatEntries): add text2, text3 and text4 formats (checkConverterEntries): add ps2ascii , pstotext and catdvi converters git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14528 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/configure.py | 12 ++++++++++++ src/graph.C | 9 +++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index 84253fa8b8..0ab15c7a80 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -240,6 +240,9 @@ def checkFormatEntries(): \Format linuxdoc sgml LinuxDoc x "" "%%" "document" \Format pdflatex tex "LaTeX (pdflatex)" "" "" "%%" "document" \Format text txt "Plain text" a "" "%%" "document" +\Format text2 txt "Plain text (pstotext)" "" "" "%%" "document" +\Format text3 txt "Plain text (ps2ascii)" "" "" "%%" "document" +\Format text4 txt "Plain text (catdvi)" "" "" "%%" "document" \Format textparagraph txt "Plain text (paragraphs)" "" "" "%%" "document"''' ]) # #checkProg('a Postscript interpreter', ['gs'], @@ -325,6 +328,15 @@ def checkConverterEntries(): checkProg('a PS to PDF converter', ['ps2pdf13 $$i $$o'], rc_entry = [ r'\converter ps pdf "%%" ""' ]) # + checkProg('a PS to TXT converter', ['pstotext $$i > $$o'], + rc_entry = [ r'\converter ps text2 "%%" ""' ]) + # + checkProg('a PS to TXT converter', ['ps2ascii $$i $$o'], + rc_entry = [ r'\converter ps text3 "%%" ""' ]) + # + checkProg('a DVI to TXT converter', ['catdvi $$i > $$o'], + rc_entry = [ r'\converter dvi text4 "%%" ""' ]) + # checkProg('a DVI to PS converter', ['dvips -o $$o $$i'], rc_entry = [ r'\converter dvi ps "%%" ""' ]) # diff --git a/src/graph.C b/src/graph.C index 2b34bf0857..87c67fc075 100644 --- a/src/graph.C +++ b/src/graph.C @@ -77,9 +77,14 @@ Graph::getReachable(int from, bool only_viewable, int const i = Q_.front(); Q_.pop(); Format const & format = formats.get(i); - if (!only_viewable || !format.viewer().empty() || - format.isChildFormat()) + if (!only_viewable || !format.viewer().empty()) result.push_back(i); + else if (format.isChildFormat()) { + Format const * const parent = + formats.getFormat(format.parentFormat()); + if (parent && !parent->viewer().empty()) + result.push_back(i); + } vector::const_iterator cit = vertices_[i].out_vertices.begin(); -- 2.39.2