]> git.lyx.org Git - lyx.git/blobdiff - src/format.h
Fix bug 2485 and crash on middle mouse paste on math
[lyx.git] / src / format.h
index 9b5cdec9821cea143bdc399718af14ba2713dddd..07feb88d6c19ab48921c9347c5930c01090babcd 100644 (file)
@@ -86,14 +86,21 @@ public:
        }
        /// \returns format named \p name if it exists, otherwise 0
        Format const * getFormat(std::string const & name) const;
+       /*!
+        * Get the format of \p filename from file contents or, if this
+        * fails, from file extension.
+        * \returns file format if it could be found, otherwise an empty
+        * string.
+        */
+       std::string getFormatFromFile(std::string const & filename) const;
        ///
        int getNumber(std::string const & name) const;
        ///
        void add(std::string const & name);
        ///
        void add(std::string const & name, std::string const & extension,
-                std::string const & prettyname, std::string const & shortcut,
-                std::string const & viewer, std::string const & editor);
+                std::string const & prettyname, std::string const & shortcut,
+                std::string const & viewer, std::string const & editor);
        ///
        void erase(std::string const & name);
        ///