]> git.lyx.org Git - lyx.git/blobdiff - src/support/Messages.cpp
Maintain plain layout for separating paragraphs when switching layouts (#11936)
[lyx.git] / src / support / Messages.cpp
index 26a320b2d243c753c727b19947aade5ebfe0457b..842697ed538ed4328a60340031b2fcc381dc1d26 100644 (file)
@@ -83,9 +83,8 @@
 
 #include "support/lassert.h"
 
-#include <boost/cstdint.hpp>
-
 #include <cerrno>
+#include <cstdint>
 #include <fstream>
 #include <utility>
 
@@ -94,7 +93,6 @@
 #endif
 
 using namespace std;
-using boost::uint32_t;
 
 namespace lyx {
 
@@ -347,6 +345,19 @@ docstring const Messages::get(string const & m) const
        }
 }
 
+
+docstring const Messages::getIfFound(string const & m) const
+{
+       if (m.empty())
+               return docstring();
+
+       TranslationMap::const_iterator it = trans_map_.find(m);
+       if (it != trans_map_.end())
+               return it->second;
+       else
+               return docstring();
+}
+
 } // namespace lyx
 
 #else // ENABLE_NLS
@@ -375,6 +386,11 @@ bool Messages::available(string const & /* c */)
        return false;
 }
 
+docstring const Messages::getIfFound(string const & /* m */) const
+{
+       return docstring();
+}
+
 } // namespace lyx
 
 #endif