editeng a11y: Pass bullet's child index in ctor
... instead of having a separate getter, AccessibleImageBullet::SetIndexInParent. Change-Id: Ie0e59f87e12d04efd72aa5663c4a3eb0df9baf21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183829 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -584,11 +584,10 @@ uno::Reference< XAccessible > SAL_CALL AccessibleEditableTextPara::getAccessible
|
|||||||
if( !aChild.is() )
|
if( !aChild.is() )
|
||||||
{
|
{
|
||||||
// there is no hard reference available, create object then
|
// there is no hard reference available, create object then
|
||||||
aChild = new AccessibleImageBullet(this);
|
aChild = new AccessibleImageBullet(this, i);
|
||||||
|
|
||||||
aChild->SetEditSource( &GetEditSource() );
|
aChild->SetEditSource( &GetEditSource() );
|
||||||
aChild->SetParagraphIndex( GetParagraphIndex() );
|
aChild->SetParagraphIndex( GetParagraphIndex() );
|
||||||
aChild->SetIndexInParent( i );
|
|
||||||
|
|
||||||
maImageBullet = aChild.get();
|
maImageBullet = aChild.get();
|
||||||
}
|
}
|
||||||
|
@@ -49,9 +49,10 @@ using namespace ::com::sun::star::accessibility;
|
|||||||
namespace accessibility
|
namespace accessibility
|
||||||
{
|
{
|
||||||
|
|
||||||
AccessibleImageBullet::AccessibleImageBullet ( uno::Reference< XAccessible > xParent ) :
|
AccessibleImageBullet::AccessibleImageBullet(uno::Reference<XAccessible> xParent,
|
||||||
|
sal_Int64 nIndexInParent) :
|
||||||
mnParagraphIndex( 0 ),
|
mnParagraphIndex( 0 ),
|
||||||
mnIndexInParent( 0 ),
|
mnIndexInParent(nIndexInParent),
|
||||||
mpEditSource( nullptr ),
|
mpEditSource( nullptr ),
|
||||||
maEEOffset( 0, 0 ),
|
maEEOffset( 0, 0 ),
|
||||||
mxParent(std::move( xParent ))
|
mxParent(std::move( xParent ))
|
||||||
@@ -216,11 +217,6 @@ uno::Sequence< OUString > SAL_CALL AccessibleImageBullet::getSupportedServiceNam
|
|||||||
return { u"com.sun.star.accessibility.AccessibleContext"_ustr };
|
return { u"com.sun.star.accessibility.AccessibleContext"_ustr };
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccessibleImageBullet::SetIndexInParent( sal_Int32 nIndex )
|
|
||||||
{
|
|
||||||
mnIndexInParent = nIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AccessibleImageBullet::SetEEOffset( const Point& rOffset )
|
void AccessibleImageBullet::SetEEOffset( const Point& rOffset )
|
||||||
{
|
{
|
||||||
maEEOffset = rOffset;
|
maEEOffset = rOffset;
|
||||||
|
@@ -44,7 +44,8 @@ class AccessibleImageBullet final
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/// Create accessible object for given parent
|
/// Create accessible object for given parent
|
||||||
AccessibleImageBullet ( css::uno::Reference< css::accessibility::XAccessible > xParent );
|
AccessibleImageBullet(css::uno::Reference<css::accessibility::XAccessible> xParent,
|
||||||
|
sal_Int64 nIndexInParent);
|
||||||
|
|
||||||
// XAccessible
|
// XAccessible
|
||||||
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) override;
|
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) override;
|
||||||
@@ -72,15 +73,6 @@ public:
|
|||||||
virtual sal_Bool SAL_CALL supportsService (const OUString& sServiceName) override;
|
virtual sal_Bool SAL_CALL supportsService (const OUString& sServiceName) override;
|
||||||
virtual css::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() override;
|
virtual css::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() override;
|
||||||
|
|
||||||
/** Set the current index in the accessibility parent
|
|
||||||
|
|
||||||
@attention This method does not lock the SolarMutex,
|
|
||||||
leaving that to the calling code. This is because only
|
|
||||||
there potential deadlock situations can be resolved. Thus,
|
|
||||||
make sure SolarMutex is locked when calling this.
|
|
||||||
*/
|
|
||||||
void SetIndexInParent( sal_Int32 nIndex );
|
|
||||||
|
|
||||||
/** Set the edit engine offset
|
/** Set the edit engine offset
|
||||||
|
|
||||||
@attention This method does not lock the SolarMutex,
|
@attention This method does not lock the SolarMutex,
|
||||||
|
Reference in New Issue
Block a user