]> git.lyx.org Git - lyx.git/blobdiff - src/Format.cpp
Remove exclamation mark from "String not found!"
[lyx.git] / src / Format.cpp
index 7e634b48becd98a8d3799ee3b80f47379d88a3d1..8e31a1e96bded7db0958f57b71a275a3b37a3f97 100644 (file)
@@ -23,7 +23,7 @@
 #include "support/gettext.h"
 #include "support/lstrings.h"
 #include "support/os.h"
-#include "support/Path.h"
+#include "support/PathChanger.h"
 #include "support/Systemcall.h"
 #include "support/textutils.h"
 #include "support/Translator.h"
@@ -115,6 +115,10 @@ private:
 
 } //namespace anon
 
+bool Format::formatSorter(Format const * lhs, Format const * rhs)
+{
+       return _(lhs->prettyname()) < _(rhs->prettyname());
+}
 
 bool operator<(Format const & a, Format const & b)
 {
@@ -336,7 +340,8 @@ string guessFormatFromContents(FileName const & fn)
                        format = "jpg";
 
                else if (contains(str, "%PDF"))
-                       format = "pdf";
+                       // autodetect pdf format for graphics inclusion
+                       format = "pdf6";
 
                else if (contains(str, "PNG"))
                        format = "png";
@@ -681,7 +686,7 @@ bool Formats::edit(Buffer const & buffer, FileName const & filename,
 
        // LinkBack files look like PDF, but have the .linkback extension
        string const ext = getExtension(filename.absFileName());
-       if (format_name == "pdf" && ext == "linkback") {
+       if (format_name == "pdf6" && ext == "linkback") {
 #ifdef USE_MACOSX_PACKAGING
                return editLinkBackFile(filename.absFileName().c_str());
 #else