[Libreoffice-commits] libcdr.git: src/lib

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Mar 22 16:17:33 UTC 2021


 src/lib/CDRParser.cpp |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 3a811cc153c6bc79a017f163ac03d51b3f66506d
Author:     Fridrich Štrba <fridrich.strba at bluewin.ch>
AuthorDate: Mon Mar 22 17:14:03 2021 +0100
Commit:     Fridrich Štrba <fridrich.strba at bluewin.ch>
CommitDate: Mon Mar 22 17:14:03 2021 +0100

    Revert "use boost spirit in unicode when appropriate"
    
    This reverts commit e2b0c8a788ec124a58a63ddc56d77fa317624bf5.

diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp
index f9dba55..045a1b9 100644
--- a/src/lib/CDRParser.cpp
+++ b/src/lib/CDRParser.cpp
@@ -17,9 +17,6 @@
 #ifndef BOOST_ALL_NO_LIB
 #define BOOST_ALL_NO_LIB 1
 #endif
-#ifndef BOOST_SPIRIT_UNICODE
-#define BOOST_SPIRIT_UNICODE 1
-#endif
 #include <boost/algorithm/string.hpp>
 #include <boost/optional.hpp>
 #include <boost/property_tree/json_parser.hpp>
@@ -150,14 +147,14 @@ static int parseColourString(const char *colourString, libcdr::CDRColor &colour,
     bRes = phrase_parse(it, end,
                         //  Begin grammar
                         (
-                          (cmodel | omit[+unicode::alnum]) >> lit(',')
-                          >> (cpalette | omit[+unicode::alnum]) >> lit(',')
+                          (cmodel | omit[+iso8859_1::alnum]) >> lit(',')
+                          >> (cpalette | omit[+iso8859_1::alnum]) >> lit(',')
                           >> *(uint_ >> lit(','))
-                          >> omit[(repeat(8)[unicode::xdigit] >> '-' >> repeat(3)[repeat(4)[unicode::xdigit] >> '-'] >> repeat(12)[unicode::xdigit])]
-                          >> -(lit(',') >> *unicode::char_)
+                          >> omit[(repeat(8)[iso8859_1::xdigit] >> '-' >> repeat(3)[repeat(4)[iso8859_1::xdigit] >> '-'] >> repeat(12)[iso8859_1::xdigit])]
+                          >> -(lit(',') >> *iso8859_1::char_)
                         ),
                         //  End grammar
-                        unicode::space,
+                        iso8859_1::space,
                         colourModel, colourPalette, val, rest)
            && it == end;
   }


More information about the Libreoffice-commits mailing list