diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 1133da6..110f59d 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -27,6 +27,7 @@ ************************************************************************/ +#include #include #include #include @@ -1126,7 +1127,7 @@ sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { SolarMutexGuard aGuard; - + printf("SwAccessibleParagraph::setCaretPosition %i\n", nIndex); CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this ); // parameter checking @@ -1149,9 +1150,10 @@ sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex ) SwPaM aPaM( aStartPos ); // set PaM at cursor shell + pCrsrShell->ClearMark(); bRet = Select( aPaM ); } - + printf("SwAccessibleParagraph::setCaretPosition <-- %i, %i, %i, %i\n", bRet, getCaretPosition(), getSelectionStart(), getSelectionEnd()); return bRet; } @@ -1787,7 +1789,7 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { SolarMutexGuard aGuard; - + printf("SwAccessibleParagraph::setSelection %i, %i\n", nStartIndex, nEndIndex); CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this ); // parameter checking @@ -1813,9 +1815,11 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n GetPortionData().GetModelPosition(nEndIndex); // set PaM at cursor shell + if (nStartIndex == nEndIndex) + pCrsrShell->ClearMark(); bRet = Select( aPaM ); } - + printf("SwAccessibleParagraph::setSelection <-- %i, %i, %i, %i\n", bRet, getCaretPosition(), getSelectionStart(), getSelectionEnd()); return bRet; } diff --git a/vcl/unx/gtk/a11y/atktext.cxx b/vcl/unx/gtk/a11y/atktext.cxx index 96a56e3..6ebb66b 100644 --- a/vcl/unx/gtk/a11y/atktext.cxx +++ b/vcl/unx/gtk/a11y/atktext.cxx @@ -41,6 +41,7 @@ // #define ENABLE_TRACING +#include #ifdef ENABLE_TRACING #include #endif @@ -441,6 +442,8 @@ static gboolean text_wrapper_set_caret_offset (AtkText *text, gint offset) { + printf("text_wrapper_set_caret_offset %i\n", offset); + try { accessibility::XAccessibleText* pText = getText( text ); if( pText ) @@ -792,6 +795,8 @@ text_wrapper_add_selection (AtkText *text, // FIXME: can we try to be more compatible by expanding an // existing adjacent selection ? + printf("text_wrapper_add_selection %i %i\n", start_offset, end_offset); + try { accessibility::XAccessibleText* pText = getText( text ); if( pText ) @@ -810,6 +815,8 @@ text_wrapper_remove_selection (AtkText *text, { g_return_val_if_fail( selection_num == 0, FALSE ); + printf("text_wrapper_remove_selection %i\n", selection_num); + try { accessibility::XAccessibleText* pText = getText( text ); if( pText )