if (!params().master.empty()) {
FileName const master_file = makeAbsPath(params().master,
onlyPath(absFileName()));
- if (isLyXFilename(master_file.absFileName())) {
+ if (isLyXFileName(master_file.absFileName())) {
Buffer * master =
checkAndLoadLyXFile(master_file, true);
if (master) {
fi != end; ++fi)
// FIXME UNICODE
sgmlpreamble << "\n<!ENTITY " << fi->first
- << (isSGMLFilename(fi->second) ? " SYSTEM \"" : " \"")
+ << (isSGMLFileName(fi->second) ? " SYSTEM \"" : " \"")
<< makeRelPath(from_utf8(fi->second), basename) << "\">";
return sgmlpreamble.str();
if (!params().master.empty()) {
FileName const master_file = support::makeAbsPath(params().master,
support::onlyPath(buffer().absFileName()));
- if (isLyXFilename(master_file.absFileName())) {
+ if (isLyXFileName(master_file.absFileName())) {
Buffer * master = checkAndLoadLyXFile(master_file);
if (master) {
if (master->isChild(const_cast<Buffer *>(&buffer())))
dlg.setButton1(qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
dlg.setButton2(qt_("Templates|#T#t"), toqstr(lyxrc.template_path));
- if (!isLyXFilename(fname.absFileName()))
+ if (!isLyXFileName(fname.absFileName()))
fname.changeExtension(".lyx");
FileDialog::Result result =
if (fname.empty())
return false;
- if (!isLyXFilename(fname.absFileName()))
+ if (!isLyXFileName(fname.absFileName()))
fname.changeExtension(".lyx");
}
string const absname = makeAbsPath(
params.filename.outputFileName(buffer.filePath()), buffer.filePath()).absFileName();
- if (!external_in_tmpdir && !isValidLaTeXFilename(absname)) {
+ if (!external_in_tmpdir && !isValidLaTeXFileName(absname)) {
lyx::frontend::Alert::warning(_("Invalid filename"),
_("The following filename is likely to cause trouble "
"when running the exported file through LaTeX: ") +
<< endl;
}
} else if (!runparams.inComment && runparams.nice && not_from_texmf &&
- !isValidLaTeXFilename(database)) {
+ !isValidLaTeXFileName(database)) {
frontend::Alert::warning(_("Invalid filename"),
_("The following filename is likely to cause trouble "
"when running the exported file through LaTeX: ") +
params().filename.outputFileName(masterBuffer->filePath()) :
onlyFileName(temp_file.absFileName());
- if (runparams.nice && !isValidLaTeXFilename(output_file)) {
+ if (runparams.nice && !isValidLaTeXFileName(output_file)) {
frontend::Alert::warning(_("Invalid filename"),
_("The following filename is likely to cause trouble "
"when running the exported file through LaTeX: ") +
child_buffer_ = 0;
}
- if (!isLyXFilename(included_file.absFileName()))
+ if (!isLyXFileName(included_file.absFileName()))
return 0;
Buffer * child = theBufferList().getBuffer(included_file);
if (!runparams.nice)
incfile = mangled;
- else if (!isValidLaTeXFilename(incfile)) {
+ else if (!isValidLaTeXFileName(incfile)) {
frontend::Alert::warning(_("Invalid filename"),
_("The following filename is likely to cause trouble "
"when running the exported file through LaTeX: ") +
//Don't try to load or copy the file if we're
//in a comment or doing a dryrun
} else if (isInputOrInclude(params()) &&
- isLyXFilename(included_file.absFileName())) {
+ isLyXFileName(included_file.absFileName())) {
//if it's a LyX file and we're inputting or including,
//try to load it so we can write the associated latex
if (!loadIfNeeded())
exportfile);
// \input wants file with extension (default is .tex)
- if (!isLyXFilename(included_file.absFileName())) {
+ if (!isLyXFileName(included_file.absFileName())) {
incfile = latex_path(incfile);
// FIXME UNICODE
os << '\\' << from_ascii(params().getCmdName())
// (If we wanted to get really arcane, we could run some tex2html
// converter on the included file. But that's just masochistic.)
FileName const included_file = includedFilename(buffer(), params());
- if (!isLyXFilename(included_file.absFileName())) {
+ if (!isLyXFileName(included_file.absFileName())) {
frontend::Alert::warning(_("Unsupported Inclusion"),
bformat(_("LyX does not know how to include non-LyX files when "
"generating HTML output. Offending file:\n%1$s"),
string const included_file =
includedFilename(buffer(), params()).absFileName();
- if (isLyXFilename(included_file))
+ if (isLyXFileName(included_file))
writefile = changeExtension(included_file, ".sgml");
else
writefile = included_file;
namespace lyx {
namespace support {
-bool isLyXFilename(string const & filename)
+bool isLyXFileName(string const & filename)
{
return suffixIs(ascii_lowercase(filename), ".lyx");
}
-bool isSGMLFilename(string const & filename)
+bool isSGMLFileName(string const & filename)
{
return suffixIs(ascii_lowercase(filename), ".sgml");
}
-bool isValidLaTeXFilename(string const & filename)
+bool isValidLaTeXFileName(string const & filename)
{
string const invalid_chars("#$%{}()[]\"^");
return filename.find_first_of(invalid_chars) == string::npos;
search_mode mode = must_exist);
///
-bool isLyXFilename(std::string const & filename);
+bool isLyXFileName(std::string const & filename);
///
-bool isSGMLFilename(std::string const & filename);
+bool isSGMLFileName(std::string const & filename);
///
-bool isValidLaTeXFilename(std::string const & filename);
+bool isValidLaTeXFileName(std::string const & filename);
/** Returns the path of a library data file.
Search the file name.ext in the subdirectory dir of