[Libreoffice-commits] core.git: sw/inc sw/source
Michael Stahl
Michael.Stahl at cib.de
Fri May 11 15:13:47 UTC 2018
sw/inc/ndtxt.hxx | 2 +-
sw/source/core/access/accpara.cxx | 4 ++--
sw/source/core/crsr/crsrsh.cxx | 4 ++--
sw/source/core/crsr/crstrvl.cxx | 2 +-
sw/source/core/edit/edlingu.cxx | 2 +-
sw/source/core/text/itratr.cxx | 2 +-
sw/source/core/txtnode/txtedt.cxx | 4 ++--
7 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit b0551b1d003d65896283e02f7c9d4945e37c8aa8
Author: Michael Stahl <Michael.Stahl at cib.de>
Date: Fri May 11 16:50:04 2018 +0200
sw: rename SwTextNode::IsSymbol() to reduce overloading
Change-Id: I440de45908af8ee1b722ddefb54cd0ba60d1e363
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 56fbc4189371..1fa043fcd44a 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -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.
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 238fcfa62f83..dece0ef514cd 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -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;
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 3f8880312b24..6827f75059c3 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -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) );
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index aa467d0f87d8..3864b07e9cf5 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -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 );
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 74401bb03f05..74d9f8833bd9 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -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), "")
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 43271ab0b595..060ba0d32b75 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -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 );
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 96ada91226f7..802ad9901872 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -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;
}
More information about the Libreoffice-commits
mailing list