diff options
author | Andras Timar <atimar@suse.com> | 2012-11-11 18:24:14 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-11-11 18:24:14 +0100 |
commit | 06ec1c089519ef3249464aa09eadf03a8db93a39 (patch) | |
tree | 85b2eb6d8ba6ca95e18e1ff82151224cb14106f6 /accessibility/source | |
parent | Add some check to renewpo (diff) | |
parent | oox: ZipStorage: better exception tracing (diff) | |
download | core-06ec1c089519ef3249464aa09eadf03a8db93a39.tar.gz core-06ec1c089519ef3249464aa09eadf03a8db93a39.zip |
Merge branch 'master' into feature/killsdf
Conflicts:
Repository.mk
RepositoryFixes.mk
connectivity/prj/build.lst
extensions/prj/build.lst
filter/prj/build.lst
fpicker/prj/build.lst
l10ntools/StaticLibrary_transex.mk
saxon/build.xml
shell/prj/build.lst
solenv/gbuild/AllLangResTarget.mk
solenv/gbuild/Configuration.mk
solenv/gbuild/UI.mk
ucb/source/ucp/webdav/webdavcontent.cxx
Diffstat (limited to 'accessibility/source')
6 files changed, 55 insertions, 49 deletions
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx index a1dd5ab94835..cd95a11ccd30 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx @@ -213,7 +213,7 @@ namespace accessibility { ENSURE_OR_RETURN_VOID( i_nPosition <= m_aChildren.size(), "AccessibleToolPanelTabBar_Impl::PanelInserted: illegal position (or invalid cache!)" ); (void)i_pPanel; - m_aChildren.insert( m_aChildren.begin() + i_nPosition, NULL ); + m_aChildren.insert( m_aChildren.begin() + i_nPosition, (Reference< XAccessible >)NULL ); m_rAntiImpl.NotifyAccessibleEvent( AccessibleEventId::CHILD, Any(), makeAny( getAccessiblePanelItem( i_nPosition ) ) ); } diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx index 4a43b6c235fd..63dc7add5905 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -81,7 +81,7 @@ namespace accessibility { if ( getListBox() && getListBox()->HasFocus() ) { - SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() ); + SvTreeListEntry* pEntry = static_cast< SvTreeListEntry* >( rVclWindowEvent.GetData() ); if ( !pEntry ) pEntry = getListBox()->GetCurEntry(); @@ -105,7 +105,7 @@ namespace accessibility NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() ); if ( getListBox() && getListBox()->HasFocus() ) { - SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() ); + SvTreeListEntry* pEntry = static_cast< SvTreeListEntry* >( rVclWindowEvent.GetData() ); if ( pEntry ) { Reference< XAccessible > xChild = new AccessibleListBoxEntry( *getListBox(), pEntry, this ); @@ -120,7 +120,7 @@ namespace accessibility case VCLEVENT_ITEM_EXPANDED : case VCLEVENT_ITEM_COLLAPSED : { - SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() ); + SvTreeListEntry* pEntry = static_cast< SvTreeListEntry* >( rVclWindowEvent.GetData() ); if ( pEntry ) { AccessibleListBoxEntry* pAccListBoxEntry = @@ -237,7 +237,7 @@ namespace accessibility ::comphelper::OExternalLockGuard aGuard( this ); ensureAlive(); - SvLBoxEntry* pEntry = getListBox()->GetEntry(i); + SvTreeListEntry* pEntry = getListBox()->GetEntry(i); if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -281,7 +281,7 @@ namespace accessibility ensureAlive(); - SvLBoxEntry* pEntry = getListBox()->GetEntry( nChildIndex ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( nChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -294,7 +294,7 @@ namespace accessibility ensureAlive(); - SvLBoxEntry* pEntry = getListBox()->GetEntry( nChildIndex ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( nChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -310,7 +310,7 @@ namespace accessibility sal_Int32 nCount = getListBox()->GetLevelChildCount( NULL ); for ( sal_Int32 i = 0; i < nCount; ++i ) { - SvLBoxEntry* pEntry = getListBox()->GetEntry( i ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( i ); if ( getListBox()->IsSelected( pEntry ) ) getListBox()->Select( pEntry, sal_False ); } @@ -325,7 +325,7 @@ namespace accessibility sal_Int32 nCount = getListBox()->GetLevelChildCount( NULL ); for ( sal_Int32 i = 0; i < nCount; ++i ) { - SvLBoxEntry* pEntry = getListBox()->GetEntry( i ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( i ); if ( !getListBox()->IsSelected( pEntry ) ) getListBox()->Select( pEntry, sal_True ); } @@ -341,7 +341,7 @@ namespace accessibility sal_Int32 nCount = getListBox()->GetLevelChildCount( NULL ); for ( sal_Int32 i = 0; i < nCount; ++i ) { - SvLBoxEntry* pEntry = getListBox()->GetEntry( i ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( i ); if ( getListBox()->IsSelected( pEntry ) ) ++nSelCount; } @@ -363,7 +363,7 @@ namespace accessibility sal_Int32 nCount = getListBox()->GetLevelChildCount( NULL ); for ( sal_Int32 i = 0; i < nCount; ++i ) { - SvLBoxEntry* pEntry = getListBox()->GetEntry( i ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( i ); if ( getListBox()->IsSelected( pEntry ) ) ++nSelCount; @@ -383,7 +383,7 @@ namespace accessibility ensureAlive(); - SvLBoxEntry* pEntry = getListBox()->GetEntry( nSelectedChildIndex ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( nSelectedChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index 16ef81de82e8..e0b5bbb3cb22 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -65,7 +65,7 @@ namespace accessibility // Ctor() and Dtor() // ----------------------------------------------------------------------------- AccessibleListBoxEntry::AccessibleListBoxEntry( SvTreeListBox& _rListBox, - SvLBoxEntry* _pEntry, + SvTreeListEntry* _pEntry, const Reference< XAccessible >& _xParent ) : AccessibleListBoxEntry_BASE ( m_aMutex ), @@ -92,11 +92,11 @@ namespace accessibility Rectangle AccessibleListBoxEntry::GetBoundingBox_Impl() const { Rectangle aRect; - SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( pEntry ) { aRect = getListBox()->GetBoundingRect( pEntry ); - SvLBoxEntry* pParent = getListBox()->GetParent( pEntry ); + SvTreeListEntry* pParent = getListBox()->GetParent( pEntry ); if ( pParent ) { // position relative to parent entry @@ -112,7 +112,7 @@ namespace accessibility Rectangle AccessibleListBoxEntry::GetBoundingBoxOnScreen_Impl() const { Rectangle aRect; - SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( pEntry ) { aRect = getListBox()->GetBoundingRect( pEntry ); @@ -173,7 +173,7 @@ namespace accessibility OUString AccessibleListBoxEntry::implGetText() { OUString sRet; - SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( pEntry ) sRet = getListBox()->SearchEntryText( pEntry ); return sRet; @@ -295,7 +295,7 @@ namespace accessibility ::osl::MutexGuard aGuard( m_aMutex ); EnsureIsAlive(); - SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); sal_Int32 nCount = 0; if ( pEntry ) nCount = getListBox()->GetLevelChildCount( pEntry ); @@ -309,8 +309,8 @@ namespace accessibility ::osl::MutexGuard aGuard( m_aMutex ); EnsureIsAlive(); - SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); - SvLBoxEntry* pEntry = pParent ? getListBox()->GetEntry( pParent, i ) : NULL; + SvTreeListEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = pParent ? getListBox()->GetEntry( pParent, i ) : NULL; if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -338,7 +338,7 @@ namespace accessibility aParentPath.pop_back(); // get the entry for this shortened access path - SvLBoxEntry* pParentEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pParentEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); OSL_ENSURE( pParentEntry, "AccessibleListBoxEntry::implGetParentAccessible: could not obtain a parent entry!" ); if ( pParentEntry ) @@ -454,7 +454,7 @@ namespace accessibility ::osl::MutexGuard aGuard( m_aMutex ); EnsureIsAlive(); - SvLBoxEntry* pEntry = getListBox()->GetEntry( VCLPoint( _aPoint ) ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( VCLPoint( _aPoint ) ); if ( !pEntry ) throw RuntimeException(); @@ -539,7 +539,7 @@ namespace accessibility throw IndexOutOfBoundsException(); awt::Rectangle aBounds( 0, 0, 0, 0 ); - SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( pEntry ) { ::vcl::ControlLayoutData aLayoutData; @@ -560,7 +560,7 @@ namespace accessibility EnsureIsAlive(); sal_Int32 nIndex = -1; - SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( pEntry ) { ::vcl::ControlLayoutData aLayoutData; @@ -644,7 +644,7 @@ namespace accessibility checkActionIndex_Impl( nIndex ); EnsureIsAlive(); - SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( pEntry ) { if ( getListBox()->IsExpanded( pEntry ) ) @@ -688,8 +688,8 @@ namespace accessibility EnsureIsAlive(); - SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); - SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, nChildIndex ); + SvTreeListEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( pParent, nChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -703,8 +703,8 @@ namespace accessibility EnsureIsAlive(); - SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); - SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, nChildIndex ); + SvTreeListEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( pParent, nChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -718,13 +718,13 @@ namespace accessibility EnsureIsAlive(); - SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( !pParent ) throw RuntimeException(); sal_Int32 nCount = getListBox()->GetLevelChildCount( pParent ); for ( sal_Int32 i = 0; i < nCount; ++i ) { - SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, i ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( pParent, i ); if ( getListBox()->IsSelected( pEntry ) ) getListBox()->Select( pEntry, sal_False ); } @@ -737,13 +737,13 @@ namespace accessibility EnsureIsAlive(); - SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( !pParent ) throw RuntimeException(); sal_Int32 nCount = getListBox()->GetLevelChildCount( pParent ); for ( sal_Int32 i = 0; i < nCount; ++i ) { - SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, i ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( pParent, i ); if ( !getListBox()->IsSelected( pEntry ) ) getListBox()->Select( pEntry, sal_True ); } @@ -758,13 +758,13 @@ namespace accessibility sal_Int32 i, nSelCount = 0, nCount = 0; - SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( !pParent ) throw RuntimeException(); nCount = getListBox()->GetLevelChildCount( pParent ); for ( i = 0; i < nCount; ++i ) { - SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, i ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( pParent, i ); if ( getListBox()->IsSelected( pEntry ) ) ++nSelCount; } @@ -785,13 +785,13 @@ namespace accessibility Reference< XAccessible > xChild; sal_Int32 i, nSelCount = 0, nCount = 0; - SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( !pParent ) throw RuntimeException(); nCount = getListBox()->GetLevelChildCount( pParent ); for ( i = 0; i < nCount; ++i ) { - SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, i ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( pParent, i ); if ( getListBox()->IsSelected( pEntry ) ) ++nSelCount; @@ -812,8 +812,8 @@ namespace accessibility EnsureIsAlive(); - SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); - SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, nSelectedChildIndex ); + SvTreeListEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath ); + SvTreeListEntry* pEntry = getListBox()->GetEntry( pParent, nSelectedChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx index 1ddaff3ec234..a33c9f1ea774 100644 --- a/accessibility/source/extended/accessibletablistboxtable.cxx +++ b/accessibility/source/extended/accessibletablistboxtable.cxx @@ -96,7 +96,7 @@ namespace accessibility commitEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() ); if ( m_pTabListBox && m_pTabListBox->HasFocus() ) { - SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() ); + SvTreeListEntry* pEntry = static_cast< SvTreeListEntry* >( rVclWindowEvent.GetData() ); if ( pEntry ) { sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry ); @@ -136,7 +136,7 @@ namespace accessibility { if ( m_pTabListBox && m_pTabListBox->HasFocus() ) { - SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() ); + SvTreeListEntry* pEntry = static_cast< SvTreeListEntry* >( rVclWindowEvent.GetData() ); if ( pEntry ) { sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry ); @@ -161,7 +161,7 @@ namespace accessibility { commitEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() ); TabListBoxEventData* pData = static_cast< TabListBoxEventData* >( rVclWindowEvent.GetData() ); - SvLBoxEntry* pEntry = pData != NULL ? pData->m_pEntry : NULL; + SvTreeListEntry* pEntry = pData != NULL ? pData->m_pEntry : NULL; if ( pEntry ) { sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry ); @@ -244,7 +244,7 @@ namespace accessibility if ( m_pTabListBox ) { sal_Int32 nRow = 0; - SvLBoxEntry* pEntry = m_pTabListBox->FirstSelected(); + SvTreeListEntry* pEntry = m_pTabListBox->FirstSelected(); while ( pEntry ) { ++nRow; diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 9f48b1a1ae2c..f25c46cf64f3 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <accessibility/extended/textwindowaccessibility.hxx> #include "comphelper/accessibleeventnotifier.hxx" #include "unotools/accessiblerelationsethelper.hxx" @@ -2124,12 +2123,19 @@ void Document::handleSelectionChangeNotification() void Document::notifySelectionChange( sal_Int32 nFirst, sal_Int32 nLast ) { - if ( nFirst < nLast ) + nFirst = std::max( nFirst, sal_Int32( 0 ) ); + nLast = std::min( nLast, sal_Int32( m_xParagraphs->size() ) ); + Paragraphs::iterator iFirst(m_xParagraphs->begin() + nFirst); + Paragraphs::iterator iLast(m_xParagraphs->begin() + nLast); + if ( iFirst < m_aVisibleBegin ) + iFirst = m_aVisibleBegin; + if ( iLast > m_aVisibleEnd ) + iLast = m_aVisibleEnd; + if ( iFirst < iLast ) { - Paragraphs::iterator aEnd( ::std::min( m_xParagraphs->begin() + nLast, m_aVisibleEnd ) ); - for ( Paragraphs::iterator aIt = ::std::max( m_xParagraphs->begin() + nFirst, m_aVisibleBegin ); aIt < aEnd; ++aIt ) + for ( Paragraphs::iterator i = iFirst; i != iLast; i++ ) { - ::rtl::Reference< ParagraphImpl > xParagraph( getParagraph( aIt ) ); + ::rtl::Reference< ParagraphImpl > xParagraph( getParagraph( i ) ); if ( xParagraph.is() ) { xParagraph->notifyEvent( diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx index 60b8414c0c6f..20e4c862a895 100644 --- a/accessibility/source/standard/vclxaccessibleedit.cxx +++ b/accessibility/source/standard/vclxaccessibleedit.cxx @@ -143,7 +143,7 @@ OUString VCLXAccessibleEdit::implGetText() if ( getAccessibleRole() == AccessibleRole::PASSWORD_TEXT ) { - xub_Unicode cEchoChar = pEdit->GetEchoChar(); + sal_Unicode cEchoChar = pEdit->GetEchoChar(); if ( !cEchoChar ) cEchoChar = '*'; OUStringBuffer sTmp; |