LibreOffice Module i18nutil (master) 1
Public Member Functions | Private Attributes | List of all members
ToggleUnicodeCodepoint Class Reference

#include <unicode.hxx>

Public Member Functions

bool AllowMoreInput (sal_Unicode uChar)
 Build an input string of valid UTF16 units to toggle. More...
 
OUString StringToReplace ()
 Validates (and potentially modifies) the input string. More...
 
OUString ReplacementString ()
 
sal_uInt32 CharsToDelete ()
 While sInput.getLength() returns the number of utf16 units to delete, this function returns the number of "characters" to delete - potentially a smaller number. More...
 

Private Attributes

OUStringBuffer maInput
 
OUStringBuffer maUtf16
 
OUStringBuffer maCombining
 
bool mbAllowMoreChars = true
 
bool mbRequiresU = false
 
bool mbIsHexString = false
 

Detailed Description

Definition at line 93 of file unicode.hxx.

Member Function Documentation

◆ AllowMoreInput()

bool ToggleUnicodeCodepoint::AllowMoreInput ( sal_Unicode  uChar)

Build an input string of valid UTF16 units to toggle.

-do not call the other functions until the input process is complete -build string from Right to Left. (Start from the character to the left of the cursor: move left.)

Definition at line 1071 of file unicode.cxx.

References unicode::getUnicodeType(), maCombining, maInput, maUtf16, mbAllowMoreChars, mbIsHexString, and mbRequiresU.

◆ CharsToDelete()

sal_uInt32 ToggleUnicodeCodepoint::CharsToDelete ( )

While sInput.getLength() returns the number of utf16 units to delete, this function returns the number of "characters" to delete - potentially a smaller number.

Definition at line 1265 of file unicode.cxx.

References nPos, and StringToReplace().

◆ ReplacementString()

OUString ToggleUnicodeCodepoint::ReplacementString ( )

Definition at line 1278 of file unicode.cxx.

References i, mbIsHexString, nPos, StringToReplace(), and o3tl::toUInt32().

◆ StringToReplace()

OUString ToggleUnicodeCodepoint::StringToReplace ( )

Validates (and potentially modifies) the input string.

-all non-input functions must use this function to first to validate the input string -additional input may be prevented after this function is called

Definition at line 1215 of file unicode.cxx.

References maCombining, maInput, maUtf16, mbAllowMoreChars, mbIsHexString, and o3tl::toUInt32().

Referenced by CharsToDelete(), and ReplacementString().

Member Data Documentation

◆ maCombining

OUStringBuffer ToggleUnicodeCodepoint::maCombining
private

Definition at line 98 of file unicode.hxx.

Referenced by AllowMoreInput(), and StringToReplace().

◆ maInput

OUStringBuffer ToggleUnicodeCodepoint::maInput
private

Definition at line 96 of file unicode.hxx.

Referenced by AllowMoreInput(), and StringToReplace().

◆ maUtf16

OUStringBuffer ToggleUnicodeCodepoint::maUtf16
private

Definition at line 97 of file unicode.hxx.

Referenced by AllowMoreInput(), and StringToReplace().

◆ mbAllowMoreChars

bool ToggleUnicodeCodepoint::mbAllowMoreChars = true
private

Definition at line 99 of file unicode.hxx.

Referenced by AllowMoreInput(), and StringToReplace().

◆ mbIsHexString

bool ToggleUnicodeCodepoint::mbIsHexString = false
private

Definition at line 101 of file unicode.hxx.

Referenced by AllowMoreInput(), ReplacementString(), and StringToReplace().

◆ mbRequiresU

bool ToggleUnicodeCodepoint::mbRequiresU = false
private

Definition at line 100 of file unicode.hxx.

Referenced by AllowMoreInput().


The documentation for this class was generated from the following files: