]> git.lyx.org Git - features.git/blobdiff - src/Text.cpp
DocBook: refactor font handling.
[features.git] / src / Text.cpp
index 2be5b8602e31b831e765ea3f6081833709b6b4d3..2da97f6bd401945d6cff65877c1cee7821d0f5e0 100644 (file)
@@ -619,7 +619,8 @@ void Text::readParagraph(Paragraph & par, Lexer & lex,
                }
        }
        // Final change goes to paragraph break:
-       par.setChange(par.size(), change);
+       if (inset().allowMultiPar())
+               par.setChange(par.size(), change);
 
        // Initialize begin_of_body_ on load; redoParagraph maintains
        par.setBeginOfBody();
@@ -1011,11 +1012,11 @@ void Text::insertChar(Cursor & cur, char_type c)
                static docstring const number_operators = from_ascii("+-/*");
                static docstring const number_unary_operators = from_ascii("+-");
 
-               // European Number Separators: comma, dot etc.
+               // Common Number Separators: comma, dot etc.
                // European Number Terminators: percent, permille, degree, euro etc.
                if (cur.current_font.fontInfo().number() == FONT_ON) {
                        if (!isDigitASCII(c) && !contains(number_operators, c) &&
-                           !(isEuropeanNumberSeparator(c) &&
+                           !(isCommonNumberSeparator(c) &&
                              cur.pos() != 0 &&
                              cur.pos() != cur.lastpos() &&
                              tm.displayFont(pit, cur.pos()).fontInfo().number() == FONT_ON &&
@@ -1040,7 +1041,7 @@ void Text::insertChar(Cursor & cur, char_type c)
                                  ) {
                                        setCharFont(pit, cur.pos() - 1, cur.current_font,
                                                tm.font_);
-                               } else if (isEuropeanNumberSeparator(ch)
+                               } else if (isCommonNumberSeparator(ch)
                                     && cur.pos() >= 2
                                     && tm.displayFont(pit, cur.pos() - 2).fontInfo().number() == FONT_ON) {
                                        setCharFont(pit, cur.pos() - 1, cur.current_font,