Kaydet (Commit) b0551b1d authored tarafından Michael Stahl's avatar Michael Stahl

sw: rename SwTextNode::IsSymbol() to reduce overloading

Change-Id: I440de45908af8ee1b722ddefb54cd0ba60d1e363
üst 92af7073
......@@ -657,7 +657,7 @@ public:
sal_uInt16 nScript = 0 ) const;
/// in ndcopy.cxx
bool IsSymbol( const sal_Int32 nBegin ) const; // In itratr.cxx.
bool IsSymbolAt(sal_Int32 nBegin) const; // In itratr.cxx.
virtual SwContentNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const override;
/// Interactive hyphenation: we find TextFrame and call its CalcHyph.
......
......@@ -2197,7 +2197,7 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
{
sal_Int32 nBegin = nIndex;
sal_Int32 nLen = 1;
if( pWrongList->InWrongWord(nBegin,nLen) && !pTextNode->IsSymbol(nBegin) )
if (pWrongList->InWrongWord(nBegin, nLen) && !pTextNode->IsSymbolAt(nBegin))
{
rValue.Value <<= sal_uInt16(LINESTYLE_WAVE);
}
......@@ -2218,7 +2218,7 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
{
sal_Int32 nBegin = nIndex;
sal_Int32 nLen = 1;
if( pWrongList->InWrongWord(nBegin,nLen) && !pTextNode->IsSymbol(nBegin) )
if (pWrongList->InWrongWord(nBegin, nLen) && !pTextNode->IsSymbolAt(nBegin))
{
rValue.Value <<= sal_Int32(0x00ff0000);
continue;
......
......@@ -3433,7 +3433,7 @@ void SwCursorShell::GetSmartTagTerm( std::vector< OUString >& rSmartTagTypes,
sal_Int32 nBegin = nCurrent;
sal_Int32 nLen = 1;
if( pSmartTagList->InWrongWord( nBegin, nLen ) && !pNode->IsSymbol(nBegin) )
if (pSmartTagList->InWrongWord(nBegin, nLen) && !pNode->IsSymbolAt(nBegin))
{
const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin );
const SwWrongList* pSubList = pSmartTagList->SubList( nIndex );
......@@ -3470,7 +3470,7 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt, SwRect& rSelectRect )
sal_Int32 nBegin = aPos.nContent.GetIndex();
sal_Int32 nLen = 1;
if( pSmartTagList->InWrongWord( nBegin, nLen ) && !pNode->IsSymbol(nBegin) )
if (pSmartTagList->InWrongWord(nBegin, nLen) && !pNode->IsSymbolAt(nBegin))
{
// get smarttag word
OUString aText( pNode->GetText().copy(nBegin, nLen) );
......
......@@ -1199,7 +1199,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
const sal_Int32 nBegin = nCurrent;
sal_Int32 nLen = 1;
if ( pSmartTagList && pSmartTagList->InWrongWord( nCurrent, nLen ) && !pTextNd->IsSymbol(nBegin) )
if (pSmartTagList && pSmartTagList->InWrongWord(nCurrent, nLen) && !pTextNd->IsSymbolAt(nBegin))
{
const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin );
const SwWrongList* pSubList = pSmartTagList->SubList( nIndex );
......
......@@ -898,7 +898,7 @@ uno::Reference< XSpellAlternatives >
{
sal_Int32 nBegin = aPos.nContent.GetIndex();
sal_Int32 nLen = 1;
if( pWrong->InWrongWord(nBegin,nLen) && !pNode->IsSymbol(nBegin) )
if (pWrong->InWrongWord(nBegin, nLen) && !pNode->IsSymbolAt(nBegin))
{
const OUString aText(pNode->GetText().copy(nBegin, nLen));
OUString aWord = aText.replaceAll(OUStringLiteral1(CH_TXTATR_BREAKWORD), "")
......
......@@ -397,7 +397,7 @@ static bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const OUString &
return bRet;
}
bool SwTextNode::IsSymbol( const sal_Int32 nBegin ) const
bool SwTextNode::IsSymbolAt(const sal_Int32 nBegin) const
{
SwScriptInfo aScriptInfo;
SwAttrIter aIter( *const_cast<SwTextNode*>(this), aScriptInfo );
......
......@@ -714,7 +714,7 @@ OUString SwTextNode::GetCurWord( sal_Int32 nPos ) const
// check if word was found and if it uses a symbol font, if so
// enforce returning an empty string
if (aBndry.endPos != aBndry.startPos && IsSymbol( aBndry.startPos ))
if (aBndry.endPos != aBndry.startPos && IsSymbolAt(aBndry.startPos))
aBndry.endPos = aBndry.startPos;
// can have -1 as start/end of bounds not found
......@@ -1044,7 +1044,7 @@ bool SwTextNode::Spell(SwSpellArgs* pArgs)
}
if( pArgs->xSpellAlt.is() )
{
if( IsSymbol( aScanner.GetBegin() ) )
if (IsSymbolAt(aScanner.GetBegin()))
{
pArgs->xSpellAlt = nullptr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment