diff --git a/accessibility/inc/standard/vclxaccessiblelistitem.hxx b/accessibility/inc/standard/vclxaccessiblelistitem.hxx index 83142b50ed6f..64fd27d4d97c 100644 --- a/accessibility/inc/standard/vclxaccessiblelistitem.hxx +++ b/accessibility/inc/standard/vclxaccessiblelistitem.hxx @@ -75,6 +75,8 @@ private: virtual css::lang::Locale implGetLocale() override; virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + OUString getTextRangeImpl(std::unique_lock& rGuard, sal_Int32 nStartIndex, sal_Int32 nEndIndex); + public: /** OAccessibleBase needs a valid view @param _nIndexInParent diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx index af616805a50e..90f4c8bbebce 100644 --- a/accessibility/source/standard/vclxaccessiblelistitem.cxx +++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx @@ -480,12 +480,17 @@ OUString SAL_CALL VCLXAccessibleListItem::getText() return m_sEntryText; } +OUString VCLXAccessibleListItem::getTextRangeImpl(std::unique_lock& /*rGuard*/, sal_Int32 nStartIndex, sal_Int32 nEndIndex) +{ + return OCommonAccessibleText::implGetTextRange(m_sEntryText, nStartIndex, nEndIndex); +} + OUString SAL_CALL VCLXAccessibleListItem::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) { SolarMutexGuard aSolarGuard; std::unique_lock aGuard( m_aMutex ); - return OCommonAccessibleText::implGetTextRange( m_sEntryText, nStartIndex, nEndIndex ); + return getTextRangeImpl(aGuard, nStartIndex, nEndIndex); } css::accessibility::TextSegment SAL_CALL VCLXAccessibleListItem::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) @@ -527,7 +532,7 @@ sal_Bool SAL_CALL VCLXAccessibleListItem::copyText( sal_Int32 nStartIndex, sal_I Reference< datatransfer::clipboard::XClipboard > xClipboard = pListBoxHelper->GetClipboard(); if ( xClipboard.is() ) { - OUString sText( getTextRange( nStartIndex, nEndIndex ) ); + OUString sText(getTextRangeImpl(aGuard, nStartIndex, nEndIndex)); rtl::Reference pDataObj = new vcl::unohelper::TextDataObject( sText ); SolarMutexReleaser aReleaser;