drop enum IAccessibleViewForwarderListener::ChangeType
since only one of it's values was in use, and simplify the ViewForwarderChanged method as a consequence. Change-Id: I00544c9b0a601c01e49519be5bafe192c6f735f6
This commit is contained in:
@@ -323,8 +323,7 @@ public:
|
|||||||
throw (css::uno::RuntimeException, std::exception) override;
|
throw (css::uno::RuntimeException, std::exception) override;
|
||||||
|
|
||||||
//===== IAccessibleViewForwarderListener ================================
|
//===== IAccessibleViewForwarderListener ================================
|
||||||
virtual void ViewForwarderChanged (ChangeType aChangeType,
|
virtual void ViewForwarderChanged() override;
|
||||||
const IAccessibleViewForwarder* pViewForwarder) override;
|
|
||||||
|
|
||||||
//===== lang::XEventListener ============================================
|
//===== lang::XEventListener ============================================
|
||||||
|
|
||||||
|
@@ -192,9 +192,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void RemoveFocus();
|
void RemoveFocus();
|
||||||
|
|
||||||
void ViewForwarderChanged(
|
void ViewForwarderChanged();
|
||||||
IAccessibleViewForwarderListener::ChangeType aChangeType,
|
|
||||||
const IAccessibleViewForwarder* pViewForwarder);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
rtl::Reference<ChildrenManagerImpl> mpImpl;
|
rtl::Reference<ChildrenManagerImpl> mpImpl;
|
||||||
|
@@ -39,25 +39,11 @@ class IAccessibleViewForwarder;
|
|||||||
class IAccessibleViewForwarderListener
|
class IAccessibleViewForwarderListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Enumeration of the different change types.
|
|
||||||
*/
|
|
||||||
enum ChangeType {TRANSFORMATION, VISIBLE_AREA, STATE};
|
|
||||||
|
|
||||||
/** This method is called to indicate a change of the specified view
|
/** This method is called to indicate a change of the specified view
|
||||||
forwarder.
|
forwarder, specifically, a change in visible area.
|
||||||
@param aChangeType
|
|
||||||
The type of the change. TRANSFORMATION indicates a change of
|
|
||||||
the coordinate transformation with a constant visible area. If
|
|
||||||
the visible area changes, just use VISIBLE_AREA. This changes
|
|
||||||
the transformation implicitly. The value STATE indicates a
|
|
||||||
change of the validity state. Check the IsValid method of the
|
|
||||||
view forwarder before doing further calls.
|
|
||||||
@param pViewForwarder
|
|
||||||
The modified view forwarder. It is specified just in case that
|
|
||||||
there is more than one view forwarder in use at the same time.
|
|
||||||
*/
|
*/
|
||||||
virtual void ViewForwarderChanged (ChangeType aChangeType,
|
virtual void ViewForwarderChanged() = 0;
|
||||||
const IAccessibleViewForwarder* pViewForwarder) = 0;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~IAccessibleViewForwarderListener() {}
|
~IAccessibleViewForwarderListener() {}
|
||||||
|
@@ -1377,13 +1377,12 @@ namespace
|
|||||||
{
|
{
|
||||||
struct ScVisAreaChanged
|
struct ScVisAreaChanged
|
||||||
{
|
{
|
||||||
ScAccessibleDocument* mpAccDoc;
|
explicit ScVisAreaChanged() {}
|
||||||
explicit ScVisAreaChanged(ScAccessibleDocument* pAccDoc) : mpAccDoc(pAccDoc) {}
|
|
||||||
void operator() (const ScAccessibleShapeData* pAccShapeData) const
|
void operator() (const ScAccessibleShapeData* pAccShapeData) const
|
||||||
{
|
{
|
||||||
if (pAccShapeData && pAccShapeData->pAccShape.is())
|
if (pAccShapeData && pAccShapeData->pAccShape.is())
|
||||||
{
|
{
|
||||||
pAccShapeData->pAccShape->ViewForwarderChanged(::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA, mpAccDoc);
|
pAccShapeData->pAccShape->ViewForwarderChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1391,7 +1390,7 @@ namespace
|
|||||||
|
|
||||||
void ScChildrenShapes::VisAreaChanged() const
|
void ScChildrenShapes::VisAreaChanged() const
|
||||||
{
|
{
|
||||||
ScVisAreaChanged aVisAreaChanged(mpAccessibleDocument);
|
ScVisAreaChanged aVisAreaChanged;
|
||||||
std::for_each(maZOrderedShapes.begin(), maZOrderedShapes.end(), aVisAreaChanged);
|
std::for_each(maZOrderedShapes.begin(), maZOrderedShapes.end(), aVisAreaChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -806,7 +806,7 @@ namespace
|
|||||||
{
|
{
|
||||||
if (rAccShapeData.mpAccShape.is())
|
if (rAccShapeData.mpAccShape.is())
|
||||||
{
|
{
|
||||||
rAccShapeData.mpAccShape->ViewForwarderChanged(::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA, mpViewForwarder);
|
rAccShapeData.mpAccShape->ViewForwarderChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -212,7 +212,7 @@ IMPL_LINK_TYPED(AccessibleDocumentViewBase, WindowChildEventListener,
|
|||||||
|
|
||||||
//===== IAccessibleViewForwarderListener ====================================
|
//===== IAccessibleViewForwarderListener ====================================
|
||||||
|
|
||||||
void AccessibleDocumentViewBase::ViewForwarderChanged(ChangeType, const IAccessibleViewForwarder* )
|
void AccessibleDocumentViewBase::ViewForwarderChanged()
|
||||||
{
|
{
|
||||||
// Empty
|
// Empty
|
||||||
}
|
}
|
||||||
@@ -558,9 +558,7 @@ void SAL_CALL
|
|||||||
if( IsDisposed() )
|
if( IsDisposed() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ViewForwarderChanged (
|
ViewForwarderChanged();
|
||||||
IAccessibleViewForwarderListener::VISIBLE_AREA,
|
|
||||||
&maViewForwarder);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL
|
void SAL_CALL
|
||||||
@@ -570,9 +568,7 @@ void SAL_CALL
|
|||||||
if( IsDisposed() )
|
if( IsDisposed() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ViewForwarderChanged (
|
ViewForwarderChanged();
|
||||||
IAccessibleViewForwarderListener::VISIBLE_AREA,
|
|
||||||
&maViewForwarder);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL
|
void SAL_CALL
|
||||||
@@ -582,9 +578,7 @@ void SAL_CALL
|
|||||||
if( IsDisposed() )
|
if( IsDisposed() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ViewForwarderChanged (
|
ViewForwarderChanged();
|
||||||
IAccessibleViewForwarderListener::VISIBLE_AREA,
|
|
||||||
&maViewForwarder);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL
|
void SAL_CALL
|
||||||
@@ -594,9 +588,7 @@ void SAL_CALL
|
|||||||
if( IsDisposed() )
|
if( IsDisposed() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ViewForwarderChanged (
|
ViewForwarderChanged();
|
||||||
IAccessibleViewForwarderListener::VISIBLE_AREA,
|
|
||||||
&maViewForwarder);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===== XFocusListener ==================================================
|
//===== XFocusListener ==================================================
|
||||||
|
@@ -123,12 +123,11 @@ void AccessibleDrawDocumentView::Init()
|
|||||||
mpChildrenManager->UpdateSelection ();
|
mpChildrenManager->UpdateSelection ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccessibleDrawDocumentView::ViewForwarderChanged (ChangeType aChangeType,
|
void AccessibleDrawDocumentView::ViewForwarderChanged()
|
||||||
const IAccessibleViewForwarder* pViewForwarder)
|
|
||||||
{
|
{
|
||||||
AccessibleDocumentViewBase::ViewForwarderChanged (aChangeType, pViewForwarder);
|
AccessibleDocumentViewBase::ViewForwarderChanged();
|
||||||
if (mpChildrenManager != nullptr)
|
if (mpChildrenManager != nullptr)
|
||||||
mpChildrenManager->ViewForwarderChanged (aChangeType, pViewForwarder);
|
mpChildrenManager->ViewForwarderChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The page shape is created on every call at the moment (provided that
|
/** The page shape is created on every call at the moment (provided that
|
||||||
@@ -335,9 +334,7 @@ void SAL_CALL
|
|||||||
{
|
{
|
||||||
OSL_TRACE (" visible area changed");
|
OSL_TRACE (" visible area changed");
|
||||||
if (mpChildrenManager != nullptr)
|
if (mpChildrenManager != nullptr)
|
||||||
mpChildrenManager->ViewForwarderChanged (
|
mpChildrenManager->ViewForwarderChanged();
|
||||||
IAccessibleViewForwarderListener::VISIBLE_AREA,
|
|
||||||
&maViewForwarder);
|
|
||||||
}
|
}
|
||||||
else if (rEventObject.PropertyName == "ActiveLayer")
|
else if (rEventObject.PropertyName == "ActiveLayer")
|
||||||
{
|
{
|
||||||
|
@@ -103,10 +103,9 @@ void AccessibleOutlineView::Init()
|
|||||||
AccessibleDocumentViewBase::Init ();
|
AccessibleDocumentViewBase::Init ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccessibleOutlineView::ViewForwarderChanged (ChangeType aChangeType,
|
void AccessibleOutlineView::ViewForwarderChanged()
|
||||||
const IAccessibleViewForwarder* pViewForwarder)
|
|
||||||
{
|
{
|
||||||
AccessibleDocumentViewBase::ViewForwarderChanged (aChangeType, pViewForwarder);
|
AccessibleDocumentViewBase::ViewForwarderChanged();
|
||||||
|
|
||||||
UpdateChildren();
|
UpdateChildren();
|
||||||
}
|
}
|
||||||
|
@@ -134,8 +134,7 @@ public:
|
|||||||
windowResized... methods it will be sufficient in most cases just to
|
windowResized... methods it will be sufficient in most cases just to
|
||||||
override this method.
|
override this method.
|
||||||
*/
|
*/
|
||||||
virtual void ViewForwarderChanged (ChangeType aChangeType,
|
virtual void ViewForwarderChanged() override;
|
||||||
const IAccessibleViewForwarder* pViewForwarder) override;
|
|
||||||
|
|
||||||
//===== XAccessibleContext ==============================================
|
//===== XAccessibleContext ==============================================
|
||||||
|
|
||||||
|
@@ -54,8 +54,7 @@ public:
|
|||||||
|
|
||||||
//===== IAccessibleViewForwarderListener ================================
|
//===== IAccessibleViewForwarderListener ================================
|
||||||
|
|
||||||
virtual void ViewForwarderChanged (ChangeType aChangeType,
|
virtual void ViewForwarderChanged() override;
|
||||||
const IAccessibleViewForwarder* pViewForwarder) override;
|
|
||||||
|
|
||||||
//===== XAccessibleContext ==============================================
|
//===== XAccessibleContext ==============================================
|
||||||
|
|
||||||
|
@@ -52,8 +52,7 @@ public:
|
|||||||
|
|
||||||
//===== IAccessibleViewForwarderListener ================================
|
//===== IAccessibleViewForwarderListener ================================
|
||||||
|
|
||||||
virtual void ViewForwarderChanged (ChangeType aChangeType,
|
virtual void ViewForwarderChanged() override;
|
||||||
const IAccessibleViewForwarder* pViewForwarder) override;
|
|
||||||
|
|
||||||
//===== XAccessibleContext ==============================================
|
//===== XAccessibleContext ==============================================
|
||||||
|
|
||||||
|
@@ -1087,8 +1087,7 @@ sal_Int64 SAL_CALL
|
|||||||
}
|
}
|
||||||
|
|
||||||
// IAccessibleViewForwarderListener
|
// IAccessibleViewForwarderListener
|
||||||
void AccessibleShape::ViewForwarderChanged (ChangeType aChangeType,
|
void AccessibleShape::ViewForwarderChanged()
|
||||||
const IAccessibleViewForwarder* pViewForwarder)
|
|
||||||
{
|
{
|
||||||
// Inform all listeners that the graphical representation (i.e. size
|
// Inform all listeners that the graphical representation (i.e. size
|
||||||
// and/or position) of the shape has changed.
|
// and/or position) of the shape has changed.
|
||||||
@@ -1098,7 +1097,7 @@ void AccessibleShape::ViewForwarderChanged (ChangeType aChangeType,
|
|||||||
|
|
||||||
// Tell children manager of the modified view forwarder.
|
// Tell children manager of the modified view forwarder.
|
||||||
if (mpChildrenManager != nullptr)
|
if (mpChildrenManager != nullptr)
|
||||||
mpChildrenManager->ViewForwarderChanged (aChangeType, pViewForwarder);
|
mpChildrenManager->ViewForwarderChanged();
|
||||||
|
|
||||||
// update our children that our screen position might have changed
|
// update our children that our screen position might have changed
|
||||||
if( mpText )
|
if( mpText )
|
||||||
|
@@ -115,11 +115,9 @@ void ChildrenManager::RemoveFocus()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// IAccessibleViewForwarderListener
|
// IAccessibleViewForwarderListener
|
||||||
void ChildrenManager::ViewForwarderChanged(
|
void ChildrenManager::ViewForwarderChanged()
|
||||||
IAccessibleViewForwarderListener::ChangeType aChangeType,
|
|
||||||
const IAccessibleViewForwarder* pViewForwarder)
|
|
||||||
{
|
{
|
||||||
mpImpl->ViewForwarderChanged (aChangeType, pViewForwarder);
|
mpImpl->ViewForwarderChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end of namespace accessibility
|
} // end of namespace accessibility
|
||||||
|
@@ -403,9 +403,7 @@ void ChildrenManagerImpl::SendVisibleAreaEvents (
|
|||||||
// as a result of a change of the view forwarder).
|
// as a result of a change of the view forwarder).
|
||||||
AccessibleShape* pShape = I->GetAccessibleShape ();
|
AccessibleShape* pShape = I->GetAccessibleShape ();
|
||||||
if (pShape != nullptr)
|
if (pShape != nullptr)
|
||||||
pShape->ViewForwarderChanged (
|
pShape->ViewForwarderChanged();
|
||||||
IAccessibleViewForwarderListener::VISIBLE_AREA,
|
|
||||||
maShapeTreeInfo.GetViewForwarder());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -729,22 +727,9 @@ void SAL_CALL ChildrenManagerImpl::disposing()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// IAccessibleViewForwarderListener
|
// IAccessibleViewForwarderListener
|
||||||
void ChildrenManagerImpl::ViewForwarderChanged (ChangeType aChangeType,
|
void ChildrenManagerImpl::ViewForwarderChanged()
|
||||||
const IAccessibleViewForwarder* pViewForwarder)
|
|
||||||
{
|
{
|
||||||
if (aChangeType == IAccessibleViewForwarderListener::VISIBLE_AREA)
|
Update(false);
|
||||||
Update (false);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SolarMutexGuard g;
|
|
||||||
ChildDescriptorListType::const_iterator aEnd = maVisibleChildren.end();
|
|
||||||
for (ChildDescriptorListType::iterator I=maVisibleChildren.begin(); I != aEnd; ++I)
|
|
||||||
{
|
|
||||||
AccessibleShape* pShape = I->GetAccessibleShape();
|
|
||||||
if (pShape != nullptr)
|
|
||||||
pShape->ViewForwarderChanged (aChangeType, pViewForwarder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// IAccessibleParent
|
// IAccessibleParent
|
||||||
|
@@ -262,8 +262,7 @@ public:
|
|||||||
@param pViewForwarder
|
@param pViewForwarder
|
||||||
The modified view forwarder. Use this one from now on.
|
The modified view forwarder. Use this one from now on.
|
||||||
*/
|
*/
|
||||||
virtual void ViewForwarderChanged (ChangeType aChangeType,
|
virtual void ViewForwarderChanged() override;
|
||||||
const IAccessibleViewForwarder* pViewForwarder) override;
|
|
||||||
|
|
||||||
// IAccessibleParent
|
// IAccessibleParent
|
||||||
/** Replace the specified child with a replacement.
|
/** Replace the specified child with a replacement.
|
||||||
@@ -393,7 +392,7 @@ private:
|
|||||||
Events are sent to all entries of this list that already contain
|
Events are sent to all entries of this list that already contain
|
||||||
an accessible object.
|
an accessible object.
|
||||||
*/
|
*/
|
||||||
void SendVisibleAreaEvents (ChildDescriptorListType& raChildList);
|
static void SendVisibleAreaEvents (ChildDescriptorListType& raChildList);
|
||||||
|
|
||||||
/** If children have to be created immediately and not on demand the
|
/** If children have to be created immediately and not on demand the
|
||||||
create the missing accessible objects now.
|
create the missing accessible objects now.
|
||||||
|
@@ -492,7 +492,7 @@ Sequence<OUString> SAL_CALL AccessibleCell::getSupportedServiceNames() throw (Ru
|
|||||||
// IAccessibleViewForwarderListener
|
// IAccessibleViewForwarderListener
|
||||||
|
|
||||||
|
|
||||||
void AccessibleCell::ViewForwarderChanged (ChangeType /*aChangeType*/, const IAccessibleViewForwarder* /*pViewForwarder*/)
|
void AccessibleCell::ViewForwarderChanged()
|
||||||
{
|
{
|
||||||
// Inform all listeners that the graphical representation (i.e. size
|
// Inform all listeners that the graphical representation (i.e. size
|
||||||
// and/or position) of the shape has changed.
|
// and/or position) of the shape has changed.
|
||||||
|
@@ -101,7 +101,7 @@ public:
|
|||||||
virtual css::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
|
virtual css::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
|
||||||
|
|
||||||
// IAccessibleViewForwarderListener
|
// IAccessibleViewForwarderListener
|
||||||
virtual void ViewForwarderChanged (ChangeType aChangeType, const IAccessibleViewForwarder* pViewForwarder) override;
|
virtual void ViewForwarderChanged() override;
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
|
|
||||||
|
@@ -227,9 +227,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrame *pFrame,
|
|||||||
{
|
{
|
||||||
case Action::SCROLLED:
|
case Action::SCROLLED:
|
||||||
case Action::SCROLLED_WITHIN:
|
case Action::SCROLLED_WITHIN:
|
||||||
xAccImpl->ViewForwarderChanged(
|
xAccImpl->ViewForwarderChanged();
|
||||||
::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA,
|
|
||||||
GetMap() );
|
|
||||||
break;
|
break;
|
||||||
case Action::SCROLLED_IN:
|
case Action::SCROLLED_IN:
|
||||||
ScrolledInShape( rLower.GetDrawObject(),
|
ScrolledInShape( rLower.GetDrawObject(),
|
||||||
@@ -237,9 +235,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrame *pFrame,
|
|||||||
break;
|
break;
|
||||||
case Action::SCROLLED_OUT:
|
case Action::SCROLLED_OUT:
|
||||||
{
|
{
|
||||||
xAccImpl->ViewForwarderChanged(
|
xAccImpl->ViewForwarderChanged();
|
||||||
::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA,
|
|
||||||
GetMap() );
|
|
||||||
// this DisposeShape call was removed by
|
// this DisposeShape call was removed by
|
||||||
// IAccessibility2 implementation
|
// IAccessibility2 implementation
|
||||||
// without giving any reason why
|
// without giving any reason why
|
||||||
|
Reference in New Issue
Block a user