summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2017-06-05 12:34:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-05 13:41:38 +0200
commitf2d40b8ba172d90be9a43c30cd5cbd62c0e8e548 (patch)
tree6fe8f206109cb97945fff7d9a01122b3e04949d4 /toolkit
parent118bcbc83e38604189bec667a394a4acaec98f56 (diff)
Remove all allocation of VCLExternalSolarLock.
This patch is graciously offered by Arnaud Versini. Change-Id: I3ed5e1758d09542a2ca0533e3f4a6ceb2dbb6346 Reviewed-on: https://gerrit.libreoffice.org/38404 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx11
-rw-r--r--toolkit/source/controls/accessiblecontrolcontext.cxx3
2 files changed, 2 insertions, 12 deletions
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 524652c36737..ae971faeaffe 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -25,7 +25,6 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
-#include <toolkit/helper/externallock.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/convert.hxx>
#include <toolkit/awt/vclxfont.hxx>
@@ -44,7 +43,7 @@ using namespace ::com::sun::star;
using namespace ::comphelper;
VCLXAccessibleComponent::VCLXAccessibleComponent( VCLXWindow* pVCLXWindow )
- : OAccessibleExtendedComponentHelper( new VCLExternalSolarLock )
+ : OAccessibleExtendedComponentHelper( &m_aLock )
, OAccessibleImplementationAccess( )
{
m_xVCLXWindow = pVCLXWindow;
@@ -80,14 +79,6 @@ VCLXAccessibleComponent::~VCLXAccessibleComponent()
{
ensureDisposed();
DisconnectEvents();
-
- delete getExternalLock();
- // This is not completely safe. If we assume that the base class dtor calls some method which
- // uses this lock, the we crash. However, as the base class' dtor does not have a chance to call _out_
- // virtual methods, this is no problem as long as the base class is safe, i.e. does not use the external
- // lock from within it's dtor. At the moment, we _know_ the base class is safe in this respect, so
- // let's assume it keeps this way.
- // @see OAccessibleContextHelper::OAccessibleContextHelper( IMutex* )
}
IMPLEMENT_FORWARD_XINTERFACE3( VCLXAccessibleComponent, OAccessibleExtendedComponentHelper, OAccessibleImplementationAccess, VCLXAccessibleComponent_BASE )
diff --git a/toolkit/source/controls/accessiblecontrolcontext.cxx b/toolkit/source/controls/accessiblecontrolcontext.cxx
index 7cf45ec18fec..155cf83d93ca 100644
--- a/toolkit/source/controls/accessiblecontrolcontext.cxx
+++ b/toolkit/source/controls/accessiblecontrolcontext.cxx
@@ -26,7 +26,6 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <toolkit/helper/vclunohelper.hxx>
-#include <toolkit/helper/externallock.hxx>
#include <vcl/window.hxx>
@@ -46,7 +45,7 @@ namespace toolkit
OAccessibleControlContext::OAccessibleControlContext()
- : OAccessibleControlContext_Base(new VCLExternalSolarLock)
+ : OAccessibleControlContext_Base(&m_aLock)
{
// nothing to do here, we have a late ctor
}