LibreOffice Module sw (master) 1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwScriptInfo Class Reference

#include <scriptinfo.hxx>

Collaboration diagram for SwScriptInfo:
[legend]

Classes

struct  CompressionChangeInfo
 Records a single change in compression. More...
 
struct  DirectionChangeInfo
 Records a single change in direction. More...
 
struct  ScriptChangeInfo
 Records a single change in script type. More...
 

Public Types

enum  CompType {
  KANA ,
  SPECIAL_LEFT ,
  SPECIAL_RIGHT ,
  NONE ,
  SPECIAL_MIDDLE
}
 
enum class  MarkKind {
  Start = (1<<0) ,
  End = (1<<1) ,
  Point = (1<<2)
}
 

Public Member Functions

 SwScriptInfo ()
 
 ~SwScriptInfo ()
 
void InitScriptInfo (const SwTextNode &rNode, sw::MergedPara const *pMerged, bool bRTL)
 
void InitScriptInfo (const SwTextNode &rNode, sw::MergedPara const *pMerged)
 
void SetInvalidityA (const TextFrameIndex nPos)
 
TextFrameIndex GetInvalidityA () const
 
sal_uInt8 GetDefaultDir () const
 
size_t CountScriptChg () const
 
TextFrameIndex GetScriptChg (const size_t nCnt) const
 
sal_uInt8 GetScriptType (const size_t nCnt) const
 
size_t CountDirChg () const
 
TextFrameIndex GetDirChg (const size_t nCnt) const
 
sal_uInt8 GetDirType (const size_t nCnt) const
 
size_t CountKashida () const
 
TextFrameIndex GetKashida (const size_t nCnt) const
 
size_t CountCompChg () const
 
TextFrameIndex GetCompStart (const size_t nCnt) const
 
TextFrameIndex GetCompLen (const size_t nCnt) const
 
CompType GetCompType (const size_t nCnt) const
 
size_t CountHiddenChg () const
 
TextFrameIndex GetHiddenChg (const size_t nCnt) const
 
TextFrameIndex NextHiddenChg (TextFrameIndex nPos) const
 
TextFrameIndex NextBookmark (TextFrameIndex nPos) const
 
std::vector< std::tuple< MarkKind, Color, OUString > > GetBookmarks (TextFrameIndex const nPos)
 
TextFrameIndex NextScriptChg (TextFrameIndex nPos) const
 
sal_Int16 ScriptType (const TextFrameIndex nPos) const
 
TextFrameIndex NextDirChg (const TextFrameIndex nPos, const sal_uInt8 *pLevel=nullptr) const
 
sal_uInt8 DirType (const TextFrameIndex nPos) const
 
bool GetBoundsOfHiddenRange (TextFrameIndex nPos, TextFrameIndex &rnStartPos, TextFrameIndex &rnEndPos) const
 
tools::Long Compress (KernArray &rKernArray, TextFrameIndex nIdx, TextFrameIndex nLen, const sal_uInt16 nCompress, const sal_uInt16 nFontHeight, const bool bCentered, Point *pPoint=nullptr) const
 
sal_Int32 KashidaJustify (KernArray *pKernArray, sal_Bool *pKashidaArray, TextFrameIndex nStt, TextFrameIndex nLen, tools::Long nSpaceAdd=0) const
 Performs a kashida justification on the kerning array. More...
 
void ClearKashidaInvalid (TextFrameIndex const nStt, TextFrameIndex const nLen)
 Clears array of kashidas marked as invalid. More...
 
void MarkKashidasInvalid (sal_Int32 nCnt, const TextFrameIndex *pKashidaPositions)
 Marks nCnt kashida positions as invalid pKashidaPositions: array of char indices relative to the paragraph. More...
 
bool MarkKashidasInvalid (sal_Int32 const nCnt, TextFrameIndex const nStt, TextFrameIndex const nLen)
 Marks nCnt kashida positions as invalid in the given text range. More...
 
void GetKashidaPositions (TextFrameIndex nStt, TextFrameIndex nLen, std::vector< TextFrameIndex > &rKashidaPosition)
 retrieves kashida opportunities for a given text range. More...
 
void SetNoKashidaLine (TextFrameIndex nStt, TextFrameIndex nLen)
 Use regular blank justification instead of kashdida justification for the given line of text. More...
 
void ClearNoKashidaLine (TextFrameIndex nStt, TextFrameIndex nLen)
 Clear forced blank justification for a given line. More...
 
SwFontScript WhichFont (TextFrameIndex nIdx) const
 

Static Public Member Functions

static void CalcHiddenRanges (const SwTextNode &rNode, MultiSelection &rHiddenMulti, std::vector< std::pair< sw::mark::IBookmark const *, MarkKind > > *pBookmarks)
 
static void selectHiddenTextProperty (const SwTextNode &rNode, MultiSelection &rHiddenMulti, std::vector< std::pair< sw::mark::IBookmark const *, MarkKind > > *pBookmarks)
 
static void selectRedLineDeleted (const SwTextNode &rNode, MultiSelection &rHiddenMulti, bool bSelect=true)
 
static bool GetBoundsOfHiddenRange (const SwTextNode &rNode, sal_Int32 nPos, sal_Int32 &rnStartPos, sal_Int32 &rnEndPos, std::vector< sal_Int32 > *pList=nullptr)
 Hidden text range information - static and non-version. More...
 
static bool IsInHiddenRange (const SwTextNode &rNode, sal_Int32 nPos)
 
static sal_Int32 MaskHiddenRanges (const SwTextNode &rNode, OUStringBuffer &rText, const sal_Int32 nStt, const sal_Int32 nEnd, const sal_Unicode cChar)
 Hidden text attribute handling. More...
 
static void DeleteHiddenRanges (SwTextNode &rNode)
 Hidden text attribute handling. More...
 
static bool IsArabicText (const OUString &rText, TextFrameIndex nStt, TextFrameIndex nLen)
 Checks if text is Arabic text. More...
 
static TextFrameIndex ThaiJustify (std::u16string_view aText, KernArray *pKernArray, TextFrameIndex nIdx, TextFrameIndex nLen, TextFrameIndex nNumberOfBlanks=TextFrameIndex(0), tools::Long nSpaceAdd=0)
 Performs a thai justification on the kerning array. More...
 
static TextFrameIndex CountCJKCharacters (const OUString &rText, TextFrameIndex nPos, TextFrameIndex nEnd, LanguageType aLang)
 
static void CJKJustify (const OUString &rText, KernArray &rKernArray, TextFrameIndex nStt, TextFrameIndex nLen, LanguageType aLang, tools::Long nSpaceAdd, bool bIsSpaceStop)
 
static SwScriptInfoGetScriptInfo (const SwTextNode &rNode, SwTextFrame const **o_pFrame=nullptr, bool bAllowInvalid=false)
 return a frame for the node, ScriptInfo is its member... (many clients need both frame and SI, and both have to match) More...
 
static SwFontScript WhichFont (sal_Int32 nIdx, OUString const &rText)
 

Private Member Functions

CompType DbgCompType (const TextFrameIndex nPos) const
 
void UpdateBidiInfo (const OUString &rText)
 
bool IsKashidaValid (size_t nKashPos) const
 
bool MarkKashidaInvalid (size_t nKashPos)
 
void ClearKashidaInvalid (size_t nKashPos)
 
bool MarkOrClearKashidaInvalid (TextFrameIndex nStt, TextFrameIndex nLen, bool bMark, sal_Int32 nMarkCount)
 
bool IsKashidaLine (TextFrameIndex nCharIdx) const
 
size_t HasKana (TextFrameIndex nStart, TextFrameIndex nEnd) const
 

Private Attributes

std::vector< ScriptChangeInfom_ScriptChanges
 
std::vector< DirectionChangeInfom_DirectionChanges
 
std::deque< TextFrameIndexm_Kashida
 
std::unordered_set< size_t > m_KashidaInvalid
 indexes into m_Kashida More...
 
std::deque< TextFrameIndexm_NoKashidaLine
 
std::deque< TextFrameIndexm_NoKashidaLineEnd
 
std::vector< TextFrameIndexm_HiddenChg
 
std::vector< std::tuple< TextFrameIndex, MarkKind, Color, OUString > > m_Bookmarks
 
std::vector< CompressionChangeInfom_CompressionChanges
 
TextFrameIndex m_nInvalidityPos
 
sal_uInt8 m_nDefaultDir
 

Detailed Description

Definition at line 44 of file scriptinfo.hxx.

Member Enumeration Documentation

◆ CompType

Enumerator
KANA 
SPECIAL_LEFT 
SPECIAL_RIGHT 
NONE 
SPECIAL_MIDDLE 

Definition at line 47 of file scriptinfo.hxx.

◆ MarkKind

enum class SwScriptInfo::MarkKind
strong
Enumerator
Start 
End 
Point 

Definition at line 48 of file scriptinfo.hxx.

Constructor & Destructor Documentation

◆ SwScriptInfo()

SwScriptInfo::SwScriptInfo ( )

Definition at line 868 of file porlay.cxx.

◆ ~SwScriptInfo()

SwScriptInfo::~SwScriptInfo ( )

Definition at line 874 of file porlay.cxx.

Member Function Documentation

◆ CalcHiddenRanges()

void SwScriptInfo::CalcHiddenRanges ( const SwTextNode rNode,
MultiSelection rHiddenMulti,
std::vector< std::pair< sw::mark::IBookmark const *, MarkKind > > *  pBookmarks 
)
static

◆ CJKJustify()

void SwScriptInfo::CJKJustify ( const OUString &  rText,
KernArray rKernArray,
TextFrameIndex  nStt,
TextFrameIndex  nLen,
LanguageType  aLang,
tools::Long  nSpaceAdd,
bool  bIsSpaceStop 
)
static

◆ ClearKashidaInvalid() [1/2]

void SwScriptInfo::ClearKashidaInvalid ( size_t  nKashPos)
private

Definition at line 2437 of file porlay.cxx.

References m_KashidaInvalid.

Referenced by SwTextAdjuster::CalcNewBlock(), and MarkOrClearKashidaInvalid().

◆ ClearKashidaInvalid() [2/2]

void SwScriptInfo::ClearKashidaInvalid ( TextFrameIndex const  nStt,
TextFrameIndex const  nLen 
)
inline

Clears array of kashidas marked as invalid.

Definition at line 299 of file scriptinfo.hxx.

References MarkOrClearKashidaInvalid().

◆ ClearNoKashidaLine()

void SwScriptInfo::ClearNoKashidaLine ( TextFrameIndex  nStt,
TextFrameIndex  nLen 
)

Clear forced blank justification for a given line.

nStt Start char index of the line referring to the paragraph. nLen Number of characters in the line

Definition at line 2529 of file porlay.cxx.

References i, m_NoKashidaLine, and m_NoKashidaLineEnd.

Referenced by SwTextAdjuster::CalcNewBlock().

◆ Compress()

tools::Long SwScriptInfo::Compress ( KernArray rKernArray,
TextFrameIndex  nIdx,
TextFrameIndex  nLen,
const sal_uInt16  nCompress,
const sal_uInt16  nFontHeight,
const bool  bCentered,
Point pPoint = nullptr 
) const

◆ CountCJKCharacters()

TextFrameIndex SwScriptInfo::CountCJKCharacters ( const OUString &  rText,
TextFrameIndex  nPos,
TextFrameIndex  nEnd,
LanguageType  aLang 
)
static

Definition at line 2934 of file porlay.cxx.

References g_pBreakIt, SwBreakIt::GetBreakIter(), SwBreakIt::GetLocale(), nCount, and nPos.

Referenced by lcl_AddSpace().

◆ CountCompChg()

size_t SwScriptInfo::CountCompChg ( ) const
inline

◆ CountDirChg()

size_t SwScriptInfo::CountDirChg ( ) const
inline

Definition at line 140 of file scriptinfo.hxx.

References m_DirectionChanges.

Referenced by DirType(), NextDirChg(), and SwVisibleCursor::SetPosAndShow().

◆ CountHiddenChg()

size_t SwScriptInfo::CountHiddenChg ( ) const
inline

Definition at line 180 of file scriptinfo.hxx.

References m_HiddenChg.

Referenced by GetBoundsOfHiddenRange().

◆ CountKashida()

size_t SwScriptInfo::CountKashida ( ) const
inline

◆ CountScriptChg()

size_t SwScriptInfo::CountScriptChg ( ) const
inline

◆ DbgCompType()

SwScriptInfo::CompType SwScriptInfo::DbgCompType ( const TextFrameIndex  nPos) const
private

Definition at line 2149 of file porlay.cxx.

References CountCompChg(), GetCompLen(), GetCompStart(), GetCompType(), NONE, and nPos.

Referenced by Compress().

◆ DeleteHiddenRanges()

void SwScriptInfo::DeleteHiddenRanges ( SwTextNode rNode)
static

Hidden text attribute handling.

@descr Takes a SwTextNode and deletes the hidden ranges from the node.

Parameters
rNodeThe text node.

Definition at line 2007 of file porlay.cxx.

References IDocumentContentOperations::DeleteRange(), GetBoundsOfHiddenRange(), and SwNode::getIDocumentContentOperations().

Referenced by SwDoc::RemoveInvisibleContent().

◆ DirType()

sal_uInt8 SwScriptInfo::DirType ( const TextFrameIndex  nPos) const

◆ GetBookmarks()

std::vector< std::tuple< SwScriptInfo::MarkKind, Color, OUString > > SwScriptInfo::GetBookmarks ( TextFrameIndex const  nPos)

Definition at line 1936 of file porlay.cxx.

References a, m_Bookmarks, nPos, and sName.

Referenced by SwTextFormatter::WhichFirstPortion().

◆ GetBoundsOfHiddenRange() [1/2]

bool SwScriptInfo::GetBoundsOfHiddenRange ( const SwTextNode rNode,
sal_Int32  nPos,
sal_Int32 &  rnStartPos,
sal_Int32 &  rnEndPos,
std::vector< sal_Int32 > *  pList = nullptr 
)
static

Hidden text range information - static and non-version.

@descr Determines if a given position is inside a hidden text range. The static version tries to obtain a valid SwScriptInfo object via the SwTextNode, otherwise it calculates the values from scratch. The non-static version uses the internally cached information for the calculation.

Parameters
rNodeThe text node.
nPosThe given position that should be checked.
rnStartPosReturn parameter for the start position of the hidden range. COMPLETE_STRING if nPos is not inside a hidden range.
rnEndPosReturn parameter for the end position of the hidden range. 0 if nPos is not inside a hidden range.
rnEndPosReturn parameter that contains all the hidden text ranges. Optional.
Returns
returns true if there are any hidden characters in this paragraph.

Definition at line 2025 of file porlay.cxx.

References CalcHiddenRanges(), COMPLETE_STRING, GetBoundsOfHiddenRange(), MultiSelection::GetRange(), MultiSelection::GetRangeCount(), GetScriptInfo(), SwTextNode::GetText(), SwTextNode::HasHiddenCharAttribute(), i, SwTextNode::IsCalcHiddenCharFlags(), Range::Max(), Range::Min(), nPos, and SwTextNode::SetHiddenCharAttribute().

Referenced by SwTextNode::CalcHiddenCharFlags(), DeleteHiddenRanges(), GetBoundsOfHiddenRange(), SwXTextField::getPropertyValue(), SwContentNode::GoNext(), SwContentNode::GoPrevious(), SwTextFrame::HideAndShowObjects(), SwTextFrame::IsHiddenNow(), SwCursorShell::IsInHiddenRange(), IsInHiddenRange(), and MaskHiddenRanges().

◆ GetBoundsOfHiddenRange() [2/2]

bool SwScriptInfo::GetBoundsOfHiddenRange ( TextFrameIndex  nPos,
TextFrameIndex rnStartPos,
TextFrameIndex rnEndPos 
) const

Definition at line 2114 of file porlay.cxx.

References COMPLETE_STRING, CountHiddenChg(), GetHiddenChg(), and nPos.

◆ GetCompLen()

TextFrameIndex SwScriptInfo::GetCompLen ( const size_t  nCnt) const
inline

Definition at line 169 of file scriptinfo.hxx.

References m_CompressionChanges.

Referenced by Compress(), DbgCompType(), HasKana(), and InitScriptInfo().

◆ GetCompStart()

TextFrameIndex SwScriptInfo::GetCompStart ( const size_t  nCnt) const
inline

Definition at line 164 of file scriptinfo.hxx.

References m_CompressionChanges.

Referenced by Compress(), DbgCompType(), HasKana(), and InitScriptInfo().

◆ GetCompType()

CompType SwScriptInfo::GetCompType ( const size_t  nCnt) const
inline

Definition at line 174 of file scriptinfo.hxx.

References m_CompressionChanges.

Referenced by Compress(), and DbgCompType().

◆ GetDefaultDir()

sal_uInt8 SwScriptInfo::GetDefaultDir ( ) const
inline

Definition at line 125 of file scriptinfo.hxx.

References m_nDefaultDir.

Referenced by SwFieldPortion::CheckScript().

◆ GetDirChg()

TextFrameIndex SwScriptInfo::GetDirChg ( const size_t  nCnt) const
inline

Definition at line 141 of file scriptinfo.hxx.

References m_DirectionChanges.

Referenced by DirType(), InitScriptInfo(), and NextDirChg().

◆ GetDirType()

sal_uInt8 SwScriptInfo::GetDirType ( const size_t  nCnt) const
inline

Definition at line 146 of file scriptinfo.hxx.

References m_DirectionChanges.

Referenced by DirType(), InitScriptInfo(), and NextDirChg().

◆ GetHiddenChg()

TextFrameIndex SwScriptInfo::GetHiddenChg ( const size_t  nCnt) const
inline

Definition at line 181 of file scriptinfo.hxx.

References m_HiddenChg.

Referenced by GetBoundsOfHiddenRange().

◆ GetInvalidityA()

TextFrameIndex SwScriptInfo::GetInvalidityA ( ) const
inline

Definition at line 119 of file scriptinfo.hxx.

References m_nInvalidityPos.

Referenced by SwAttrIter::CtorInitAttrIter(), GetScriptInfo(), and SwEditShell::Insert2().

◆ GetKashida()

TextFrameIndex SwScriptInfo::GetKashida ( const size_t  nCnt) const
inline

◆ GetKashidaPositions()

void SwScriptInfo::GetKashidaPositions ( TextFrameIndex  nStt,
TextFrameIndex  nLen,
std::vector< TextFrameIndex > &  rKashidaPosition 
)

retrieves kashida opportunities for a given text range.

rKashidaPositions: buffer to receive the char indices of the kashida opportunities relative to the paragraph

Definition at line 2488 of file porlay.cxx.

References CountKashida(), and GetKashida().

Referenced by lcl_CheckKashidaPositions().

◆ GetScriptChg()

TextFrameIndex SwScriptInfo::GetScriptChg ( const size_t  nCnt) const
inline

◆ GetScriptInfo()

SwScriptInfo * SwScriptInfo::GetScriptInfo ( const SwTextNode rNode,
SwTextFrame const **  o_pFrame = nullptr,
bool  bAllowInvalid = false 
)
static

◆ GetScriptType()

sal_uInt8 SwScriptInfo::GetScriptType ( const size_t  nCnt) const
inline

Definition at line 134 of file scriptinfo.hxx.

References m_ScriptChanges.

Referenced by SwAttrIter::InitFontAndAttrHandler(), InitScriptInfo(), and ScriptType().

◆ HasKana()

size_t SwScriptInfo::HasKana ( TextFrameIndex  nStart,
TextFrameIndex  nEnd 
) const
private

Definition at line 2168 of file porlay.cxx.

References CountCompChg(), GetCompLen(), and GetCompStart().

Referenced by Compress().

◆ InitScriptInfo() [1/2]

void SwScriptInfo::InitScriptInfo ( const SwTextNode rNode,
sw::MergedPara const *  pMerged 
)

Definition at line 1121 of file porlay.cxx.

References InitScriptInfo(), and m_nDefaultDir.

◆ InitScriptInfo() [2/2]

void SwScriptInfo::InitScriptInfo ( const SwTextNode rNode,
sw::MergedPara const *  pMerged,
bool  bRTL 
)

Definition at line 1127 of file porlay.cxx.

References CalcHiddenRanges(), CHAR_NNBSP, COMPLETE_STRING, CountCompChg(), CountKashida(), CountScriptChg(), End, sw::MergedPara::extents, g_pBreakIt, GetAppLanguage(), SwScanner::GetBegin(), getBookmarkColor(), SwBreakIt::GetBreakIter(), IDocumentSettingAccess::getCharacterCompressionType(), GetCompLen(), GetCompStart(), IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix(), GetDirChg(), GetDirType(), SvtLanguageOptions::GetI18NScriptTypeOfLanguage(), SwNode::getIDocumentSettingAccess(), GetKashida(), SwTextNode::GetLang(), MultiSelection::GetRange(), MultiSelection::GetRangeCount(), GetScriptChg(), GetScriptType(), SwTextNode::GetText(), unicode::getUnicodeType(), SwScanner::GetWord(), i, InitBookmarks(), isAinChar, isAlefChar, isBehChar(), isDalChar, isFehChar, isGafChar, isHehChar, isKafChar, isLamChar, isQafChar, isRehChar, isSeenOrSadChar, isTahChar, isTehMarbutaChar, isTransparentChar(), isWawChar, isYehChar(), KANA, lcl_ConnectToPrev(), lcl_HasStrongLTR(), SwTextNode::Len(), m_Bookmarks, m_CompressionChanges, m_DirectionChanges, m_HiddenChg, m_Kashida, m_nDefaultDir, m_nInvalidityPos, m_ScriptChanges, sw::MapViewToModel(), Range::Max(), sw::MergedPara::mergedText, Range::Min(), min(), SwScanner::NextWord(), NONE, nPos, nType, Point, pos, sw::MergedPara::pParaPropsNode, SAL_WARN_IF, script, SPECIAL_LEFT, SPECIAL_MIDDLE, SPECIAL_RIGHT, Start, and UpdateBidiInfo().

Referenced by SwAttrIter::CtorInitAttrIter(), InitScriptInfo(), SwEditShell::Insert2(), and SwTextFrame::IsHiddenNow().

◆ IsArabicText()

bool SwScriptInfo::IsArabicText ( const OUString &  rText,
TextFrameIndex  nStt,
TextFrameIndex  nLen 
)
static

Checks if text is Arabic text.

@descr Checks if text is Arabic text.

Parameters
rTextThe text to check
nSttStart index of the text
Returns
Returns if the language is an Arabic language

Definition at line 2395 of file porlay.cxx.

References GetAppCharClass(), unicode::getUnicodeScriptType(), CharClass::isLetterNumeric(), type, and typeList.

Referenced by SwFntObj::DrawText(), SwFntObj::GetModelPositionForViewPoint(), lcl_AddSpace(), lcl_CheckKashidaPositions(), and lcl_CheckKashidaWidth().

◆ IsInHiddenRange()

bool SwScriptInfo::IsInHiddenRange ( const SwTextNode rNode,
sal_Int32  nPos 
)
static

Definition at line 2139 of file porlay.cxx.

References COMPLETE_STRING, GetBoundsOfHiddenRange(), and nPos.

Referenced by SwPostItHelper::getLayoutInfos(), and SwTOXMark::Notify().

◆ IsKashidaLine()

bool SwScriptInfo::IsKashidaLine ( TextFrameIndex  nCharIdx) const
private

Definition at line 2519 of file porlay.cxx.

References i, m_NoKashidaLine, and m_NoKashidaLineEnd.

Referenced by KashidaJustify().

◆ IsKashidaValid()

bool SwScriptInfo::IsKashidaValid ( size_t  nKashPos) const
private

Definition at line 2432 of file porlay.cxx.

References m_KashidaInvalid.

Referenced by KashidaJustify(), and MarkKashidasInvalid().

◆ KashidaJustify()

sal_Int32 SwScriptInfo::KashidaJustify ( KernArray pKernArray,
sal_Bool pKashidaArray,
TextFrameIndex  nStt,
TextFrameIndex  nLen,
tools::Long  nSpaceAdd = 0 
) const

Performs a kashida justification on the kerning array.

@descr Add some extra space for kashida justification to the positions in the kerning array.

Parameters
pKernArrayThe printers kerning array. Optional.
nSttStart referring to the paragraph.
nLenThe number of characters to be considered.
nSpaceAddThe value which has to be added to a kashida opportunity.
Returns
The number of kashida opportunities in the given range

Definition at line 2307 of file porlay.cxx.

References KernArray::adjust(), CountKashida(), GetKashida(), i, IsKashidaLine(), IsKashidaValid(), and SAL_WARN_IF.

Referenced by SwFntObj::DrawText(), SwFntObj::GetModelPositionForViewPoint(), lcl_AddSpace(), lcl_CheckKashidaPositions(), and lcl_CheckKashidaWidth().

◆ MarkKashidaInvalid()

bool SwScriptInfo::MarkKashidaInvalid ( size_t  nKashPos)
private

Definition at line 2482 of file porlay.cxx.

References m_KashidaInvalid.

Referenced by MarkKashidasInvalid(), and MarkOrClearKashidaInvalid().

◆ MarkKashidasInvalid() [1/2]

bool SwScriptInfo::MarkKashidasInvalid ( sal_Int32 const  nCnt,
TextFrameIndex const  nStt,
TextFrameIndex const  nLen 
)
inline

Marks nCnt kashida positions as invalid in the given text range.

Definition at line 312 of file scriptinfo.hxx.

References MarkOrClearKashidaInvalid().

◆ MarkKashidasInvalid() [2/2]

void SwScriptInfo::MarkKashidasInvalid ( sal_Int32  nCnt,
const TextFrameIndex pKashidaPositions 
)

Marks nCnt kashida positions as invalid pKashidaPositions: array of char indices relative to the paragraph.

Definition at line 2545 of file porlay.cxx.

References CountKashida(), GetKashida(), IsKashidaValid(), MarkKashidaInvalid(), and SAL_WARN_IF.

Referenced by lcl_CheckKashidaPositions(), and lcl_CheckKashidaWidth().

◆ MarkOrClearKashidaInvalid()

bool SwScriptInfo::MarkOrClearKashidaInvalid ( TextFrameIndex  nStt,
TextFrameIndex  nLen,
bool  bMark,
sal_Int32  nMarkCount 
)
private

◆ MaskHiddenRanges()

sal_Int32 SwScriptInfo::MaskHiddenRanges ( const SwTextNode rNode,
OUStringBuffer &  rText,
const sal_Int32  nStt,
const sal_Int32  nEnd,
const sal_Unicode  cChar 
)
static

Hidden text attribute handling.

@descr Takes a string and either deletes the hidden ranges or sets a given character in place of the hidden characters.

Parameters
rNodeThe text node.
rTextThe string to modify.
cCharThe character that should replace the hidden characters.
bDelIf set, the hidden ranges will be deleted from the text node.

Definition at line 1971 of file porlay.cxx.

References GetBoundsOfHiddenRange(), and SwTextNode::GetText().

Referenced by SwTextNode::CopyExpandText(), and lcl_MaskRedlinesAndHiddenText().

◆ NextBookmark()

TextFrameIndex SwScriptInfo::NextBookmark ( TextFrameIndex  nPos) const

Definition at line 1923 of file porlay.cxx.

References COMPLETE_STRING, m_Bookmarks, and nPos.

Referenced by SwTextFormatter::NewTextPortion().

◆ NextDirChg()

TextFrameIndex SwScriptInfo::NextDirChg ( const TextFrameIndex  nPos,
const sal_uInt8 pLevel = nullptr 
) const

◆ NextHiddenChg()

TextFrameIndex SwScriptInfo::NextHiddenChg ( TextFrameIndex  nPos) const

Definition at line 1911 of file porlay.cxx.

References COMPLETE_STRING, m_HiddenChg, and nPos.

Referenced by SwTextFormatter::NewTextPortion().

◆ NextScriptChg()

TextFrameIndex SwScriptInfo::NextScriptChg ( TextFrameIndex  nPos) const

◆ ScriptType()

sal_Int16 SwScriptInfo::ScriptType ( const TextFrameIndex  nPos) const

◆ selectHiddenTextProperty()

void SwScriptInfo::selectHiddenTextProperty ( const SwTextNode rNode,
MultiSelection rHiddenMulti,
std::vector< std::pair< sw::mark::IBookmark const *, MarkKind > > *  pBookmarks 
)
static

◆ selectRedLineDeleted()

void SwScriptInfo::selectRedLineDeleted ( const SwTextNode rNode,
MultiSelection rHiddenMulti,
bool  bSelect = true 
)
static

◆ SetInvalidityA()

void SwScriptInfo::SetInvalidityA ( const TextFrameIndex  nPos)
inline

Definition at line 114 of file scriptinfo.hxx.

References m_nInvalidityPos, and nPos.

Referenced by lcl_SetScriptInval().

◆ SetNoKashidaLine()

void SwScriptInfo::SetNoKashidaLine ( TextFrameIndex  nStt,
TextFrameIndex  nLen 
)

Use regular blank justification instead of kashdida justification for the given line of text.

nStt Start char index of the line referring to the paragraph. nLen Number of characters in the line

Definition at line 2512 of file porlay.cxx.

References m_NoKashidaLine, and m_NoKashidaLineEnd.

Referenced by SwTextAdjuster::CalcNewBlock().

◆ ThaiJustify()

TextFrameIndex SwScriptInfo::ThaiJustify ( std::u16string_view  aText,
KernArray pKernArray,
TextFrameIndex  nIdx,
TextFrameIndex  nLen,
TextFrameIndex  nNumberOfBlanks = TextFrameIndex(0),
tools::Long  nSpaceAdd = 0 
)
static

Performs a thai justification on the kerning array.

@descr Add some extra space for thai justification to the positions in the kerning array.

Parameters
aTextThe String
pKernArrayThe printers kerning array. Optional.
nIdxStart referring to the paragraph.
nLenThe number of characters to be considered.
nSpaceAddThe value which has to be added to the cells.
Returns
The number of extra spaces in the given range

Definition at line 2569 of file porlay.cxx.

References KernArray::adjust(), SAL_WARN_IF, and SPACING_PRECISION_FACTOR.

Referenced by SwFntObj::DrawText(), SwFntObj::GetModelPositionForViewPoint(), and lcl_AddSpace().

◆ UpdateBidiInfo()

void SwScriptInfo::UpdateBidiInfo ( const OUString &  rText)
private

Definition at line 1823 of file porlay.cxx.

References m_DirectionChanges, m_nDefaultDir, and nCount.

Referenced by InitScriptInfo().

◆ WhichFont() [1/2]

SwFontScript SwScriptInfo::WhichFont ( sal_Int32  nIdx,
OUString const &  rText 
)
static

Definition at line 898 of file porlay.cxx.

References g_pBreakIt, SwBreakIt::GetRealScriptOfText(), and lcl_ScriptToFont().

◆ WhichFont() [2/2]

SwFontScript SwScriptInfo::WhichFont ( TextFrameIndex  nIdx) const

Member Data Documentation

◆ m_Bookmarks

std::vector<std::tuple<TextFrameIndex, MarkKind, Color, OUString> > SwScriptInfo::m_Bookmarks
private

Definition at line 75 of file scriptinfo.hxx.

Referenced by GetBookmarks(), InitScriptInfo(), and NextBookmark().

◆ m_CompressionChanges

std::vector<CompressionChangeInfo> SwScriptInfo::m_CompressionChanges
private

Definition at line 84 of file scriptinfo.hxx.

Referenced by CountCompChg(), GetCompLen(), GetCompStart(), GetCompType(), and InitScriptInfo().

◆ m_DirectionChanges

std::vector<DirectionChangeInfo> SwScriptInfo::m_DirectionChanges
private

Definition at line 68 of file scriptinfo.hxx.

Referenced by CountDirChg(), GetDirChg(), GetDirType(), InitScriptInfo(), and UpdateBidiInfo().

◆ m_HiddenChg

std::vector<TextFrameIndex> SwScriptInfo::m_HiddenChg
private

Definition at line 74 of file scriptinfo.hxx.

Referenced by CountHiddenChg(), GetHiddenChg(), InitScriptInfo(), and NextHiddenChg().

◆ m_Kashida

std::deque<TextFrameIndex> SwScriptInfo::m_Kashida
private

Definition at line 69 of file scriptinfo.hxx.

Referenced by CountKashida(), GetKashida(), and InitScriptInfo().

◆ m_KashidaInvalid

std::unordered_set<size_t> SwScriptInfo::m_KashidaInvalid
private

indexes into m_Kashida

Definition at line 71 of file scriptinfo.hxx.

Referenced by ClearKashidaInvalid(), IsKashidaValid(), and MarkKashidaInvalid().

◆ m_nDefaultDir

sal_uInt8 SwScriptInfo::m_nDefaultDir
private

Definition at line 90 of file scriptinfo.hxx.

Referenced by GetDefaultDir(), InitScriptInfo(), and UpdateBidiInfo().

◆ m_nInvalidityPos

TextFrameIndex SwScriptInfo::m_nInvalidityPos
private

Definition at line 89 of file scriptinfo.hxx.

Referenced by GetInvalidityA(), InitScriptInfo(), and SetInvalidityA().

◆ m_NoKashidaLine

std::deque<TextFrameIndex> SwScriptInfo::m_NoKashidaLine
private

Definition at line 72 of file scriptinfo.hxx.

Referenced by ClearNoKashidaLine(), IsKashidaLine(), and SetNoKashidaLine().

◆ m_NoKashidaLineEnd

std::deque<TextFrameIndex> SwScriptInfo::m_NoKashidaLineEnd
private

Definition at line 73 of file scriptinfo.hxx.

Referenced by ClearNoKashidaLine(), IsKashidaLine(), and SetNoKashidaLine().

◆ m_ScriptChanges

std::vector<ScriptChangeInfo> SwScriptInfo::m_ScriptChanges
private

Definition at line 60 of file scriptinfo.hxx.

Referenced by CountScriptChg(), GetScriptChg(), GetScriptType(), and InitScriptInfo().


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