#include <algorithm>
+
+namespace lyx {
+
using std::vector;
using std::reverse;
+using std::fill;
int Graph::bfs_init(int s, bool clear_visited)
int const i = Q_.front();
Q_.pop();
Format const & format = formats.get(i);
- if (format.name() == "lyx")
- continue;
- 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<int>::const_iterator cit =
vertices_[i].out_vertices.begin();
}
vector<Graph::Vertex> Graph::vertices_;
+
+
+} // namespace lyx