a11y: Move OAccessibleWrapper etc. to svx

OAccessibleWrapper and a couple of related classes
is only used by AccessibleControlShape inside svx,
so move it there from comphelper.

Use the same "accessibility" namespace as other
classes there.

Those classes used to be used elsewhere as well before

    commit 39e0bdb686
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Mar 3 17:42:03 2025 +0100

        tdf#163989 vcl a11y: Rework toolbar item window a11y

Change-Id: Ie56357d943084b34f202510b13e8bb17e07bc125
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185639
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2025-05-22 06:44:36 +02:00
parent ef500b6529
commit ec41ec4e96
10 changed files with 38 additions and 40 deletions

View File

@ -85,7 +85,6 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
comphelper/source/misc/accessiblekeybindinghelper \
comphelper/source/misc/accessibleselectionhelper \
comphelper/source/misc/accessibletexthelper \
comphelper/source/misc/accessiblewrapper \
comphelper/source/misc/AccessibleImplementationHelper \
comphelper/source/misc/anycompare \
comphelper/source/misc/anytohash \
@ -125,7 +124,6 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
comphelper/source/misc/numbers \
comphelper/source/misc/officerestartmanager \
comphelper/source/misc/traceevent \
comphelper/source/misc/proxyaggregation \
comphelper/source/misc/random \
comphelper/source/misc/SelectionMultiplex \
comphelper/source/misc/sequenceashashmap \

View File

@ -165,9 +165,9 @@ void SalCall::handleFunctionDecl(FunctionDecl const* decl)
if (auto recordDecl = dyn_cast<CXXRecordDecl>(decl->getDeclContext()))
{
auto dc = loplugin::DeclCheck(recordDecl);
if (dc.Class("OProxyAggregation").Namespace("comphelper").GlobalNamespace()
if (dc.Class("OProxyAggregation").Namespace("accessibility").GlobalNamespace()
|| dc.Class("OComponentProxyAggregationHelper")
.Namespace("comphelper")
.Namespace("accessibility")
.GlobalNamespace()
|| dc.Class("SvxShapeMaster").GlobalNamespace()
|| dc.Class("ListBoxAccessibleBase").Namespace("accessibility").GlobalNamespace()

View File

@ -43,7 +43,7 @@ namespace com::sun::star {
namespace uno { class XAggregation; }
}
namespace comphelper
namespace accessibility
{
class OWrappedAccessibleChildrenManager;
}
@ -187,7 +187,7 @@ private:
css::uno::Reference< css::lang::XComponent >
m_xControlContextComponent; // cached interface of our aggregate
rtl::Reference<::comphelper::OWrappedAccessibleChildrenManager>
rtl::Reference<::accessibility::OWrappedAccessibleChildrenManager>
m_pChildManager;
bool m_bListeningForName : 1; // are we currently listening for changes of the "Name" property?

View File

@ -1237,7 +1237,6 @@ comphelper/source/misc/accessibleeventnotifier.cxx
comphelper/source/misc/accessiblekeybindinghelper.cxx
comphelper/source/misc/accessibleselectionhelper.cxx
comphelper/source/misc/accessibletexthelper.cxx
comphelper/source/misc/accessiblewrapper.cxx
comphelper/source/misc/anycompare.cxx
comphelper/source/misc/anytohash.cxx
comphelper/source/misc/anytostring.cxx
@ -1267,7 +1266,6 @@ comphelper/source/misc/numberedcollection.cxx
comphelper/source/misc/numbers.cxx
comphelper/source/misc/officerestartmanager.cxx
comphelper/source/misc/officerestartmanager.hxx
comphelper/source/misc/proxyaggregation.cxx
comphelper/source/misc/sequenceashashmap.cxx
comphelper/source/misc/sharedmutex.cxx
comphelper/source/misc/solarmutex.cxx
@ -4724,7 +4722,6 @@ include/comphelper/accessibleeventnotifier.hxx
include/comphelper/accessiblekeybindinghelper.hxx
include/comphelper/accessibleselectionhelper.hxx
include/comphelper/accessibletexthelper.hxx
include/comphelper/accessiblewrapper.hxx
include/comphelper/anycompare.hxx
include/comphelper/asyncnotification.hxx
include/comphelper/attributelist.hxx
@ -4775,7 +4772,6 @@ include/comphelper/propertysetinfo.hxx
include/comphelper/propertystatecontainer.hxx
include/comphelper/propmultiplex.hxx
include/comphelper/propstate.hxx
include/comphelper/proxyaggregation.hxx
include/comphelper/scopeguard.hxx
include/comphelper/seekableinput.hxx
include/comphelper/seqstream.hxx
@ -11167,7 +11163,11 @@ svx/source/accessibility/ChildrenManagerImpl.hxx
svx/source/accessibility/GraphCtlAccessibleContext.cxx
svx/source/accessibility/ShapeTypeHandler.cxx
svx/source/accessibility/SvxShapeTypes.cxx
svx/source/accessibility/accessiblewrapper.cxx
svx/source/accessibility/accessiblewrapper.hxx
svx/source/accessibility/charmapacc.cxx
svx/source/accessibility/proxyaggregation.cxx
svx/source/accessibility/proxyaggregation.hxx
svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
svx/source/accessibility/svxrectctaccessiblecontext.cxx
svx/source/core/extedit.cxx

View File

@ -110,7 +110,9 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/accessibility/GraphCtlAccessibleContext \
svx/source/accessibility/ShapeTypeHandler \
svx/source/accessibility/SvxShapeTypes \
svx/source/accessibility/accessiblewrapper \
svx/source/accessibility/lookupcolorname \
svx/source/accessibility/proxyaggregation \
))
endif

View File

@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "accessiblewrapper.hxx"
#include <svx/AccessibleControlShape.hxx>
#include <svx/AccessibleShapeInfo.hxx>
#include <DescriptionGenerator.hxx>
@ -38,7 +40,6 @@
#include <svx/svdouno.hxx>
#include <svx/ShapeTypeHandler.hxx>
#include <svx/SvxShapeTypes.hxx>
#include <comphelper/accessiblewrapper.hxx>
#include <svx/svdview.hxx>
#include <svx/svdpagv.hxx>
#include <svx/strings.hrc>
@ -101,7 +102,7 @@ AccessibleControlShape::AccessibleControlShape (
, m_bDisposeNativeContext( false )
, m_bWaitingForControl( false )
{
m_pChildManager = new comphelper::OWrappedAccessibleChildrenManager( comphelper::getProcessComponentContext() );
m_pChildManager = new OWrappedAccessibleChildrenManager( comphelper::getProcessComponentContext() );
osl_atomic_increment( &m_refCount );
{

View File

@ -17,7 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <comphelper/accessiblewrapper.hxx>
#include "accessiblewrapper.hxx"
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@ -27,7 +28,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
namespace comphelper
namespace accessibility
{
OWrappedAccessibleChildrenManager::OWrappedAccessibleChildrenManager( const Reference< XComponentContext >& _rxContext )
:m_xContext( _rxContext )

View File

@ -22,9 +22,10 @@
#include <config_options.h>
#include <sal/config.h>
#include "proxyaggregation.hxx"
#include <map>
#include <comphelper/proxyaggregation.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
@ -36,13 +37,12 @@
#include <comphelper/uno3.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <comphelper/accessibleeventnotifier.hxx>
#include <comphelper/comphelperdllapi.h>
#include <rtl/ref.hxx>
#include <unotools/weakref.hxx>
namespace com::sun::star::uno { class XComponentContext; }
namespace comphelper
namespace accessibility
{
//= OAccessibleWrapper
@ -55,8 +55,7 @@ using OAccessibleWrapper_Base = cppu::ImplHelper1<css::accessibility::XAccessibl
/** a class which aggregates a proxy for an XAccessible, and wrapping the context returned by this
XAccessible.
*/
class UNLESS_MERGELIBS_MORE(COMPHELPER_DLLPUBLIC) OAccessibleWrapper final : public OAccessibleWrapper_Base
,public OComponentProxyAggregation
class OAccessibleWrapper final : public OAccessibleWrapper_Base, public OComponentProxyAggregation
{
private:
@ -123,9 +122,8 @@ typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleEventListener
@seealso OAccessibleContextWrapper
*/
class UNLESS_MERGELIBS_MORE(COMPHELPER_DLLPUBLIC) OAccessibleContextWrapperHelper
:private OComponentProxyAggregationHelper
,public OAccessibleContextWrapperHelper_Base
class OAccessibleContextWrapperHelper : private OComponentProxyAggregationHelper,
public OAccessibleContextWrapperHelper_Base
{
protected:
/// the context we're wrapping (properly typed, in opposite to OComponentProxyAggregationHelper::m_xInner)
@ -215,10 +213,9 @@ typedef ::cppu::WeakComponentImplHelper< css::accessibility::XAccessibleEvent
, css::accessibility::XAccessibleContext
> OAccessibleContextWrapper_CBase;
class UNLESS_MERGELIBS_MORE(COMPHELPER_DLLPUBLIC) OAccessibleContextWrapper final
:public cppu::BaseMutex
,public OAccessibleContextWrapper_CBase
,public OAccessibleContextWrapperHelper
class OAccessibleContextWrapper final : public cppu::BaseMutex,
public OAccessibleContextWrapper_CBase,
public OAccessibleContextWrapperHelper
{
private:
::comphelper::AccessibleEventNotifier::TClientId m_nNotifierClient; // for notifying AccessibleEvents
@ -294,7 +291,7 @@ private:
typedef ::std::map < css::uno::Reference< css::accessibility::XAccessible >
, rtl::Reference< comphelper::OAccessibleWrapper >
, rtl::Reference<OAccessibleWrapper >
> AccessibleMap;
// TODO: think about if we should hold these objects weak
@ -302,7 +299,7 @@ typedef ::cppu::WeakImplHelper< css::lang::XEventListener
> OWrappedAccessibleChildrenManager_Base;
/** manages wrapping XAccessible's to XAccessible's
*/
class UNLESS_MERGELIBS(COMPHELPER_DLLPUBLIC) OWrappedAccessibleChildrenManager final : public OWrappedAccessibleChildrenManager_Base
class OWrappedAccessibleChildrenManager final : public OWrappedAccessibleChildrenManager_Base
{
css::uno::Reference< css::uno::XComponentContext >
m_xContext;

View File

@ -19,13 +19,14 @@
#include <sal/config.h>
#include "proxyaggregation.hxx"
#include <cassert>
#include <comphelper/proxyaggregation.hxx>
#include <com/sun/star/reflection/ProxyFactory.hpp>
namespace comphelper
namespace accessibility
{
@ -237,7 +238,7 @@ namespace comphelper
}
} // namespace comphelper
} // namespace accessibility
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -25,7 +25,6 @@
#include <cppuhelper/basemutex.hxx>
#include <comphelper/uno3.hxx>
#include <cppuhelper/compbase_ex.hxx>
#include <comphelper/comphelperdllapi.h>
namespace com::sun::star::uno {
class XComponentContext;
@ -71,7 +70,7 @@ namespace com::sun::star::lang { class XComponent; }
*/
namespace comphelper
namespace accessibility
{
@ -126,9 +125,8 @@ namespace comphelper
calls which your derived class gets to the dispose method of this class.</p>
*/
class UNLESS_MERGELIBS_MORE(COMPHELPER_DLLPUBLIC) OComponentProxyAggregationHelper
: public ::cppu::ImplHelper1<css::lang::XEventListener>,
private OProxyAggregation
class OComponentProxyAggregationHelper : public ::cppu::ImplHelper1<css::lang::XEventListener>,
private OProxyAggregation
{
private:
typedef ::cppu::ImplHelper1 < css::lang::XEventListener
@ -178,9 +176,9 @@ namespace comphelper
//= OComponentProxyAggregation
class UNLESS_MERGELIBS_MORE(COMPHELPER_DLLPUBLIC) OComponentProxyAggregation : public cppu::BaseMutex
,public cppu::WeakComponentImplHelperBase
,public OComponentProxyAggregationHelper
class OComponentProxyAggregation : public cppu::BaseMutex,
public cppu::WeakComponentImplHelperBase,
public OComponentProxyAggregationHelper
{
protected:
OComponentProxyAggregation(
@ -210,6 +208,6 @@ namespace comphelper
};
} // namespace comphelper
} // namespace accessibility
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */