Bug 767264 - remove uses of do_QueryObject() in CAccessibleHyperlink, r=tbsaunde

--HG--
rename : accessible/src/msaa/CAccessibleHyperlink.cpp => accessible/src/msaa/ia2AccessibleHyperlink.cpp
rename : accessible/src/msaa/CAccessibleHyperlink.h => accessible/src/msaa/ia2AccessibleHyperlink.h
This commit is contained in:
Mark Capella 2012-06-26 04:18:48 -04:00
parent 16cfb01461
commit 5fcd8d777d
5 changed files with 18 additions and 21 deletions

View File

@ -103,7 +103,7 @@ __try {
}
if (NULL == *ppv) {
HRESULT hr = CAccessibleHyperlink::QueryInterface(iid, ppv);
HRESULT hr = ia2AccessibleHyperlink::QueryInterface(iid, ppv);
if (SUCCEEDED(hr))
return hr;
}

View File

@ -14,7 +14,7 @@
#include "Accessible.h"
#include "Accessible2.h"
#include "ia2AccessibleComponent.h"
#include "CAccessibleHyperlink.h"
#include "ia2AccessibleHyperlink.h"
#include "CAccessibleValue.h"
#define DECL_IUNKNOWN_INHERITED \
@ -65,7 +65,7 @@ Class::QueryInterface(REFIID iid, void** ppv) \
class AccessibleWrap : public Accessible,
public ia2AccessibleComponent,
public CAccessibleHyperlink,
public ia2AccessibleHyperlink,
public CAccessibleValue,
public IAccessible2
{

View File

@ -26,7 +26,6 @@ CPPSRCS = \
nsAccessNodeWrap.cpp \
nsHTMLWin32ObjectAccessible.cpp \
nsWinUtils.cpp \
CAccessibleHyperlink.cpp \
CAccessibleTable.cpp \
CAccessibleTableCell.cpp \
CAccessibleValue.cpp \
@ -36,6 +35,7 @@ CPPSRCS = \
ia2AccessibleComponent.cpp \
ia2AccessibleEditableText.cpp \
ia2AccessibleImage.cpp \
ia2AccessibleHyperlink.cpp \
ia2AccessibleHypertext.cpp \
ia2AccessibleRelation.cpp \
ia2AccessibleText.cpp \

View File

@ -5,8 +5,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "CAccessibleHyperlink.h"
#include "Accessible2.h"
#include "AccessibleHyperlink.h"
#include "AccessibleHyperlink_i.c"
@ -17,13 +15,12 @@
// IUnknown
STDMETHODIMP
CAccessibleHyperlink::QueryInterface(REFIID iid, void** ppv)
ia2AccessibleHyperlink::QueryInterface(REFIID iid, void** ppv)
{
*ppv = NULL;
if (IID_IAccessibleHyperlink == iid) {
nsRefPtr<Accessible> thisObj = do_QueryObject(this);
if (!thisObj->IsLink())
if (!static_cast<AccessibleWrap*>(this)->IsLink())
return E_NOINTERFACE;
*ppv = static_cast<IAccessibleHyperlink*>(this);
@ -37,12 +34,12 @@ CAccessibleHyperlink::QueryInterface(REFIID iid, void** ppv)
// IAccessibleHyperlink
STDMETHODIMP
CAccessibleHyperlink::get_anchor(long aIndex, VARIANT *aAnchor)
ia2AccessibleHyperlink::get_anchor(long aIndex, VARIANT* aAnchor)
{
__try {
VariantInit(aAnchor);
nsRefPtr<Accessible> thisObj = do_QueryObject(this);
Accessible* thisObj = static_cast<AccessibleWrap*>(this);
if (thisObj->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -72,12 +69,12 @@ __try {
}
STDMETHODIMP
CAccessibleHyperlink::get_anchorTarget(long aIndex, VARIANT *aAnchorTarget)
ia2AccessibleHyperlink::get_anchorTarget(long aIndex, VARIANT* aAnchorTarget)
{
__try {
VariantInit(aAnchorTarget);
nsRefPtr<Accessible> thisObj = do_QueryObject(this);
Accessible* thisObj = static_cast<AccessibleWrap*>(this);
if (thisObj->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -115,12 +112,12 @@ __try {
}
STDMETHODIMP
CAccessibleHyperlink::get_startIndex(long *aIndex)
ia2AccessibleHyperlink::get_startIndex(long* aIndex)
{
__try {
*aIndex = 0;
nsRefPtr<Accessible> thisObj = do_QueryObject(this);
Accessible* thisObj = static_cast<AccessibleWrap*>(this);
if (thisObj->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -135,12 +132,12 @@ __try {
}
STDMETHODIMP
CAccessibleHyperlink::get_endIndex(long *aIndex)
ia2AccessibleHyperlink::get_endIndex(long* aIndex)
{
__try {
*aIndex = 0;
nsRefPtr<Accessible> thisObj = do_QueryObject(this);
Accessible* thisObj = static_cast<AccessibleWrap*>(this);
if (thisObj->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -155,12 +152,12 @@ __try {
}
STDMETHODIMP
CAccessibleHyperlink::get_valid(boolean *aValid)
ia2AccessibleHyperlink::get_valid(boolean* aValid)
{
__try {
*aValid = false;
nsRefPtr<Accessible> thisObj = do_QueryObject(this);
Accessible* thisObj = static_cast<AccessibleWrap*>(this);
if (thisObj->IsDefunct())
return CO_E_OBJNOTCONNECTED;

View File

@ -13,8 +13,8 @@
#include "ia2AccessibleAction.h"
#include "AccessibleHyperlink.h"
class CAccessibleHyperlink: public ia2AccessibleAction,
public IAccessibleHyperlink
class ia2AccessibleHyperlink : public ia2AccessibleAction,
public IAccessibleHyperlink
{
public: