Kaydet (Commit) 77f94ded authored tarafından Michael Stahl's avatar Michael Stahl

winaccessibility: pass pointers as "hyper" in the COM IDL

Change-Id: I083589fd57540e3b4ec488aeb84bc92dddc02d36
üst 8530048b
...@@ -98,7 +98,7 @@ STDMETHODIMP CAccAction::get_keyBinding( ...@@ -98,7 +98,7 @@ STDMETHODIMP CAccAction::get_keyBinding(
* *
* @param pXInterface the pointer of UNO interface. * @param pXInterface the pointer of UNO interface.
*/ */
STDMETHODIMP CAccAction::put_XInterface(long pXInterface) STDMETHODIMP CAccAction::put_XInterface(hyper pXInterface)
{ {
return CAccActionBase::put_XInterface(pXInterface); return CAccActionBase::put_XInterface(pXInterface);
...@@ -108,11 +108,11 @@ STDMETHODIMP CAccAction::put_XInterface(long pXInterface) ...@@ -108,11 +108,11 @@ STDMETHODIMP CAccAction::put_XInterface(long pXInterface)
* @param pXSubInterface XAccessibleHyperlink interface. * @param pXSubInterface XAccessibleHyperlink interface.
* @return Result. * @return Result.
*/ */
STDMETHODIMP CAccAction::put_XSubInterface(long pXSubInterface) STDMETHODIMP CAccAction::put_XSubInterface(hyper pXSubInterface)
{ {
pRXAct = (XAccessibleAction*)pXSubInterface; pRXAct = reinterpret_cast<XAccessibleAction*>(pXSubInterface);
return S_OK; return S_OK;
} }
......
...@@ -93,10 +93,10 @@ public: ...@@ -93,10 +93,10 @@ public:
/* [retval][out] */ long __RPC_FAR *nBinding); /* [retval][out] */ long __RPC_FAR *nBinding);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XSubInterface)(long pXSubInterface); STDMETHOD(put_XSubInterface)(hyper pXSubInterface);
}; };
......
...@@ -248,7 +248,7 @@ STDMETHODIMP CAccActionBase::get_keyBinding( ...@@ -248,7 +248,7 @@ STDMETHODIMP CAccActionBase::get_keyBinding(
* *
* @param pXInterface the pointer of UNO interface. * @param pXInterface the pointer of UNO interface.
*/ */
STDMETHODIMP CAccActionBase::put_XInterface(long pXInterface) STDMETHODIMP CAccActionBase::put_XInterface(hyper pXInterface)
{ {
......
...@@ -68,7 +68,7 @@ public: ...@@ -68,7 +68,7 @@ public:
/* [retval][out] */ long __RPC_FAR *nBinding); /* [retval][out] */ long __RPC_FAR *nBinding);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
static void GetkeyBindingStrByXkeyBinding( const com::sun::star::uno::Sequence< com::sun::star::awt::KeyStroke > &keySet, OLECHAR* pString ); static void GetkeyBindingStrByXkeyBinding( const com::sun::star::uno::Sequence< com::sun::star::awt::KeyStroke > &keySet, OLECHAR* pString );
......
...@@ -63,7 +63,7 @@ STDMETHODIMP CAccComponent::get_background(IA2Color * background) ...@@ -63,7 +63,7 @@ STDMETHODIMP CAccComponent::get_background(IA2Color * background)
* *
* @param pXInterface the pointer of UNO interface. * @param pXInterface the pointer of UNO interface.
*/ */
STDMETHODIMP CAccComponent::put_XInterface(long pXInterface) STDMETHODIMP CAccComponent::put_XInterface(hyper pXInterface)
{ {
return CAccComponentBase::put_XInterface(pXInterface); return CAccComponentBase::put_XInterface(pXInterface);
......
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
STDMETHOD(get_background)(IA2Color * background); STDMETHOD(get_background)(IA2Color * background);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
}; };
......
...@@ -183,7 +183,7 @@ STDMETHODIMP CAccComponentBase::get_background(IA2Color * background) ...@@ -183,7 +183,7 @@ STDMETHODIMP CAccComponentBase::get_background(IA2Color * background)
* *
* @param pXInterface the pointer of UNO interface. * @param pXInterface the pointer of UNO interface.
*/ */
STDMETHODIMP CAccComponentBase::put_XInterface(long pXInterface) STDMETHODIMP CAccComponentBase::put_XInterface(hyper pXInterface)
{ {
CHECK_ENABLE_INF CHECK_ENABLE_INF
......
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
STDMETHOD(get_background)(IA2Color * background); STDMETHOD(get_background)(IA2Color * background);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
protected: protected:
......
...@@ -480,7 +480,7 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const : ...@@ -480,7 +480,7 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const :
* *
* @param pXInterface the pointer of UNO interface. * @param pXInterface the pointer of UNO interface.
*/ */
STDMETHODIMP CAccEditableText::put_XInterface(long pXInterface) STDMETHODIMP CAccEditableText::put_XInterface(hyper pXInterface)
{ {
......
...@@ -96,7 +96,7 @@ public: ...@@ -96,7 +96,7 @@ public:
STDMETHOD(setAttributes)(long startOffset, long endOffset, BSTR * attributes); STDMETHOD(setAttributes)(long startOffset, long endOffset, BSTR * attributes);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
private: private:
......
...@@ -248,7 +248,7 @@ STDMETHODIMP CAccHyperLink::get_valid(/* [retval][out] */ boolean __RPC_FAR *val ...@@ -248,7 +248,7 @@ STDMETHODIMP CAccHyperLink::get_valid(/* [retval][out] */ boolean __RPC_FAR *val
* @param pXInterface XAccessibleContext interface. * @param pXInterface XAccessibleContext interface.
* @return Result. * @return Result.
*/ */
STDMETHODIMP CAccHyperLink::put_XInterface(long pXInterface) STDMETHODIMP CAccHyperLink::put_XInterface(hyper pXInterface)
{ {
CHECK_ENABLE_INF CHECK_ENABLE_INF
...@@ -282,13 +282,13 @@ STDMETHODIMP CAccHyperLink::put_XInterface(long pXInterface) ...@@ -282,13 +282,13 @@ STDMETHODIMP CAccHyperLink::put_XInterface(long pXInterface)
* @param pXSubInterface XAccessibleHyperlink interface. * @param pXSubInterface XAccessibleHyperlink interface.
* @return Result. * @return Result.
*/ */
STDMETHODIMP CAccHyperLink::put_XSubInterface(long pXSubInterface) STDMETHODIMP CAccHyperLink::put_XSubInterface(hyper pXSubInterface)
{ {
CHECK_ENABLE_INF CHECK_ENABLE_INF
pRXLink = (XAccessibleHyperlink*)pXSubInterface; pRXLink = reinterpret_cast<XAccessibleHyperlink*>(pXSubInterface);
pRXAct = (XAccessibleAction*)pXSubInterface; pRXAct = reinterpret_cast<XAccessibleAction*>(pXSubInterface);
return S_OK; return S_OK;
} }
......
...@@ -119,10 +119,10 @@ public: ...@@ -119,10 +119,10 @@ public:
STDMETHOD(get_valid)(/* [retval][out] */ boolean __RPC_FAR *valid); STDMETHOD(get_valid)(/* [retval][out] */ boolean __RPC_FAR *valid);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XSubInterface)(long pXSubInterface); STDMETHOD(put_XSubInterface)(hyper pXSubInterface);
private: private:
......
...@@ -336,7 +336,7 @@ STDMETHODIMP CAccHypertext::get_hyperlink(long index,IAccessibleHyperlink **hype ...@@ -336,7 +336,7 @@ STDMETHODIMP CAccHypertext::get_hyperlink(long index,IAccessibleHyperlink **hype
plink->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper); plink->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper);
if(wrapper) if(wrapper)
{ {
wrapper->put_XSubInterface((long)pRLink.get()/*pXI*/); wrapper->put_XSubInterface(reinterpret_cast<hyper>(pRLink.get()));
wrapper->Release(); wrapper->Release();
} }
*hyperlink = plink; *hyperlink = plink;
...@@ -381,7 +381,7 @@ STDMETHODIMP CAccHypertext::get_hyperlinkIndex(long charIndex, long *hyperlinkIn ...@@ -381,7 +381,7 @@ STDMETHODIMP CAccHypertext::get_hyperlinkIndex(long charIndex, long *hyperlinkIn
* @param pXInterface UNO interface. * @param pXInterface UNO interface.
* @return Result. * @return Result.
*/ */
STDMETHODIMP CAccHypertext::put_XInterface(long pXInterface) STDMETHODIMP CAccHypertext::put_XInterface(hyper pXInterface)
{ {
......
...@@ -148,7 +148,7 @@ public: ...@@ -148,7 +148,7 @@ public:
STDMETHOD(get_hyperlinkIndex)(long charIndex, long *hyperlinkIndex); STDMETHOD(get_hyperlinkIndex)(long charIndex, long *hyperlinkIndex);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
private: private:
......
...@@ -73,7 +73,7 @@ STDMETHODIMP CAccImage::get_imageSize( ...@@ -73,7 +73,7 @@ STDMETHODIMP CAccImage::get_imageSize(
* @param pXInterface UNO interface. * @param pXInterface UNO interface.
* @return Result. * @return Result.
*/ */
STDMETHODIMP CAccImage::put_XInterface(long pXInterface) STDMETHODIMP CAccImage::put_XInterface(hyper pXInterface)
{ {
......
...@@ -84,7 +84,7 @@ public: ...@@ -84,7 +84,7 @@ public:
long __RPC_FAR *width); long __RPC_FAR *width);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
private: private:
......
...@@ -106,10 +106,10 @@ STDMETHODIMP CAccRelation::get_target(long targetIndex, IUnknown * * target) ...@@ -106,10 +106,10 @@ STDMETHODIMP CAccRelation::get_target(long targetIndex, IUnknown * * target)
if( targetIndex >= nCount ) if( targetIndex >= nCount )
return E_FAIL; return E_FAIL;
Reference<XInterface> pRAcc = xTargets[targetIndex]; Reference<XAccessible> xRAcc(xTargets[targetIndex], UNO_QUERY);
IAccessible* pRet = NULL; IAccessible* pRet = NULL;
BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet); BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible(xRAcc.get(), &pRet);
if(isGet) if(isGet)
{ {
*target = /*(IAccessible2 *)*/(IUnknown*)pRet; *target = /*(IAccessible2 *)*/(IUnknown*)pRet;
...@@ -172,10 +172,10 @@ STDMETHODIMP CAccRelation::get_targets(long, IUnknown * * target, long * nTarget ...@@ -172,10 +172,10 @@ STDMETHODIMP CAccRelation::get_targets(long, IUnknown * * target, long * nTarget
* @param pXSubInterface AccessibleRelation pointer. * @param pXSubInterface AccessibleRelation pointer.
* @return Result. * @return Result.
*/ */
STDMETHODIMP CAccRelation::put_XSubInterface(long pXSubInterface) STDMETHODIMP CAccRelation::put_XSubInterface(hyper pXSubInterface)
{ {
relation = *((AccessibleRelation*)pXSubInterface); relation = *reinterpret_cast<AccessibleRelation*>(pXSubInterface);
return S_OK; return S_OK;
} }
......
...@@ -73,7 +73,7 @@ public: ...@@ -73,7 +73,7 @@ public:
STDMETHOD(get_targets)(long maxTargets, IUnknown * * target, long * nTargets); STDMETHOD(get_targets)(long maxTargets, IUnknown * * target, long * nTargets);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XSubInterface)(long pXSubInterface); STDMETHOD(put_XSubInterface)(hyper pXSubInterface);
//static OLECHAR* getRelationTypeOLECHAR(int type); //static OLECHAR* getRelationTypeOLECHAR(int type);
static BSTR getRelationTypeBSTR(int type); static BSTR getRelationTypeBSTR(int type);
......
...@@ -66,7 +66,7 @@ STDMETHODIMP CAccTable::get_accessibleAt(long row, long column, IUnknown * * acc ...@@ -66,7 +66,7 @@ STDMETHODIMP CAccTable::get_accessibleAt(long row, long column, IUnknown * * acc
IAccessible* pRet = NULL; IAccessible* pRet = NULL;
BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet); BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get(), &pRet);
if(isTRUE) if(isTRUE)
{ {
*accessible = (IAccessible2 *)pRet; *accessible = (IAccessible2 *)pRet;
...@@ -78,7 +78,7 @@ STDMETHODIMP CAccTable::get_accessibleAt(long row, long column, IUnknown * * acc ...@@ -78,7 +78,7 @@ STDMETHODIMP CAccTable::get_accessibleAt(long row, long column, IUnknown * * acc
Reference<XAccessible> pxTable(GetXInterface(),UNO_QUERY); Reference<XAccessible> pxTable(GetXInterface(),UNO_QUERY);
CMAccessible::g_pAgent->InsertAccObj(pRAcc.get(),pxTable.get()); CMAccessible::g_pAgent->InsertAccObj(pRAcc.get(),pxTable.get());
isTRUE = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet); isTRUE = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get(), &pRet);
if(isTRUE) if(isTRUE)
{ {
...@@ -220,7 +220,8 @@ STDMETHODIMP CAccTable::get_columnHeader(IAccessibleTable __RPC_FAR *__RPC_FAR * ...@@ -220,7 +220,8 @@ STDMETHODIMP CAccTable::get_columnHeader(IAccessibleTable __RPC_FAR *__RPC_FAR *
(void **)&m_pIMacc (void **)&m_pIMacc
); );
DeactivateActContext(); DeactivateActContext();
((CMAccessible*)m_pIMacc)->SetXAccessible((long)pRXColumnHeader.get()); ((CMAccessible*)m_pIMacc)->SetXAccessible(
reinterpret_cast<hyper>(pRXColumnHeader.get()));
m_pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable); m_pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable);
if( SUCCEEDED(hr) ) if( SUCCEEDED(hr) )
{ {
...@@ -452,7 +453,8 @@ STDMETHODIMP CAccTable::get_rowHeader(IAccessibleTable __RPC_FAR *__RPC_FAR *acc ...@@ -452,7 +453,8 @@ STDMETHODIMP CAccTable::get_rowHeader(IAccessibleTable __RPC_FAR *__RPC_FAR *acc
(void **)&m_pIMacc (void **)&m_pIMacc
); );
DeactivateActContext(); DeactivateActContext();
((CMAccessible*)m_pIMacc)->SetXAccessible((long)pRXRowHeader.get()); ((CMAccessible*)m_pIMacc)->SetXAccessible(
reinterpret_cast<hyper>(pRXRowHeader.get()));
m_pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable); m_pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable);
if( SUCCEEDED(hr) ) if( SUCCEEDED(hr) )
{ {
...@@ -568,7 +570,7 @@ STDMETHODIMP CAccTable::get_summary(IUnknown * * accessible) ...@@ -568,7 +570,7 @@ STDMETHODIMP CAccTable::get_summary(IUnknown * * accessible)
Reference<XAccessible> pRAcc = GetXInterface()->getAccessibleSummary(); Reference<XAccessible> pRAcc = GetXInterface()->getAccessibleSummary();
IAccessible* pRet = NULL; IAccessible* pRet = NULL;
BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet); BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get(), &pRet);
if(pRet) if(pRet)
{ {
...@@ -856,7 +858,7 @@ STDMETHODIMP CAccTable::unselectColumn(long column) ...@@ -856,7 +858,7 @@ STDMETHODIMP CAccTable::unselectColumn(long column)
* *
* @param pXInterface the pointer of UNO interface. * @param pXInterface the pointer of UNO interface.
*/ */
STDMETHODIMP CAccTable::put_XInterface(long pXInterface) STDMETHODIMP CAccTable::put_XInterface(hyper pXInterface)
{ {
CHECK_ENABLE_INF CHECK_ENABLE_INF
......
...@@ -158,7 +158,7 @@ public: ...@@ -158,7 +158,7 @@ public:
STDMETHOD(get_modelChange)(IA2TableModelChange *modelChange); STDMETHOD(get_modelChange)(IA2TableModelChange *modelChange);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
private: private:
......
...@@ -272,7 +272,7 @@ STDMETHODIMP CAccText::scrollSubstringTo(long startIndex, long endIndex,enum IA2 ...@@ -272,7 +272,7 @@ STDMETHODIMP CAccText::scrollSubstringTo(long startIndex, long endIndex,enum IA2
* @param pXInterface UNO interface. * @param pXInterface UNO interface.
* @return Result. * @return Result.
*/ */
STDMETHODIMP CAccText::put_XInterface(long pXInterface) STDMETHODIMP CAccText::put_XInterface(hyper pXInterface)
{ {
return CAccTextBase::put_XInterface(pXInterface); return CAccTextBase::put_XInterface(pXInterface);
......
...@@ -131,7 +131,7 @@ public: ...@@ -131,7 +131,7 @@ public:
STDMETHOD(get_oldText)( IA2TextSegment *oldText); STDMETHOD(get_oldText)( IA2TextSegment *oldText);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
}; };
......
...@@ -936,7 +936,7 @@ STDMETHODIMP CAccTextBase::scrollSubstringTo(long, long, IA2ScrollType) ...@@ -936,7 +936,7 @@ STDMETHODIMP CAccTextBase::scrollSubstringTo(long, long, IA2ScrollType)
* @param pXInterface UNO interface. * @param pXInterface UNO interface.
* @return Result. * @return Result.
*/ */
STDMETHODIMP CAccTextBase::put_XInterface(long pXInterface) STDMETHODIMP CAccTextBase::put_XInterface(hyper pXInterface)
{ {
CHECK_ENABLE_INF CHECK_ENABLE_INF
......
...@@ -103,7 +103,7 @@ public: ...@@ -103,7 +103,7 @@ public:
STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y ); STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y );
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
private: private:
......
...@@ -196,7 +196,7 @@ STDMETHODIMP CAccValue::get_minimumValue(VARIANT *mininumValue) ...@@ -196,7 +196,7 @@ STDMETHODIMP CAccValue::get_minimumValue(VARIANT *mininumValue)
* @param pXInterface UNO interface. * @param pXInterface UNO interface.
* @return Result. * @return Result.
*/ */
STDMETHODIMP CAccValue::put_XInterface(long pXInterface) STDMETHODIMP CAccValue::put_XInterface(hyper pXInterface)
{ {
......
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
STDMETHOD(get_minimumValue)(VARIANT *mininumValue); STDMETHOD(get_minimumValue)(VARIANT *mininumValue);
// Overide of IUNOXWrapper. // Overide of IUNOXWrapper.
STDMETHOD(put_XInterface)(long pXInterface); STDMETHOD(put_XInterface)(hyper pXInterface);
private: private:
......
...@@ -58,7 +58,8 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Next(ULONG cElements,VARIANT __RPC_FAR * ...@@ -58,7 +58,8 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Next(ULONG cElements,VARIANT __RPC_FAR *
{ {
Reference< XAccessible > pRXAcc = m_pXAccessibleSelection->getSelectedAccessibleChild(l1); Reference< XAccessible > pRXAcc = m_pXAccessibleSelection->getSelectedAccessibleChild(l1);
IAccessible* pChild = NULL; IAccessible* pChild = NULL;
BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible((long)pRXAcc.get(),&pChild); BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible(pRXAcc.get(),
&pChild);
if(isGet) if(isGet)
{ {
pvar[l2].vt = VT_I4; pvar[l2].vt = VT_I4;
...@@ -68,7 +69,8 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Next(ULONG cElements,VARIANT __RPC_FAR * ...@@ -68,7 +69,8 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Next(ULONG cElements,VARIANT __RPC_FAR *
{ {
if(CMAccessible::g_pAgent) if(CMAccessible::g_pAgent)
CMAccessible::g_pAgent->InsertAccObj(pRXAcc.get(),pUNOInterface,NULL); CMAccessible::g_pAgent->InsertAccObj(pRXAcc.get(),pUNOInterface,NULL);
BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible((long)pRXAcc.get(),&pChild); BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible(
pRXAcc.get(), &pChild);
if(isGet) if(isGet)
{ {
pvar[l2].vt = VT_I4; pvar[l2].vt = VT_I4;
...@@ -135,7 +137,7 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Clone(IEnumVARIANT __RPC_FAR *__RPC_FAR ...@@ -135,7 +137,7 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Clone(IEnumVARIANT __RPC_FAR *__RPC_FAR
hr = Create(&penum); hr = Create(&penum);
if( hr == S_OK ) if( hr == S_OK )
{ {
penum->PutSelection((long)pUNOInterface); penum->PutSelection(reinterpret_cast<hyper>(pUNOInterface));
*ppenum = penum; *ppenum = penum;
} }
else else
...@@ -221,9 +223,9 @@ static Reference<XAccessibleSelection> GetXAccessibleSelection(XAccessible* pXAc ...@@ -221,9 +223,9 @@ static Reference<XAccessibleSelection> GetXAccessibleSelection(XAccessible* pXAc
* @param pXSelection XAccessible interface. * @param pXSelection XAccessible interface.
* @return Result.. * @return Result..
*/ */
STDMETHODIMP CEnumVariant::PutSelection(long pXSelection) STDMETHODIMP CEnumVariant::PutSelection(hyper pXSelection)
{ {
pUNOInterface = (XAccessible*)pXSelection; pUNOInterface = reinterpret_cast<XAccessible*>(pXSelection);
m_pXAccessibleSelection = GetXAccessibleSelection(pUNOInterface); m_pXAccessibleSelection = GetXAccessibleSelection(pUNOInterface);
return S_OK; return S_OK;
} }
......
...@@ -77,7 +77,7 @@ public: ...@@ -77,7 +77,7 @@ public:
// IEnumVariant // IEnumVariant
// //
HRESULT STDMETHODCALLTYPE PutSelection(long pXSelection); HRESULT STDMETHODCALLTYPE PutSelection(hyper pXSelection);
// //
static HRESULT STDMETHODCALLTYPE Create(CEnumVariant __RPC_FAR *__RPC_FAR *ppenum); static HRESULT STDMETHODCALLTYPE Create(CEnumVariant __RPC_FAR *__RPC_FAR *ppenum);
......
...@@ -1335,9 +1335,9 @@ STDMETHODIMP CMAccessible::Put_XAccChildID(long dChildID) ...@@ -1335,9 +1335,9 @@ STDMETHODIMP CMAccessible::Put_XAccChildID(long dChildID)
* @param pAgent, the AccObjectManagerAgent point. * @param pAgent, the AccObjectManagerAgent point.
* @return S_OK if successful and E_FAIL if failure. * @return S_OK if successful and E_FAIL if failure.
*/ */
STDMETHODIMP CMAccessible::Put_XAccAgent(long pAgent) STDMETHODIMP CMAccessible::Put_XAccAgent(hyper pAgent)
{ {
g_pAgent = (AccObjectManagerAgent*)pAgent; g_pAgent = reinterpret_cast<AccObjectManagerAgent*>(pAgent);
return S_OK; return S_OK;
} }
...@@ -1390,12 +1390,13 @@ IMAccessible* CMAccessible::GetChildInterface(long dChildID)//for test ...@@ -1390,12 +1390,13 @@ IMAccessible* CMAccessible::GetChildInterface(long dChildID)//for test
IAccessible* pChild = NULL; IAccessible* pChild = NULL;
Reference< XAccessible > pXChild = pRContext->getAccessibleChild(dChildID-1); Reference< XAccessible > pXChild = pRContext->getAccessibleChild(dChildID-1);
BOOL isGet = get_IAccessibleFromXAccessible((long)pXChild.get(),&pChild); BOOL isGet = get_IAccessibleFromXAccessible(pXChild.get(), &pChild);
if(!isGet) if(!isGet)
{ {
g_pAgent->InsertAccObj(pXChild.get(),pUNOInterface,(long)m_hwnd); g_pAgent->InsertAccObj(pXChild.get(), pUNOInterface,
isGet = get_IAccessibleFromXAccessible((long)pXChild.get(),&pChild); reinterpret_cast<sal_Int64>(m_hwnd));
isGet = get_IAccessibleFromXAccessible(pXChild.get(), &pChild);
} }
if(isGet) if(isGet)
...@@ -1460,7 +1461,7 @@ IMAccessible* CMAccessible::GetNavigateChildForDM(VARIANT varCur, short flags) ...@@ -1460,7 +1461,7 @@ IMAccessible* CMAccessible::GetNavigateChildForDM(VARIANT varCur, short flags)
{ {
return NULL; return NULL;
} }
pCurChild->GetUNOInterface((long*)&pChildXAcc); pCurChild->GetUNOInterface(reinterpret_cast<hyper*>(&pChildXAcc));
if(pChildXAcc==NULL) if(pChildXAcc==NULL)
{ {
return NULL; return NULL;
...@@ -1728,7 +1729,8 @@ STDMETHODIMP CMAccessible::get_relation( long relationIndex, IAccessibleRelation ...@@ -1728,7 +1729,8 @@ STDMETHODIMP CMAccessible::get_relation( long relationIndex, IAccessibleRelation
if(SUCCEEDED(hr)) if(SUCCEEDED(hr))
{ {
AccessibleRelation accRelation = pRrelationSet->getRelation(relationIndex); AccessibleRelation accRelation = pRrelationSet->getRelation(relationIndex);
wrapper->put_XSubInterface((long)&accRelation); wrapper->put_XSubInterface(
reinterpret_cast<hyper>(&accRelation));
wrapper->Release(); wrapper->Release();
*relation = pRelation; *relation = pRelation;
return S_OK; return S_OK;
...@@ -1790,7 +1792,8 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_ ...@@ -1790,7 +1792,8 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_
if(SUCCEEDED(hr)) if(SUCCEEDED(hr))
{ {
AccessibleRelation accRelation = pRrelationSet->getRelation(i); AccessibleRelation accRelation = pRrelationSet->getRelation(i);
wrapper->put_XSubInterface((long)&accRelation); wrapper->put_XSubInterface(
reinterpret_cast<hyper>(&accRelation));
wrapper->Release(); wrapper->Release();
} }
(relation)[i] = pRelation; (relation)[i] = pRelation;
...@@ -2268,11 +2271,12 @@ HRESULT CMAccessible::DeSelectMutipleChildren( XAccessible** pItem,int size ) ...@@ -2268,11 +2271,12 @@ HRESULT CMAccessible::DeSelectMutipleChildren( XAccessible** pItem,int size )
* @param pXAcc, the XAccessible object of current object. * @param pXAcc, the XAccessible object of current object.
* @return S_OK if successful. * @return S_OK if successful.
*/ */
STDMETHODIMP CMAccessible::SetXAccessible(long pXAcc) STDMETHODIMP CMAccessible::SetXAccessible(hyper pXAcc)
{ {
pUNOInterface = (XAccessible*)pXAcc; pUNOInterface = reinterpret_cast<XAccessible*>(pXAcc);
pRef = pUNOInterface; pRef = pUNOInterface;
m_pEnumVar->PutSelection(/*XAccessibleSelection*/(long)pUNOInterface); m_pEnumVar->PutSelection(/*XAccessibleSelection*/
reinterpret_cast<hyper>(pUNOInterface));
pRContext = pUNOInterface->getAccessibleContext(); pRContext = pUNOInterface->getAccessibleContext();
pRContextInterface = (XAccessibleContext*)pRContext.is(); pRContextInterface = (XAccessibleContext*)pRContext.is();
...@@ -2327,13 +2331,13 @@ STDMETHODIMP CMAccessible::accSelect(long flagsSelect, VARIANT varChild) ...@@ -2327,13 +2331,13 @@ STDMETHODIMP CMAccessible::accSelect(long flagsSelect, VARIANT varChild)
if( flagsSelect&SELFLAG_TAKEFOCUS ) if( flagsSelect&SELFLAG_TAKEFOCUS )
{ {
long pTempUNO = 0; XAccessible * pTempUNO = 0;
pSelectAcc->GetUNOInterface( &pTempUNO); pSelectAcc->GetUNOInterface(reinterpret_cast<hyper*>(&pTempUNO));
if( pTempUNO == NULL ) if( pTempUNO == NULL )
return NULL; return NULL;
Reference< XAccessibleContext > pRContext = ( (XAccessible*)pTempUNO)->getAccessibleContext(); Reference<XAccessibleContext> pRContext = pTempUNO->getAccessibleContext();
Reference< XAccessibleComponent > pRComponent(pRContext,UNO_QUERY); Reference< XAccessibleComponent > pRComponent(pRContext,UNO_QUERY);
Reference< XAccessible > pRParentXAcc = pRContext->getAccessibleParent(); Reference< XAccessible > pRParentXAcc = pRContext->getAccessibleParent();
Reference< XAccessibleContext > pRParentContext = pRParentXAcc->getAccessibleContext(); Reference< XAccessibleContext > pRParentContext = pRParentXAcc->getAccessibleContext();
...@@ -2383,13 +2387,13 @@ STDMETHODIMP CMAccessible::accSelect(long flagsSelect, VARIANT varChild) ...@@ -2383,13 +2387,13 @@ STDMETHODIMP CMAccessible::accSelect(long flagsSelect, VARIANT varChild)
* @param pXAcc, [in, out] the Uno interface of the current object. * @param pXAcc, [in, out] the Uno interface of the current object.
* @return S_OK if successful. * @return S_OK if successful.
*/ */
STDMETHODIMP CMAccessible::GetUNOInterface(long* pXAcc) STDMETHODIMP CMAccessible::GetUNOInterface(hyper * pXAcc)
{ {
// #CHECK# // #CHECK#
if(pXAcc == NULL) if(pXAcc == NULL)
return E_INVALIDARG; return E_INVALIDARG;
*pXAcc = (long)pUNOInterface; *pXAcc = reinterpret_cast<hyper>(pUNOInterface);
return S_OK; return S_OK;
} }
...@@ -2398,9 +2402,9 @@ STDMETHODIMP CMAccessible::GetUNOInterface(long* pXAcc) ...@@ -2398,9 +2402,9 @@ STDMETHODIMP CMAccessible::GetUNOInterface(long* pXAcc)
* @param pAction, the default action point of the current object. * @param pAction, the default action point of the current object.
* @return S_OK if successful. * @return S_OK if successful.
*/ */
STDMETHODIMP CMAccessible::SetDefaultAction(long pAction) STDMETHODIMP CMAccessible::SetDefaultAction(hyper pAction)
{ {
m_pXAction = (XAccessibleAction*)pAction; m_pXAction = reinterpret_cast<XAccessibleAction*>(pAction);
return S_OK; return S_OK;
} }
...@@ -2590,7 +2594,8 @@ HRESULT WINAPI CMAccessible::SmartQI(void* pv, REFIID iid, void** ppvObject) ...@@ -2590,7 +2594,8 @@ HRESULT WINAPI CMAccessible::SmartQI(void* pv, REFIID iid, void** ppvObject)
((IUnknown*)*ppvObject)->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper); ((IUnknown*)*ppvObject)->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper);
if(wrapper) if(wrapper)
{ {
wrapper->put_XInterface((long)pUNOInterface); wrapper->put_XInterface(
reinterpret_cast<hyper>(pUNOInterface));
wrapper->Release(); wrapper->Release();
} }
return S_OK; return S_OK;
...@@ -2605,7 +2610,8 @@ HRESULT WINAPI CMAccessible::SmartQI(void* pv, REFIID iid, void** ppvObject) ...@@ -2605,7 +2610,8 @@ HRESULT WINAPI CMAccessible::SmartQI(void* pv, REFIID iid, void** ppvObject)
LEAVE_PROTECTED_BLOCK LEAVE_PROTECTED_BLOCK
} }
BOOL CMAccessible::get_IAccessibleFromXAccessible(long pXAcc, IAccessible **ppIA) BOOL
CMAccessible::get_IAccessibleFromXAccessible(XAccessible * pXAcc, IAccessible **ppIA)
{ {
ENTER_PROTECTED_BLOCK ENTER_PROTECTED_BLOCK
...@@ -2617,7 +2623,7 @@ BOOL CMAccessible::get_IAccessibleFromXAccessible(long pXAcc, IAccessible **ppIA ...@@ -2617,7 +2623,7 @@ BOOL CMAccessible::get_IAccessibleFromXAccessible(long pXAcc, IAccessible **ppIA
} }
BOOL isGet = FALSE; BOOL isGet = FALSE;
if(g_pAgent) if(g_pAgent)
isGet = g_pAgent->GetIAccessibleFromXAccessible((XAccessible*)pXAcc,ppIA); isGet = g_pAgent->GetIAccessibleFromXAccessible(pXAcc, ppIA);
if(isGet) if(isGet)
return TRUE; return TRUE;
...@@ -2958,12 +2964,12 @@ void CMAccessible::ConvertAnyToVariant(const ::com::sun::star::uno::Any &rAnyVal ...@@ -2958,12 +2964,12 @@ void CMAccessible::ConvertAnyToVariant(const ::com::sun::star::uno::Any &rAnyVal
if(pXAcc.is()) if(pXAcc.is())
{ {
IAccessible* pIAcc = NULL; IAccessible* pIAcc = NULL;
get_IAccessibleFromXAccessible((long)pXAcc.get(), &pIAcc); get_IAccessibleFromXAccessible(pXAcc.get(), &pIAcc);
if(pIAcc == NULL) if(pIAcc == NULL)
{ {
Reference< XAccessibleContext > pXAccContext = pXAcc->getAccessibleContext(); Reference< XAccessibleContext > pXAccContext = pXAcc->getAccessibleContext();
g_pAgent->InsertAccObj(pXAcc.get(),pXAccContext->getAccessibleParent().get()); g_pAgent->InsertAccObj(pXAcc.get(),pXAccContext->getAccessibleParent().get());
get_IAccessibleFromXAccessible((long)pXAcc.get(), &pIAcc); get_IAccessibleFromXAccessible(pXAcc.get(), &pIAcc);
} }
if(pIAcc) if(pIAcc)
{ {
......
...@@ -195,12 +195,12 @@ public: ...@@ -195,12 +195,12 @@ public:
STDMETHOD(Put_XAccParent)(IMAccessible __RPC_FAR *pIParent); STDMETHOD(Put_XAccParent)(IMAccessible __RPC_FAR *pIParent);
STDMETHOD(Put_XAccWindowHandle)(HWND hwnd); STDMETHOD(Put_XAccWindowHandle)(HWND hwnd);
STDMETHOD(Put_XAccChildID)(long dChildID); STDMETHOD(Put_XAccChildID)(long dChildID);
STDMETHOD(Put_XAccAgent)(long pAgent); STDMETHOD(Put_XAccAgent)(hyper pAgent);
STDMETHOD(NotifyDestroy)(BOOL isDestroy); STDMETHOD(NotifyDestroy)(BOOL isDestroy);
STDMETHOD(Put_ActionDescription)( const OLECHAR* szAction); STDMETHOD(Put_ActionDescription)( const OLECHAR* szAction);
STDMETHOD(SetDefaultAction)(long pAction); STDMETHOD(SetDefaultAction)(hyper pAction);
STDMETHOD(GetUNOInterface)(long*); STDMETHOD(GetUNOInterface)(hyper*);
STDMETHOD(SetXAccessible)(long); STDMETHOD(SetXAccessible)(hyper);
private: private:
OLECHAR* m_pszName; OLECHAR* m_pszName;
...@@ -270,7 +270,8 @@ public: ...@@ -270,7 +270,8 @@ public:
// implement some specific MSAA methods,such as accSelection,accNavigate // implement some specific MSAA methods,such as accSelection,accNavigate
static AccObjectManagerAgent* g_pAgent; static AccObjectManagerAgent* g_pAgent;
static BOOL get_IAccessibleFromXAccessible(long pXAcc,IAccessible** ppIA); static BOOL get_IAccessibleFromXAccessible(
css::accessibility::XAccessible * pXAcc, IAccessible** ppIA);
BOOL m_bRequiresSave; BOOL m_bRequiresSave;
XGUIDToComObjHash m_containedObjects; XGUIDToComObjHash m_containedObjects;
......
...@@ -38,24 +38,24 @@ public: ...@@ -38,24 +38,24 @@ public:
public: public:
// IUNOXWrapper // IUNOXWrapper
STDMETHOD(put_XInterface)(long pXInterface) STDMETHOD(put_XInterface)(hyper pXInterface)
{ {
pUNOInterface = (com::sun::star::accessibility::XAccessible*)pXInterface; pUNOInterface = (com::sun::star::accessibility::XAccessible*)pXInterface;
return S_OK; return S_OK;
} }
STDMETHOD(put_XSubInterface)(long) STDMETHOD(put_XSubInterface)(hyper)
{ {
return S_OK; return S_OK;
} }
STDMETHOD(get_XInterface)(/*[out,retval]*/long *pXInterface) STDMETHOD(get_XInterface)(/*[out,retval]*/hyper *pXInterface)
{ {
*pXInterface = (long)pUNOInterface;//.get(); *pXInterface = reinterpret_cast<hyper>(pUNOInterface);
return S_OK; return S_OK;
} }
STDMETHOD(get_XSubInterface)(/*[out,retval]*/long *) STDMETHOD(get_XSubInterface)(/*[out,retval]*/hyper *)
{ {
return S_OK; return S_OK;
} }
......
...@@ -43,11 +43,11 @@ import "defines.idl"; ...@@ -43,11 +43,11 @@ import "defines.idl";
[id(10), helpstring("method Put_XAccParent")] HRESULT Put_XAccParent(IMAccessible* pIParent); [id(10), helpstring("method Put_XAccParent")] HRESULT Put_XAccParent(IMAccessible* pIParent);
[id(13), helpstring("method Put_XAccWindowHandle")] HRESULT Put_XAccWindowHandle(HWND hwnd); [id(13), helpstring("method Put_XAccWindowHandle")] HRESULT Put_XAccWindowHandle(HWND hwnd);
[id(14), helpstring("method Put_XAccChildID")] HRESULT Put_XAccChildID(long dChildID); [id(14), helpstring("method Put_XAccChildID")] HRESULT Put_XAccChildID(long dChildID);
[id(19), helpstring("method SetXAccessible")] HRESULT SetXAccessible( long XAccessible); [id(19), helpstring("method SetXAccessible")] HRESULT SetXAccessible(hyper XAccessible);
[id(20), helpstring("method GetUNOInterface")] HRESULT GetUNOInterface(long* UNOInterface); [id(20), helpstring("method GetUNOInterface")] HRESULT GetUNOInterface(hyper* UNOInterface);
[id(23), helpstring("method SetDefaultAction")] HRESULT SetDefaultAction(long pAction); [id(23), helpstring("method SetDefaultAction")] HRESULT SetDefaultAction(hyper pAction);
[id(24), helpstring("method Put_ActionDescription")] HRESULT Put_ActionDescription( const OLECHAR* szAction); [id(24), helpstring("method Put_ActionDescription")] HRESULT Put_ActionDescription( const OLECHAR* szAction);
[id(25), helpstring("method Put_XAccAgent")] HRESULT Put_XAccAgent(long pAgent); [id(25), helpstring("method Put_XAccAgent")] HRESULT Put_XAccAgent(hyper pAgent);
[id(26), helpstring("method NotifyDestroy")] HRESULT NotifyDestroy(BOOL isDestroy); [id(26), helpstring("method NotifyDestroy")] HRESULT NotifyDestroy(BOOL isDestroy);
[id(30), helpstring("method Get_XAccChildID")] HRESULT Get_XAccChildID([out,retval] long* childID); [id(30), helpstring("method Get_XAccChildID")] HRESULT Get_XAccChildID([out,retval] long* childID);
}; };
...@@ -61,7 +61,7 @@ import "defines.idl"; ...@@ -61,7 +61,7 @@ import "defines.idl";
interface IEnumVariant : IEnumVARIANT interface IEnumVariant : IEnumVARIANT
{ {
[id(1), helpstring("method ClearEnumeration")] HRESULT ClearEnumeration(); [id(1), helpstring("method ClearEnumeration")] HRESULT ClearEnumeration();
[id(2), helpstring("method PutSelection")] HRESULT PutSelection(long pXSeletion); [id(2), helpstring("method PutSelection")] HRESULT PutSelection(hyper pXSeletion);
}; };
[ [
object, object,
...@@ -72,10 +72,10 @@ import "defines.idl"; ...@@ -72,10 +72,10 @@ import "defines.idl";
] ]
interface IUNOXWrapper : IUnknown interface IUNOXWrapper : IUnknown
{ {
[id(1), helpstring("method put_XInterface")] HRESULT put_XInterface(long pXInterface); [id(1), helpstring("method put_XInterface")] HRESULT put_XInterface(hyper pXInterface);
[id(2), helpstring("method put_XSubInterface")] HRESULT put_XSubInterface(long pXSubInterface); [id(2), helpstring("method put_XSubInterface")] HRESULT put_XSubInterface(hyper pXSubInterface);
[id(3), helpstring("method get_XInterface")] HRESULT get_XInterface([out,retval]long* pXInterface); [id(3), helpstring("method get_XInterface")] HRESULT get_XInterface([out,retval]hyper* pXInterface);
[id(4), helpstring("method get_XSubInterface")] HRESULT get_XSubInterface([out,retval]long* pXSubInterface); [id(4), helpstring("method get_XSubInterface")] HRESULT get_XSubInterface([out,retval]hyper * pXSubInterface);
}; };
[ [
......
...@@ -161,9 +161,9 @@ AccObject::AccObject(XAccessible* pAcc, AccObjectManagerAgent* pAgent, ...@@ -161,9 +161,9 @@ AccObject::AccObject(XAccessible* pAcc, AccObjectManagerAgent* pAgent,
m_accRole = m_xAccContextRef -> getAccessibleRole(); m_accRole = m_xAccContextRef -> getAccessibleRole();
if( m_pIMAcc ) if( m_pIMAcc )
{ {
m_pIMAcc->SetXAccessible((long) m_xAccRef.get()); m_pIMAcc->SetXAccessible(reinterpret_cast<hyper>(m_xAccRef.get()));
m_pIMAcc->Put_XAccAgent((long)pAgent); m_pIMAcc->Put_XAccAgent(reinterpret_cast<hyper>(pAgent));
m_pIMAcc->SetDefaultAction((long)m_xAccActionRef.get()); m_pIMAcc->SetDefaultAction(reinterpret_cast<hyper>(m_xAccActionRef.get()));
} }
} }
/** /**
...@@ -317,7 +317,8 @@ void AccObject::UpdateAction() ...@@ -317,7 +317,8 @@ void AccObject::UpdateAction()
if( m_xAccActionRef->getAccessibleActionCount() > 0 ) if( m_xAccActionRef->getAccessibleActionCount() > 0 )
{ {
UpdateDefaultAction( ); UpdateDefaultAction( );
m_pIMAcc->SetDefaultAction((long)m_xAccActionRef.get()); m_pIMAcc->SetDefaultAction(
reinterpret_cast<hyper>(m_xAccActionRef.get()));
} }
} }
} }
......
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