LibreOffice Module sw (master) 1
|
#include <scriptinfo.hxx>
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 SwScriptInfo * | GetScriptInfo (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< ScriptChangeInfo > | m_ScriptChanges |
std::vector< DirectionChangeInfo > | m_DirectionChanges |
std::deque< TextFrameIndex > | m_Kashida |
std::unordered_set< size_t > | m_KashidaInvalid |
indexes into m_Kashida More... | |
std::deque< TextFrameIndex > | m_NoKashidaLine |
std::deque< TextFrameIndex > | m_NoKashidaLineEnd |
std::vector< TextFrameIndex > | m_HiddenChg |
std::vector< std::tuple< TextFrameIndex, MarkKind, Color, OUString > > | m_Bookmarks |
std::vector< CompressionChangeInfo > | m_CompressionChanges |
TextFrameIndex | m_nInvalidityPos |
sal_uInt8 | m_nDefaultDir |
Definition at line 44 of file scriptinfo.hxx.
Enumerator | |
---|---|
KANA | |
SPECIAL_LEFT | |
SPECIAL_RIGHT | |
NONE | |
SPECIAL_MIDDLE |
Definition at line 47 of file scriptinfo.hxx.
|
strong |
Enumerator | |
---|---|
Start | |
End | |
Point |
Definition at line 48 of file scriptinfo.hxx.
SwScriptInfo::SwScriptInfo | ( | ) |
Definition at line 868 of file porlay.cxx.
SwScriptInfo::~SwScriptInfo | ( | ) |
Definition at line 874 of file porlay.cxx.
|
static |
Definition at line 2909 of file porlay.cxx.
References MultiSelection::GetRange(), MultiSelection::GetRangeCount(), SwTextNode::GetText(), Range::Max(), Range::Min(), selectHiddenTextProperty(), selectRedLineDeleted(), and SwTextNode::SetHiddenCharAttribute().
Referenced by GetBoundsOfHiddenRange(), and InitScriptInfo().
|
static |
Definition at line 2957 of file porlay.cxx.
References KernArray::adjust(), g_pBreakIt, SwBreakIt::GetBreakIter(), and SwBreakIt::GetLocale().
Referenced by SwFntObj::DrawText(), and SwFntObj::GetModelPositionForViewPoint().
|
private |
Definition at line 2437 of file porlay.cxx.
References m_KashidaInvalid.
Referenced by SwTextAdjuster::CalcNewBlock(), and MarkOrClearKashidaInvalid().
|
inline |
Clears array of kashidas marked as invalid.
Definition at line 299 of file scriptinfo.hxx.
References MarkOrClearKashidaInvalid().
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().
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 |
Definition at line 2188 of file porlay.cxx.
References KernArray::adjust(), Point::AdjustX(), CountCompChg(), DbgCompType(), GetCompLen(), GetCompStart(), GetCompType(), HasKana(), KANA, NONE, nType, SAL_WARN_IF, SPECIAL_LEFT, and SPECIAL_MIDDLE.
Referenced by SwFntObj::DrawText(), SwFntObj::GetModelPositionForViewPoint(), SwFont::GetTextBreak(), and SwFntObj::GetTextSize().
|
static |
Definition at line 2934 of file porlay.cxx.
References g_pBreakIt, SwBreakIt::GetBreakIter(), SwBreakIt::GetLocale(), nCount, and nPos.
Referenced by lcl_AddSpace().
|
inline |
Definition at line 163 of file scriptinfo.hxx.
References m_CompressionChanges.
Referenced by Compress(), DbgCompType(), SwFntObj::DrawText(), SwFntObj::GetModelPositionForViewPoint(), SwTextCursor::GetModelPositionForViewPoint(), SwFont::GetTextBreak(), SwTextSizeInfo::GetTextSize(), SwFntObj::GetTextSize(), SwTextGuess::Guess(), HasKana(), and InitScriptInfo().
|
inline |
Definition at line 140 of file scriptinfo.hxx.
References m_DirectionChanges.
Referenced by DirType(), NextDirChg(), and SwVisibleCursor::SetPosAndShow().
|
inline |
Definition at line 180 of file scriptinfo.hxx.
References m_HiddenChg.
Referenced by GetBoundsOfHiddenRange().
|
inline |
Definition at line 152 of file scriptinfo.hxx.
References m_Kashida.
Referenced by SwTextAdjuster::CalcNewBlock(), SwFntObj::DrawText(), GetKashidaPositions(), SwFntObj::GetModelPositionForViewPoint(), InitScriptInfo(), KashidaJustify(), lcl_AddSpace(), MarkKashidasInvalid(), and MarkOrClearKashidaInvalid().
|
inline |
Definition at line 128 of file scriptinfo.hxx.
References m_ScriptChanges.
Referenced by SwAttrIter::InitFontAndAttrHandler(), InitScriptInfo(), NextScriptChg(), and ScriptType().
|
private |
Definition at line 2149 of file porlay.cxx.
References CountCompChg(), GetCompLen(), GetCompStart(), GetCompType(), NONE, and nPos.
Referenced by Compress().
|
static |
Hidden text attribute handling.
@descr Takes a SwTextNode and deletes the hidden ranges from the node.
rNode | The text node. |
Definition at line 2007 of file porlay.cxx.
References IDocumentContentOperations::DeleteRange(), GetBoundsOfHiddenRange(), and SwNode::getIDocumentContentOperations().
Referenced by SwDoc::RemoveInvisibleContent().
sal_uInt8 SwScriptInfo::DirType | ( | const TextFrameIndex | nPos | ) | const |
Definition at line 1899 of file porlay.cxx.
References CountDirChg(), GetDirChg(), GetDirType(), and nPos.
Referenced by SwFieldPortion::CheckScript(), SwCursor::DoSetBidiLevelLeftRight(), SwCursor::DoSetBidiLevelUpDown(), SwFntObj::GetModelPositionForViewPoint(), SwTextSizeInfo::GetMultiCreator(), and SwEditShell::Insert2().
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().
|
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.
rNode | The text node. |
nPos | The given position that should be checked. |
rnStartPos | Return parameter for the start position of the hidden range. COMPLETE_STRING if nPos is not inside a hidden range. |
rnEndPos | Return parameter for the end position of the hidden range. 0 if nPos is not inside a hidden range. |
rnEndPos | Return parameter that contains all the hidden text ranges. Optional. |
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().
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.
|
inline |
Definition at line 169 of file scriptinfo.hxx.
References m_CompressionChanges.
Referenced by Compress(), DbgCompType(), HasKana(), and InitScriptInfo().
|
inline |
Definition at line 164 of file scriptinfo.hxx.
References m_CompressionChanges.
Referenced by Compress(), DbgCompType(), HasKana(), and InitScriptInfo().
|
inline |
Definition at line 174 of file scriptinfo.hxx.
References m_CompressionChanges.
Referenced by Compress(), and DbgCompType().
|
inline |
Definition at line 125 of file scriptinfo.hxx.
References m_nDefaultDir.
Referenced by SwFieldPortion::CheckScript().
|
inline |
Definition at line 141 of file scriptinfo.hxx.
References m_DirectionChanges.
Referenced by DirType(), InitScriptInfo(), and NextDirChg().
|
inline |
Definition at line 146 of file scriptinfo.hxx.
References m_DirectionChanges.
Referenced by DirType(), InitScriptInfo(), and NextDirChg().
|
inline |
Definition at line 181 of file scriptinfo.hxx.
References m_HiddenChg.
Referenced by GetBoundsOfHiddenRange().
|
inline |
Definition at line 119 of file scriptinfo.hxx.
References m_nInvalidityPos.
Referenced by SwAttrIter::CtorInitAttrIter(), GetScriptInfo(), and SwEditShell::Insert2().
|
inline |
Definition at line 157 of file scriptinfo.hxx.
References m_Kashida.
Referenced by GetKashidaPositions(), InitScriptInfo(), KashidaJustify(), MarkKashidasInvalid(), and MarkOrClearKashidaInvalid().
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().
|
inline |
Definition at line 129 of file scriptinfo.hxx.
References m_ScriptChanges.
Referenced by SwAttrIter::InitFontAndAttrHandler(), InitScriptInfo(), NextScriptChg(), and ScriptType().
|
static |
return a frame for the node, ScriptInfo is its member... (many clients need both frame and SI, and both have to match)
Definition at line 2608 of file porlay.cxx.
References COMPLETE_STRING, SwIterator< TElementType, TSource, eMode >::First(), GetInvalidityA(), and SwIterator< TElementType, TSource, eMode >::Next().
Referenced by SwCursor::DoSetBidiLevelLeftRight(), SwCursor::DoSetBidiLevelUpDown(), GetBoundsOfHiddenRange(), SwEditShell::GetItemWithPaM(), SwEditShell::GetScriptType(), and SwEditShell::Insert2().
|
inline |
Definition at line 134 of file scriptinfo.hxx.
References m_ScriptChanges.
Referenced by SwAttrIter::InitFontAndAttrHandler(), InitScriptInfo(), and ScriptType().
|
private |
Definition at line 2168 of file porlay.cxx.
References CountCompChg(), GetCompLen(), and GetCompStart().
Referenced by Compress().
void SwScriptInfo::InitScriptInfo | ( | const SwTextNode & | rNode, |
sw::MergedPara const * | pMerged | ||
) |
Definition at line 1121 of file porlay.cxx.
References InitScriptInfo(), and m_nDefaultDir.
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().
|
static |
Checks if text is Arabic text.
@descr Checks if text is Arabic text.
rText | The text to check |
nStt | Start index of the text |
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().
|
static |
Definition at line 2139 of file porlay.cxx.
References COMPLETE_STRING, GetBoundsOfHiddenRange(), and nPos.
Referenced by SwPostItHelper::getLayoutInfos(), and SwTOXMark::Notify().
|
private |
Definition at line 2519 of file porlay.cxx.
References i, m_NoKashidaLine, and m_NoKashidaLineEnd.
Referenced by KashidaJustify().
|
private |
Definition at line 2432 of file porlay.cxx.
References m_KashidaInvalid.
Referenced by KashidaJustify(), and MarkKashidasInvalid().
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.
pKernArray | The printers kerning array. Optional. |
nStt | Start referring to the paragraph. |
nLen | The number of characters to be considered. |
nSpaceAdd | The value which has to be added to a kashida opportunity. |
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().
|
private |
Definition at line 2482 of file porlay.cxx.
References m_KashidaInvalid.
Referenced by MarkKashidasInvalid(), and MarkOrClearKashidaInvalid().
|
inline |
Marks nCnt kashida positions as invalid in the given text range.
Definition at line 312 of file scriptinfo.hxx.
References MarkOrClearKashidaInvalid().
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().
|
private |
Definition at line 2446 of file porlay.cxx.
References ClearKashidaInvalid(), CountKashida(), GetKashida(), and MarkKashidaInvalid().
Referenced by ClearKashidaInvalid(), and MarkKashidasInvalid().
|
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.
rNode | The text node. |
rText | The string to modify. |
cChar | The character that should replace the hidden characters. |
bDel | If 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().
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().
TextFrameIndex SwScriptInfo::NextDirChg | ( | const TextFrameIndex | nPos, |
const sal_uInt8 * | pLevel = nullptr |
||
) | const |
Definition at line 1884 of file porlay.cxx.
References COMPLETE_STRING, CountDirChg(), GetDirChg(), GetDirType(), and nPos.
Referenced by SwTextSizeInfo::GetMultiCreator(), and SwTextFormatter::NewTextPortion().
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().
TextFrameIndex SwScriptInfo::NextScriptChg | ( | TextFrameIndex | nPos | ) | const |
Definition at line 1858 of file porlay.cxx.
References COMPLETE_STRING, CountScriptChg(), GetScriptChg(), and nPos.
Referenced by SwTextFormatter::BuildPortions(), SwTextNode::GetMinMaxSize(), SwTextFrame::GetScalingOfSelectedText(), SwEditShell::GetScriptType(), lcl_CheckKashidaPositions(), lcl_CheckKashidaWidth(), SwTextFormatter::NewDropPortion(), and SwTextFormatter::NewTextPortion().
sal_Int16 SwScriptInfo::ScriptType | ( | const TextFrameIndex | nPos | ) | const |
Definition at line 1871 of file porlay.cxx.
References CountScriptChg(), GetAppLanguage(), SvtLanguageOptions::GetI18NScriptTypeOfLanguage(), GetScriptChg(), GetScriptType(), and nPos.
Referenced by SwTextFormatter::BuildPortions(), SwSubFont::DrawText_(), SwEditShell::GetItemWithPaM(), SwEditShell::GetScriptType(), lcl_AddSpace(), and WhichFont().
|
static |
Definition at line 2802 of file porlay.cxx.
References SwpHints::Count(), SwTextAttr::End(), End, SwpHints::Get(), SwPosition::GetContentIndex(), CharFormat::GetItem(), SfxItemSet::GetItemIfSet(), sw::mark::IMark::GetMarkEnd(), sw::mark::IMark::GetMarkStart(), SwTextNode::GetpSwpHints(), SwTextAttr::GetStart(), SwContentNode::GetSwAttrSet(), SwTextNode::GetText(), MultiSelection::GetTotalRange(), sw::mark::IMark::IsExpanded(), sw::mark::IBookmark::IsHidden(), Range::Len(), SwPosition::nContent, Point, RES_CHRATR_HIDDEN(), MultiSelection::Select(), MultiSelection::SelectAll(), and Start.
Referenced by CalcHiddenRanges(), and ModelToViewHelper::ModelToViewHelper().
|
static |
Definition at line 2874 of file porlay.cxx.
References SwRangeRedline::CalcStartEnd(), SwNode::getIDocumentRedlineAccess(), SwNode::GetIndex(), SwPosition::GetNode(), IDocumentRedlineAccess::GetRedlineFlags(), IDocumentRedlineAccess::GetRedlinePos(), IDocumentRedlineAccess::GetRedlineTable(), SwTextNode::GetText(), MultiSelection::GetTotalRange(), SwRangeRedline::GetType(), IDocumentRedlineAccess::IsShowChanges(), Range::Len(), MultiSelection::Select(), size, and SwPaM::Start().
Referenced by CalcHiddenRanges(), and ModelToViewHelper::ModelToViewHelper().
|
inline |
Definition at line 114 of file scriptinfo.hxx.
References m_nInvalidityPos, and nPos.
Referenced by lcl_SetScriptInval().
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().
|
static |
Performs a thai justification on the kerning array.
@descr Add some extra space for thai justification to the positions in the kerning array.
aText | The String |
pKernArray | The printers kerning array. Optional. |
nIdx | Start referring to the paragraph. |
nLen | The number of characters to be considered. |
nSpaceAdd | The value which has to be added to the cells. |
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().
|
private |
Definition at line 1823 of file porlay.cxx.
References m_DirectionChanges, m_nDefaultDir, and nCount.
Referenced by InitScriptInfo().
|
static |
Definition at line 898 of file porlay.cxx.
References g_pBreakIt, SwBreakIt::GetRealScriptOfText(), and lcl_ScriptToFont().
SwFontScript SwScriptInfo::WhichFont | ( | TextFrameIndex | nIdx | ) | const |
Definition at line 892 of file porlay.cxx.
References lcl_ScriptToFont(), and ScriptType().
Referenced by SwTextFormatter::BuildPortions(), SwAttrIter::InitFontAndAttrHandler(), lcl_GetCharRectInsideField(), SwAttrIter::Seek(), and SwDoubleLinePortion::SwDoubleLinePortion().
|
private |
Definition at line 75 of file scriptinfo.hxx.
Referenced by GetBookmarks(), InitScriptInfo(), and NextBookmark().
|
private |
Definition at line 84 of file scriptinfo.hxx.
Referenced by CountCompChg(), GetCompLen(), GetCompStart(), GetCompType(), and InitScriptInfo().
|
private |
Definition at line 68 of file scriptinfo.hxx.
Referenced by CountDirChg(), GetDirChg(), GetDirType(), InitScriptInfo(), and UpdateBidiInfo().
|
private |
Definition at line 74 of file scriptinfo.hxx.
Referenced by CountHiddenChg(), GetHiddenChg(), InitScriptInfo(), and NextHiddenChg().
|
private |
Definition at line 69 of file scriptinfo.hxx.
Referenced by CountKashida(), GetKashida(), and InitScriptInfo().
|
private |
indexes into m_Kashida
Definition at line 71 of file scriptinfo.hxx.
Referenced by ClearKashidaInvalid(), IsKashidaValid(), and MarkKashidaInvalid().
|
private |
Definition at line 90 of file scriptinfo.hxx.
Referenced by GetDefaultDir(), InitScriptInfo(), and UpdateBidiInfo().
|
private |
Definition at line 89 of file scriptinfo.hxx.
Referenced by GetInvalidityA(), InitScriptInfo(), and SetInvalidityA().
|
private |
Definition at line 72 of file scriptinfo.hxx.
Referenced by ClearNoKashidaLine(), IsKashidaLine(), and SetNoKashidaLine().
|
private |
Definition at line 73 of file scriptinfo.hxx.
Referenced by ClearNoKashidaLine(), IsKashidaLine(), and SetNoKashidaLine().
|
private |
Definition at line 60 of file scriptinfo.hxx.
Referenced by CountScriptChg(), GetScriptChg(), GetScriptType(), and InitScriptInfo().