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

sw_redlinehide_3: adapt SwEditShell::GetScriptType()

Change-Id: Iffb09b9145b72a1ac8710e41a0a7d7ad3abe5c33
üst eed21432
...@@ -565,7 +565,8 @@ static SvtScriptType lcl_SetScriptFlags( sal_uInt16 nType ) ...@@ -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 ) SvtScriptType &rScrpt, bool bInSelection, bool bNum )
{ {
bool bRet = false; bool bRet = false;
...@@ -576,7 +577,7 @@ static bool lcl_IsNoEndTextAttrAtPos( const SwTextNode& rTNd, sal_Int32 nPos, ...@@ -576,7 +577,7 @@ static bool lcl_IsNoEndTextAttrAtPos( const SwTextNode& rTNd, sal_Int32 nPos,
{ {
bRet = false; bRet = false;
if ( rTNd.IsInList() ) if (sw::IsParaPropsNode(rLayout, rTNd) && rTNd.IsInList())
{ {
OSL_ENSURE( rTNd.GetNumRule(), OSL_ENSURE( rTNd.GetNumRule(),
"<lcl_IsNoEndTextAttrAtPos(..)> - no list style found at text node. Serious defect." ); "<lcl_IsNoEndTextAttrAtPos(..)> - no list style found at text node. Serious defect." );
...@@ -686,7 +687,7 @@ SvtScriptType SwEditShell::GetScriptType() const ...@@ -686,7 +687,7 @@ SvtScriptType SwEditShell::GetScriptType() const
else else
nScript = SvtLanguageOptions::GetI18NScriptTypeOfLanguage( GetAppLanguage() ); 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 ); nRet |= lcl_SetScriptFlags( nScript );
} }
} }
...@@ -728,7 +729,7 @@ SvtScriptType SwEditShell::GetScriptType() const ...@@ -728,7 +729,7 @@ SvtScriptType SwEditShell::GetScriptType() const
g_pBreakIt->GetBreakIter()->getScriptType( g_pBreakIt->GetBreakIter()->getScriptType(
rText, nChg ); rText, nChg );
if( !lcl_IsNoEndTextAttrAtPos( *pTNd, nChg, nRet, true, if (!lcl_IsNoEndTextAttrAtPos(*GetLayout(), *pTNd, nChg, nRet, true,
0 == nChg && rText.getLength() == nEndPos)) 0 == nChg && rText.getLength() == nEndPos))
nRet |= lcl_SetScriptFlags( nScript ); nRet |= lcl_SetScriptFlags( nScript );
......
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