]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
Small changes; ChangeLog is your friend
[lyx.git] / src / buffer.C
index 93ce39b729ba29ca1f34cbc2f8fa081971721181..f36aa069e7945b6e222e6a48f86cda9988a7a4a4 100644 (file)
@@ -167,14 +167,14 @@ Buffer::~Buffer()
 }
 
 
-string Buffer::getLatexName(bool no_path = true) const
+string Buffer::getLatexName(bool no_path /* = true */) const
 {
        return ChangeExtension(MakeLatexName(filename), 
                               ".tex", no_path); 
 }
 
 
-void Buffer::setReadonly(bool flag = true)
+void Buffer::setReadonly(bool flag /* = true */)
 {
        if (read_only != flag) {
                read_only = flag; 
@@ -1653,7 +1653,7 @@ void Buffer::makeLaTeXFile(string const & fname,
        
        // validate the buffer.
        lyxerr[Debug::LATEX] << "  Validating buffer..." << endl;
-       LaTeXFeatures features(tclass.numLayouts());
+       LaTeXFeatures features(params, tclass.numLayouts());
        validate(features);
        lyxerr[Debug::LATEX] << "  Buffer validation done." << endl;
        
@@ -1973,13 +1973,13 @@ void Buffer::makeLaTeXFile(string const & fname,
                string preamble, tmppreamble;
 
                // The optional packages;
-               preamble = features.getPackages(params);
+               preamble = features.getPackages();
 
                // this might be useful...
                preamble += "\n\\makeatletter\n\n";
 
                // Some macros LyX will need
-               tmppreamble = features.getMacros(params);
+               tmppreamble = features.getMacros();
 
                if (!tmppreamble.empty()) {
                        preamble += "\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "
@@ -1988,7 +1988,7 @@ void Buffer::makeLaTeXFile(string const & fname,
                }
 
                // the text class specific preamble 
-               tmppreamble = features.getTClassPreamble(params);
+               tmppreamble = features.getTClassPreamble();
                if (!tmppreamble.empty()) {
                        preamble += "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "
                                "Textclass specific LaTeX commands.\n"
@@ -3721,7 +3721,7 @@ void Buffer::validate(LaTeXFeatures & features) const
        }
        
        if (lyxerr.debugging(Debug::LATEX)) {
-               features.showStruct(params);
+               features.showStruct();
        }
 }
 
@@ -3925,3 +3925,25 @@ void Buffer::Dispatch(int action, string const & argument)
 
        } // end of switch
 }
+
+void Buffer::ChangeLanguage(Language const * from, Language const * to)
+{
+
+       LyXParagraph * par = paragraph;
+       while (par) {
+               par->ChangeLanguage(from,to);
+               par = par->next;
+       }
+}
+
+bool Buffer::isMultiLingual()
+{
+
+       LyXParagraph * par = paragraph;
+       while (par) {
+               if (par->isMultiLingual())
+                       return true;
+               par = par->next;
+       }
+       return false;
+}