The branch, betterpaint, has been updated.
  discards  c2575265a75fef6a5078e78bfe0fa88eaf7aa8bd (commit)
  discards  9ed658633cea9221f24b80881f66950251e8b4e5 (commit)
  discards  d57a233e1b194d0f8fb5e2f8942f1cf737e1711a (commit)
  discards  3e0ec32e78023a8cb47f5da532912b7f41874765 (commit)
  discards  5c78d680835a6f331c2e1ca954d451aee61f4a29 (commit)
  discards  9b9b4c6c86bd0c7a49299f9b667cf8069f37b08d (commit)
  discards  8a8cbfae6bf723ff1399e6ed777dec70a1cf3459 (commit)
  discards  cd64dc2270ebe12b4dd3a4efafb20ec835f5e177 (commit)
  discards  db3d035089e988f4eef071e4f1885f5a451526c9 (commit)
  discards  f4f3fa973ec37b34a052b93f37eb7958efea550a (commit)
  discards  989be39f48f7efe90d1e612ac6fb836faf79708b (commit)
  discards  949f48c2d272d949299298412fc430480e6fac15 (commit)
  discards  3810b52f7563877be8f2ffa595506612c1ac40d2 (commit)
  discards  c1bbf74088a33c9cd7f2d9243abec24e9288510c (commit)
  discards  c30a698517f5f560480593168371d8154d5d4e8e (commit)
  discards  640c70a1e808151b58820d9841a57d17204535f1 (commit)
  discards  454af396dc178c37637831ad649c192b9ebe2b9c (commit)
  discards  d3fcea878a0a8b9328c0c6fcadb727f4d69d445e (commit)
  discards  281368c681252e1f92b6a13e4447b656f79b48e0 (commit)
  discards  c07208fbb4516d93b5c28bc63cb215b57c278355 (commit)
  discards  93fb68b1637bc01f85faa1b8ac373fd34032a9f2 (commit)
  discards  26a525ef1cce8bcb3f693bca31b7b2d18848f45e (commit)
  discards  de003b4ec71db8bb5d0fe0f6160b5c417470dbd3 (commit)
  discards  e3e690e39d6bf9a3fd54edfa09d544eb810b1893 (commit)
  discards  d9b81486a2157db7dce67130cdbfb90a6b28ad51 (commit)
  discards  09f975504fd29d27826037b8388c5a71220bab69 (commit)
  discards  db54b72eb945bd7032a5d45916f5acc559c0162a (commit)
  discards  8d35c8447ff7bdf906696e876b9a2946f852e455 (commit)
  discards  7fcf2e2599a5a651c89f9bf412b5ab8e2659e8cb (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (c2575265a75fef6a5078e78bfe0fa88eaf7aa8bd)
            \
             N -- N -- N (65a068109cf8773aa202fcca930ed0d580eb5275)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

- Log -----------------------------------------------------------------

commit 65a068109cf8773aa202fcca930ed0d580eb5275
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Tue May 17 15:00:09 2016 +0200

    RowPainter const cleanup
    
    Change the various paint* helpers to take a single row element as argument.
    
    Do not update x_ in the various paint* helpers. Constify them. Update x_ in 
paintText and paintOnlyInsets instead.
    
    Remove an empty call to paintForeignMark in paintInset (the call did 
nothing since orig_x == x_ at this point).

diff --git a/development/PAINTING_ANALYSIS b/development/PAINTING_ANALYSIS
index 78719f5..beb0fad 100644
--- a/development/PAINTING_ANALYSIS
+++ b/development/PAINTING_ANALYSIS
@@ -113,14 +113,24 @@ topBottomSpace parameter should be removed after that.
 
    The helper version should return a Row::Element instead of an InsetTable.
 
-** Do not make RowPainter operations update x_
+** DONE Do not make RowPainter operations update x_
 
 It is better to make them const and update x_ separately.
 
-Then it will be possible to reorder the painting of the different
-elements. In particular, if text is painted last, it will be more
-visible in the presence of underlines (foreign language, change
-tracking, spell check).
+** reorder the painting of the different elements.
+
+In particular, if text is painted last, it will be more visible in the
+presence of underlines (foreign language, change tracking, spell
+check).
+
+** Remember rtl status in the row object
+
+This will avoid to pass a Paragraph object to methods that do not need it.
+
+** Rewrite RowPainter::paintSelection using row information
+
+Currently it uses some very complicated code. It should be possible to
+reuse the logic of paintStringAndSel.
 
 ** Set inset position during metrics phase
 
diff --git a/src/Row.h b/src/Row.h
index 0bd4597..f69eeca 100644
--- a/src/Row.h
+++ b/src/Row.h
@@ -62,6 +62,7 @@ public:
                          extra(0), font(f), change(ch), final(false) {}
 
                // Return total width of element, including separator overhead
+               // FIXME: Cache this value or the number of separators?
                double full_width() const { return dim.wid + extra * 
countSeparators(); }
                // Return the number of separator in the element (only STRING 
type)
                int countSeparators() const;
diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp
index e6c6353..1c2b65d 100644
--- a/src/RowPainter.cpp
+++ b/src/RowPainter.cpp
@@ -104,7 +104,7 @@ FontInfo RowPainter::labelFont() const
 // This draws green lines around each inset.
 
 
-void RowPainter::paintInset(Row::Element const & e)
+void RowPainter::paintInset(Row::Element const & e) const
 {
        // Handle selection
        bool const pi_selected = pi_.selected;
@@ -135,12 +135,6 @@ void RowPainter::paintInset(Row::Element const & e)
        e.inset->drawSelection(pi_, x1, yo_);
        e.inset->draw(pi_, x1, yo_);
 
-       Dimension const & dim = pi_.base.bv->coordCache().insets().dim(e.inset);
-
-       paintForeignMark(x_, e.font.language(), dim.descent());
-
-       x_ += dim.width();
-
        // Restore full_repaint status.
        pi_.full_repaint = pi_full_repaint;
        pi_.change_ = pi_change;
@@ -148,6 +142,7 @@ void RowPainter::paintInset(Row::Element const & e)
        pi_.selected = pi_selected;
 
 #ifdef DEBUG_METRICS
+       Dimension const & dim = pi_.base.bv->coordCache().insets().dim(e.inset);
        int const x2 = x1 + dim.wid;
        int const y1 = yo_ + dim.des;
        int const y2 = yo_ - dim.asc;
@@ -159,8 +154,9 @@ void RowPainter::paintInset(Row::Element const & e)
 }
 
 
-void RowPainter::paintForeignMark(double orig_x, Language const * lang, int 
desc) const
+void RowPainter::paintForeignMark(Row::Element const & e) const
 {
+       Language const * lang = e.font.language();
        if (!lyxrc.mark_foreign_language)
                return;
        if (lang == latex_language)
@@ -168,14 +164,14 @@ void RowPainter::paintForeignMark(double orig_x, Language 
const * lang, int desc
        if (lang == pi_.base.bv->buffer().params().language)
                return;
 
+       int const desc = e.inset ? e.dim.descent() : 0;
        int const y = yo_ + solid_line_offset_ + desc + solid_line_thickness_ / 
2;
-       pi_.pain.line(int(orig_x), y, int(x_), y, Color_language,
+       pi_.pain.line(int(x_), y, int(x_ + e.full_width()), y, Color_language,
                Painter::line_solid, solid_line_thickness_);
 }
 
 
-void RowPainter::paintMisspelledMark(double const orig_x,
-                                     Row::Element const & e) const
+void RowPainter::paintMisspelledMark(Row::Element const & e) const
 {
        // if changed the misspelled marker gets placed slightly lower than 
normal
        // to avoid drawing at the same vertical offset
@@ -224,15 +220,14 @@ void RowPainter::paintMisspelledMark(double const orig_x,
                if (x1 > x2)
                        swap(x1, x2);
 
-               pi_.pain.line(int(orig_x) + x1, y, int(orig_x) + x2, y,
-                             Color_error,
+               pi_.pain.line(x_ + x1, y, x_ + x2, y, Color_error,
                              Painter::line_onoffdash, thickness);
                pos = range.last + 1;
        }
 }
 
 
-void RowPainter::paintStringAndSel(Row::Element const & e)
+void RowPainter::paintStringAndSel(Row::Element const & e) const
 {
        // at least part of text selected?
        bool const some_sel = (e.endpos >= row_.sel_beg && e.pos < row_.sel_end)
@@ -255,21 +250,19 @@ void RowPainter::paintStringAndSel(Row::Element const & e)
                              min(row_.sel_end, e.endpos) - e.pos,
                              e.extra, e.full_width());
        }
-       x_ += e.full_width();
 }
 
 
-void RowPainter::paintChange(double orig_x, Font const & font,
-                             Change const & change) const
+void RowPainter::paintChange(Row::Element const & e) const
 {
-       if (!change.changed())
+       if (!e.change.changed())
                return;
        // Calculate 1/3 height of font
-       FontMetrics const & fm = theFontMetrics(font);
-       int const y_bar = change.deleted() ? yo_ - fm.maxAscent() / 3
+       FontMetrics const & fm = theFontMetrics(e.font);
+       int const y_bar = e.change.deleted() ? yo_ - fm.maxAscent() / 3
                : yo_ + 2 * solid_line_offset_ + solid_line_thickness_;
-       pi_.pain.line(int(orig_x), y_bar, int(x_), y_bar,
-                     change.color(), Painter::line_solid, 
solid_line_thickness_);
+       pi_.pain.line(int(x_), y_bar, int(x_ + e.full_width()), y_bar,
+                     e.change.color(), Painter::line_solid, 
solid_line_thickness_);
 }
 
 
@@ -504,7 +497,7 @@ static int getEndLabel(pit_type p, Text const & text)
 }
 
 
-void RowPainter::paintLast()
+void RowPainter::paintLast() const
 {
        bool const is_rtl = text_.isRTL(par_);
        int const endlabel = getEndLabel(pit_, text_);
@@ -578,16 +571,14 @@ void RowPainter::paintOnlyInsets()
                Row::Element const & e = *cit;
                if (e.type == Row::INSET) {
                        // If outer row has changed, nested insets are 
repainted completely.
+                       // FIXME: check what this really does. The test is 
weird.
                        bool const nested_inset =
                                (e.inset->asInsetMath() && 
!e.inset->asInsetMath()->asMacroTemplate())
                                || e.inset->asInsetText() || 
e.inset->asInsetTabular();
-                       if (!nested_inset) {
-                               x_ += e.full_width();
-                               continue;
-                       }
-                       paintInset(e);
-               } else
-                       x_ += e.full_width();
+                       if (nested_inset)
+                               paintInset(e);
+               }
+               x_ += e.full_width();
        }
 }
 
@@ -597,9 +588,7 @@ void RowPainter::paintText()
        Row::const_iterator cit = row_.begin();
        Row::const_iterator const & end = row_.end();
        for ( ; cit != end ; ++cit) {
-               double const orig_x = x_;
                Row::Element const & e = *cit;
-               int foreign_descent = 0;
 
                switch (e.type) {
                case Row::STRING:
@@ -608,25 +597,25 @@ void RowPainter::paintText()
 
                        // Paint the spelling marks if enabled.
                        if (lyxrc.spellcheck_continuously && pi_.do_spellcheck 
&& pi_.pain.isDrawingEnabled())
-                               paintMisspelledMark(orig_x, e);
+                               paintMisspelledMark(e);
                        break;
-               case Row::INSET: {
-                       // If outer row has changed, nested insets are 
repainted completely.
+
+               case Row::INSET:
                        paintInset(e);
-                       foreign_descent = e.dim.descent();
-               }
                        break;
+
                case Row::SPACE:
                        pi_.pain.textDecoration(e.font.fontInfo(), int(x_), 
yo_, int(e.full_width()));
-                       x_ += e.full_width();
                }
 
                // The line that indicates word in a different language
-               paintForeignMark(orig_x, e.font.language(), foreign_descent);
+               paintForeignMark(e);
 
                // change tracking (not for insets that track their own changes)
                if (e.type != Row::INSET || ! e.inset->canTrackChanges())
-                       paintChange(orig_x, e.font, e.change);
+                       paintChange(e);
+
+               x_ += e.full_width();
        }
 }
 
diff --git a/src/RowPainter.h b/src/RowPainter.h
index cb70f5d..5ad1662 100644
--- a/src/RowPainter.h
+++ b/src/RowPainter.h
@@ -52,19 +52,18 @@ public:
        void paintChangeBar() const;
        void paintTooLargeMarks(bool const left, bool const right) const;
        void paintFirst() const;
-       void paintLast();
+       void paintLast() const;
        void paintText();
        void paintOnlyInsets();
        void paintSelection() const;
 
 private:
-       void paintSeparator(double width, Font const & font);
-       void paintForeignMark(double orig_x, Language const * lang, int desc = 
0) const;
-       void paintStringAndSel(Row::Element const & e);
-       void paintMisspelledMark(double orig_x, Row::Element const & e) const;
-       void paintChange(double orig_x , Font const & font, Change const & 
change) const;
+       void paintForeignMark(Row::Element const & e) const;
+       void paintStringAndSel(Row::Element const & e) const;
+       void paintMisspelledMark(Row::Element const & e) const;
+       void paintChange(Row::Element const & e) const;
        void paintAppendixStart(int y) const;
-       void paintInset(Row::Element const & e);
+       void paintInset(Row::Element const & e) const;
 
        /// return the label font for this row
        FontInfo labelFont() const;

commit bc5cf43c8effe2bc125adb88eace493f7cd86cc7
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Wed May 11 14:16:08 2016 +0200

    Update PAINTING_ANALYSIS and add a new task

diff --git a/development/PAINTING_ANALYSIS b/development/PAINTING_ANALYSIS
index acb033d..78719f5 100644
--- a/development/PAINTING_ANALYSIS
+++ b/development/PAINTING_ANALYSIS
@@ -58,15 +58,14 @@ The global idea would be to extend FitCursor to cover also 
horizontal
 cursor.
 
 
-* Proposals
-
-
 * Clean-up of drawing code
 
 The goal is to make painting with drawing disable fast enough that it
 can be used after every metrics computation. Then we can separate real
 drawing from metrics.
 
+Other changes are only clean-ups.
+
 ** DONE RowPainter
 
 Inset position is set in paintInset, paintOnlyInsets, and paintText.
@@ -114,29 +113,14 @@ topBottomSpace parameter should be removed after that.
 
    The helper version should return a Row::Element instead of an InsetTable.
 
-** TODO make Inset::display() more useful
+** Do not make RowPainter operations update x_
 
-[This has been started in the features/betterbreak branch. Time will
-tell whether it really helps. The question in particular is the
-handling of separator insets]
+It is better to make them const and update x_ separately.
 
-Extending the DisplayType enum would allow to remove special cases
-from the code.
-
-The enumeration could be like
-: Inline = 0
-: BreakBefore = 1 // break row before this inset
-: BreakAfter = 2 // break row after this inset
-: CanBreakAfter = 4 // optionally break row after this inset
-: AlignLeft = 8
-: AlignRight = 16
-: NoBoundary = 32 // do not allow cursor to go at the end of the row
-:                 //before display inset
-: Display = BreakBefore|BreakAfter
-
-A display equation would be Display, other could be Display|AlignLeft
-BreakAfter can be used by Newline or separator insets
-CanBreakAfter can be used by the optional hyphen InsetSpecialChar.
+Then it will be possible to reorder the painting of the different
+elements. In particular, if text is painted last, it will be more
+visible in the presence of underlines (foreign language, change
+tracking, spell check).
 
 ** Set inset position during metrics phase
 
@@ -222,12 +206,8 @@ update flag is Update::None.
 ** Metrics computation
 
 This is triggered by bv::updateMetrics, which calls tm::redoParagraph for
-  + all visible paragraphs
-  + paragraph above the screen (up to one page)
-  + paragraphs below the screen (up to one page again)
-
-The paragraphs outside of the screen are required to make PageUp/Down
-work.
+all visible paragraphs. Paragraphs above or below the screen (needed
+for page up/down) and computed as needed.
 
 tm::redoParagraph will call Inset::metrics for each inset. In the case
 of text insets, this will invoke recursively tm::metrics, which redoes

commit a1c52588be41f1511a1dcb69374ddb839836ef24
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Apr 8 16:34:46 2016 +0200

    Set vertical margins in redoParagraph, not setRowHeight
    
    It is actually easier to set the 20 pixels margin in redoParagraph, since 
it is not necessary to take newlines in account when deciding what is the real 
last row of the paragraph.
    
    Moreover this solves the following bug (present in 2.1.x too): when the 
document ends with a newling, the bottom margin disappears.
    
    Update PAINTING_ANALYSIS with new tasks.

diff --git a/development/PAINTING_ANALYSIS b/development/PAINTING_ANALYSIS
index 74aaa99..acb033d 100644
--- a/development/PAINTING_ANALYSIS
+++ b/development/PAINTING_ANALYSIS
@@ -100,7 +100,25 @@ version.
 
 ==> more versions, no optional parameters.
 
-** make Inset::display() more useful
+** DONE When a document ends with a newline, add the bottom margin anyway
+
+The code that tests for a newline was added at 6bb98d07 in 2007.
+
+** When a paragraph ends with a newline, compute correctly the height of the 
extra row.
+** Rewrite TextMetrics::completionPosAndDim using row information
+
+Currently it uses setRowHeight in a very weird way. In particular the
+topBottomSpace parameter should be removed after that.
+
+** Rewrite TextMetrics::editXY, checkInsetHit using row information 
(getPosNearX)?
+
+   The helper version should return a Row::Element instead of an InsetTable.
+
+** TODO make Inset::display() more useful
+
+[This has been started in the features/betterbreak branch. Time will
+tell whether it really helps. The question in particular is the
+handling of separator insets]
 
 Extending the DisplayType enum would allow to remove special cases
 from the code.
diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 8483ec1..bc86968 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -471,6 +471,21 @@ bool TextMetrics::redoParagraph(pit_type const pit)
                pm.dim().des += row.height();
        } while (first < par.size() || need_new_row);
 
+       // FIXME: It might be better to move this in another method
+       // specially tailored for the main text.
+       // Top and bottom margin of the document (only at top-level)
+       if (text_->isMainText()) {
+               if (pit == 0) {
+                       pm.rows().front().dimension().asc += 20;
+                       pm.dim().des += 20;
+               }
+               ParagraphList const & pars = text_->paragraphs();
+               if (pit + 1 == pit_type(pars.size())) {
+                       pm.rows().back().dimension().des += 20;
+                       pm.dim().des += 20;
+               }
+       }
+
        if (row_index < pm.rows().size())
                pm.rows().resize(row_index);
 
@@ -1044,19 +1059,6 @@ void TextMetrics::setRowHeight(Row & row, pit_type const 
pit,
        maxasc += int(layoutasc  * 2 / (2 + pars[pit].getDepth()));
        maxdes += int(layoutdesc * 2 / (2 + pars[pit].getDepth()));
 
-       // FIXME: the correct way is to do the following is to move the
-       // following code in another method specially tailored for the
-       // main Text. The following test is thus bogus.
-       // Top and bottom margin of the document (only at top-level)
-       if (text_->isMainText() && topBottomSpace) {
-               if (pit == 0 && row.pos() == 0)
-                       maxasc += 20;
-               if (pit + 1 == pit_type(pars.size()) &&
-                   row.endpos() == par.size() &&
-                               !(row.endpos() > 0 && 
par.isNewline(row.endpos() - 1)))
-                       maxdes += 20;
-       }
-
        row.dimension().asc = maxasc + labeladdon;
        row.dimension().des = maxdes;
 }

commit cac67a00e2e36531660c66d61421df5891e2ec1c
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Sun Mar 20 20:02:05 2016 +0100

    Cleanup Painter text() API
    
    * remove optional arguments to the helpers that use a FontInfo
    * add a textwidth argument to the text() methods that are used by 
rowpainter.
    
    Now textwidth is only computed if a null value was passed to the
    text() method. This means that in the use case of rowpainter, no
    textwidth needs to be computed.

diff --git a/development/PAINTING_ANALYSIS b/development/PAINTING_ANALYSIS
index 4934c5e..74aaa99 100644
--- a/development/PAINTING_ANALYSIS
+++ b/development/PAINTING_ANALYSIS
@@ -60,6 +60,7 @@ cursor.
 
 * Proposals
 
+
 * Clean-up of drawing code
 
 The goal is to make painting with drawing disable fast enough that it
@@ -81,7 +82,7 @@ paintInset needs to be called.
 The only thing we want to do here is to set inset positions (for
 text). The other insets still use the painter with drawing disabled.
 
-** Painter::text
+** DONE Painter::text
 
 We cannot remove (or make private) the version that uses a
 FontInfo because it is used by PainterInfo::draw. Document this and
@@ -99,6 +100,26 @@ version.
 
 ==> more versions, no optional parameters.
 
+** make Inset::display() more useful
+
+Extending the DisplayType enum would allow to remove special cases
+from the code.
+
+The enumeration could be like
+: Inline = 0
+: BreakBefore = 1 // break row before this inset
+: BreakAfter = 2 // break row after this inset
+: CanBreakAfter = 4 // optionally break row after this inset
+: AlignLeft = 8
+: AlignRight = 16
+: NoBoundary = 32 // do not allow cursor to go at the end of the row
+:                 //before display inset
+: Display = BreakBefore|BreakAfter
+
+A display equation would be Display, other could be Display|AlignLeft
+BreakAfter can be used by Newline or separator insets
+CanBreakAfter can be used by the optional hyphen InsetSpecialChar.
+
 ** Set inset position during metrics phase
 
 In order to do that, a no-paint drawing will be initiated after every
diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp
index 40d2618..e6c6353 100644
--- a/src/RowPainter.cpp
+++ b/src/RowPainter.cpp
@@ -246,13 +246,14 @@ void RowPainter::paintStringAndSel(Row::Element const & e)
                Color const col = e.change.changed() ? e.change.color()
                                                     : Color_selectiontext;
                copy.fontInfo().setPaintColor(col);
-               pi_.pain.text(int(x_), yo_, e.str, copy, e.extra);
+               pi_.pain.text(int(x_), yo_, e.str, copy, e.extra, 
e.full_width());
        } else if (!some_sel) {
-               pi_.pain.text(int(x_), yo_, e.str, e.font, e.extra);
+               pi_.pain.text(int(x_), yo_, e.str, e.font, e.extra, 
e.full_width());
        } else {
                pi_.pain.text(int(x_), yo_, e.str, e.font, Color_selectiontext,
-                                   max(row_.sel_beg, e.pos) - e.pos,
-                        min(row_.sel_end, e.endpos) - e.pos, e.extra);
+                             max(row_.sel_beg, e.pos) - e.pos,
+                             min(row_.sel_end, e.endpos) - e.pos,
+                             e.extra, e.full_width());
        }
        x_ += e.full_width();
 }
diff --git a/src/frontends/Painter.h b/src/frontends/Painter.h
index 2106768..b62a4e5 100644
--- a/src/frontends/Painter.h
+++ b/src/frontends/Painter.h
@@ -133,21 +133,17 @@ public:
        virtual void image(int x, int y, int w, int h,
                graphics::Image const & image) = 0;
 
-       /** draw a character at position x, y (y is the baseline)
-        */
-       virtual void text(int x, int y, char_type c, FontInfo const & f) = 0;
+       /// draw a string at position x, y (y is the baseline).
+       virtual void text(int x, int y, docstring const & str, FontInfo const & 
f) = 0;
 
-       /** draw a string at position x, y (y is the baseline). The
-        * text direction is given by \c rtl.
-        */
-       virtual void text(int x, int y, docstring const & str, FontInfo const & 
f,
-                      bool rtl = false, double wordspacing = 0.0) = 0;
+       /// draw a char at position x, y (y is the baseline)
+       virtual void text(int x, int y, char_type c, FontInfo const & f) = 0;
 
        /** draw a string at position x, y (y is the baseline). The
         * text direction is enforced by the \c Font.
         */
        virtual void text(int x, int y, docstring const & str, Font const & f,
-                      double wordspacing = 0.0) = 0;
+                      double wordspacing, double textwidth) = 0;
 
        /** draw a string at position x, y (y is the baseline), but
         * make sure that the part between \c from and \c to is in
@@ -155,7 +151,7 @@ public:
         */
        virtual void text(int x, int y, docstring const & str, Font const & f,
                          Color other, size_type from, size_type to,
-                         double const wordspacing) = 0;
+                      double wordspacing, double textwidth) = 0;
 
        void setDrawingEnabled(bool drawing_enabled)
        { drawing_enabled_ = drawing_enabled; }
diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp
index 7ee56cb..1cc7db2 100644
--- a/src/frontends/qt4/GuiPainter.cpp
+++ b/src/frontends/qt4/GuiPainter.cpp
@@ -327,6 +327,12 @@ void GuiPainter::text(int x, int y, char_type c, FontInfo 
const & f)
 }
 
 
+void GuiPainter::text(int x, int y, docstring const & s, FontInfo const & f)
+{
+       text(x, y, s, f, false, 0.0, 0.0);
+}
+
+
 void GuiPainter::do_drawText(int x, int y, QString str, bool rtl, FontInfo 
const & f, QFont ff)
 {
        setQPainterPen(computeColor(f.realColor()));
@@ -364,7 +370,7 @@ void GuiPainter::do_drawText(int x, int y, QString str, 
bool rtl, FontInfo const
 
 void GuiPainter::text(int x, int y, docstring const & s,
                       FontInfo const & f, bool const rtl,
-                      double const wordspacing)
+                      double const wordspacing, double const tw)
 {
        //LYXERR0("text: x=" << x << ", s=" << s);
        if (s.empty() || !isDrawingEnabled())
@@ -376,8 +382,8 @@ void GuiPainter::text(int x, int y, docstring const & s,
        of the symbol in the font (as given in lib/symbols) as a char_type to 
the
        frontend. This is just wrong, because the symbol is no UCS4 character at
        all. You can think of this number as the code point of the symbol in a
-       custom symbol encoding. It works because this char_type is lateron again
-       interpreted as a position in the font again.
+       custom symbol encoding. It works because this char_type is later on 
again
+       interpreted as a position in the font.
        The correct solution would be to have extra functions for symbols, but 
that
        would require to duplicate a lot of frontend and mathed support code.
        */
@@ -394,11 +400,12 @@ void GuiPainter::text(int x, int y, docstring const & s,
        ff.setWordSpacing(wordspacing);
        GuiFontMetrics const & fm = getFontMetrics(f);
 
-       // Here we use the font width cache instead of
-       //   textwidth = fontMetrics().width(str);
-       // because the above is awfully expensive on MacOSX
-       // Note that we have to take in account space stretching (word spacing)
-       int const textwidth = fm.width(s) + count(s.begin(), s.end(), ' ') * 
wordspacing;
+       int textwidth = 0;
+       if (tw == 0.0)
+               // Note that we have to take in account space stretching (word 
spacing)
+               textwidth = fm.width(s) + count(s.begin(), s.end(), ' ') * 
wordspacing;
+       else
+               textwidth = static_cast<int>(tw);
 
        textDecoration(f, x, y, textwidth);
 
@@ -458,15 +465,15 @@ void GuiPainter::text(int x, int y, docstring const & s,
 
 
 void GuiPainter::text(int x, int y, docstring const & str, Font const & f,
-                      double const wordspacing)
+                      double const wordspacing, double const tw)
 {
-       text(x, y, str, f.fontInfo(), f.isVisibleRightToLeft(), wordspacing);
+       text(x, y, str, f.fontInfo(), f.isVisibleRightToLeft(), wordspacing, 
tw);
 }
 
 
 void GuiPainter::text(int x, int y, docstring const & str, Font const & f,
                       Color other, size_type const from, size_type const to,
-                      double const wordspacing)
+                      double const wordspacing, double const tw)
 {
        GuiFontMetrics const & fm = getFontMetrics(f.fontInfo());
        FontInfo fi = f.fontInfo();
@@ -485,7 +492,7 @@ void GuiPainter::text(int x, int y, docstring const & str, 
Font const & f,
        fi.setPaintColor(other);
        QRegion const clip(x + xmin, y - ascent, xmax - xmin, height);
        setClipRegion(clip);
-       text(x, y, str, fi, rtl, wordspacing);
+       text(x, y, str, fi, rtl, wordspacing, tw);
 
        // Then the part in normal color
        // Note that in Qt5, it is not possible to use Qt::UniteClip,
@@ -493,7 +500,7 @@ void GuiPainter::text(int x, int y, docstring const & str, 
Font const & f,
        fi.setPaintColor(orig);
        QRegion region(viewport());
        setClipRegion(region - clip);
-       text(x, y, str, fi, rtl, wordspacing);
+       text(x, y, str, fi, rtl, wordspacing, tw);
        setClipping(false);
 }
 
diff --git a/src/frontends/qt4/GuiPainter.h b/src/frontends/qt4/GuiPainter.h
index f92b606..10d3070 100644
--- a/src/frontends/qt4/GuiPainter.h
+++ b/src/frontends/qt4/GuiPainter.h
@@ -105,17 +105,17 @@ public:
        virtual void image(int x, int y, int w, int h,
                lyx::graphics::Image const & image);
 
-       /** draw a string at position x, y (y is the baseline). The
-        * text direction is given by \c rtl.
-        */
-       virtual void text(int x, int y, docstring const & str, FontInfo const & 
f,
-                      bool rtl = false, double wordspacing = 0.0);
+       /// draw a string at position x, y (y is the baseline).
+       virtual void text(int x, int y, docstring const & str, FontInfo const & 
f);
+
+       /// draw a char at position x, y (y is the baseline)
+       virtual void text(int x, int y, char_type c, FontInfo const & f);
 
        /** draw a string at position x, y (y is the baseline). The
         * text direction is enforced by the \c Font.
         */
        virtual void text(int x, int y, docstring const & str, Font const & f,
-                      double wordspacing = 0.0);
+                      double wordspacing, double textwidth);
 
        /** draw a string at position x, y (y is the baseline), but
         * make sure that the part between \c from and \c to is in
@@ -123,10 +123,7 @@ public:
         */
        virtual void text(int x, int y, docstring const & str, Font const & f,
                          Color other, size_type from, size_type to,
-                      double const wordspacing);
-
-       /// draw a char at position x, y (y is the baseline)
-       virtual void text(int x, int y, char_type c, FontInfo const & f);
+                      double wordspacing, double textwidth);
 
        ///
        virtual void textDecoration(FontInfo const & f, int x, int y, int 
width);
@@ -136,11 +133,11 @@ public:
                FontInfo const & font, bool mouseHover);
 
        /// start monochrome painting mode, i.e. map every color into [min,max]
-       virtual void enterMonochromeMode(Color const & min, 
+       virtual void enterMonochromeMode(Color const & min,
                Color const & max);
        /// leave monochrome painting mode
        virtual void leaveMonochromeMode();
-       
+
        /**
         * Draw a string and enclose it inside a rectangle. If
         * back color is specified, the background is cleared with
@@ -186,6 +183,11 @@ private:
        // Helper for text() method
        void do_drawText(int x, int y, QString str, bool rtl, FontInfo const & 
f, QFont ff);
 
+       // Real text() method
+       void text(int x, int y, docstring const & s,
+              FontInfo const & f, bool const rtl,
+              double const wordspacing, double tw);
+
        QColor current_color_;
        Painter::line_style current_ls_;
        int current_lw_;

commit bec76f2591d473ea09da78faee3570ab11841fcf
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Sat Mar 19 17:52:07 2016 +0100

    Make the different Painter::text void methods
    
    The textwidth value that was returned is not used anymore. Now in some
    cases we can avoid to compute it at all.

diff --git a/src/frontends/Painter.h b/src/frontends/Painter.h
index c72d813..2106768 100644
--- a/src/frontends/Painter.h
+++ b/src/frontends/Painter.h
@@ -133,28 +133,29 @@ public:
        virtual void image(int x, int y, int w, int h,
                graphics::Image const & image) = 0;
 
+       /** draw a character at position x, y (y is the baseline)
+        */
+       virtual void text(int x, int y, char_type c, FontInfo const & f) = 0;
+
        /** draw a string at position x, y (y is the baseline). The
         * text direction is given by \c rtl.
-        * \return the width of the drawn text.
         */
-       virtual int text(int x, int y, docstring const & str, FontInfo const & 
f,
-                     bool rtl = false, double wordspacing = 0.0) = 0;
+       virtual void text(int x, int y, docstring const & str, FontInfo const & 
f,
+                      bool rtl = false, double wordspacing = 0.0) = 0;
 
        /** draw a string at position x, y (y is the baseline). The
         * text direction is enforced by the \c Font.
-        * \return the width of the drawn text.
         */
-       virtual int text(int x, int y, docstring const & str, Font const & f,
-                     double wordspacing = 0.0) = 0;
+       virtual void text(int x, int y, docstring const & str, Font const & f,
+                      double wordspacing = 0.0) = 0;
 
        /** draw a string at position x, y (y is the baseline), but
         * make sure that the part between \c from and \c to is in
         * \c other color. The text direction is enforced by the \c Font.
-        * \return the width of the drawn text.
         */
-       virtual int text(int x, int y, docstring const & str, Font const & f,
-                     Color other, size_type from, size_type to,
-                     double const wordspacing) = 0;
+       virtual void text(int x, int y, docstring const & str, Font const & f,
+                         Color other, size_type from, size_type to,
+                         double const wordspacing) = 0;
 
        void setDrawingEnabled(bool drawing_enabled)
        { drawing_enabled_ = drawing_enabled; }
@@ -164,12 +165,6 @@ public:
 
        double pixelRatio() const { return pixel_ratio_; }
 
-       /// draw a char at position x, y (y is the baseline)
-       /**
-       * \return the width of the drawn text.
-       */
-       virtual int text(int x, int y, char_type c, FontInfo const & f) = 0;
-
        /// draw the underbar, strikeout, uuline and uwave font attributes
        virtual void textDecoration(FontInfo const & f, int x, int y, int 
width) = 0;
 
diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp
index b67441b..7ee56cb 100644
--- a/src/frontends/qt4/GuiPainter.cpp
+++ b/src/frontends/qt4/GuiPainter.cpp
@@ -321,9 +321,9 @@ void GuiPainter::image(int x, int y, int w, int h, 
graphics::Image const & i)
 }
 
 
-int GuiPainter::text(int x, int y, char_type c, FontInfo const & f)
+void GuiPainter::text(int x, int y, char_type c, FontInfo const & f)
 {
-       return text(x, y, docstring(1, c), f);
+       text(x, y, docstring(1, c), f);
 }
 
 
@@ -362,13 +362,13 @@ void GuiPainter::do_drawText(int x, int y, QString str, 
bool rtl, FontInfo const
 }
 
 
-int GuiPainter::text(int x, int y, docstring const & s,
-                     FontInfo const & f, bool const rtl,
-                     double const wordspacing)
+void GuiPainter::text(int x, int y, docstring const & s,
+                      FontInfo const & f, bool const rtl,
+                      double const wordspacing)
 {
        //LYXERR0("text: x=" << x << ", s=" << s);
-       if (s.empty())
-               return 0;
+       if (s.empty() || !isDrawingEnabled())
+               return;
 
        /* Caution: The following ucs4 to QString conversions work for symbol 
fonts
        only because they are no real conversions but simple casts in reality.
@@ -400,9 +400,6 @@ int GuiPainter::text(int x, int y, docstring const & s,
        // Note that we have to take in account space stretching (word spacing)
        int const textwidth = fm.width(s) + count(s.begin(), s.end(), ' ') * 
wordspacing;
 
-       if (!isDrawingEnabled())
-               return textwidth;
-
        textDecoration(f, x, y, textwidth);
 
        if (use_pixmap_cache_) {
@@ -422,7 +419,7 @@ int GuiPainter::text(int x, int y, docstring const & s,
                if (QPixmapCache::find(key, pm)) {
                        // Draw the cached pixmap.
                        drawPixmap(x + lb, y - mA, pm);
-                       return textwidth;
+                       return;
                }
 
                // Only the right bearing of the last character is
@@ -450,27 +447,26 @@ int GuiPainter::text(int x, int y, docstring const & s,
                        drawPixmap(x + lb, y - mA, pm);
                        //rectangle(x-lb, y-mA, w, h, Color_green);
                }
-               return textwidth;
+               return;
        }
 
        // don't use the pixmap cache,
        do_drawText(x, y, str, rtl, f, ff);
        //LYXERR(Debug::PAINTING, "draw " << string(str.toUtf8())
        //      << " at " << x << "," << y);
-       return textwidth;
 }
 
 
-int GuiPainter::text(int x, int y, docstring const & str, Font const & f,
-                     double const wordspacing)
+void GuiPainter::text(int x, int y, docstring const & str, Font const & f,
+                      double const wordspacing)
 {
-       return text(x, y, str, f.fontInfo(), f.isVisibleRightToLeft(), 
wordspacing);
+       text(x, y, str, f.fontInfo(), f.isVisibleRightToLeft(), wordspacing);
 }
 
 
-int GuiPainter::text(int x, int y, docstring const & str, Font const & f,
-                     Color other, size_type const from, size_type const to,
-                     double const wordspacing)
+void GuiPainter::text(int x, int y, docstring const & str, Font const & f,
+                      Color other, size_type const from, size_type const to,
+                      double const wordspacing)
 {
        GuiFontMetrics const & fm = getFontMetrics(f.fontInfo());
        FontInfo fi = f.fontInfo();
@@ -489,7 +485,7 @@ int GuiPainter::text(int x, int y, docstring const & str, 
Font const & f,
        fi.setPaintColor(other);
        QRegion const clip(x + xmin, y - ascent, xmax - xmin, height);
        setClipRegion(clip);
-       int const textwidth = text(x, y, str, fi, rtl, wordspacing);
+       text(x, y, str, fi, rtl, wordspacing);
 
        // Then the part in normal color
        // Note that in Qt5, it is not possible to use Qt::UniteClip,
@@ -499,8 +495,6 @@ int GuiPainter::text(int x, int y, docstring const & str, 
Font const & f,
        setClipRegion(region - clip);
        text(x, y, str, fi, rtl, wordspacing);
        setClipping(false);
-
-       return textwidth;
 }
 
 
diff --git a/src/frontends/qt4/GuiPainter.h b/src/frontends/qt4/GuiPainter.h
index 5aec66a..f92b606 100644
--- a/src/frontends/qt4/GuiPainter.h
+++ b/src/frontends/qt4/GuiPainter.h
@@ -107,29 +107,26 @@ public:
 
        /** draw a string at position x, y (y is the baseline). The
         * text direction is given by \c rtl.
-        * \return the width of the drawn text.
         */
-       virtual int text(int x, int y, docstring const & str, FontInfo const & 
f,
-                     bool rtl = false, double wordspacing = 0.0);
+       virtual void text(int x, int y, docstring const & str, FontInfo const & 
f,
+                      bool rtl = false, double wordspacing = 0.0);
 
        /** draw a string at position x, y (y is the baseline). The
         * text direction is enforced by the \c Font.
-        * \return the width of the drawn text.
         */
-       virtual int text(int x, int y, docstring const & str, Font const & f,
-                     double wordspacing = 0.0);
+       virtual void text(int x, int y, docstring const & str, Font const & f,
+                      double wordspacing = 0.0);
 
        /** draw a string at position x, y (y is the baseline), but
         * make sure that the part between \c from and \c to is in
         * \c other color. The text direction is enforced by the \c Font.
-        * \return the width of the drawn text.
         */
-       virtual int text(int x, int y, docstring const & str, Font const & f,
-                     Color other, size_type from, size_type to,
-                     double const wordspacing);
+       virtual void text(int x, int y, docstring const & str, Font const & f,
+                         Color other, size_type from, size_type to,
+                      double const wordspacing);
 
        /// draw a char at position x, y (y is the baseline)
-       virtual int text(int x, int y, char_type c, FontInfo const & f);
+       virtual void text(int x, int y, char_type c, FontInfo const & f);
 
        ///
        virtual void textDecoration(FontInfo const & f, int x, int y, int 
width);

commit ae35991c314c009b3dd5a7b23b127a1c1ad874a9
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Sat Mar 19 17:26:25 2016 +0100

    Do not use the return value of Painter::text for logos
    
    This will allow to get rid of this return value (and avoid computing it).

diff --git a/src/insets/InsetSpecialChar.cpp b/src/insets/InsetSpecialChar.cpp
index 8fa6ead..8671d2b 100644
--- a/src/insets/InsetSpecialChar.cpp
+++ b/src/insets/InsetSpecialChar.cpp
@@ -135,7 +135,16 @@ void InsetSpecialChar::metrics(MetricsInfo & mi, Dimension 
& dim) const
 
 namespace {
 
-void drawLogo(PainterInfo & pi, InsetSpecialChar::Kind kind, int & x, int & y) 
{
+// helper function: draw text and update x.
+void drawChar(PainterInfo & pi, int & x, int const y, char_type ch)
+{
+       pi.pain.text(x, y, ch, pi.base.font);
+       x += theFontMetrics(pi.base.font).width(ch);
+}
+
+
+void drawLogo(PainterInfo & pi, int & x, int const y, InsetSpecialChar::Kind 
kind)
+{
        FontInfo const & font = pi.base.font;
        int const em = theFontMetrics(font).em();
        switch (kind) {
@@ -143,11 +152,11 @@ void drawLogo(PainterInfo & pi, InsetSpecialChar::Kind 
kind, int & x, int & y) {
                /** Reference macro:
                 *  
\providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\\@};
                 */
-               x += pi.pain.text(x, y, from_ascii("L"), font);
+               drawChar(pi, x, y, 'L');
                x -= em / 6;
-               x += pi.pain.text(x, y + em / 4, from_ascii("Y"), font);
+               drawChar(pi, x, y + em / 4, 'Y');
                x -= em / 8;
-               x += pi.pain.text(x, y, from_ascii("X"), font);
+               drawChar(pi, x, y, 'X');
                break;
 
        case InsetSpecialChar::PHRASE_TEX: {
@@ -155,11 +164,11 @@ void drawLogo(PainterInfo & pi, InsetSpecialChar::Kind 
kind, int & x, int & y) {
                 *  \def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@}
                 */
                int const ex = theFontMetrics(font).ascent('x');
-               x += pi.pain.text(x, y, from_ascii("T"), font);
+               drawChar(pi, x, y, 'T');
                x -= em / 6;
-               x += pi.pain.text(x, y + ex / 2, from_ascii("E"), font);
+               drawChar(pi, x, y + ex / 2, 'E');
                x -= em / 8;
-               x += pi.pain.text(x, y, from_ascii("X"), font);
+               drawChar(pi, x, y, 'X');
                break;
        }
        case InsetSpecialChar::PHRASE_LATEX2E:
@@ -168,10 +177,10 @@ void drawLogo(PainterInfo & pi, InsetSpecialChar::Kind 
kind, int & x, int & y) {
                 *    \if b\expandafter\@car\f@series\@nil\boldmath\fi
                 *    \LaTeX\kern.15em2$_{\textstyle\varepsilon}$}}
                 */
-               drawLogo(pi, InsetSpecialChar::PHRASE_LATEX, x, y);
+               drawLogo(pi, x, y, InsetSpecialChar::PHRASE_LATEX);
                x += 3 * em / 20;
-               x += pi.pain.text(x, y, from_ascii("2"), font);
-               x += pi.pain.text(x, y + em / 4, char_type(0x03b5), font);
+               drawChar(pi, x, y, '2');
+               drawChar(pi, x, y + em / 4, char_type(0x03b5));
                break;
 
        case InsetSpecialChar::PHRASE_LATEX: {
@@ -187,13 +196,13 @@ void drawLogo(PainterInfo & pi, InsetSpecialChar::Kind 
kind, int & x, int & y) {
                 *        \kern-.15em%
                 *        \TeX}
                 */
-               x += pi.pain.text(x, y, from_ascii("L"), font);
+               drawChar(pi, x, y, 'L');
                x -= 9 * em / 25;
-               FontInfo smaller = font;
-               smaller.decSize().decSize();
-               x += pi.pain.text(x, y - em / 5, from_ascii("A"), smaller);
+               PainterInfo pi2 = pi;
+               pi2.base.font.decSize().decSize();
+               drawChar(pi2, x, y - em / 5, 'A');
                x -= 3 * em / 20;
-               drawLogo(pi, InsetSpecialChar::PHRASE_TEX, x, y);
+               drawLogo(pi, x, y, InsetSpecialChar::PHRASE_TEX);
                break;
        }
        default:
@@ -269,7 +278,7 @@ void InsetSpecialChar::draw(PainterInfo & pi, int x, int y) 
const
        case PHRASE_TEX:
        case PHRASE_LATEX2E:
        case PHRASE_LATEX:
-               drawLogo(pi, kind_, x, y);
+               drawLogo(pi, x, y, kind_);
                break;
        }
 }

commit 7b4c041bf8490a0752d1b55035dd8ae9603e2abf
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Sun Mar 6 16:22:53 2016 +0100

    Rewrite setRowHeight using row information
    
    The initial values for maxasc and maxdes (renamed from maxdesc) is obtained 
as a maximum of max ascents/descents of all row elements.
    
    This allows to get rid of Paragraph::highestFontInRange and 
FontList::highestInRange.
    
    Some auxilliary variables declarations are also moved to where they are 
needed.

diff --git a/src/FontList.cpp b/src/FontList.cpp
index e5a86db..1bfab76 100644
--- a/src/FontList.cpp
+++ b/src/FontList.cpp
@@ -180,31 +180,6 @@ void FontList::set(pos_type pos, Font const & font)
 }
 
 
-FontSize FontList::highestInRange(pos_type startpos, pos_type endpos,
-       FontSize def_size) const
-{
-       if (list_.empty())
-               return def_size;
-
-       List::const_iterator end_it = fontIterator(endpos);
-       const_iterator const end = list_.end();
-       if (end_it != end)
-               ++end_it;
-
-       List::const_iterator cit = fontIterator(startpos);
-
-       FontSize maxsize = FONT_SIZE_TINY;
-       for (; cit != end_it; ++cit) {
-               FontSize size = cit->font().fontInfo().size();
-               if (size == FONT_SIZE_INHERIT)
-                       size = def_size;
-               if (size > maxsize && size <= FONT_SIZE_HUGER)
-                       maxsize = size;
-       }
-       return maxsize;
-}
-
-
 void FontList::validate(LaTeXFeatures & features) const
 {
        const_iterator fcit = list_.begin();
diff --git a/src/FontList.h b/src/FontList.h
index 9dfd527..6400f97 100644
--- a/src/FontList.h
+++ b/src/FontList.h
@@ -105,13 +105,6 @@ public:
        ///
        void decreasePosAfterPos(pos_type pos);
 
-       /// Returns the height of the highest font in range
-       FontSize highestInRange(
-               pos_type startpos,
-               pos_type endpos,
-               FontSize def_size
-               ) const;
-
        ///
        void validate(LaTeXFeatures & features) const;
 
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index d6106b3..0fd673e 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -1837,14 +1837,6 @@ Font const Paragraph::getLayoutFont
 }
 
 
-/// Returns the height of the highest font in range
-FontSize Paragraph::highestFontInRange
-       (pos_type startpos, pos_type endpos, FontSize def_size) const
-{
-       return d->fontlist_.highestInRange(startpos, endpos, def_size);
-}
-
-
 char_type Paragraph::getUChar(BufferParams const & bparams, pos_type pos) const
 {
        char_type c = d->text_[pos];
diff --git a/src/Paragraph.h b/src/Paragraph.h
index 6f8d248..6f0e844 100644
--- a/src/Paragraph.h
+++ b/src/Paragraph.h
@@ -359,9 +359,6 @@ public:
        char_type getUChar(BufferParams const &, pos_type pos) const;
        /// pos <= size() (there is a dummy font change at the end of each par)
        void setFont(pos_type pos, Font const & font);
-       /// Returns the height of the highest font in range
-       FontSize highestFontInRange(pos_type startpos,
-                                       pos_type endpos, FontSize def_size) 
const;
        ///
        void insert(pos_type pos, docstring const & str,
                    Font const & font, Change const & change);
diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 172b4f1..8483ec1 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -920,85 +920,53 @@ void TextMetrics::setRowHeight(Row & row, pit_type const 
pit,
                                    bool topBottomSpace) const
 {
        Paragraph const & par = text_->getPar(pit);
-       // get the maximum ascent and the maximum descent
-       double layoutasc = 0;
-       double layoutdesc = 0;
-       double const dh = defaultRowHeight();
-
-       // ok, let us initialize the maxasc and maxdesc value.
-       // Only the fontsize count. The other properties
-       // are taken from the layoutfont. Nicer on the screen :)
        Layout const & layout = par.layout();
-
-       // as max get the first character of this row then it can
-       // increase but not decrease the height. Just some point to
-       // start with so we don't have to do the assignment below too
-       // often.
-       Buffer const & buffer = bv_->buffer();
-       Font font = displayFont(pit, row.pos());
-       FontSize const tmpsize = font.fontInfo().size();
-       font.fontInfo() = text_->layoutFont(pit);
-       FontSize const size = font.fontInfo().size();
-       font.fontInfo().setSize(tmpsize);
-
-       FontInfo labelfont = text_->labelFont(par);
-
-       FontMetrics const & lfm = theFontMetrics(labelfont);
-       FontMetrics const & fm = theFontMetrics(font);
-
-       // these are minimum values
        double const spacing_val = layout.spacing.getValue()
                * text_->spacing(par);
-       //lyxerr << "spacing_val = " << spacing_val << endl;
-       int maxasc  = int(fm.maxAscent()  * spacing_val);
-       int maxdesc = int(fm.maxDescent() * spacing_val);
 
-       // insets may be taller
-       CoordCache::Insets const & insetCache = bv_->coordCache().getInsets();
+       // Initial value for ascent (useful if row is empty).
+       Font const font = displayFont(pit, row.pos());
+       FontMetrics const & fm = theFontMetrics(font);
+       int maxasc = int(fm.maxAscent() * spacing_val);
+       int maxdes = int(fm.maxDescent() * spacing_val);
+
+       // Find the ascent/descent of the row contents
        Row::const_iterator cit = row.begin();
        Row::const_iterator cend = row.end();
        for ( ; cit != cend; ++cit) {
                if (cit->inset) {
-                       Dimension const & dim = insetCache.dim(cit->inset);
-                       maxasc  = max(maxasc,  dim.ascent());
-                       maxdesc = max(maxdesc, dim.descent());
+                       maxasc = max(maxasc, cit->dim.ascent());
+                       maxdes = max(maxdes, cit->dim.descent());
+               } else {
+                       FontMetrics const & fm = theFontMetrics(cit->font);
+                       maxasc = max(maxasc, int(fm.maxAscent() * spacing_val));
+                       maxdes = max(maxdes, int(fm.maxDescent() * 
spacing_val));
                }
        }
 
-       // Check if any custom fonts are larger (Asger)
-       // This is not completely correct, but we can live with the small,
-       // cosmetic error for now.
-       int labeladdon = 0;
-
-       FontSize maxsize =
-               par.highestFontInRange(row.pos(), row.endpos(), size);
-       if (maxsize > font.fontInfo().size()) {
-               // use standard paragraph font with the maximal size
-               FontInfo maxfont = font.fontInfo();
-               maxfont.setSize(maxsize);
-               FontMetrics const & maxfontmetrics = theFontMetrics(maxfont);
-               maxasc  = max(maxasc,  maxfontmetrics.maxAscent());
-               maxdesc = max(maxdesc, maxfontmetrics.maxDescent());
-       }
-
-       // This is nicer with box insets:
+       // This is nicer with box insets
        ++maxasc;
-       ++maxdesc;
+       ++maxdes;
 
+       // Now use the layout information.
+       double layoutasc = 0;
+       double layoutdesc = 0;
+       int labeladdon = 0;
        ParagraphList const & pars = text_->paragraphs();
        Inset const & inset = text_->inset();
+       double const dh = defaultRowHeight();
 
        // is it a top line?
        if (row.pos() == 0 && topBottomSpace) {
-               BufferParams const & bufparams = buffer.params();
+               BufferParams const & bufparams = bv_->buffer().params();
                // some parskips VERY EASY IMPLEMENTATION
                if (bufparams.paragraph_separation == 
BufferParams::ParagraphSkipSeparation
                    && !inset.getLayout().parbreakIsNewline()
                    && !par.layout().parbreak_is_newline
                    && pit > 0
                    && ((layout.isParagraph() && par.getDepth() == 0)
-                       || (pars[pit - 1].layout().isParagraph()
-                           && pars[pit - 1].getDepth() == 0))) {
+                           || (pars[pit - 1].layout().isParagraph()
+                                   && pars[pit - 1].getDepth() == 0))) {
                        maxasc += bufparams.getDefSkip().inPixels(*bv_);
                }
 
@@ -1009,6 +977,8 @@ void TextMetrics::setRowHeight(Row & row, pit_type const 
pit,
                if (layout.labelIsAbove()
                    && (!layout.isParagraphGroup() || 
text_->isFirstInSequence(pit))
                    && !par.labelString().empty()) {
+                       FontInfo labelfont = text_->labelFont(par);
+                       FontMetrics const & lfm = theFontMetrics(labelfont);
                        labeladdon = int(
                                  lfm.maxHeight()
                                        * layout.spacing.getValue()
@@ -1071,8 +1041,8 @@ void TextMetrics::setRowHeight(Row & row, pit_type const 
pit,
        }
 
        // incalculate the layout spaces
-       maxasc  += int(layoutasc  * 2 / (2 + pars[pit].getDepth()));
-       maxdesc += int(layoutdesc * 2 / (2 + pars[pit].getDepth()));
+       maxasc += int(layoutasc  * 2 / (2 + pars[pit].getDepth()));
+       maxdes += int(layoutdesc * 2 / (2 + pars[pit].getDepth()));
 
        // FIXME: the correct way is to do the following is to move the
        // following code in another method specially tailored for the
@@ -1084,11 +1054,11 @@ void TextMetrics::setRowHeight(Row & row, pit_type 
const pit,
                if (pit + 1 == pit_type(pars.size()) &&
                    row.endpos() == par.size() &&
                                !(row.endpos() > 0 && 
par.isNewline(row.endpos() - 1)))
-                       maxdesc += 20;
+                       maxdes += 20;
        }
 
        row.dimension().asc = maxasc + labeladdon;
-       row.dimension().des = maxdesc;
+       row.dimension().des = maxdes;
 }
 
 

commit a9ccbdf92d558bc9b0d021fe92581bcd2c208da1
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Sat Mar 5 23:11:45 2016 +0100

    Simplify redoParagraph by merging duplicated code
    
    Let breakRow return a boolean indicating whether an additional row is
    required (after a newline) and use that to replace the code that added
    an extra row when a paragraph ends with a newline.

diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 8e84059..172b4f1 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -437,6 +437,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
        par.setBeginOfBody();
        pos_type first = 0;
        size_t row_index = 0;
+       bool need_new_row = false;
        // maximum pixel width of a row
        do {
                if (row_index == pm.rows().size())
@@ -444,7 +445,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
                Row & row = pm.rows()[row_index];
                row.pit(pit);
                row.pos(first);
-               breakRow(row, right_margin, pit);
+               need_new_row = breakRow(row, right_margin, pit);
                setRowHeight(row, pit);
                row.setChanged(false);
                if (row_index || row.endpos() < par.size()
@@ -468,26 +469,11 @@ bool TextMetrics::redoParagraph(pit_type const pit)
 
                pm.dim().wid = max(pm.dim().wid, row.width());
                pm.dim().des += row.height();
-       } while (first < par.size());
+       } while (first < par.size() || need_new_row);
 
        if (row_index < pm.rows().size())
                pm.rows().resize(row_index);
 
-       // Make sure that if a par ends in newline, there is one more row
-       // under it
-       if (first > 0 && par.isNewline(first - 1)) {
-               if (row_index == pm.rows().size())
-                       pm.rows().push_back(Row());
-               Row & row = pm.rows()[row_index];
-               row.pos(first);
-               breakRow(row, right_margin, pit);
-               setRowHeight(row, pit);
-               row.setChanged(false);
-               int const max_row_width = max(dim_.wid, row.width());
-               computeRowMetrics(pit, row, max_row_width);
-               pm.dim().des += row.height();
-       }
-
        pm.dim().asc += pm.rows()[0].ascent();
        pm.dim().des -= pm.rows()[0].ascent();
 
@@ -786,7 +772,7 @@ private:
  * very sensitive to small changes :) Note that part of the
  * intelligence is also in Row::shortenIfNeeded.
  */
-void TextMetrics::breakRow(Row & row, int const right_margin, pit_type const 
pit) const
+bool TextMetrics::breakRow(Row & row, int const right_margin, pit_type const 
pit) const
 {
        Paragraph const & par = text_->getPar(pit);
        pos_type const end = par.size();
@@ -806,7 +792,10 @@ void TextMetrics::breakRow(Row & row, int const 
right_margin, pit_type const pit
        // the width available for the row.
        int const width = max_width_ - row.right_margin;
 
-       ParagraphList const & pars = text_->paragraphs();
+       if (pos >= end || row.width() > width) {
+               row.endpos(end);
+               return need_new_row;
+       }
 
 #if 0
        //FIXME: As long as leftMargin() is not correctly implemented for
@@ -900,6 +889,7 @@ void TextMetrics::breakRow(Row & row, int const 
right_margin, pit_type const pit
        row.endpos(i);
 
        // End of paragraph marker
+       ParagraphList const & pars = text_->paragraphs();
        if (lyxrc.paragraph_markers && !need_new_row
            && i == end && size_type(pit + 1) < pars.size()) {
                // add a virtual element for the end-of-paragraph
@@ -921,6 +911,8 @@ void TextMetrics::breakRow(Row & row, int const 
right_margin, pit_type const pit
        // make sure that the RTL elements are in reverse ordering
        row.reverseRTL(is_rtl);
        //LYXERR0("breakrow: row is " << row);
+
+       return need_new_row;
 }
 
 
diff --git a/src/TextMetrics.h b/src/TextMetrics.h
index eef00ff..8d2a12c 100644
--- a/src/TextMetrics.h
+++ b/src/TextMetrics.h
@@ -131,7 +131,8 @@ private:
 
        /// sets row.end to the pos value *after* which a row should break.
        /// for example, the pos after which isNewLine(pos) == true
-       void breakRow(Row & row, int right_margin, pit_type const pit) const;
+       /// \return true when another row is required (after a newline)
+       bool breakRow(Row & row, int right_margin, pit_type const pit) const;
 
        // Expand the alignment of row \param row in paragraph \param par
        LyXAlignment getAlign(Paragraph const & par, Row const & row) const;

commit 6c5d9fabfc2079b461ea89141f9fe05172f71d57
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Sat Mar 5 00:09:34 2016 +0100

    Update PAINTING_ANALYSIS
    
    Some things were wrong, and some new ideas are added (some are done in
    this branch already).

diff --git a/development/PAINTING_ANALYSIS b/development/PAINTING_ANALYSIS
index d1da54b..4934c5e 100644
--- a/development/PAINTING_ANALYSIS
+++ b/development/PAINTING_ANALYSIS
@@ -60,13 +60,75 @@ cursor.
 
 * Proposals
 
-** set inset position during metrics phase
+* Clean-up of drawing code
 
-This implies to set inset positions relative to outer inset during
-metrics phase and then in a second loop to descend into insets and
-update positions correctly.
+The goal is to make painting with drawing disable fast enough that it
+can be used after every metrics computation. Then we can separate real
+drawing from metrics.
 
-Effect: avoid going through the painter machinery when it is not necessary.
+** DONE RowPainter
+
+Inset position is set in paintInset, paintOnlyInsets, and paintText.
+This should be done only once in paintInset
+
+** DONE TextMetrics::drawParagraph
+
+We can really simplify the code when drawing is disabled only
+paintInset needs to be called.
+ + do right at the start when drawing is already disabled
+ + do it in the loop for rows that are not visible on screen.
+
+The only thing we want to do here is to set inset positions (for
+text). The other insets still use the painter with drawing disabled.
+
+** Painter::text
+
+We cannot remove (or make private) the version that uses a
+FontInfo because it is used by PainterInfo::draw. Document this and
+remove unused arguments rtl and double spacing. This would become a 
specialized helper.
+Proposed solution: keep the existing function, but private and without
+optional arguments.
+
+Avoid to return (and thus compute) the width of strings?
+ + used by InsetSpecialChar (fixable)
+ + used by textDecoration() in text(): more difficult to fix
+
+Idea: add a version of text where wordspacing and textwidth (giving
+the width of strings) are required parameters and remove optional
+version.
+
+==> more versions, no optional parameters.
+
+** Set inset position during metrics phase
+
+In order to do that, a no-paint drawing will be initiated after every
+redoParagraph. This code path will need to be made as fast as possible.
+
+Effect: avoid depending on actual drawing having taken place. In turn,
+it will allow to do drawing on paint events, like any reasonable
+application would do.
+
+** Cleanup after complete metrics
+   Then the following can be done:
+   + remove hack in InsetMathNest::drawSelection
+   + remove painting when not inside in drawParagraph
+   + remove Cursor::inCoordCache?
+
+** Use Row for MathData
+
+It may not be so difficult. Implement x2pos and pos2x from
+the TM:cursorX and TM::getPosNearX, and use them for both text and
+math.
+
+Will the strings display OK if drawing string-wise?
+
+Then it would be possible to streamline drawing with disabled painter.
+
+** Paint directly to screen
+
+Instead of using an intermediary pixmap. I have no idea of how
+difficult it will prove.
+One benefit will be that subpixel aliasing will work again (#9972)
 
 ** Merging bv::updateMetrics and tm::metrics
 
@@ -75,16 +137,10 @@ paragraphs that are rebroken, the version that is used for 
inner inset
 does not try any such optimization. This can be very bad for very tall
 insets. We should re-use the bv::updateMetrics logic:
  + transfer all the logic of bv::updateMetrics to tm.
- +  Main InsetText should not be special.
-
-** Metrics outside of visible area
-
-Currently metrics are computed for current visible paet of text, the
-page above and the page below. It should be possible to compute hidden
-rows ony on demand, although it might be a bit slow.
+ + Main InsetText should not be special.
 
-There was a proposal to always compute _all_ rows, but this may become
-expensive for large files. This would though help scrolling.
+The difficuly for a tall table cell for example, is that it may be
+necessary to break the whole contents to know the width of the cell.
 
 
 * Description of current drawing mechanism

commit fe87bbcd7df562244cd3df489bd3968fb3eb0ca8
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Mon Feb 29 16:07:35 2016 +0100

    Make the non-drawing cases faster in TextMetrics::drawParagraph
    
    There are two main cases:
    * when drawing is disabled from the start, use a simplified code that only 
paints insets (in order to cache positions).
    * when the row is not visible, do the same.
    
    The goal of this optimization is to be able to always run a no-drawing draw 
after the metrics have been computed.

diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 8afed8a..8e84059 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -1870,15 +1870,31 @@ void TextMetrics::draw(PainterInfo & pi, int x, int y) 
const
 
 void TextMetrics::drawParagraph(PainterInfo & pi, pit_type const pit, int 
const x, int y) const
 {
-       BufferParams const & bparams = bv_->buffer().params();
        ParagraphMetrics const & pm = par_metrics_[pit];
        if (pm.rows().empty())
                return;
-
-       bool const original_drawing_state = pi.pain.isDrawingEnabled();
-       int const ww = bv_->workHeight();
        size_t const nrows = pm.rows().size();
 
+       // Use fast lane when drawing is disabled.
+       if (!pi.pain.isDrawingEnabled()) {
+               for (size_t i = 0; i != nrows; ++i) {
+
+                       Row const & row = pm.rows()[i];
+                       // Adapt to cursor row scroll offset if applicable.
+                       int row_x = x - bv_->horizScrollOffset(text_, pit, 
row.pos());
+                       if (i)
+                               y += row.ascent();
+
+                       RowPainter rp(pi, *text_, pit, row, row_x, y);
+
+                       rp.paintOnlyInsets();
+                       y += row.descent();
+               }
+               return;
+       }
+
+       BufferParams const & bparams = bv_->buffer().params();
+       int const ww = bv_->workHeight();
        Cursor const & cur = bv_->cursor();
        DocIterator sel_beg = cur.selectionBegin();
        DocIterator sel_end = cur.selectionEnd();
@@ -1915,10 +1931,18 @@ void TextMetrics::drawParagraph(PainterInfo & pi, 
pit_type const pit, int const
 
                RowPainter rp(pi, *text_, pit, row, row_x, y);
 
+               // It is not needed to draw on screen if we are not inside.
                bool const inside = (y + row.descent() >= 0
                        && y - row.ascent() < ww);
-               // It is not needed to draw on screen if we are not inside.
-               pi.pain.setDrawingEnabled(inside && original_drawing_state);
+               pi.pain.setDrawingEnabled(inside);
+               if (!inside) {
+                       // Paint only the insets to set inset cache correctly
+                       // FIXME: remove paintOnlyInsets when we know that 
positions
+                       // have already been set.
+                       rp.paintOnlyInsets();
+                       y += row.descent();
+                       continue;
+               }
 
                if (selection)
                        row.setSelectionAndMargins(sel_beg_par, sel_end_par);
@@ -1935,8 +1959,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, 
pit_type const pit, int const
                }
 
                // Row signature; has row changed since last paint?
-               if (pi.pain.isDrawingEnabled())
-                       row.setCrc(pm.computeRowSignature(row, bparams));
+               row.setCrc(pm.computeRowSignature(row, bparams));
                bool row_has_changed = row.changed()
                        || bv_->hadHorizScrollOffset(text_, pit, row.pos());
 
@@ -1967,7 +1990,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, 
pit_type const pit, int const
 
                // Instrumentation for testing row cache (see also
                // 12 lines lower):
-               if (lyxerr.debugging(Debug::PAINTING) && inside
+               if (lyxerr.debugging(Debug::PAINTING)
                        && (row.selection() || pi.full_repaint || 
row_has_changed)) {
                                string const foreword = text_->isMainText() ?
                                        "main text redraw " : "inset text 
redraw: ";
@@ -2005,7 +2028,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, 
pit_type const pit, int const
                pi.full_repaint = tmp;
        }
        // Re-enable screen drawing for future use of the painter.
-       pi.pain.setDrawingEnabled(original_drawing_state);
+       pi.pain.setDrawingEnabled(true);
 
        //LYXERR(Debug::PAINTING, ".");
 }

commit e69a05cf90ac32b0d8bacb1151503b034b8b9033
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Mon Feb 29 16:05:06 2016 +0100

    Move some horizontal scrolling code from TextMetrics to BufferView
    
    It is better to have all the code in the same place, and it will avoid code 
duplication later.

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 1daee5c..9708a08 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -2914,15 +2914,26 @@ int BufferView::horizScrollOffset() const
 }
 
 
-CursorSlice const & BufferView::currentRowSlice() const
-{
-       return d->current_row_slice_;
+int BufferView::horizScrollOffset(Text const * text,
+                                  pit_type pit, pos_type pos) const
+{
+       // Is this a row that is currently scrolled?
+       if (!d->current_row_slice_.empty()
+           && &text->inset() == d->current_row_slice_.inset().asInsetText()
+           && pit ==  d->current_row_slice_.pit()
+           && pos ==  d->current_row_slice_.pos())
+               return d->horiz_scroll_offset_;
+       return 0;
 }
 
 
-CursorSlice const & BufferView::lastRowSlice() const
+bool BufferView::hadHorizScrollOffset(Text const * text,
+                                      pit_type pit, pos_type pos) const
 {
-       return d->last_row_slice_;
+       return !d->last_row_slice_.empty()
+              && &text->inset() == d->last_row_slice_.inset().asInsetText()
+              && pit ==  d->last_row_slice_.pit()
+              && pos ==  d->last_row_slice_.pos();
 }
 
 
diff --git a/src/BufferView.h b/src/BufferView.h
index 31b6e94..f57801f 100644
--- a/src/BufferView.h
+++ b/src/BufferView.h
@@ -125,12 +125,15 @@ public:
        // Returns the amount of horizontal scrolling applied to the
        // top-level row where the cursor lies
        int horizScrollOffset() const;
-
-       // Points to the top-level row where the cursor lies (during draw).
-       CursorSlice const & currentRowSlice() const;
-
-       // Points to the top-level row where the cursor lied at last draw event.
-       CursorSlice const & lastRowSlice() const;
+       // Returns the amount of horizontal scrolling applied to the
+       // row of text starting at (pit, pos)
+       int horizScrollOffset(Text const * text,
+                             pit_type pit, pos_type pos) const;
+
+       // Returns true if the row of text starting at (pit, pos) was scrolled
+       // at the last draw event.
+       bool hadHorizScrollOffset(Text const * text,
+                              pit_type pit, pos_type pos) const;
 
        /// reset the scrollbar to reflect current view position.
        void updateScrollbar();
diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index e69ffe9..8afed8a 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -1908,26 +1908,18 @@ void TextMetrics::drawParagraph(PainterInfo & pi, 
pit_type const pit, int const
        for (size_t i = 0; i != nrows; ++i) {
 
                Row const & row = pm.rows()[i];
-               int row_x = x;
+               // Adapt to cursor row scroll offset if applicable.
+               int row_x = x - bv_->horizScrollOffset(text_, pit, row.pos());
                if (i)
                        y += row.ascent();
 
-               CursorSlice rowSlice(const_cast<InsetText &>(text_->inset()));
-               rowSlice.pit() = pit;
-               rowSlice.pos() = row.pos();
+               RowPainter rp(pi, *text_, pit, row, row_x, y);
 
                bool const inside = (y + row.descent() >= 0
                        && y - row.ascent() < ww);
-
-               // Adapt to cursor row scroll offset if applicable.
-               if (bv_->currentRowSlice() == rowSlice)
-                       row_x -= bv_->horizScrollOffset();
-
                // It is not needed to draw on screen if we are not inside.
                pi.pain.setDrawingEnabled(inside && original_drawing_state);
 
-               RowPainter rp(pi, *text_, pit, row, row_x, y);
-
                if (selection)
                        row.setSelectionAndMargins(sel_beg_par, sel_end_par);
                else
@@ -1946,7 +1938,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, 
pit_type const pit, int const
                if (pi.pain.isDrawingEnabled())
                        row.setCrc(pm.computeRowSignature(row, bparams));
                bool row_has_changed = row.changed()
-                       || rowSlice == bv_->lastRowSlice();
+                       || bv_->hadHorizScrollOffset(text_, pit, row.pos());
 
                // Take this opportunity to spellcheck the row contents.
                if (row_has_changed && pi.do_spellcheck && 
lyxrc.spellcheck_continuously) {

commit a927ccb94232b367934092abd1956eec3457323c
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Mon Feb 29 14:34:55 2016 +0100

    Only add inset postion to cache in paintInset
    
    It was also added in paintText and paintOnlyInsets.

diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp
index 2766642..40d2618 100644
--- a/src/RowPainter.cpp
+++ b/src/RowPainter.cpp
@@ -577,7 +577,6 @@ void RowPainter::paintOnlyInsets()
                Row::Element const & e = *cit;
                if (e.type == Row::INSET) {
                        // If outer row has changed, nested insets are 
repainted completely.
-                       pi_.base.bv->coordCache().insets().add(e.inset, 
int(x_), yo_);
                        bool const nested_inset =
                                (e.inset->asInsetMath() && 
!e.inset->asInsetMath()->asMacroTemplate())
                                || e.inset->asInsetText() || 
e.inset->asInsetTabular();
@@ -611,8 +610,7 @@ void RowPainter::paintText()
                                paintMisspelledMark(orig_x, e);
                        break;
                case Row::INSET: {
-                       // If outer row has changed, nested insets are repaint 
completely.
-                       pi_.base.bv->coordCache().insets().add(e.inset, 
int(x_), yo_);
+                       // If outer row has changed, nested insets are 
repainted completely.
                        paintInset(e);
                        foreign_descent = e.dim.descent();
                }

-----------------------------------------------------------------------

Summary of changes:
 .gitattributes                                     |    3 +
 3rdparty/Makefile.am                               |   14 +-
 3rdparty/hunspell/Makefile.am                      |    9 +-
 3rdparty/libiconv/Makefile.am                      |   20 +-
 3rdparty/zlib/1.2.8/zconf.h.in                     |  511 +
 3rdparty/zlib/Makefile.am                          |    4 +-
 ANNOUNCE                                           |   14 +-
 CMakeLists.txt                                     |    5 +
 INSTALL.Win32                                      |   44 +-
 config/lyxinclude.m4                               |   97 +-
 config/qt4.m4                                      |    9 +-
 config/spell.m4                                    |   37 +-
 configure.ac                                       |   58 +-
 development/FORMAT                                 |   14 +
 development/MacOSX/ReadMe/Leame.lyx                |    4 +-
 development/MacOSX/ReadMe/LiesMich.lyx             |    4 +-
 development/MacOSX/ReadMe/LisezMoi.lyx             |    4 +-
 development/MacOSX/ReadMe/ReadMe.lyx               |    4 +-
 development/Makefile.am                            |    1 -
 .../Win32/packaging/installer/ChangeLog.txt        |   25 +-
 .../packaging/installer/include/detection.nsh      |    7 +-
 .../Win32/packaging/installer/include/filelist.nsh |   10 +-
 .../Win32/packaging/installer/include/init.nsh     |   11 +-
 .../Win32/packaging/installer/lyx-bundle.nsi       |    2 +-
 .../Win32/packaging/installer/lyx-standard.nsi     |    4 +-
 development/Win32/packaging/installer/settings.nsh |   17 +-
 .../Win32/packaging/installer/setup/install.nsh    |   20 +-
 .../Win32/packaging/installer/setup/uninstall.nsh  |   15 +-
 development/autotests/ExportTests.cmake            |   21 +-
 development/autotests/suspiciousTests              |    8 -
 development/autotests/unreliableTests              |   22 +-
 development/cmake/ConfigureChecks.cmake            |    7 +
 development/cmake/Install.cmake                    |   22 +-
 development/cmake/build5-2015-x64.bat              |   91 +
 development/cmake/config.h.cmake                   |    3 +
 development/cmake/configCompiler.h.cmake           |    7 +
 development/cmake/configCompiler.h.msvc            |    9 +
 development/cmake/modules/LyXMacros.cmake          |    2 +-
 development/cmake/po/cat.py                        |   10 +-
 development/cmake/po/dos2unix.py                   |   17 -
 development/tools/mergepo.py                       |   63 +-
 development/tools/separator-convert.sh             |   21 +
 lib/CREDITS                                        |    3 +
 lib/Makefile.am                                    |   13 +-
 lib/RELEASE-NOTES                                  |   15 +
 lib/configure.py                                   |    7 +-
 lib/doc/Additional.lyx                             |   38 +-
 .../Changelog-Customization-LyX_22x.txt            |    0
 lib/doc/Changelog-EmbeddedObjects-LyX_22x.txt      |   21 +
 lib/doc/{attic => }/Changelog-Math-LyX_22.txt      |    0
 .../{attic => }/Changelog-UserGuide-LyX_22x.txt    |    0
 lib/doc/Customization.lyx                          |   20 +-
 lib/doc/Development.lyx                            |  892 +-
 lib/doc/DummyDocument1.lyx                         |    2 +-
 lib/doc/DummyDocument2.lyx                         |    2 +-
 lib/doc/EmbeddedObjects.lyx                        |   56 +-
 lib/doc/Formula-numbering.lyx                      |    2 +-
 lib/doc/Intro.lyx                                  |    2 +-
 lib/doc/LFUNs.lyx                                  |    6 +-
 lib/doc/LaTeXConfig.lyx                            |   70 +-
 lib/doc/Makefile.am                                |    3 +-
 lib/doc/Math.lyx                                   |   84 +-
 lib/doc/MergedManuals.lyx                          |    2 +-
 lib/doc/Shortcuts.lyx                              |    2 +-
 lib/doc/Tutorial.lyx                               |   42 +-
 lib/doc/UserGuide.lyx                              |    2 +-
 .../attic/Changelog-EmbeddedObjects-LyX_22x.txt    |   18 -
 lib/doc/attic/aastex6_sample.lyx                   | 2465 ++
 lib/doc/ca/Intro.lyx                               |    2 +-
 lib/doc/cs/Tutorial.lyx                            |    8 +-
 lib/doc/da/Intro.lyx                               |   18 +-
 lib/doc/de/Additional.lyx                          |   54 +-
 lib/doc/de/Customization.lyx                       |   18 +-
 lib/doc/de/DummyDocument1.lyx                      |    2 +-
 lib/doc/de/DummyDocument2.lyx                      |    2 +-
 lib/doc/de/EmbeddedObjects.lyx                     |   62 +-
 lib/doc/de/Formelnummerierung.lyx                  |    2 +-
 lib/doc/de/Intro.lyx                               |    6 +-
 lib/doc/de/Math.lyx                                |   78 +-
 lib/doc/de/Shortcuts.lyx                           |    2 +-
 lib/doc/de/Tutorial.lyx                            |   10 +-
 lib/doc/de/UserGuide.lyx                           | 2632 +--
 lib/doc/el/Intro.lyx                               |    2 +-
 lib/doc/es/Additional.lyx                          |   38 +-
 lib/doc/es/Customization.lyx                       |   20 +-
 lib/doc/es/DocumentoPostizo1.lyx                   |    2 +-
 lib/doc/es/DocumentoPostizo2.lyx                   |    2 +-
 lib/doc/es/EmbeddedObjects.lyx                     |   60 +-
 lib/doc/es/Formula-numbering.lyx                   |    2 +-
 lib/doc/es/Intro.lyx                               |    2 +-
 lib/doc/es/Math.lyx                                |   84 +-
 lib/doc/es/Shortcuts.lyx                           |    2 +-
 lib/doc/es/Tutorial.lyx                            |   10 +-
 lib/doc/es/UserGuide.lyx                           |  120 +-
 lib/doc/eu/Intro.lyx                               |    2 +-
 lib/doc/eu/Tutorial.lyx                            |    8 +-
 lib/doc/fr/Additional.lyx                          |   58 +-
 lib/doc/fr/Customization.lyx                       |   20 +-
 lib/doc/fr/DocumentBidon1.lyx                      |    2 +-
 lib/doc/fr/DocumentBidon2.lyx                      |    2 +-
 lib/doc/fr/EmbeddedObjects.lyx                     |   60 +-
 lib/doc/fr/Formula-numbering.lyx                   |    2 +-
 lib/doc/fr/Intro.lyx                               |   24 +-
 lib/doc/fr/Math.lyx                                |   82 +-
 lib/doc/fr/Shortcuts.lyx                           |    2 +-
 lib/doc/fr/Tutorial.lyx                            |   10 +-
 lib/doc/fr/UserGuide.lyx                           |  625 +-
 lib/doc/gl/Intro.lyx                               |   24 +-
 lib/doc/gl/Tutorial.lyx                            |    8 +-
 lib/doc/he/Intro.lyx                               |    2 +-
 lib/doc/he/Tutorial.lyx                            |   12 +-
 lib/doc/hu/Intro.lyx                               |   20 +-
 lib/doc/hu/Tutorial.lyx                            |   10 +-
 lib/doc/id/Intro.lyx                               |    2 +-
 lib/doc/id/Shortcuts.lyx                           |    2 +-
 lib/doc/id/Tutorial.lyx                            |   10 +-
 lib/doc/it/Intro.lyx                               |    2 +-
 lib/doc/it/Tutorial.lyx                            |   10 +-
 lib/doc/ja/Additional.lyx                          | 5206 ++--
 lib/doc/ja/Customization.lyx                       | 3394 ++--
 lib/doc/ja/DummyDocument1.lyx                      |    4 +-
 lib/doc/ja/DummyDocument2.lyx                      |    4 +-
 lib/doc/ja/EmbeddedObjects.lyx                     | 3406 ++--
 lib/doc/ja/Formula-numbering.lyx                   |   24 +-
 lib/doc/ja/Intro.lyx                               |  532 +-
 lib/doc/ja/LaTeXConfig.lyx                         | 1214 +-
 lib/doc/ja/Math.lyx                                | 3078 ++--
 lib/doc/ja/MergedManuals.lyx                       |    4 +-
 lib/doc/ja/Shortcuts.lyx                           |    4 +-
 lib/doc/ja/Tutorial.lyx                            | 1380 +-
 lib/doc/ja/UserGuide.lyx                           | 7092 +++---
 lib/doc/nb/Intro.lyx                               |  112 +-
 lib/doc/nb/Tutorial.lyx                            | 5249 ++++
 lib/doc/nl/Intro.lyx                               |    8 +-
 lib/doc/nl/Tutorial.lyx                            |   12 +-
 lib/doc/pl/Intro.lyx                               |    6 +-
 lib/doc/pl/Tutorial.lyx                            |   14 +-
 lib/doc/pt/Intro.lyx                               |    6 +-
 lib/doc/pt/Tutorial.lyx                            |   12 +-
 lib/doc/ro/Intro.lyx                               |    6 +-
 lib/doc/ru/Intro.lyx                               |   18 +-
 lib/doc/ru/Tutorial.lyx                            |   12 +-
 lib/doc/sk/Intro.lyx                               |    2 +-
 lib/doc/sk/Tutorial.lyx                            |   10 +-
 lib/doc/sl/Intro.lyx                               |    8 +-
 lib/doc/sl/Tutorial.lyx                            |   12 +-
 lib/doc/sv/Intro.lyx                               |    2 +-
 lib/doc/sv/Shortcuts.lyx                           |    2 +-
 lib/doc/sv/Tutorial.lyx                            |    8 +-
 lib/doc/uk/Intro.lyx                               |    2 +-
 lib/doc/zh_CN/Intro.lyx                            |    2 +-
 lib/doc/zh_CN/Tutorial.lyx                         |   10 +-
 lib/examples/Braille.lyx                           |    2 +-
 lib/examples/FeynmanDiagrams.lyx                   |    6 +-
 lib/examples/Foils.lyx                             |   16 +-
 lib/examples/H-P-statements.lyx                    |    2 +-
 lib/examples/ItemizeBullets.lyx                    |   18 +-
 lib/examples/Literate.lyx                          |    2 +-
 lib/examples/MultilingualCaptions.lyx              |    2 +-
 lib/examples/PDF-comment.lyx                       |    2 +-
 lib/examples/PDF-form.lyx                          |    2 +-
 lib/examples/R-S-statements.lyx                    |    2 +-
 lib/examples/aa_sample.lyx                         |    6 +-
 lib/examples/aas_sample.lyx                        |  181 +-
 lib/examples/achemso.lyx                           |    2 +-
 lib/examples/amsart-test.lyx                       |    2 +-
 lib/examples/amsbook-test.lyx                      |    2 +-
 lib/examples/beamer-article.lyx                    |    2 +-
 lib/examples/beamer.lyx                            |  297 +-
 lib/examples/beamerlyxexample1.lyx                 |  270 +-
 lib/examples/beamerposter.lyx                      |   41 +-
 lib/examples/ca/ItemizeBullets.lyx                 |   18 +-
 lib/examples/ca/mathed.lyx                         |    4 +-
 lib/examples/ca/splash.lyx                         |    2 +-
 lib/examples/chess-article.lyx                     |    2 +-
 lib/examples/chessgame.lyx                         |    2 +-
 lib/examples/colored-boxes.lyx                     |    2 +-
 lib/examples/cs/priklad_syrovy.lyx                 |    2 +-
 lib/examples/cs/priklad_zLyXovany.lyx              |    2 +-
 lib/examples/cs/splash.lyx                         |    2 +-
 lib/examples/da/splash.lyx                         |    2 +-
 lib/examples/de/Braille.lyx                        |    2 +-
 lib/examples/de/Dezimal.lyx                        |    2 +-
 lib/examples/de/FeynmanDiagrams.lyx                |    6 +-
 lib/examples/de/ItemizeBullets.lyx                 |   18 +-
 lib/examples/de/Lebenslauf.lyx                     |    6 +-
 lib/examples/de/MultilingualCaptions.lyx           |    2 +-
 lib/examples/de/PDF-comment.lyx                    |    2 +-
 lib/examples/de/beamer-article.lyx                 |    2 +-
 lib/examples/de/beamer.lyx                         |  410 +-
 lib/examples/de/beispiel_gelyxt.lyx                |    2 +-
 lib/examples/de/beispiel_roh.lyx                   |    2 +-
 lib/examples/de/europassCV.lyx                     |    2 +-
 lib/examples/de/linguistics.lyx                    |   14 +-
 lib/examples/de/serienbrief1.lyx                   |    2 +-
 lib/examples/de/serienbrief2.lyx                   |    2 +-
 lib/examples/de/serienbrief3.lyx                   |    2 +-
 lib/examples/de/splash.lyx                         |    2 +-
 lib/examples/de/tufte-handout.lyx                  |    2 +-
 lib/examples/docbook_article.lyx                   |   16 +-
 lib/examples/el/splash.lyx                         |    2 +-
 lib/examples/es/Braille.lyx                        |    2 +-
 lib/examples/es/ItemizeBullets.lyx                 |   18 +-
 lib/examples/es/ejemplo_con_lyx.lyx                |    2 +-
 lib/examples/es/ejemplo_sin_lyx.lyx                |    2 +-
 lib/examples/es/europeCV.lyx                       |    2 +-
 lib/examples/es/linguistics.lyx                    |   14 +-
 lib/examples/es/modernCV.lyx                       |    4 +-
 lib/examples/es/splash.lyx                         |    2 +-
 lib/examples/es/tufte-book.lyx                     |    2 +-
 lib/examples/es/tufte-handout.lyx                  |    2 +-
 lib/examples/eu/adibide_gordina.lyx                |    2 +-
 lib/examples/eu/adibide_lyx-atua.lyx               |    2 +-
 lib/examples/eu/splash.lyx                         |    2 +-
 lib/examples/europassCV.lyx                        |    2 +-
 lib/examples/europeCV.lyx                          |    2 +-
 lib/examples/example_lyxified.lyx                  |    2 +-
 lib/examples/example_raw.lyx                       |    2 +-
 lib/examples/fa/splash.lyx                         |    2 +-
 lib/examples/fr/AlignementDecimal.lyx              |    2 +-
 lib/examples/fr/Braille.lyx                        |    2 +-
 lib/examples/fr/FeynmanDiagrams.lyx                |    6 +-
 lib/examples/fr/Foils.lyx                          |   16 +-
 lib/examples/fr/ListesPuces.lyx                    |   18 +-
 lib/examples/fr/MultilingualCaptions.lyx           |    2 +-
 lib/examples/fr/PDF-comment.lyx                    |    2 +-
 lib/examples/fr/beamer-article.lyx                 |  172 +
 lib/examples/fr/beamer.lyx                         | 4606 ++++
 lib/examples/fr/exemple-powerdot.lyx               |   14 +-
 lib/examples/fr/exemple_brut.lyx                   |    2 +-
 lib/examples/fr/exemple_lyxifie.lyx                |    2 +-
 lib/examples/fr/linguistics.lyx                    |   14 +-
 lib/examples/fr/seminar.lyx                        |   51 +-
 lib/examples/fr/simplecv.lyx                       |    6 +-
 lib/examples/fr/splash.lyx                         |    2 +-
 lib/examples/fr/xypic.lyx                          |   12 +-
 lib/examples/gl/exemplo_bruto.lyx                  |    2 +-
 lib/examples/gl/exemplo_lyxificado.lyx             |    2 +-
 lib/examples/gl/splash.lyx                         |    2 +-
 lib/examples/he/example_lyxified.lyx               |    2 +-
 lib/examples/he/example_raw.lyx                    |    2 +-
 lib/examples/he/splash.lyx                         |    2 +-
 lib/examples/hu/example_lyxified.lyx               |    2 +-
 lib/examples/hu/example_raw.lyx                    |    2 +-
 lib/examples/hu/splash.lyx                         |    2 +-
 lib/examples/id/splash.lyx                         |    2 +-
 lib/examples/instant_preview.lyx                   |    2 +-
 lib/examples/it/ItemizeBullets.lyx                 |   26 +-
 lib/examples/it/splash.lyx                         |    2 +-
 lib/examples/ja/Braille.lyx                        |    2 +-
 lib/examples/ja/FeynmanDiagrams.lyx                |    4 +-
 lib/examples/ja/MultilingualCaptions.lyx           |    2 +-
 lib/examples/ja/R-S-statements.lyx                 |    2 +-
 lib/examples/ja/beamer.lyx                         |  112 +-
 lib/examples/ja/knitr.lyx                          |    2 +-
 lib/examples/ja/lilypond.lyx                       |    4 +-
 lib/examples/ja/linguistics.lyx                    |    2 +-
 lib/examples/ja/splash.lyx                         |   54 +-
 lib/examples/ja/sweave.lyx                         |    2 +-
 lib/examples/ja/xypic.lyx                          |    6 +-
 lib/examples/knitr.lyx                             |    2 +-
 lib/examples/ko/splash.lyx                         |    2 +-
 lib/examples/landslide.lyx                         |    2 +-
 lib/examples/lilypond.lyx                          |    4 +-
 lib/examples/linguistics.lyx                       |   14 +-
 lib/examples/listerrors.lyx                        |    2 +-
 lib/examples/localization_test.lyx                 |    6 +-
 lib/examples/modernCV.lyx                          |    4 +-
 lib/examples/nb/eksempel_lyxet.lyx                 |  403 +
 lib/examples/nb/eksempel_txt.lyx                   |  475 +
 lib/examples/nb/splash.lyx                         |  271 +
 lib/examples/nl/opsommingstekens.lyx               |   18 +-
 lib/examples/nl/splash.lyx                         |    2 +-
 lib/examples/nl/voorbeeld_ruw.lyx                  |    2 +-
 lib/examples/nl/voorbeeld_verlyxt.lyx              |    2 +-
 lib/examples/noweb2lyx.lyx                         |    2 +-
 lib/examples/paralist.lyx                          |    2 +-
 lib/examples/pl/splash.lyx                         |    2 +-
 lib/examples/powerdot-example.lyx                  |   30 +-
 lib/examples/pt_BR/splash.lyx                      |    2 +-
 lib/examples/pt_PT/splash.lyx                      |    2 +-
 lib/examples/recipebook.lyx                        |    2 +-
 lib/examples/ro/splash.lyx                         |    2 +-
 lib/examples/ru/splash.lyx                         |    2 +-
 lib/examples/script_form.lyx                       |    2 +-
 lib/examples/seminar.lyx                           |    2 +-
 lib/examples/serial_letter1.lyx                    |    2 +-
 lib/examples/serial_letter2.lyx                    |    2 +-
 lib/examples/serial_letter3.lyx                    |    2 +-
 lib/examples/simplecv.lyx                          |    6 +-
 lib/examples/sk/splash.lyx                         |    2 +-
 lib/examples/sl/primer_lyxan.lyx                   |    2 +-
 lib/examples/sl/primer_surov.lyx                   |    2 +-
 lib/examples/sl/splash.lyx                         |    2 +-
 lib/examples/splash.lyx                            |    5 +-
 lib/examples/spreadsheet.lyx                       |    2 +-
 lib/examples/springer/svmono_acknow.lyx            |    2 +-
 lib/examples/springer/svmono_acronym.lyx           |    2 +-
 lib/examples/springer/svmono_appendix.lyx          |    2 +-
 lib/examples/springer/svmono_book-master.lyx       |    2 +-
 lib/examples/springer/svmono_chapter.lyx           |    6 +-
 lib/examples/springer/svmono_dedication.lyx        |    2 +-
 lib/examples/springer/svmono_foreword.lyx          |    4 +-
 lib/examples/springer/svmono_glossary.lyx          |    2 +-
 lib/examples/springer/svmono_part.lyx              |    2 +-
 lib/examples/springer/svmono_preface.lyx           |    4 +-
 lib/examples/springer/svmono_referenc.lyx          |    4 +-
 lib/examples/springer/svmono_solutions.lyx         |    2 +-
 lib/examples/springer/svmult_acknow.lyx            |    2 +-
 lib/examples/springer/svmult_acronym.lyx           |    2 +-
 lib/examples/springer/svmult_appendix.lyx          |    2 +-
 lib/examples/springer/svmult_author.lyx            |    6 +-
 lib/examples/springer/svmult_cblist.lyx            |    2 +-
 lib/examples/springer/svmult_dedication.lyx        |    2 +-
 lib/examples/springer/svmult_editor-master.lyx     |    2 +-
 lib/examples/springer/svmult_foreword.lyx          |    4 +-
 lib/examples/springer/svmult_glossary.lyx          |    2 +-
 lib/examples/springer/svmult_part.lyx              |    2 +-
 lib/examples/springer/svmult_preface.lyx           |    4 +-
 lib/examples/springer/svmult_referenc.lyx          |    4 +-
 lib/examples/sr/Braille.lyx                        |    2 +-
 lib/examples/sr/splash.lyx                         |    2 +-
 lib/examples/sv/splash.lyx                         |    2 +-
 lib/examples/sweave.lyx                            |    2 +-
 lib/examples/thesis/Acknowledgments.lyx            |    2 +-
 lib/examples/thesis/Appendix.lyx                   |    2 +-
 lib/examples/thesis/Summary.lyx                    |    2 +-
 lib/examples/thesis/chapter-1.lyx                  |    2 +-
 lib/examples/thesis/chapter-2.lyx                  |    2 +-
 lib/examples/thesis/thesis.lyx                     |    2 +-
 lib/examples/tufte-book.lyx                        |    2 +-
 lib/examples/tufte-handout.lyx                     |    2 +-
 lib/examples/uk/splash.lyx                         |    2 +-
 lib/examples/varwidth-floats-side-by-side.lyx      |    2 +-
 lib/examples/xyfigure.lyx                          |    2 +-
 lib/examples/xypic.lyx                             |   28 +-
 lib/generate_contributions.py                      |    8 +
 lib/images/change-accept.svgz                      |  Bin 2495 -> 2880 bytes
 lib/images/change-next.svgz                        |  Bin 2223 -> 2561 bytes
 lib/images/change-reject.svgz                      |  Bin 2758 -> 3114 bytes
 lib/images/cut.svgz                                |  Bin 2767 -> 3099 bytes
 lib/images/dialog-show_mathmatrix.svgz             |  Bin 2667 -> 3115 bytes
 lib/images/info-insert.svgz                        |  Bin 716 -> 933 bytes
 lib/images/math-macro-add-optional-param.svgz      |  Bin 3586 -> 3711 bytes
 lib/images/math-macro-add-param.svgz               |  Bin 5878 -> 6274 bytes
 lib/images/math-macro-remove-optional-param.svgz   |  Bin 3589 -> 3717 bytes
 lib/images/math-macro-remove-param.svgz            |  Bin 5876 -> 6271 bytes
 lib/images/math-matrix.svgz                        |  Bin 4186 -> 3873 bytes
 lib/images/math/alpha.svgz                         |  Bin 926 -> 1327 bytes
 lib/images/math/digamma.svgz                       |  Bin 733 -> 1123 bytes
 lib/images/math/frac-square.svgz                   |  Bin 1311 -> 1677 bytes
 lib/images/math/frac.svgz                          |  Bin 3591 -> 3940 bytes
 lib/images/math/intop.svgz                         |  Bin 1103 -> 1455 bytes
 lib/images/math/leq.svgz                           |  Bin 495 -> 885 bytes
 lib/images/math/leqq.svgz                          |  Bin 508 -> 900 bytes
 lib/images/math/nabla.svgz                         |  Bin 503 -> 918 bytes
 lib/images/math/pm.svgz                            |  Bin 470 -> 860 bytes
 lib/images/redo.svgz                               |  Bin 2435 -> 2687 bytes
 lib/images/script-insert_subscript.svgz            |  Bin 1299 -> 1673 bytes
 lib/images/script-insert_superscript.svgz          |  Bin 562 -> 944 bytes
 lib/images/specialchar-insert_latex.svgz           |  Bin 3540 -> 3638 bytes
 lib/images/specialchar-insert_latex2e.svgz         |  Bin 4572 -> 4531 bytes
 lib/images/specialchar-insert_lyx.svgz             |  Bin 2549 -> 2166 bytes
 lib/images/specialchar-insert_menu-separator.svgz  |  Bin 443 -> 882 bytes
 lib/images/specialchar-insert_tex.svgz             |  Bin 2856 -> 2528 bytes
 lib/images/spellcheck-continously.svgz             |  Bin 6372 -> 0 bytes
 lib/layouts/AEA.layout                             |    2 +-
 lib/layouts/IEEEtran-CompSoc.layout                |    2 +-
 lib/layouts/IEEEtran-TransMag.layout               |    2 +-
 lib/layouts/IEEEtran.layout                        |    2 +-
 lib/layouts/RJournal.layout                        |    2 +-
 lib/layouts/a0poster.layout                        |    2 +-
 lib/layouts/aa.layout                              |    2 +-
 lib/layouts/aapaper.inc                            |    2 +-
 lib/layouts/aapaper.layout                         |    2 +-
 lib/layouts/aastex.layout                          |   10 +-
 lib/layouts/aastex6.layout                         |  111 +
 lib/layouts/achemso.layout                         |    2 +-
 lib/layouts/acm-sigs-alt.layout                    |    2 +-
 lib/layouts/acm-sigs.inc                           |    2 +-
 lib/layouts/acm-sigs.layout                        |    2 +-
 lib/layouts/acmsiggraph-0-92.layout                |  340 +
 lib/layouts/acmsiggraph.layout                     |    4 +-
 lib/layouts/agu-dtd.layout                         |    2 +-
 lib/layouts/agu_stdclass.inc                       |    2 +-
 lib/layouts/agu_stdcounters.inc                    |    2 +-
 lib/layouts/agu_stdlists.inc                       |    2 +-
 lib/layouts/agu_stdsections.inc                    |    2 +-
 lib/layouts/agu_stdtitle.inc                       |    2 +-
 lib/layouts/agums.layout                           |    2 +-
 lib/layouts/aguplus.inc                            |    2 +-
 lib/layouts/agutex.layout                          |    2 +-
 lib/layouts/algorithm2e.module                     |    2 +-
 lib/layouts/amsart.layout                          |    2 +-
 lib/layouts/amsbook.layout                         |    2 +-
 lib/layouts/amsdefs.inc                            |    2 +-
 lib/layouts/apa.layout                             |    2 +-
 lib/layouts/apa6.layout                            |    2 +-
 lib/layouts/arab-article.layout                    |    2 +-
 lib/layouts/article-beamer.layout                  |    4 +-
 lib/layouts/article.layout                         |    2 +-
 lib/layouts/basic.module                           |    2 +-
 lib/layouts/beamer.layout                          |    2 +-
 lib/layouts/beamerposter.layout                    |    2 +-
 lib/layouts/bicaption.module                       |    2 +-
 lib/layouts/book.layout                            |    2 +-
 lib/layouts/braille.module                         |    2 +-
 lib/layouts/broadway.layout                        |    2 +-
 lib/layouts/changebars.module                      |    2 +-
 lib/layouts/chess.layout                           |    2 +-
 lib/layouts/cl2emult.layout                        |    2 +-
 lib/layouts/ctex-article.layout                    |    2 +-
 lib/layouts/ctex-book.layout                       |    2 +-
 lib/layouts/ctex-report.layout                     |    2 +-
 lib/layouts/customHeadersFooters.module            |    2 +-
 lib/layouts/db_lyxmacros.inc                       |    2 +-
 lib/layouts/db_stdcharstyles.inc                   |    2 +-
 lib/layouts/db_stdclass.inc                        |    2 +-
 lib/layouts/db_stdcounters.inc                     |    2 +-
 lib/layouts/db_stdlayouts.inc                      |    2 +-
 lib/layouts/db_stdlists.inc                        |    2 +-
 lib/layouts/db_stdsections.inc                     |    2 +-
 lib/layouts/db_stdstarsections.inc                 |    2 +-
 lib/layouts/db_stdstruct.inc                       |    2 +-
 lib/layouts/db_stdtitle.inc                        |    2 +-
 lib/layouts/dinbrief.layout                        |    2 +-
 lib/layouts/docbook-book.layout                    |    2 +-
 lib/layouts/docbook-chapter.layout                 |    2 +-
 lib/layouts/docbook-section.layout                 |    2 +-
 lib/layouts/docbook.layout                         |    2 +-
 lib/layouts/doublecol-new.layout                   |    2 +-
 lib/layouts/dtk.layout                             |    2 +-
 lib/layouts/ectaart.layout                         |    2 +-
 lib/layouts/egs.layout                             |    2 +-
 lib/layouts/elsart.layout                          |    2 +-
 lib/layouts/elsarticle.layout                      |    2 +-
 lib/layouts/endnotes.module                        |    2 +-
 lib/layouts/entcs.layout                           |    2 +-
 lib/layouts/enumitem.module                        |    2 +-
 lib/layouts/eqs-within-sections.module             |    2 +-
 lib/layouts/europasscv.layout                      |    2 +-
 lib/layouts/europecv.layout                        |    2 +-
 lib/layouts/extarticle.layout                      |    2 +-
 lib/layouts/extbook.layout                         |    2 +-
 lib/layouts/extletter.layout                       |    2 +-
 lib/layouts/extreport.layout                       |    2 +-
 lib/layouts/figs-within-sections.module            |    2 +-
 lib/layouts/fix-cm.module                          |    2 +-
 lib/layouts/fixltx2e.module                        |    2 +-
 lib/layouts/fixme.module                           |    2 +-
 lib/layouts/foils.layout                           |    2 +-
 lib/layouts/foottoend.module                       |    2 +-
 lib/layouts/frletter.layout                        |    2 +-
 lib/layouts/g-brief.layout                         |    2 +-
 lib/layouts/g-brief2.layout                        |    2 +-
 lib/layouts/graphicboxes.module                    |    2 +-
 lib/layouts/hanging.module                         |    2 +-
 lib/layouts/heb-article.layout                     |    2 +-
 lib/layouts/heb-letter.layout                      |    2 +-
 lib/layouts/hollywood.layout                       |    2 +-
 lib/layouts/hpstatement.module                     |    2 +-
 lib/layouts/ijmpc.layout                           |    2 +-
 lib/layouts/ijmpd.layout                           |    2 +-
 lib/layouts/initials.module                        |    2 +-
 lib/layouts/iopart.layout                          |    2 +-
 lib/layouts/isprs.layout                           |    2 +-
 lib/layouts/iucr.layout                            |    2 +-
 lib/layouts/jarticle.layout                        |    2 +-
 lib/layouts/jasatex.layout                         |    2 +-
 lib/layouts/jbook.layout                           |    2 +-
 lib/layouts/jgrga.layout                           |    2 +-
 lib/layouts/jreport.layout                         |    2 +-
 lib/layouts/jsarticle.layout                       |    2 +-
 lib/layouts/jsbook.layout                          |    2 +-
 lib/layouts/jss.layout                             |    2 +-
 lib/layouts/jurabib.module                         |    2 +-
 lib/layouts/kluwer.layout                          |    2 +-
 lib/layouts/knitr.module                           |    2 +-
 lib/layouts/latex8.layout                          |    2 +-
 lib/layouts/letter.layout                          |    2 +-
 lib/layouts/lettre.layout                          |    2 +-
 lib/layouts/lilypond.module                        |    2 +-
 lib/layouts/linguistics.module                     |    2 +-
 lib/layouts/litinsets.inc                          |    2 +-
 lib/layouts/llncs.layout                           |    2 +-
 lib/layouts/logicalmkup.module                     |    2 +-
 lib/layouts/ltugboat.layout                        |    2 +-
 lib/layouts/lyxmacros.inc                          |    2 +-
 lib/layouts/memoir.layout                          |    2 +-
 lib/layouts/minimalistic.module                    |    2 +-
 lib/layouts/moderncv.layout                        |    2 +-
 lib/layouts/multicol.module                        |    2 +-
 lib/layouts/mwart.layout                           |    2 +-
 lib/layouts/mwbk.layout                            |    2 +-
 lib/layouts/mwrep.layout                           |    2 +-
 lib/layouts/natbib.module                          |    2 +-
 lib/layouts/natbibapa.module                       |    2 +-
 lib/layouts/noweb.module                           |    2 +-
 lib/layouts/numarticle.inc                         |    2 +-
 lib/layouts/numreport.inc                          |    2 +-
 lib/layouts/numrevtex.inc                          |    2 +-
 lib/layouts/paper.layout                           |    2 +-
 lib/layouts/paralist.module                        |    2 +-
 lib/layouts/pdfcomment.module                      |    2 +-
 lib/layouts/pdfform.module                         |    2 +-
 lib/layouts/powerdot.layout                        |    2 +-
 lib/layouts/recipebook.layout                      |    2 +-
 lib/layouts/report.layout                          |    2 +-
 lib/layouts/revtex.layout                          |    2 +-
 lib/layouts/revtex4-1.layout                       |    2 +-
 lib/layouts/revtex4.layout                         |    2 +-
 lib/layouts/rsphrase.module                        |    2 +-
 lib/layouts/sciposter.layout                       |    2 +-
 lib/layouts/scrartcl.layout                        |    2 +-
 lib/layouts/scrarticle-beamer.layout               |    4 +-
 lib/layouts/scrbook.layout                         |    2 +-
 lib/layouts/scrclass.inc                           |    2 +-
 lib/layouts/scrlettr.layout                        |    2 +-
 lib/layouts/scrlttr2.layout                        |    2 +-
 lib/layouts/scrreprt.layout                        |    2 +-
 lib/layouts/sectionbox.module                      |    2 +-
 lib/layouts/seminar.layout                         |    2 +-
 lib/layouts/shapepar.module                        |    2 +-
 lib/layouts/siamltex.layout                        |    2 +-
 lib/layouts/sigplanconf.layout                     |    2 +-
 lib/layouts/simplecv.layout                        |    2 +-
 lib/layouts/singlecol-new.layout                   |    2 +-
 lib/layouts/singlecol.layout                       |    2 +-
 lib/layouts/slides.layout                          |    2 +-
 lib/layouts/spie.layout                            |    2 +-
 lib/layouts/stdcharstyles.inc                      |    2 +-
 lib/layouts/stdciteformats.inc                     |    2 +-
 lib/layouts/stdclass.inc                           |    2 +-
 lib/layouts/stdcounters.inc                        |    2 +-
 lib/layouts/stdcustom.inc                          |    2 +-
 lib/layouts/stdfloats.inc                          |    2 +-
 lib/layouts/stdinsets.inc                          |    4 +-
 lib/layouts/stdlayouts.inc                         |    2 +-
 lib/layouts/stdletter.inc                          |    2 +-
 lib/layouts/stdlists.inc                           |    2 +-
 lib/layouts/stdlyxlist.inc                         |    2 +-
 lib/layouts/stdrefprefix.inc                       |    2 +-
 lib/layouts/stdsections.inc                        |    2 +-
 lib/layouts/stdstarsections.inc                    |    2 +-
 lib/layouts/stdstruct.inc                          |    2 +-
 lib/layouts/stdtitle.inc                           |    2 +-
 lib/layouts/svcommon.inc                           |    2 +-
 lib/layouts/svglobal.layout                        |    2 +-
 lib/layouts/svglobal3.layout                       |    2 +-
 lib/layouts/svjog.layout                           |    2 +-
 lib/layouts/svmono.layout                          |    2 +-
 lib/layouts/svmult.layout                          |    2 +-
 lib/layouts/svprobth.layout                        |    2 +-
 lib/layouts/sweave.module                          |    2 +-
 lib/layouts/tabs-within-sections.module            |    2 +-
 lib/layouts/tarticle.layout                        |    2 +-
 lib/layouts/tbook.layout                           |    2 +-
 lib/layouts/tcolorbox.module                       |    2 +-
 lib/layouts/theorems-ams-bytype.inc                |    2 +-
 lib/layouts/theorems-ams-bytype.module             |    2 +-
 lib/layouts/theorems-ams-extended-bytype.module    |    2 +-
 lib/layouts/theorems-ams-extended.module           |    2 +-
 lib/layouts/theorems-ams.inc                       |    2 +-
 lib/layouts/theorems-ams.module                    |    2 +-
 lib/layouts/theorems-bytype.inc                    |    2 +-
 lib/layouts/theorems-bytype.module                 |    2 +-
 lib/layouts/theorems-case.inc                      |    2 +-
 lib/layouts/theorems-chap-bytype.module            |    2 +-
 lib/layouts/theorems-chap.module                   |    2 +-
 lib/layouts/theorems-named.module                  |    2 +-
 lib/layouts/theorems-order.inc                     |    2 +-
 lib/layouts/theorems-proof-std.inc                 |    2 +-
 lib/layouts/theorems-proof.inc                     |    2 +-
 lib/layouts/theorems-refprefix.inc                 |    2 +-
 lib/layouts/theorems-sec-bytype.module             |    2 +-
 lib/layouts/theorems-sec.module                    |    2 +-
 lib/layouts/theorems-starred-equivalents.inc       |    2 +-
 lib/layouts/theorems-starred.inc                   |    2 +-
 lib/layouts/theorems-starred.module                |    2 +-
 lib/layouts/theorems-std.module                    |    2 +-
 lib/layouts/theorems-without-preamble.inc          |    2 +-
 lib/layouts/theorems.inc                           |    2 +-
 lib/layouts/todonotes.module                       |    2 +-
 lib/layouts/treport.layout                         |    2 +-
 lib/layouts/tufte-book.layout                      |    2 +-
 lib/layouts/tufte-handout.layout                   |    2 +-
 lib/layouts/varwidth.module                        |    2 +-
 lib/layouttranslations                             |   64 +-
 lib/layouttranslations.review                      |    3 -
 lib/lyx2lyx/LyX.py                                 |    4 +-
 lib/lyx2lyx/lyx_2_2.py                             |   76 +-
 lib/scripts/convertDefault.py                      |   16 +-
 lib/scripts/layout2layout.py                       |   17 +-
 lib/templates/ACM-SIGS.lyx                         |    2 +-
 lib/templates/ACM-siggraph.lyx                     |  367 +-
 lib/templates/ACM-sigplan.lyx                      |    2 +-
 lib/templates/AEA.lyx                              |   10 +-
 lib/templates/AGUTeX.lyx                           |    2 +-
 lib/templates/APA.lyx                              |    2 +-
 lib/templates/APA6.lyx                             |    2 +-
 lib/templates/DocBook_article.lyx                  |    2 +-
 lib/templates/EPS-cropped.lyx                      |    2 +-
 lib/templates/IEEEtran-CompSoc.lyx                 |    4 +-
 lib/templates/IEEEtran-Conference.lyx              |    4 +-
 lib/templates/IEEEtran-Journal.lyx                 |    4 +-
 lib/templates/IEEEtran-TransMag.lyx                |    4 +-
 lib/templates/IJMPC.lyx                            |    4 +-
 lib/templates/IJMPD.lyx                            |    4 +-
 lib/templates/IOP-article.lyx                      |    2 +-
 lib/templates/IUCr-article.lyx                     |    2 +-
 lib/templates/JASA.lyx                             |    2 +-
 lib/templates/JSS-article.lyx                      |    2 +-
 lib/templates/PDF-cropped.lyx                      |    2 +-
 lib/templates/RJournal.lyx                         |    2 +-
 lib/templates/aa.lyx                               |    2 +-
 lib/templates/aastex.lyx                           |  358 -
 lib/templates/aastex6.lyx                          |  460 +
 lib/templates/beamer-conference-ornate-20min.lyx   |   69 +-
 lib/templates/ctex.lyx                             |    2 +-
 .../de_beamer-conference-ornate-20min.lyx          |   69 +-
 lib/templates/dinbrief.lyx                         |    2 +-
 lib/templates/ectaart.lyx                          |    2 +-
 lib/templates/elsarticle.lyx                       |    4 +-
 .../es_beamer-conference-ornate-20min.lyx          |   69 +-
 .../fr_beamer-conference-ornate-20min.lyx          |   75 +-
 lib/templates/frletter.lyx                         |    2 +-
 lib/templates/g-brief-de.lyx                       |    2 +-
 lib/templates/g-brief-en.lyx                       |    2 +-
 lib/templates/g-brief2.lyx                         |    2 +-
 lib/templates/hollywood.lyx                        |    2 +-
 .../ja_beamer-conference-ornate-20min.lyx          |   26 +-
 lib/templates/kluwer.lyx                           |    2 +-
 lib/templates/koma-letter2.lyx                     |    2 +-
 lib/templates/letter.lyx                           |    2 +-
 lib/templates/lettre.lyx                           |    2 +-
 lib/templates/poster-a0poster-colored.lyx          |    6 +-
 lib/templates/poster-a0poster-simple.lyx           |    2 +-
 lib/templates/poster-beamerposter.lyx              |   49 +-
 lib/templates/poster-sciposter.lyx                 |    2 +-
 lib/templates/revtex4-1.lyx                        |    6 +-
 lib/templates/revtex4.lyx                          |    2 +-
 lib/templates/slides.lyx                           |    2 +-
 lib/templates/springer/svjour3.lyx                 |    2 +-
 lib/ui/default.ui                                  |    3 +-
 m4/Makefile.am                                     |    3 +-
 m4/eilseq.m4                                       |   67 +
 po/CMakeLists.txt                                  |    2 -
 po/Rules-lyx                                       |    3 +-
 po/ar.gmo                                          |  Bin 362117 -> 361933 
bytes
 po/ar.po                                           | 3719 ++--
 po/bg.po                                           |14147 ++++++-----
 po/ca.gmo                                          |  Bin 162499 -> 162393 
bytes
 po/ca.po                                           | 3709 ++--
 po/cs.gmo                                          |  Bin 420367 -> 420067 
bytes
 po/cs.po                                           | 3721 ++--
 po/da.gmo                                          |  Bin 211718 -> 211610 
bytes
 po/da.po                                           | 3709 ++--
 po/de.gmo                                          |  Bin 489670 -> 490433 
bytes
 po/de.po                                           | 3688 ++--
 po/el.gmo                                          |  Bin 278332 -> 278232 
bytes
 po/el.po                                           | 3704 ++--
 po/en.gmo                                          |  Bin 1139 -> 1139 bytes
 po/en.po                                           | 3660 ++--
 po/es.gmo                                          |  Bin 437304 -> 481556 
bytes
 po/es.po                                           | 3482 ++--
 po/eu.gmo                                          |  Bin 346048 -> 345945 
bytes
 po/eu.po                                           | 3713 ++--
 po/fi.gmo                                          |  Bin 218228 -> 242882 
bytes
 po/fi.po                                           | 5292 ++--
 po/fr.gmo                                          |  Bin 492159 -> 493690 
bytes
 po/fr.po                                           |26850 ++++++++++----------
 po/gl.gmo                                          |  Bin 170551 -> 170426 
bytes
 po/gl.po                                           | 3709 ++--
 po/he.gmo                                          |  Bin 252162 -> 259770 
bytes
 po/he.po                                           | 4042 ++--
 po/hu.gmo                                          |  Bin 283578 -> 283469 
bytes
 po/hu.po                                           | 3707 ++--
 po/ia.gmo                                          |  Bin 426043 -> 444082 
bytes
 po/ia.po                                           |14077 ++++++-----
 po/id.gmo                                          |  Bin 350721 -> 350474 
bytes
 po/id.po                                           | 3708 ++--
 po/it.gmo                                          |  Bin 481401 -> 482929 
bytes
 po/it.po                                           | 3272 ++--
 po/ja.gmo                                          |  Bin 508076 -> 509579 
bytes
 po/ja.po                                           |24494 +++++++++---------
 po/ko.po                                           |13124 ++++++-----
 po/lyx_pot.py                                      |   84 +-
 po/nb.gmo                                          |  Bin 411743 -> 452460 
bytes
 po/nb.po                                           | 5618 ++---
 po/nl.gmo                                          |  Bin 152585 -> 152471 
bytes
 po/nl.po                                           | 3706 ++--
 po/nn.gmo                                          |  Bin 360596 -> 360305 
bytes
 po/nn.po                                           | 3708 ++--
 po/pl.gmo                                          |  Bin 314477 -> 359150 
bytes
 po/pl.po                                           | 5615 ++---
 po/pt_BR.gmo                                       |  Bin 485955 -> 487543 
bytes
 po/pt_BR.po                                        | 3507 ++--
 po/pt_PT.gmo                                       |  Bin 439547 -> 439188 
bytes
 po/pt_PT.po                                        | 3721 ++--
 po/ro.gmo                                          |  Bin 151306 -> 151306 
bytes
 po/ro.po                                           | 3702 ++--
 po/ru.gmo                                          |  Bin 294996 -> 294850 
bytes
 po/ru.po                                           | 3707 ++--
 po/sk.gmo                                          |  Bin 479015 -> 480027 
bytes
 po/sk.po                                           |11686 +++++-----
 po/sl.po                                           |13400 ++++++-----
 po/sr.gmo                                          |  Bin 161875 -> 161875 
bytes
 po/sr.po                                           | 3700 ++--
 po/sv.gmo                                          |  Bin 427912 -> 468962 
bytes
 po/sv.po                                           | 1225 +-
 po/tr.gmo                                          |  Bin 224112 -> 224008 
bytes
 po/tr.po                                           | 3705 ++--
 po/uk.gmo                                          |  Bin 548061 -> 606923 
bytes
 po/uk.po                                           |23633 +++++++++---------
 po/wa.po                                           |13391 ++++++-----
 po/zh_CN.gmo                                       |  Bin 214282 -> 214138 
bytes
 po/zh_CN.po                                        | 3709 ++--
 po/zh_TW.gmo                                       |  Bin 418895 -> 418725 
bytes
 po/zh_TW.po                                        | 3733 ++--
 src/AppleSpellChecker.cpp                          |    1 -
 src/Author.cpp                                     |   10 +
 src/Author.h                                       |    2 +
 src/Buffer.cpp                                     |   42 +-
 src/Buffer.h                                       |    6 +
 src/BufferView.cpp                                 |   66 +-
 src/Changes.cpp                                    |   32 +-
 src/Changes.h                                      |   13 +
 src/Counters.cpp                                   |   22 +-
 src/Counters.h                                     |    6 +-
 src/Cursor.cpp                                     |   24 +-
 src/Cursor.h                                       |    5 +-
 src/CutAndPaste.cpp                                |   19 +-
 src/DispatchResult.h                               |   18 +-
 src/DocIterator.cpp                                |    2 +-
 src/HunspellChecker.cpp                            |    4 +-
 src/LaTeX.cpp                                      |    4 +
 src/LyXAction.cpp                                  |    4 +-
 src/LyXRC.cpp                                      |    5 +-
 src/LyXRC.h                                        |    2 +-
 src/Makefile.am                                    |   28 +-
 src/Paragraph.cpp                                  |   21 +-
 src/Paragraph.h                                    |    5 +-
 src/ParagraphMetrics.cpp                           |   13 +-
 src/Row.cpp                                        |   18 +-
 src/Row.h                                          |    9 +-
 src/RowPainter.cpp                                 |    8 +-
 src/Server.cpp                                     |    4 +-
 src/Text.cpp                                       |   35 +-
 src/Text3.cpp                                      |    9 +-
 src/TextClass.cpp                                  |   11 +-
 src/TextClass.h                                    |    4 +-
 src/TextMetrics.cpp                                |   48 +-
 src/TextMetrics.h                                  |    2 +-
 src/Toc.h                                          |   43 +
 src/TocBackend.cpp                                 |   40 +-
 src/TocBackend.h                                   |   43 +-
 src/client/Makefile.am                             |    9 +-
 src/factory.cpp                                    |    2 +
 src/frontends/Makefile.am                          |    5 +-
 src/frontends/qt4/GuiApplication.cpp               |   67 +-
 src/frontends/qt4/GuiApplication.h                 |    3 +
 src/frontends/qt4/GuiChanges.cpp                   |   62 +-
 src/frontends/qt4/GuiChanges.h                     |    7 +-
 src/frontends/qt4/GuiCitation.cpp                  |   20 +
 src/frontends/qt4/GuiClipboard.cpp                 |   34 +-
 src/frontends/qt4/GuiClipboard.h                   |    9 +-
 src/frontends/qt4/GuiDelimiter.cpp                 |   29 +-
 src/frontends/qt4/GuiDocument.cpp                  |   25 +-
 src/frontends/qt4/GuiFontMetrics.cpp               |    2 +-
 src/frontends/qt4/GuiLog.cpp                       |    5 +-
 src/frontends/qt4/GuiPainter.cpp                   |    9 +-
 src/frontends/qt4/GuiPainter.h                     |    3 +-
 src/frontends/qt4/GuiPrefs.cpp                     |   71 +-
 src/frontends/qt4/GuiPrefs.h                       |    9 +
 src/frontends/qt4/GuiProgressView.cpp              |    5 +-
 src/frontends/qt4/GuiSymbols.cpp                   |  253 +-
 src/frontends/qt4/GuiToc.cpp                       |    8 +-
 src/frontends/qt4/GuiView.cpp                      |    9 +-
 src/frontends/qt4/GuiViewSource.cpp                |   24 +-
 src/frontends/qt4/LyXToolBox.cpp                   |   57 +
 src/frontends/qt4/LyXToolBox.h                     |   46 +
 src/frontends/qt4/Makefile.am                      |   13 +-
 src/frontends/qt4/TocModel.cpp                     |    7 +-
 src/frontends/qt4/TocModel.h                       |    4 +-
 src/frontends/qt4/TocWidget.cpp                    |   81 +-
 src/frontends/qt4/TocWidget.h                      |   27 +-
 src/frontends/qt4/ui/CitationUi.ui                 |  166 +-
 src/frontends/qt4/ui/DelimiterUi.ui                |    4 +-
 src/graphics/GraphicsLoader.cpp                    |    4 -
 src/insets/Inset.cpp                               |    2 +-
 src/insets/Inset.h                                 |    4 +-
 src/insets/InsetBox.cpp                            |    2 +-
 src/insets/InsetCaption.cpp                        |    2 +-
 src/insets/InsetCollapsable.cpp                    |  118 +-
 src/insets/InsetCollapsable.h                      |   42 +-
 src/insets/InsetCommand.cpp                        |    2 +-
 src/insets/InsetCommand.h                          |    2 +-
 src/insets/InsetExternal.h                         |    2 +-
 src/insets/InsetFlex.cpp                           |   25 +-
 src/insets/InsetFloat.cpp                          |    2 +-
 src/insets/InsetFloatList.h                        |    2 +-
 src/insets/InsetGraphics.h                         |    2 +-
 src/insets/InsetScript.cpp                         |    2 -
 src/insets/InsetScript.h                           |    4 +
 src/insets/InsetSeparator.cpp                      |   19 +-
 src/insets/InsetSeparator.h                        |    5 +-
 src/insets/InsetSpace.h                            |    2 +-
 src/insets/InsetTOC.h                              |    5 +-
 src/insets/InsetTabular.cpp                        |   39 +-
 src/insets/InsetTabular.h                          |    9 +
 src/insets/InsetText.cpp                           |    6 +-
 src/insets/InsetVSpace.h                           |    2 +-
 src/mathed/InsetMath.h                             |    3 +-
 src/mathed/InsetMathCases.cpp                      |    6 +
 src/mathed/InsetMathCases.h                        |    2 +
 src/mathed/InsetMathGrid.cpp                       |   78 +-
 src/mathed/InsetMathGrid.h                         |   13 +-
 src/mathed/InsetMathHull.cpp                       |  441 +-
 src/mathed/InsetMathHull.h                         |    6 +-
 src/mathed/InsetMathNest.cpp                       |    9 +-
 src/mathed/InsetMathSplit.cpp                      |   50 +-
 src/mathed/InsetMathSplit.h                        |    4 +
 src/support/Makefile.am                            |    4 +-
 src/support/convert.cpp                            |   32 +
 src/support/convert.h                              |    8 +
 src/support/debug.cpp                              |    6 +
 src/support/debug.h                                |    4 +
 src/support/docstring.cpp                          |    4 +-
 src/support/filetools.cpp                          |    2 +-
 src/support/lstrings.cpp                           |   11 +
 src/support/lstrings.h                             |    3 +
 src/support/lyxtime.cpp                            |   12 +
 src/support/lyxtime.h                              |   10 +
 src/support/os_win32.cpp                           |   10 +-
 src/support/os_win32.h                             |    9 +-
 src/support/strfwd.h                               |   13 +-
 src/tex2lyx/Makefile.am                            |    4 +-
 src/tex2lyx/test/CJK.lyx.lyx                       |    2 +-
 src/tex2lyx/test/CJKutf8.lyx.lyx                   |    2 +-
 src/tex2lyx/test/DummyDocument.lyx.lyx             |    2 +-
 src/tex2lyx/test/Dummy~Document.lyx.lyx            |    2 +-
 src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx         |    2 +-
 src/tex2lyx/test/algo2e.lyx.lyx                    |    2 +-
 .../test/box-color-size-space-align.lyx.lyx        |    2 +-
 src/tex2lyx/test/test-insets-basic.lyx.lyx         |    6 +-
 src/tex2lyx/test/test-insets.lyx.lyx               |    6 +-
 src/tex2lyx/test/test-memoir.lyx.lyx               |    2 +-
 src/tex2lyx/test/test-modules.lyx.lyx              |    2 +-
 src/tex2lyx/test/test-refstyle-theorems.lyx.lyx    |    2 +-
 src/tex2lyx/test/test-scr.lyx.lyx                  |    2 +-
 src/tex2lyx/test/test-structure.lyx.lyx            |    2 +-
 src/tex2lyx/test/test.lyx.lyx                      |    2 +-
 src/tex2lyx/test/verbatim.lyx.lyx                  |    2 +-
 src/texstream.cpp                                  |    8 +
 src/version.h                                      |    4 +-
 855 files changed, 168752 insertions(+), 146126 deletions(-)
 create mode 100644 .gitattributes
 create mode 100644 3rdparty/zlib/1.2.8/zconf.h.in
 create mode 100644 development/cmake/build5-2015-x64.bat
 delete mode 100644 development/cmake/po/dos2unix.py
 create mode 100755 development/tools/separator-convert.sh
 rename lib/doc/{attic => }/Changelog-Customization-LyX_22x.txt (100%)
 create mode 100644 lib/doc/Changelog-EmbeddedObjects-LyX_22x.txt
 rename lib/doc/{attic => }/Changelog-Math-LyX_22.txt (100%)
 rename lib/doc/{attic => }/Changelog-UserGuide-LyX_22x.txt (100%)
 delete mode 100644 lib/doc/attic/Changelog-EmbeddedObjects-LyX_22x.txt
 create mode 100644 lib/doc/attic/aastex6_sample.lyx
 create mode 100644 lib/doc/nb/Tutorial.lyx
 create mode 100644 lib/examples/fr/beamer-article.lyx
 create mode 100644 lib/examples/fr/beamer.lyx
 create mode 100644 lib/examples/nb/eksempel_lyxet.lyx
 create mode 100644 lib/examples/nb/eksempel_txt.lyx
 create mode 100644 lib/examples/nb/splash.lyx
 delete mode 100644 lib/images/spellcheck-continously.svgz
 create mode 100644 lib/layouts/aastex6.layout
 create mode 100644 lib/layouts/acmsiggraph-0-92.layout
 delete mode 100644 lib/templates/aastex.lyx
 create mode 100644 lib/templates/aastex6.lyx
 create mode 100644 m4/eilseq.m4
 create mode 100644 src/Toc.h
 create mode 100644 src/frontends/qt4/LyXToolBox.cpp
 create mode 100644 src/frontends/qt4/LyXToolBox.h


hooks/post-receive
-- 
Repository for new features

Reply via email to