]> git.lyx.org Git - lyx.git/blobdiff - src/format.h
Remove the now superseeded SConscript files, and some small missing parts to SConstruct
[lyx.git] / src / format.h
index 3751b6d0af2111d127d4ce4e46d860860809681e..07feb88d6c19ab48921c9347c5930c01090babcd 100644 (file)
@@ -84,16 +84,23 @@ public:
        Format const & get(FormatList::size_type i) const {
                return formatlist[i];
        }
-       ///
+       /// \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);
        ///