]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalTemplate.cpp
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / ExternalTemplate.cpp
index 9f6ba3ce5d2aeca0605bf83f4b96db5e4e7cec53..f3884f91d6acf8d5237420bd91e4b10ad6074f73 100644 (file)
@@ -13,9 +13,9 @@
 
 #include "ExternalTemplate.h"
 
-#include "support/debug.h"
 #include "Lexer.h"
 
+#include "support/debug.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
 #include "support/Package.h"
@@ -24,6 +24,7 @@
 #include <ostream>
 
 using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 namespace external {
@@ -59,7 +60,7 @@ Template::Format::Format()
 
 TemplateManager::TemplateManager()
 {
-       readTemplates(support::package().user_support());
+       readTemplates(package().user_support());
        if (lyxerr.debugging(Debug::EXTERNAL)) {
                dumpPreambleDefs(lyxerr);
                lyxerr << '\n';
@@ -136,7 +137,7 @@ public:
                vector<string>::const_iterator qit = ft.requirements.begin();
                vector<string>::const_iterator qend = ft.requirements.end();
                for (; qit != qend; ++qit) {
-                       lyxerr << "req:" << *qit << std::endl;
+                       lyxerr << "req:" << *qit << endl;
                        ost << "\t\tRequirement " << *qit << '\n';
                }
 
@@ -219,7 +220,7 @@ TemplateManager::getTemplateByName(string const & name) const
 string const
 TemplateManager::getPreambleDefByName(string const & name) const
 {
-       string const trimmed_name = support::trim(name);
+       string const trimmed_name = trim(name);
        if (trimmed_name.empty())
                return string();
 
@@ -231,9 +232,9 @@ TemplateManager::getPreambleDefByName(string const & name) const
 }
 
 
-void TemplateManager::readTemplates(support::FileName const & path)
+void TemplateManager::readTemplates(FileName const & path)
 {
-       support::PathChanger p(path);
+       PathChanger p(path);
 
        enum TemplateTags {
                TM_PREAMBLEDEF = 1,
@@ -251,7 +252,7 @@ void TemplateManager::readTemplates(support::FileName const & path)
 
        Lexer lex(templatetags, TM_TEMPLATE_END);
 
-       support::FileName const filename = support::libFileSearch("", "external_templates");
+       FileName const filename = libFileSearch("", "external_templates");
        if (filename.empty() || !lex.setFile(filename)) {
                lex.printError("external::TemplateManager::readTemplates: "
                               "No template file");
@@ -299,7 +300,7 @@ void add(vector<TransformID> & ids, string const & name)
        if (int(id) == -1) {
                lyxerr << "external::Template::readTemplate\n"
                       << "Transform " << name << " is not recognized"
-                      << std::endl;
+                      << endl;
        } else {
                ids.push_back(id);
        }
@@ -385,17 +386,17 @@ void Template::readTemplate(Lexer & lex)
 
 namespace {
 
-void transform_not_found(std::ostream & os, string const & transform)
+void transform_not_found(ostream & os, string const & transform)
 {
        os << "external::Format::readFormat. Transformation \""
-          << transform << "\" is unrecognized." << std::endl;
+          << transform << "\" is unrecognized." << endl;
 }
 
 
-void transform_class_not_found(std::ostream & os, string const & tclass)
+void transform_class_not_found(ostream & os, string const & tclass)
 {
        os << "external::Format::readFormat. Transformation class \""
-          << tclass << "\" is unrecognized." << std::endl;
+          << tclass << "\" is unrecognized." << endl;
 }