diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2017-06-05 16:12:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-12 08:45:48 +0200 |
commit | a7532d8f061986c2e828df32f47f1fee1a339a14 (patch) | |
tree | a7a1421a1476e246e620a03c6188b312db015c06 /accessibility | |
parent | 0b8c2c72c988488895d74d1bb36e60378283a4da (diff) |
Remove VCLExternalSolarLock and IMutex.
Next step is to remove OContextEntryGuard.
Change-Id: I9460fb67fba6f3bfb3c809b730c33f38d225a64e
Reviewed-on: https://gerrit.libreoffice.org/38411
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility')
13 files changed, 27 insertions, 44 deletions
diff --git a/accessibility/inc/extended/accessibletabbarbase.hxx b/accessibility/inc/extended/accessibletabbarbase.hxx index d2d6ab83cc3c..8fd28dc06beb 100644 --- a/accessibility/inc/extended/accessibletabbarbase.hxx +++ b/accessibility/inc/extended/accessibletabbarbase.hxx @@ -23,10 +23,8 @@ #include <comphelper/accessiblecomponenthelper.hxx> #include <tools/link.hxx> #include <vcl/vclptr.hxx> -#include <toolkit/helper/externallock.hxx> class TabBar; -class VCLExternalSolarLock; class VclSimpleEvent; class VclWindowEvent; @@ -34,8 +32,7 @@ class VclWindowEvent; namespace accessibility { -class AccessibleTabBarBase : private BaseVCLExternalSolarLock, - public comphelper::OAccessibleExtendedComponentHelper +class AccessibleTabBarBase : public comphelper::OAccessibleExtendedComponentHelper { public: explicit AccessibleTabBarBase( TabBar* pTabBar ); diff --git a/accessibility/inc/pch/precompiled_acc.hxx b/accessibility/inc/pch/precompiled_acc.hxx index a6a92876ada5..bebb30a6b92e 100644 --- a/accessibility/inc/pch/precompiled_acc.hxx +++ b/accessibility/inc/pch/precompiled_acc.hxx @@ -303,7 +303,6 @@ #include <toolkit/awt/vclxwindows.hxx> #include <toolkit/dllapi.h> #include <toolkit/helper/convert.hxx> -#include <toolkit/helper/externallock.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <tools/color.hxx> #include <tools/contnr.hxx> diff --git a/accessibility/inc/standard/accessiblemenubasecomponent.hxx b/accessibility/inc/standard/accessiblemenubasecomponent.hxx index 96fa054244c2..2447b0d6c1d3 100644 --- a/accessibility/inc/standard/accessiblemenubasecomponent.hxx +++ b/accessibility/inc/standard/accessiblemenubasecomponent.hxx @@ -27,7 +27,6 @@ #include <cppuhelper/implbase2.hxx> #include <tools/link.hxx> #include <vcl/vclptr.hxx> -#include <toolkit/helper/externallock.hxx> #include <vector> @@ -46,8 +45,7 @@ typedef ::cppu::ImplHelper2< css::accessibility::XAccessible, css::lang::XServiceInfo > OAccessibleMenuBaseComponent_BASE; -class OAccessibleMenuBaseComponent : private BaseVCLExternalSolarLock, - public comphelper::OAccessibleExtendedComponentHelper, +class OAccessibleMenuBaseComponent : public comphelper::OAccessibleExtendedComponentHelper, public OAccessibleMenuBaseComponent_BASE { friend class OAccessibleMenuItemComponent; diff --git a/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx b/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx index 163fd663f5b6..47cb8bad700a 100644 --- a/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx +++ b/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx @@ -25,7 +25,6 @@ #include <comphelper/accessibletexthelper.hxx> #include <cppuhelper/implbase2.hxx> #include <vcl/vclptr.hxx> -#include <toolkit/helper/externallock.hxx> class StatusBar; @@ -43,8 +42,7 @@ typedef ::cppu::ImplHelper2< css::accessibility::XAccessible, css::lang::XServiceInfo > VCLXAccessibleStatusBarItem_BASE; -class VCLXAccessibleStatusBarItem : private BaseVCLExternalSolarLock, - public AccessibleTextHelper_BASE, +class VCLXAccessibleStatusBarItem : public AccessibleTextHelper_BASE, public VCLXAccessibleStatusBarItem_BASE { friend class VCLXAccessibleStatusBar; diff --git a/accessibility/inc/standard/vclxaccessibletabpage.hxx b/accessibility/inc/standard/vclxaccessibletabpage.hxx index 830e45d64808..66a2fbc8f87d 100644 --- a/accessibility/inc/standard/vclxaccessibletabpage.hxx +++ b/accessibility/inc/standard/vclxaccessibletabpage.hxx @@ -25,7 +25,6 @@ #include <comphelper/accessibletexthelper.hxx> #include <cppuhelper/implbase2.hxx> #include <vcl/vclptr.hxx> -#include <toolkit/helper/externallock.hxx> class TabControl; @@ -44,8 +43,7 @@ typedef ::cppu::ImplHelper2< css::accessibility::XAccessible, css::lang::XServiceInfo > VCLXAccessibleTabPage_BASE; -class VCLXAccessibleTabPage : private BaseVCLExternalSolarLock, - public AccessibleTextHelper_BASE, +class VCLXAccessibleTabPage : public AccessibleTextHelper_BASE, public VCLXAccessibleTabPage_BASE { friend class VCLXAccessibleTabControl; diff --git a/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx index 47bb3c387e93..fd455b025507 100644 --- a/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx +++ b/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx @@ -31,7 +31,6 @@ #include <cppuhelper/implbase4.hxx> #include <comphelper/accessibletexthelper.hxx> #include <vcl/vclptr.hxx> -#include <toolkit/helper/externallock.hxx> class ToolBox; @@ -42,8 +41,7 @@ typedef ::cppu::ImplHelper4 < css::accessibility::XAccessible, css::accessibility::XAccessibleValue, css::lang::XServiceInfo > VCLXAccessibleToolBoxItem_BASE; -class VCLXAccessibleToolBoxItem : private BaseVCLExternalSolarLock, - public AccessibleTextHelper_BASE, +class VCLXAccessibleToolBoxItem : public AccessibleTextHelper_BASE, public VCLXAccessibleToolBoxItem_BASE { private: diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx index 5c21f9371849..f33ab493970b 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp> #include <unotools/accessiblerelationsethelper.hxx> +#include <vcl/svapp.hxx> using ::com::sun::star::uno::Reference; diff --git a/accessibility/source/extended/accessibletabbarbase.cxx b/accessibility/source/extended/accessibletabbarbase.cxx index 12f741869cc4..e1cec85dee48 100644 --- a/accessibility/source/extended/accessibletabbarbase.cxx +++ b/accessibility/source/extended/accessibletabbarbase.cxx @@ -29,7 +29,6 @@ namespace accessibility AccessibleTabBarBase::AccessibleTabBarBase( TabBar* pTabBar ) : - OAccessibleExtendedComponentHelper( &m_aLock ), m_pTabBar( nullptr ) { SetTabBarPointer( pTabBar ); diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 78cd8f280ea5..322118940159 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -703,7 +703,7 @@ Document::Document(::VCLXWindow * pVclXWindow, ::TextEngine & rEngine, css::lang::Locale Document::retrieveLocale() { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; return m_rEngine.GetLocale(); } @@ -760,7 +760,7 @@ css::awt::Rectangle Document::retrieveParagraphBounds(Paragraph const * pParagraph, bool bAbsolute) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; ::osl::MutexGuard aInternalGuard(GetMutex()); // If a client holds on to a Paragraph that is no longer visible (as it @@ -799,7 +799,7 @@ Document::retrieveParagraphBounds(Paragraph const * pParagraph, OUString Document::retrieveParagraphText(Paragraph const * pParagraph) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; ::osl::MutexGuard aInternalGuard(GetMutex()); return m_rEngine.GetText(static_cast< ::sal_uLong >(pParagraph->getNumber())); // numeric overflow cannot happen here @@ -809,7 +809,7 @@ void Document::retrieveParagraphSelection(Paragraph const * pParagraph, ::sal_Int32 * pBegin, ::sal_Int32 * pEnd) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; ::osl::MutexGuard aInternalGuard(GetMutex()); ::TextSelection const & rSelection = m_rView.GetSelection(); Paragraphs::size_type nNumber = pParagraph->getNumber(); @@ -839,7 +839,7 @@ void Document::retrieveParagraphSelection(Paragraph const * pParagraph, ::sal_Int32 Document::retrieveParagraphCaretPosition(Paragraph const * pParagraph) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; ::osl::MutexGuard aInternalGuard(GetMutex()); ::TextSelection const & rSelection = m_rView.GetSelection(); Paragraphs::size_type nNumber = pParagraph->getNumber(); @@ -852,7 +852,7 @@ css::awt::Rectangle Document::retrieveCharacterBounds(Paragraph const * pParagraph, ::sal_Int32 nIndex) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; ::osl::MutexGuard aInternalGuard(GetMutex()); ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); sal_Int32 nLength = m_rEngine.GetText(nNumber).getLength(); @@ -898,7 +898,7 @@ Document::retrieveCharacterBounds(Paragraph const * pParagraph, ::sal_Int32 Document::retrieveCharacterIndex(Paragraph const * pParagraph, css::awt::Point const & rPoint) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; ::osl::MutexGuard aInternalGuard(GetMutex()); ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); // XXX numeric overflow @@ -927,7 +927,7 @@ Document::retrieveCharacterAttributes( Paragraph const * pParagraph, ::sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; vcl::Font aFont = m_rEngine.GetFont(); const sal_Int32 AttributeCount = 9; @@ -1075,7 +1075,7 @@ Document::retrieveDefaultAttributes( Paragraph const * pParagraph, const css::uno::Sequence< OUString >& RequestedAttributes) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() ); + SolarMutexGuard aGuard; ::osl::MutexGuard aInternalGuard( GetMutex() ); tPropValMap aDefAttrSeq; @@ -1141,7 +1141,7 @@ Document::retrieveRunAttributes( Paragraph const * pParagraph, ::sal_Int32 Index, const css::uno::Sequence< OUString >& RequestedAttributes) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() ); + SolarMutexGuard aGuard; ::osl::MutexGuard aInternalGuard( GetMutex() ); ::sal_uLong nNumber = static_cast< ::sal_uLong >( pParagraph->getNumber() ); // XXX numeric overflow @@ -1159,7 +1159,7 @@ Document::retrieveRunAttributes( void Document::changeParagraphText(Paragraph * pParagraph, OUString const & rText) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; { ::osl::MutexGuard aInternalGuard(GetMutex()); ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); @@ -1174,7 +1174,7 @@ void Document::changeParagraphText(Paragraph * pParagraph, bool bCut, bool bPaste, OUString const & rText) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; { ::osl::MutexGuard aInternalGuard(GetMutex()); ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); @@ -1194,7 +1194,7 @@ void Document::changeParagraphText(Paragraph * pParagraph, void Document::copyParagraphText(Paragraph const * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; { ::osl::MutexGuard aInternalGuard(GetMutex()); ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); @@ -1217,7 +1217,7 @@ void Document::changeParagraphAttributes( Paragraph * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd, css::uno::Sequence< css::beans::PropertyValue > const & rAttributeSet) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; { ::osl::MutexGuard aInternalGuard(GetMutex()); ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); @@ -1249,7 +1249,7 @@ void Document::changeParagraphAttributes( void Document::changeParagraphSelection(Paragraph * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; { ::osl::MutexGuard aInternalGuard(GetMutex()); ::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber()); @@ -1275,7 +1275,7 @@ Document::retrieveParagraphLineBoundary( Paragraph const * pParagraph, aBoundary.startPos = nIndex; aBoundary.endPos = nIndex; - ::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() ); + SolarMutexGuard aGuard; { ::osl::MutexGuard aInternalGuard( GetMutex() ); ::sal_uLong nNumber = static_cast< ::sal_uLong >( pParagraph->getNumber() ); @@ -1313,7 +1313,7 @@ Document::retrieveParagraphBoundaryOfLine( Paragraph const * pParagraph, aBoundary.startPos = 0; aBoundary.endPos = 0; - ::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() ); + SolarMutexGuard aGuard; { ::osl::MutexGuard aInternalGuard( GetMutex() ); ::sal_uLong nNumber = static_cast< ::sal_uLong >( pParagraph->getNumber() ); @@ -1339,7 +1339,7 @@ Document::retrieveParagraphBoundaryOfLine( Paragraph const * pParagraph, sal_Int32 Document::retrieveParagraphLineWithCursor( Paragraph const * pParagraph ) { - ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); + SolarMutexGuard aGuard; ::osl::MutexGuard aInternalGuard(GetMutex()); ::TextSelection const & rSelection = m_rView.GetSelection(); Paragraphs::size_type nNumber = pParagraph->getNumber(); diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx index b3ee3884958a..5aae312b0176 100644 --- a/accessibility/source/standard/accessiblemenubasecomponent.cxx +++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx @@ -43,8 +43,7 @@ using namespace ::comphelper; OAccessibleMenuBaseComponent::OAccessibleMenuBaseComponent( Menu* pMenu ) - :OAccessibleExtendedComponentHelper( &m_aLock ) - ,m_pMenu( pMenu ) + :m_pMenu( pMenu ) ,m_bEnabled( false ) ,m_bFocused( false ) ,m_bVisible( false ) diff --git a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx index 3a50c75d980a..0b462f7cfecb 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx @@ -48,8 +48,7 @@ using namespace ::comphelper; VCLXAccessibleStatusBarItem::VCLXAccessibleStatusBarItem( StatusBar* pStatusBar, sal_uInt16 nItemId ) - :AccessibleTextHelper_BASE( &m_aLock ) - ,m_pStatusBar( pStatusBar ) + :m_pStatusBar( pStatusBar ) ,m_nItemId( nItemId ) { diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx b/accessibility/source/standard/vclxaccessibletabpage.cxx index 954b471dbd90..8fc4030209f8 100644 --- a/accessibility/source/standard/vclxaccessibletabpage.cxx +++ b/accessibility/source/standard/vclxaccessibletabpage.cxx @@ -48,8 +48,7 @@ using namespace ::comphelper; VCLXAccessibleTabPage::VCLXAccessibleTabPage( TabControl* pTabControl, sal_uInt16 nPageId ) - :AccessibleTextHelper_BASE( &m_aLock ) - ,m_pTabControl( pTabControl ) + :m_pTabControl( pTabControl ) ,m_nPageId( nPageId ) { m_bFocused = IsFocused(); diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index 93e2c82fb010..325db82a8891 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -59,8 +59,6 @@ using namespace ::comphelper; // Ctor() and Dtor() VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos ) : - AccessibleTextHelper_BASE( &m_aLock ), - m_pToolBox ( _pToolBox ), m_nIndexInParent( _nPos ), m_nRole ( AccessibleRole::PUSH_BUTTON ), |