Revision | a29b7837b494e1d220191e9d8984b6744bed91a3 (tree) |
---|---|
Time | 2017-10-27 00:20:30 |
Author | <exeal@user...> |
Removed kernel.locations.characterAt free function.
@@ -80,7 +80,6 @@ | ||
80 | 80 | /// @defgroup miscellaneous_locational_functions Miscellaneous Locational Functions |
81 | 81 | /// @{ |
82 | 82 | Index absoluteOffset(const PointProxy& p, bool fromAccessibleStart); |
83 | - CodePoint characterAt(const PointProxy& p, bool useLineFeed = false); | |
84 | 83 | Position updatePosition(const Position& position, const DocumentChange& change, Direction gravity) BOOST_NOEXCEPT; |
85 | 84 | /// @} |
86 | 85 |
@@ -80,20 +80,6 @@ | ||
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
83 | - * Returns the code point of the current character. | |
84 | - * @param p The base point | |
85 | - * @param useLineFeed Set @c true to return LF (U+000A) when the current position is the end of the line. | |
86 | - * Otherwise LS (U+2008) | |
87 | - * @return The code point of the character, or @c INVALID_CODE_POINT if @a p is the end of the document | |
88 | - */ | |
89 | - CodePoint characterAt(const PointProxy& p, bool useLineFeed /* = false */) { | |
90 | - const auto& lineString = document(p).lineString(line(p)); | |
91 | - if(offsetInLine(p) == lineString.length()) | |
92 | - return (line(p) == document(p).numberOfLines() - 1) ? text::INVALID_CODE_POINT : (useLineFeed ? text::LINE_FEED : text::LINE_SEPARATOR); | |
93 | - return text::utf::decodeFirst(std::begin(lineString) + offsetInLine(p), std::end(lineString)); | |
94 | - } | |
95 | - | |
96 | - /** | |
97 | 83 | * Returns the end of the document. |
98 | 84 | * @param p The base point |
99 | 85 | * @return The destination |
@@ -384,7 +384,7 @@ | ||
384 | 384 | kernel::Position pos[3]; |
385 | 385 | const kernel::Region region(caret.document().accessibleRegion()); |
386 | 386 | |
387 | - if(text::ucd::BinaryProperty::is<text::ucd::BinaryProperty::GRAPHEME_EXTEND>(kernel::locations::characterAt(caret))) // not the start of a grapheme | |
387 | + if(text::ucd::BinaryProperty::is<text::ucd::BinaryProperty::GRAPHEME_EXTEND>(*kernel::DocumentCharacterIterator(caret))) // not the start of a grapheme | |
388 | 388 | return false; |
389 | 389 | const auto ip(insertionPosition(caret)); |
390 | 390 | if(!encompasses(region, ip)) // inaccessible |