]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
remove unused macro
[lyx.git] / src / Paragraph.cpp
index aeece98bddc6e20b6b0b50b6757fdd69640a45a8..19a99cfe09683ad1d42bdb094bbb73bdf9e2a951 100644 (file)
@@ -53,7 +53,6 @@
 #include "support/lstrings.h"
 #include "support/Messages.h"
 #include "support/textutils.h"
-#include "support/unicode.h"
 
 #include <sstream>
 #include <vector>
@@ -992,13 +991,6 @@ void Paragraph::Private::validate(LaTeXFeatures & features,
 
        // then the layouts
        features.useLayout(layout.name());
-       if (!layout.requires().empty()) {
-               vector<string> req = layout.requires();
-               for (vector<string>::const_iterator it = req.begin();
-                    it != req.end(); ++it) {
-                       features.require(*it);
-               }
-       }
 
        // then the fonts
        fontlist_.validate(features);
@@ -1158,11 +1150,9 @@ void Paragraph::write(Buffer const & buf, ostream & os,
                        }
                        // this check is to amend a bug. LyX sometimes
                        // inserts '\0' this could cause problems.
-                       if (c != '\0') {
-                               vector<char> tmp = ucs4_to_utf8(c);
-                               tmp.push_back('\0');
-                               os << &tmp[0];
-                       } else
+                       if (c != '\0')
+                               os << to_utf8(docstring(1, c));
+                       else
                                lyxerr << "ERROR (Paragraph::writeFile):"
                                        " NULL char in structure." << endl;
                        ++column;
@@ -2546,7 +2536,7 @@ Inset const * Paragraph::getInset(pos_type pos) const
 
 
 void Paragraph::changeCase(BufferParams const & bparams, pos_type pos,
-               pos_type right, TextCase action)
+               pos_type right, TextCase action)
 {
        // process sequences of modified characters; in change
        // tracking mode, this approach results in much better