Kaydet (Commit) 6b886694 authored tarafından Noel Grandin's avatar Noel Grandin

std::list->std::vector in SwAccessibleMap

Change-Id: I8820405b7565e8ec4aff72bd24ddd252d95422e5
Reviewed-on: https://gerrit.libreoffice.org/52530Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 919ffe37
......@@ -29,7 +29,6 @@
#include <svx/AccessibleControlShape.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <list>
#include <vector>
#include <memory>
#include <set>
......@@ -67,7 +66,7 @@ namespace vcl { class Window; }
// the XShape at the same time (indirectly by destroying the accessible
// shape) leads to an assert, because a client of the Modify is destroyed
// within a Modify call.
using SwShapeList_Impl = std::list<css::uno::Reference<css::drawing::XShape>>;
using SwShapeList_Impl = std::vector<css::uno::Reference<css::drawing::XShape>>;
enum class AccessibleStates
{
......@@ -95,7 +94,7 @@ class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder,
::osl::Mutex maEventMutex;
SwAccessibleContextMap_Impl *mpFrameMap;
SwAccessibleShapeMap_Impl *mpShapeMap;
SwShapeList_Impl *mpShapes;
SwShapeList_Impl mvShapes;
SwAccessibleEventList_Impl *mpEvents;
SwAccessibleEventMap_Impl *mpEventMap;
// #i27301 data structure to keep information about
......
......@@ -1636,7 +1636,6 @@ void SwAccessibleMap::DoInvalidateShapeFocus()
SwAccessibleMap::SwAccessibleMap( SwViewShell *pSh ) :
mpFrameMap( nullptr ),
mpShapeMap( nullptr ),
mpShapes( nullptr ),
mpEvents( nullptr ),
mpEventMap( nullptr ),
mpSelectedParas( nullptr ),
......@@ -1699,8 +1698,7 @@ SwAccessibleMap::~SwAccessibleMap()
mpFrameMap = nullptr;
delete mpShapeMap;
mpShapeMap = nullptr;
delete mpShapes;
mpShapes = nullptr;
mvShapes.clear();
delete mpSelectedParas;
mpSelectedParas = nullptr;
}
......@@ -2237,9 +2235,7 @@ void SwAccessibleMap::A11yDispose( const SwFrame *pFrame,
uno::UNO_QUERY );
if( xShape.is() )
{
if( !mpShapes )
mpShapes = new SwShapeList_Impl;
mpShapes->push_back( xShape );
mvShapes.push_back( xShape );
}
}
}
......@@ -3024,11 +3020,7 @@ void SwAccessibleMap::FireEvents()
}
{
osl::MutexGuard aGuard( maMutex );
if( mpShapes )
{
delete mpShapes;
mpShapes = nullptr;
}
mvShapes.clear();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment