]> git.lyx.org Git - lyx.git/commitdiff
s/boost::uint32_t/lyx::char_type/g except in the definition of lyx::docstring
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 13 Sep 2006 17:11:39 +0000 (17:11 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 13 Sep 2006 17:11:39 +0000 (17:11 +0000)
and lyx::char_type

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14990 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt3/QLPainter.C
src/frontends/qt4/qt_helpers.C
src/lyxlex_pimpl.C
src/support/docstring.C
src/support/unicode.C
src/support/unicode.h

index be335513b761cafd32287f81e9ec8c24d097579e..550f87ceaf0eb6084a04b3469e6cd15d572880f1 100644 (file)
@@ -222,7 +222,7 @@ void QLPainter::text(int x, int y, lyx::char_type const * s, size_t ls,
                // Brain-dead MSVC wants at(i) rather than operator[]
                str.at(i) = QChar(encoding->ucs(s[i]));
 #else
-       //std::vector<boost::uint32_t> in(s, s + ls);
+       //std::vector<lyx::char_type> in(s, s + ls);
        //std::vector<unsigned short> ucs2 = ucs4_to_ucs2(in);
        std::vector<unsigned short> ucs2 = ucs4_to_ucs2(s, ls);
        ucs2.push_back(0);
index 44fcf98e2f92fa6a886e6b3d19849375c9cbd89e..3f419624f38839979c434ed338ddfff3fcbbc228 100644 (file)
@@ -159,13 +159,13 @@ void qstring_to_ucs4(QString const & qstr, vector<char_type> & ucs4)
        int const ls = qstr.size();
        ucs4.clear();
        for (int i = 0; i < ls; ++i)
-               ucs4.push_back(static_cast<boost::uint32_t>(qstr[i].unicode()));
+               ucs4.push_back(static_cast<lyx::char_type>(qstr[i].unicode()));
 }
 
 
 char_type const qchar_to_ucs4(QChar const & qchar)
 {
-       return static_cast<boost::uint32_t>(qchar.unicode());
+       return static_cast<lyx::char_type>(qchar.unicode());
 }
 
 
index 415402b4cc9a5d8a7c4e3756864540605ed9cabd..a3270e355d15b748f7f8ea15991323e9a7508e96 100644 (file)
@@ -73,7 +73,7 @@ string const LyXLex::Pimpl::getString() const
 
 lyx::docstring const LyXLex::Pimpl::getDocString() const
 {
-       std::vector<boost::uint32_t> res = utf8_to_ucs4(buff);
+       std::vector<lyx::char_type> res = utf8_to_ucs4(buff);
        lyx::docstring dstr(res.begin(), res.end());
        return dstr;
 }
index 382612071a2d5346cd9878348e5f19a60e081e58..aa0f43bfcc18fc088ed7d1c4730d9bf83e241703 100644 (file)
@@ -40,7 +40,7 @@ docstring const from_ascii(std::string const & ascii)
 
 docstring const from_utf8(std::string const & utf8)
 {
-       std::vector<boost::uint32_t> const ucs4 =
+       std::vector<lyx::char_type> const ucs4 =
                utf8_to_ucs4(utf8.data(), utf8.size());
        return docstring(ucs4.begin(), ucs4.end());
 }
index 650962ab9b6293876b96c4f3610922b12e44c287..4f4cf27980b8fb0a3f5f841bc7614b4df896f370 100644 (file)
@@ -124,60 +124,60 @@ iconv_convert(iconv_t * cd,
 } // anon namespace
 
 
-std::vector<boost::uint32_t> utf8_to_ucs4(std::vector<char> const & utf8str)
+std::vector<lyx::char_type> utf8_to_ucs4(std::vector<char> const & utf8str)
 {
        return utf8_to_ucs4(&utf8str[0], utf8str.size());
 }
 
 
-std::vector<boost::uint32_t>
+std::vector<lyx::char_type>
 utf8_to_ucs4(char const * utf8str, size_t ls)
 {
        static iconv_t cd = (iconv_t)(-1);
-       return iconv_convert<boost::uint32_t>(&cd, ucs4_codeset, "UTF-8",
+       return iconv_convert<lyx::char_type>(&cd, ucs4_codeset, "UTF-8",
                                              utf8str, ls);
 }
 
 
-boost::uint32_t
+lyx::char_type
 ucs2_to_ucs4(unsigned short c)
 {
        return ucs2_to_ucs4(&c, 1)[0];
 }
 
 
-std::vector<boost::uint32_t>
+std::vector<lyx::char_type>
 ucs2_to_ucs4(std::vector<unsigned short> const & ucs2str)
 {
        return ucs2_to_ucs4(&ucs2str[0], ucs2str.size());
 }
 
 
-std::vector<boost::uint32_t>
+std::vector<lyx::char_type>
 ucs2_to_ucs4(unsigned short const * ucs2str, size_t ls)
 {
        static iconv_t cd = (iconv_t)(-1);
-       return iconv_convert<boost::uint32_t>(&cd, ucs4_codeset, ucs2_codeset,
+       return iconv_convert<lyx::char_type>(&cd, ucs4_codeset, ucs2_codeset,
                                              ucs2str, ls);
 }
 
 
 unsigned short
-ucs4_to_ucs2(boost::uint32_t c)
+ucs4_to_ucs2(lyx::char_type c)
 {
        return ucs4_to_ucs2(&c, 1)[0];
 }
 
 
 std::vector<unsigned short>
-ucs4_to_ucs2(std::vector<boost::uint32_t> const & ucs4str)
+ucs4_to_ucs2(std::vector<lyx::char_type> const & ucs4str)
 {
        return ucs4_to_ucs2(&ucs4str[0], ucs4str.size());
 }
 
 
 std::vector<unsigned short>
-ucs4_to_ucs2(boost::uint32_t const * s, size_t ls)
+ucs4_to_ucs2(lyx::char_type const * s, size_t ls)
 {
        static iconv_t cd = (iconv_t)(-1);
        return iconv_convert<unsigned short>(&cd, ucs2_codeset, ucs4_codeset,
@@ -186,7 +186,7 @@ ucs4_to_ucs2(boost::uint32_t const * s, size_t ls)
 
 
 std::vector<char>
-ucs4_to_utf8(boost::uint32_t c)
+ucs4_to_utf8(lyx::char_type c)
 {
        static iconv_t cd = (iconv_t)(-1);
        return iconv_convert<char>(&cd, "UTF-8", ucs4_codeset, &c, 1);
@@ -194,14 +194,14 @@ ucs4_to_utf8(boost::uint32_t c)
 
 
 std::vector<char>
-ucs4_to_utf8(std::vector<boost::uint32_t> const & ucs4str)
+ucs4_to_utf8(std::vector<lyx::char_type> const & ucs4str)
 {
        return ucs4_to_utf8(&ucs4str[0], ucs4str.size());
 }
 
 
 std::vector<char>
-ucs4_to_utf8(boost::uint32_t const * ucs4str, size_t ls)
+ucs4_to_utf8(lyx::char_type const * ucs4str, size_t ls)
 {
        static iconv_t cd = (iconv_t)(-1);
        return iconv_convert<char>(&cd, "UTF-8", ucs4_codeset,
index 977ded6fd8d0377cc1c91cf5ce28541d2f72662c..6af70074eb0c32bbeb38c42c3d8c80046314d828 100644 (file)
@@ -13,7 +13,8 @@
 #ifndef LYX_SUPPORT_UNICODE_H
 #define LYX_SUPPORT_UNICODE_H
 
-#include <boost/cstdint.hpp>
+#include "support/types.h"
+
 #include <vector>
 
 // utf8_to_ucs4
 // A single codepoint conversion for utf8_to_ucs4 does not make
 // sense, so that function is left out.
 
-std::vector<boost::uint32_t>
+std::vector<lyx::char_type>
 utf8_to_ucs4(std::vector<char> const & utf8str);
 
-std::vector<boost::uint32_t>
+std::vector<lyx::char_type>
 utf8_to_ucs4(char const * utf8str, size_t ls);
 
 // ucs2_to_ucs4
 
-boost::uint32_t
+lyx::char_type
 ucs2_to_ucs4(unsigned short c);
 
-std::vector<boost::uint32_t>
+std::vector<lyx::char_type>
 ucs2_to_ucs4(std::vector<unsigned short> const & ucs2str);
 
-std::vector<boost::uint32_t>
+std::vector<lyx::char_type>
 ucs2_to_ucs4(unsigned short const * ucs2str, size_t ls);
 
 // ucs4_to_ucs2
 
 unsigned short
-ucs4_to_ucs2(boost::uint32_t c);
+ucs4_to_ucs2(lyx::char_type c);
 
 std::vector<unsigned short>
-ucs4_to_ucs2(std::vector<boost::uint32_t> const & ucs4str);
+ucs4_to_ucs2(std::vector<lyx::char_type> const & ucs4str);
 
 std::vector<unsigned short>
-ucs4_to_ucs2(boost::uint32_t const * s, size_t ls);
+ucs4_to_ucs2(lyx::char_type const * s, size_t ls);
 
 // ucs4_to_utf8
 
 std::vector<char>
-ucs4_to_utf8(boost::uint32_t c);
+ucs4_to_utf8(lyx::char_type c);
 
 std::vector<char>
-ucs4_to_utf8(std::vector<boost::uint32_t> const & ucs4str);
+ucs4_to_utf8(std::vector<lyx::char_type> const & ucs4str);
 
 std::vector<char>
-ucs4_to_utf8(boost::uint32_t const * ucs4str, size_t ls);
+ucs4_to_utf8(lyx::char_type const * ucs4str, size_t ls);
 
 #endif