summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-11-06 16:57:15 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-10 19:47:00 +0100
commit45b470be8809a6cc08a58031af7c3cfe75a13311 (patch)
treee22e385b676866561fcae0fd514095104332ccf6
parentb16391691833bc09a60a31d0098230d67feb1ad4 (diff)
sw_redlinehide_3: adapt SwEditShell::GetScriptType()
Change-Id: Iffb09b9145b72a1ac8710e41a0a7d7ad3abe5c33
-rw-r--r--sw/source/core/edit/edattr.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 197b22e821bb..98366e1b8f0f 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -565,7 +565,8 @@ static SvtScriptType lcl_SetScriptFlags( sal_uInt16 nType )
}
}
-static bool lcl_IsNoEndTextAttrAtPos( const SwTextNode& rTNd, sal_Int32 nPos,
+static bool lcl_IsNoEndTextAttrAtPos(SwRootFrame const& rLayout,
+ const SwTextNode& rTNd, sal_Int32 const nPos,
SvtScriptType &rScrpt, bool bInSelection, bool bNum )
{
bool bRet = false;
@@ -576,7 +577,7 @@ static bool lcl_IsNoEndTextAttrAtPos( const SwTextNode& rTNd, sal_Int32 nPos,
{
bRet = false;
- if ( rTNd.IsInList() )
+ if (sw::IsParaPropsNode(rLayout, rTNd) && rTNd.IsInList())
{
OSL_ENSURE( rTNd.GetNumRule(),
"<lcl_IsNoEndTextAttrAtPos(..)> - no list style found at text node. Serious defect." );
@@ -686,7 +687,7 @@ SvtScriptType SwEditShell::GetScriptType() const
else
nScript = SvtLanguageOptions::GetI18NScriptTypeOfLanguage( GetAppLanguage() );
- if( !lcl_IsNoEndTextAttrAtPos( *pTNd, nPos, nRet, false, false ))
+ if (!lcl_IsNoEndTextAttrAtPos(*GetLayout(), *pTNd, nPos, nRet, false, false))
nRet |= lcl_SetScriptFlags( nScript );
}
}
@@ -728,7 +729,7 @@ SvtScriptType SwEditShell::GetScriptType() const
g_pBreakIt->GetBreakIter()->getScriptType(
rText, nChg );
- if( !lcl_IsNoEndTextAttrAtPos( *pTNd, nChg, nRet, true,
+ if (!lcl_IsNoEndTextAttrAtPos(*GetLayout(), *pTNd, nChg, nRet, true,
0 == nChg && rText.getLength() == nEndPos))
nRet |= lcl_SetScriptFlags( nScript );