/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef TOXWHITESPACESTRIPPER_HXX_ #define TOXWHITESPACESTRIPPER_HXX_ #include #include namespace sw { /** This class helps to remove unwanted whitespaces from a string to use in a Tox. * * The new string will have * - Newlines changed to spaces * - Consecutive spaces merged * - Trailing spaces removed * * 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? * * @note One leading whitespace is preserved. */ class ToxWhitespaceStripper { public: ToxWhitespaceStripper(const OUString&); sal_Int32 GetPositionInStrippedString(sal_Int32 pos) const; const OUString& GetStrippedString() const { return mStripped; } private: OUString mStripped; std::vector mNewPositions; }; } // end namespace sw #endif /* TOXWHITESPACESTRIPPER_HXX_ */ 05'>distro/collabora/co-23.05 LibreOffice 界面翻译代码仓库文档基金会
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobinson Tryon <qubit@runcibility.com>2015-10-17 20:45:45 -0500
committerRobinson Tryon <qubit@runcibility.com>2015-10-17 22:24:05 -0500
commitca20aa8ceb614b394803763754df27fb3b44c0de (patch)
treed5711c8a1c8b0031b9e83aec2830f0e45fbd51be
parentaf8538d62d29b7a3a70a812d222cc419a1cc57bf (diff)
Update translations for master and force-fix errors using pocheck
Change-Id: I631ca49b2d16304d2a238e92bf96c5e38c6cc77d