]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.cpp
PlainLayout -> Plain Layout
[lyx.git] / src / rowpainter.cpp
index 335b2941c6192dfb7b55297b5a8c2ca9cec3e28e..a50b8a77a129b088b9db6401741d1b5d66ab6b76 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <config.h>
+#include <algorithm>
 
 #include "rowpainter.h"
 
@@ -42,6 +43,7 @@
 #include "support/debug.h"
 #include "support/textutils.h"
 
+#include <boost/assert.hpp>
 #include <boost/crc.hpp>
 
 #include <ostream>
@@ -171,7 +173,7 @@ void RowPainter::paintHebrewComposeChar(pos_type & vpos, FontInfo const & font)
 
        for (pos_type i = pos - 1; i >= 0; --i) {
                c = par_.getChar(i);
-               if (!Encodings::isComposeChar_hebrew(c)) {
+               if (!Encodings::isHebrewComposeChar(c)) {
                        if (isPrintableNonspace(c)) {
                                int const width2 = pm_.singleWidth(i,
                                        text_metrics_.displayFont(pit_, i));
@@ -205,7 +207,7 @@ void RowPainter::paintArabicComposeChar(pos_type & vpos, FontInfo const & font)
 
        for (pos_type i = pos - 1; i >= 0; --i) {
                c = par_.getChar(i);
-               if (!Encodings::isComposeChar_arabic(c)) {
+               if (!Encodings::isArabicComposeChar(c)) {
                        if (isPrintableNonspace(c)) {
                                int const width2 = pm_.singleWidth(i,
                                                text_metrics_.displayFont(pit_, i));
@@ -275,10 +277,10 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font,
                 * of arabic and hebrew characters, then these breaks may have
                 * to be re-applied.
 
-               if (arabic && Encodings::isComposeChar_arabic(c))
+               if (arabic && Encodings::isArabicComposeChar(c))
                        break;
 
-               if (hebrew && Encodings::isComposeChar_hebrew(c))
+               if (hebrew && Encodings::isHebrewComposeChar(c))
                        break;
                */
 
@@ -343,8 +345,8 @@ void RowPainter::paintFromPos(pos_type & vpos)
 
        // draw as many chars as we can
        if ((!hebrew && !arabic)
-               || (hebrew && !Encodings::isComposeChar_hebrew(c))
-               || (arabic && !Encodings::isComposeChar_arabic(c))) {
+               || (hebrew && !Encodings::isHebrewComposeChar(c))
+               || (arabic && !Encodings::isArabicComposeChar(c))) {
                paintChars(vpos, orig_font.fontInfo(), hebrew, arabic);
        } else if (hebrew) {
                paintHebrewComposeChar(vpos, orig_font.fontInfo());
@@ -473,10 +475,9 @@ void RowPainter::paintFirst()
                y_top += paintAppendixStart(yo_ - row_.ascent() + 2 * defaultRowHeight());
 
        Buffer const & buffer = pi_.base.bv->buffer();
-
        Layout const & layout = par_.layout();
 
-       if (buffer.params().paragraph_separation == BufferParams::PARSEP_SKIP) {
+       if (buffer.params().paragraph_separation == BufferParams::ParagraphSkipSeparation) {
                if (pit_ != 0) {
                        if (layout.latextype == LATEX_PARAGRAPH
                                && !par_.getDepth()) {