X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FFormat.cpp;h=050af1414f69ae0058849c9f26e35af9c68ca961;hb=66ca99798bff016b0a60cb10bd2124c5c228c8b6;hp=7e82f9a3b073756f4eadaed6ebc4bc702f9ed9d7;hpb=c68d754a749f2b5d162868544c07c21d6168b84b;p=lyx.git diff --git a/src/Format.cpp b/src/Format.cpp index 7e82f9a3b0..050af1414f 100644 --- a/src/Format.cpp +++ b/src/Format.cpp @@ -24,6 +24,7 @@ #include "support/lstrings.h" #include "support/os.h" #include "support/Systemcall.h" +#include "support/textutils.h" #include @@ -102,7 +103,7 @@ bool Format::isChildFormat() const { if (name_.empty()) return false; - return isdigit(name_[name_.length() - 1]); + return isDigitASCII(name_[name_.length() - 1]); } @@ -259,27 +260,6 @@ void Formats::setEditor(string const & name, string const & command) } -bool Formats::viewURL(docstring const & url) { - Format const * format = getFormat("html"); - if (!format) - return false; - - string command = libScriptSearch(format->viewer()); - - if (!contains(command, token_from_format)) - command += ' ' + token_from_format; - command = subst(command, token_from_format, quoteName(to_utf8(url))); - - LYXERR(Debug::FILES, "Executing command: " << command); - - Systemcall one; - one.startscript(Systemcall::DontWait, command); - - // we can't report any sort of error, since we aren't waiting - return true; -} - - bool Formats::view(Buffer const & buffer, FileName const & filename, string const & format_name) const {