LibreOffice Module sw (master) 1
|
This class helps to remove unwanted whitespaces from a string to use in a Tox. More...
#include <ToxWhitespaceStripper.hxx>
Public Member Functions | |
ToxWhitespaceStripper (std::u16string_view) | |
sal_Int32 | GetPositionInStrippedString (sal_Int32 pos) const |
const OUString & | GetStrippedString () const |
Private Attributes | |
OUString | mStripped |
std::vector< sal_Int32 > | mNewPositions |
This class helps to remove unwanted whitespaces from a string to use in a Tox.
The new string will have
It also allows to find the corresponding new positions of the input string in the stripped string. This is important for attributes which might have to be imported, e.g., it helps to answer the question: The 3rd character of the input string is subscript, which character in the output string is that?
Definition at line 31 of file ToxWhitespaceStripper.hxx.
sw::ToxWhitespaceStripper::ToxWhitespaceStripper | ( | std::u16string_view | inputString | ) |
Definition at line 19 of file ToxWhitespaceStripper.cxx.
References mNewPositions, mStripped, and pos.
sal_Int32 sw::ToxWhitespaceStripper::GetPositionInStrippedString | ( | sal_Int32 | pos | ) | const |
Definition at line 50 of file ToxWhitespaceStripper.cxx.
References o3tl::make_unsigned(), mNewPositions, pos, and SAL_WARN.
Referenced by sw::ToxTextGenerator::GetAttributesForNode().
|
inline |
Definition at line 38 of file ToxWhitespaceStripper.hxx.
References mStripped.
Referenced by sw::ToxTextGenerator::HandleTextToken().
|
private |
Definition at line 42 of file ToxWhitespaceStripper.hxx.
Referenced by GetPositionInStrippedString(), and ToxWhitespaceStripper().
|
private |
Definition at line 41 of file ToxWhitespaceStripper.hxx.
Referenced by GetStrippedString(), and ToxWhitespaceStripper().