The branch, 2.0.x has been updated
       via  39f06f37c37b1af1207734cdeafd3d324c08da03 (commit)
       via  0665673d03c22466b4ad0bc1ac53fef3a37f888c (commit)
      from  124bc762a735d482e12d54022008e919dff76978 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 39f06f37c37b1af1207734cdeafd3d324c08da03
Author: Vincent van Ravesteijn <[email protected]>
Date:   Sun Apr 29 22:46:17 2012 +0200

    Fix bug #7518: Assert when selecting in RTL text
    
    If we are in rtl text, we *need* to check whether the first character is a
    space. We can't use the rtl variable for this because this is only
    computed on the last row.
    
    This bug was introduced in [0a137e31/lyxgit] to fix the computation for
    freespacing paragraphs. We better can just check whether the paragraph is
    freespacing or not.
    
    (cherry picked from commit d7f68078cf3bbf3ea7f5d2b3ac5c7e73555c4681)

diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index ecc9e52..d9800e3 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -1230,8 +1230,9 @@ pos_type TextMetrics::getColumnNearX(pit_type const pit,
 
        // if the first character is a separator, and we are in RTL
        // text, this character will not be painted on screen
-       // and thus we should not count it and skip to the next.
-       if (rtl && par.isSeparator(bidi.vis2log(vc)))
+       // and thus we should not count it and skip to the next. Only
+       // in freespacing paragraphs, this first character is painted.
+       if (!par.isFreeSpacing() && par.isSeparator(bidi.vis2log(vc)))
                ++vc;
 
        while (vc < end && tmpx <= x) {
diff --git a/status.20x b/status.20x
index 0959093..9a93760 100644
--- a/status.20x
+++ b/status.20x
@@ -107,6 +107,8 @@ What's new
 - Fixed crash when modifying or pasting an equation label and there
   are references to that label in math (bug 8095).
 
+- Fixed assertion on selection of insets in RTL text (bug 7518).
+
 - Don't reset the selected format each time we click into a new paragraph
   in View->Source (bug 7997).
 

commit 0665673d03c22466b4ad0bc1ac53fef3a37f888c
Author: Vincent van Ravesteijn <[email protected]>
Date:   Thu Apr 26 16:31:42 2012 +0200

    Fix bug #8078: Assertions in xhtml output on Windows
    
    (cherry picked from commit 3c0e3c16c8c75524cd25e2fd9f34e2f2e17af150)

diff --git a/src/Floating.cpp b/src/Floating.cpp
index 531a066..513c4fa 100644
--- a/src/Floating.cpp
+++ b/src/Floating.cpp
@@ -16,6 +16,7 @@
 
 #include "support/debug.h"
 #include "support/lstrings.h"
+#include "support/textutils.h"
 
 using namespace std;
 
@@ -67,9 +68,9 @@ string Floating::defaultCSSClass() const
        string::const_iterator it = n.begin();
        string::const_iterator en = n.end();
        for (; it != en; ++it) {
-               if (!isalpha(*it))
+               if (!isAlphaASCII(*it))
                        d += "_";
-               else if (islower(*it))
+               else if (isLower(*it))
                        d += *it;
                else
                        d += support::lowercase(*it);
diff --git a/src/Layout.cpp b/src/Layout.cpp
index 1606977..120f7a2 100644
--- a/src/Layout.cpp
+++ b/src/Layout.cpp
@@ -1009,7 +1009,7 @@ string Layout::defaultCSSClass() const
                                d = from_ascii("lyx_");
                        else
                                d += '_';
-               } else if (islower(c))
+               } else if (isLower(c))
                        d += c;
                else
                        // this is slow, so do it only if necessary
diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp
index dee7e29..c87ebac 100644
--- a/src/insets/InsetLayout.cpp
+++ b/src/insets/InsetLayout.cpp
@@ -20,6 +20,7 @@
 
 #include "support/debug.h"
 #include "support/lstrings.h"
+#include "support/textutils.h"
 
 #include <vector>
 
@@ -426,9 +427,9 @@ string InsetLayout::defaultCSSClass() const
        string::const_iterator it = n.begin();
        string::const_iterator en = n.end();
        for (; it != en; ++it) {
-               if (!isalpha(*it))
+               if (!isAlphaASCII(*it))
                        d += "_";
-               else if (islower(*it))
+               else if (isLower(*it))
                        d += *it;
                else
                        d += support::lowercase(*it);
diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp
index ae1a3b0..e23723c 100644
--- a/src/mathed/InsetMathChar.cpp
+++ b/src/mathed/InsetMathChar.cpp
@@ -193,7 +193,7 @@ void InsetMathChar::mathmlize(MathStream & ms) const
        }               
 
        char const * type = 
-               (isalpha(char_) || Encodings::isMathAlpha(char_))
+               (isAlphaASCII(char_) || Encodings::isMathAlpha(char_))
                        ? "mi" : "mo";
        // we don't use MTag and ETag because we do not want the spacing
        ms << "<" << type << ">" << char_type(char_) << "</" << type << ">";    
@@ -227,7 +227,7 @@ void InsetMathChar::htmlize(HtmlStream & ms) const
                return;
        }               
 
-       if (isalpha(char_) || Encodings::isMathAlpha(char_))
+       if (isAlphaASCII(char_) || Encodings::isMathAlpha(char_))
                // we don't use MTag and ETag because we do not want the spacing
                ms << MTag("i") << char_type(char_) << ETag("i");
        else
diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp
index 005aa42..4a587ee 100644
--- a/src/output_xhtml.cpp
+++ b/src/output_xhtml.cpp
@@ -125,7 +125,7 @@ string cleanAttr(string const & str)
        string::const_iterator it = str.begin();
        string::const_iterator en = str.end();
        for (; it != en; ++it)
-               newname += isalnum(*it) ? *it : '_';
+               newname += isAlnumASCII(*it) ? *it : '_';
        return newname; 
 }
 
diff --git a/status.20x b/status.20x
index 46bba5f..0959093 100644
--- a/status.20x
+++ b/status.20x
@@ -75,6 +75,8 @@ What's new
 
 * DOCUMENT INPUT/OUTPUT
 
+- Fixed assertions on Windows for XHTML output (bug 8078).
+
 - Fix reconfiguration on Windows when the user directory is a UNC path
   (bug 8098).
 

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

Summary of changes:
 src/Floating.cpp             |    5 +++--
 src/Layout.cpp               |    2 +-
 src/TextMetrics.cpp          |    5 +++--
 src/insets/InsetLayout.cpp   |    5 +++--
 src/mathed/InsetMathChar.cpp |    4 ++--
 src/output_xhtml.cpp         |    2 +-
 status.20x                   |    4 ++++
 7 files changed, 17 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to