#include <config.h>
#include "support/FileFilterList.h"
-#include "support/lstrings.h"
-// FIXME Interface violation
-#include "gettext.h"
+#include "support/lstrings.h"
+#include "support/gettext.h"
#include <boost/regex.hpp>
#include <boost/tokenizer.hpp>
#include <sstream>
-using lyx::docstring;
-
-using std::distance;
-using std::ostringstream;
-using std::string;
-using std::vector;
-
+using namespace std;
namespace {
namespace lyx {
namespace support {
-FileFilterList::Filter::Filter(lyx::docstring const & description,
- std::string const & globs)
+FileFilterList::Filter::Filter(docstring const & description,
+ string const & globs)
: desc_(description)
{
typedef boost::tokenizer<boost::char_separator<char> > Tokenizer;
FileFilterList::FileFilterList(docstring const & qt_style_filter)
{
// FIXME UNICODE
- string const filter = lyx::to_utf8(qt_style_filter)
+ string const filter = to_utf8(qt_style_filter)
+ (qt_style_filter.empty() ? string() : ";;")
- + lyx::to_utf8(_("All files (*)"));
+ + to_utf8(_("All files (*)"));
// Split data such as "TeX documents (*.tex);;LyX Documents (*.lyx)"
// into individual filters.
filters_.push_back(Filter(docstring(), trim(filter)));
} else {
// FIXME UNICODE
- docstring const desc = lyx::from_utf8(string(what[1].first, what[1].second));
+ docstring const desc = from_utf8(string(what[1].first, what[1].second));
string const globs = string(what[2].first, what[2].second);
filters_.push_back(Filter(trim(desc), trim(globs)));
}
bool const has_description = !fit->description().empty();
if (has_description)
- ss << lyx::to_utf8(fit->description()) << " (";
+ ss << to_utf8(fit->description()) << " (";
for (Filter::glob_iterator git = gbegin; git != gend; ++git) {
if (git != gbegin)
ss << ')';
}
- return lyx::from_utf8(ss.str());
+ return from_utf8(ss.str());
}
} // namespace support