]> git.lyx.org Git - lyx.git/blobdiff - src/TexRow.cpp
Merge branch 'master' of git.lyx.org:lyx
[lyx.git] / src / TexRow.cpp
index e72af19a784862e4d29886b1e68397571ebf0375..21be0b8e30f69f1eed42ea4273cad5d514746918 100644 (file)
@@ -35,8 +35,11 @@ bool TexRow::RowEntryList::addEntry(RowEntry const & entry)
        if (!entry.is_math) {
                if (text_entry_ < size())
                        return false;
-               else
+               else {
                        text_entry_ = size();
+                       push_back(RowEntry(entry));
+                       return true;
+               }
        }
        forceAddEntry(entry);
        return true;
@@ -75,7 +78,7 @@ void TexRow::RowEntryList::append(RowEntryList const & row)
 
 
 TexRow::TextEntry const TexRow::text_none = { -1, 0 };
-TexRow::RowEntry const TexRow::row_none = { false, TexRow::text_none };
+TexRow::RowEntry const TexRow::row_none = { false, { TexRow::text_none } };
 
 
 bool TexRow::isNone(TextEntry const & t)
@@ -475,7 +478,7 @@ docstring TexRow::asString(RowEntry const & entry)
 ///prepends the texrow to the source given by tex, for debugging purpose
 void TexRow::prepend(docstring_list & tex) const
 {
-       int const prefix_length = 25;
+       size_type const prefix_length = 25;
        if (tex.size() < rowlist_.size())
                tex.resize(rowlist_.size());
        std::vector<RowEntryList>::const_iterator it = rowlist_.begin();
@@ -489,7 +492,7 @@ void TexRow::prepend(docstring_list & tex) const
                        entry += asString(*it2);
                if (entry.length() < prefix_length)
                        entry = entry + docstring(prefix_length - entry.length(), L' ');
-               int i = it - beg;
+               ptrdiff_t i = it - beg;
                tex[i] = entry + "  " + tex[i];
        }
 }