summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Johansson <sleeping.pillow@gmail.com>2014-03-14 15:39:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-03-19 10:31:18 +0000
commit3fa4b0a00f78e940b32d546bac410890719502fd (patch)
tree7ae03024ba842ce252b93f35dcd4e83eb8dcdbcd
parent4999a73991e6995e8d307c7653bfbf29a15573ec (diff)
fdo#74983: Instability in A11y after integration of IA2-branch
The IA2-integration added some special cases for calculating textbounds for attributeruns when automatic spellchecking is active. This does not seem to effect linux but messes up accessibility on mac. This patch removes the special cases avoids the problem on Mac. When daily builds gets available for Windows I will do some testing there to see if I can find any problems. Change-Id: I203da4fe1c6e5d4915d19e1704073e58f8aa88c9 Reviewed-on: https://gerrit.libreoffice.org/8591 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/access/accpara.cxx59
1 files changed, 0 insertions, 59 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 8ff24106d862..77817ecb02e3 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -916,65 +916,6 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary(
case AccessibleTextType::ATTRIBUTE_RUN:
bRet = GetAttributeBoundary( rBound, rText, nPos );
- if(bRet)
- {
- SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell != NULL && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell())
- {
- SwTxtNode* pTxtNode = const_cast<SwTxtNode*>( GetTxtNode() );
- if(pTxtNode)
- {
- const SwWrongList* pWrongList = pTxtNode->GetWrong();
- if( NULL != pWrongList )
- {
- sal_Int32 nBegin = nPos;
- sal_Int32 nLen = 1;
- const sal_Int32 nNext = pWrongList->NextWrong(nBegin);
- sal_Int32 nLast = 0;
- sal_uInt16 nWrongPos = pWrongList->GetWrongPos( nBegin );
- if ( nWrongPos >= pWrongList->Count() ||
- ( nLast = pWrongList->Pos( nWrongPos ) ) >= nBegin )
- {
- nLast = nWrongPos
- ? pWrongList->Pos( --nWrongPos )
- : COMPLETE_STRING;
- }
- if ( nBegin > pWrongList->GetBeginInv() &&
- ( nLast == COMPLETE_STRING || nLast < pWrongList->GetEndInv() ) )
- {
- nLast = min(nBegin, pWrongList->GetEndInv());
- }
- else if ( nLast < COMPLETE_STRING )
- {
- nLast += pWrongList->Len( nWrongPos );
- }
-
- const bool bIn = pWrongList->InWrongWord(nBegin, nLen); // && !pTxtNode->IsSymbol(nBegin) )
- if(bIn)
- {
- rBound.startPos = max(nNext, rBound.startPos);
- rBound.endPos = min(nNext+nLen, rBound.endPos);
- }
- else
- {
- if (COMPLETE_STRING == nLast)//first
- {
- rBound.endPos = min(nNext, rBound.endPos);
- }
- else if(COMPLETE_STRING == nNext)
- {
- rBound.startPos = max(nLast, rBound.startPos);
- }
- else
- {
- rBound.startPos = max(nLast, rBound.startPos);
- rBound.endPos = min(nNext, rBound.endPos);
- }
- }
- }
- }
- }
- }
break;
case AccessibleTextType::GLYPH: