diff options
-rw-r--r-- | sw/source/core/edit/edattr.cxx | 9 |
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 ); |