diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-11-21 00:11:57 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-11-21 00:41:09 +0100 |
commit | 77f94ded7adaeaaf1074312632b7d933fd2d7fbe (patch) | |
tree | 7cc63318f38bf766f1dd91648ef70bbc4cecf9e7 /winaccessibility | |
parent | 8530048bb52d1617678958b07a0bb2946507259d (diff) |
winaccessibility: pass pointers as "hyper" in the COM IDL
Change-Id: I083589fd57540e3b4ec488aeb84bc92dddc02d36
Diffstat (limited to 'winaccessibility')
33 files changed, 106 insertions, 94 deletions
diff --git a/winaccessibility/source/UAccCOM/AccAction.cxx b/winaccessibility/source/UAccCOM/AccAction.cxx index e1a97f163f45..57568fa54a3f 100644 --- a/winaccessibility/source/UAccCOM/AccAction.cxx +++ b/winaccessibility/source/UAccCOM/AccAction.cxx @@ -98,7 +98,7 @@ STDMETHODIMP CAccAction::get_keyBinding( * * @param pXInterface the pointer of UNO interface. */ -STDMETHODIMP CAccAction::put_XInterface(long pXInterface) +STDMETHODIMP CAccAction::put_XInterface(hyper pXInterface) { return CAccActionBase::put_XInterface(pXInterface); @@ -108,11 +108,11 @@ STDMETHODIMP CAccAction::put_XInterface(long pXInterface) * @param pXSubInterface XAccessibleHyperlink interface. * @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; } diff --git a/winaccessibility/source/UAccCOM/AccAction.h b/winaccessibility/source/UAccCOM/AccAction.h index 0c16d0550622..67e08bbac37e 100644 --- a/winaccessibility/source/UAccCOM/AccAction.h +++ b/winaccessibility/source/UAccCOM/AccAction.h @@ -93,10 +93,10 @@ public: /* [retval][out] */ long __RPC_FAR *nBinding); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); // Overide of IUNOXWrapper. - STDMETHOD(put_XSubInterface)(long pXSubInterface); + STDMETHOD(put_XSubInterface)(hyper pXSubInterface); }; diff --git a/winaccessibility/source/UAccCOM/AccActionBase.cxx b/winaccessibility/source/UAccCOM/AccActionBase.cxx index 327e091ee77e..982e58f21677 100644 --- a/winaccessibility/source/UAccCOM/AccActionBase.cxx +++ b/winaccessibility/source/UAccCOM/AccActionBase.cxx @@ -248,7 +248,7 @@ STDMETHODIMP CAccActionBase::get_keyBinding( * * @param pXInterface the pointer of UNO interface. */ -STDMETHODIMP CAccActionBase::put_XInterface(long pXInterface) +STDMETHODIMP CAccActionBase::put_XInterface(hyper pXInterface) { diff --git a/winaccessibility/source/UAccCOM/AccActionBase.h b/winaccessibility/source/UAccCOM/AccActionBase.h index 8a6f64a5851a..0ed991437936 100644 --- a/winaccessibility/source/UAccCOM/AccActionBase.h +++ b/winaccessibility/source/UAccCOM/AccActionBase.h @@ -68,7 +68,7 @@ public: /* [retval][out] */ long __RPC_FAR *nBinding); // 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 ); diff --git a/winaccessibility/source/UAccCOM/AccComponent.cxx b/winaccessibility/source/UAccCOM/AccComponent.cxx index ed8ef298ef47..e9a7759b81ff 100644 --- a/winaccessibility/source/UAccCOM/AccComponent.cxx +++ b/winaccessibility/source/UAccCOM/AccComponent.cxx @@ -63,7 +63,7 @@ STDMETHODIMP CAccComponent::get_background(IA2Color * background) * * @param pXInterface the pointer of UNO interface. */ -STDMETHODIMP CAccComponent::put_XInterface(long pXInterface) +STDMETHODIMP CAccComponent::put_XInterface(hyper pXInterface) { return CAccComponentBase::put_XInterface(pXInterface); diff --git a/winaccessibility/source/UAccCOM/AccComponent.h b/winaccessibility/source/UAccCOM/AccComponent.h index 0982d62d1c77..bafeb364f2ee 100644 --- a/winaccessibility/source/UAccCOM/AccComponent.h +++ b/winaccessibility/source/UAccCOM/AccComponent.h @@ -86,7 +86,7 @@ public: STDMETHOD(get_background)(IA2Color * background); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); }; diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.cxx b/winaccessibility/source/UAccCOM/AccComponentBase.cxx index 49cea21c55d4..666faf201ffc 100644 --- a/winaccessibility/source/UAccCOM/AccComponentBase.cxx +++ b/winaccessibility/source/UAccCOM/AccComponentBase.cxx @@ -183,7 +183,7 @@ STDMETHODIMP CAccComponentBase::get_background(IA2Color * background) * * @param pXInterface the pointer of UNO interface. */ -STDMETHODIMP CAccComponentBase::put_XInterface(long pXInterface) +STDMETHODIMP CAccComponentBase::put_XInterface(hyper pXInterface) { CHECK_ENABLE_INF diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.h b/winaccessibility/source/UAccCOM/AccComponentBase.h index a894816fa380..908115722db4 100644 --- a/winaccessibility/source/UAccCOM/AccComponentBase.h +++ b/winaccessibility/source/UAccCOM/AccComponentBase.h @@ -59,7 +59,7 @@ public: STDMETHOD(get_background)(IA2Color * background); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); protected: diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx b/winaccessibility/source/UAccCOM/AccEditableText.cxx index a6ceed36d8b3..3514ab99946e 100644 --- a/winaccessibility/source/UAccCOM/AccEditableText.cxx +++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx @@ -480,7 +480,7 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const : * * @param pXInterface the pointer of UNO interface. */ -STDMETHODIMP CAccEditableText::put_XInterface(long pXInterface) +STDMETHODIMP CAccEditableText::put_XInterface(hyper pXInterface) { diff --git a/winaccessibility/source/UAccCOM/AccEditableText.h b/winaccessibility/source/UAccCOM/AccEditableText.h index 409a9fabc456..c130731b0231 100644 --- a/winaccessibility/source/UAccCOM/AccEditableText.h +++ b/winaccessibility/source/UAccCOM/AccEditableText.h @@ -96,7 +96,7 @@ public: STDMETHOD(setAttributes)(long startOffset, long endOffset, BSTR * attributes); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); private: diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.cxx b/winaccessibility/source/UAccCOM/AccHyperLink.cxx index 490c2e6548a2..7944cc615dd6 100644 --- a/winaccessibility/source/UAccCOM/AccHyperLink.cxx +++ b/winaccessibility/source/UAccCOM/AccHyperLink.cxx @@ -248,7 +248,7 @@ STDMETHODIMP CAccHyperLink::get_valid(/* [retval][out] */ boolean __RPC_FAR *val * @param pXInterface XAccessibleContext interface. * @return Result. */ -STDMETHODIMP CAccHyperLink::put_XInterface(long pXInterface) +STDMETHODIMP CAccHyperLink::put_XInterface(hyper pXInterface) { CHECK_ENABLE_INF @@ -282,13 +282,13 @@ STDMETHODIMP CAccHyperLink::put_XInterface(long pXInterface) * @param pXSubInterface XAccessibleHyperlink interface. * @return Result. */ -STDMETHODIMP CAccHyperLink::put_XSubInterface(long pXSubInterface) +STDMETHODIMP CAccHyperLink::put_XSubInterface(hyper pXSubInterface) { CHECK_ENABLE_INF - pRXLink = (XAccessibleHyperlink*)pXSubInterface; - pRXAct = (XAccessibleAction*)pXSubInterface; + pRXLink = reinterpret_cast<XAccessibleHyperlink*>(pXSubInterface); + pRXAct = reinterpret_cast<XAccessibleAction*>(pXSubInterface); return S_OK; } diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.h b/winaccessibility/source/UAccCOM/AccHyperLink.h index e49fe73309f0..7505900cc952 100644 --- a/winaccessibility/source/UAccCOM/AccHyperLink.h +++ b/winaccessibility/source/UAccCOM/AccHyperLink.h @@ -119,10 +119,10 @@ public: STDMETHOD(get_valid)(/* [retval][out] */ boolean __RPC_FAR *valid); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); // Overide of IUNOXWrapper. - STDMETHOD(put_XSubInterface)(long pXSubInterface); + STDMETHOD(put_XSubInterface)(hyper pXSubInterface); private: diff --git a/winaccessibility/source/UAccCOM/AccHypertext.cxx b/winaccessibility/source/UAccCOM/AccHypertext.cxx index 89fc62230a0c..ae9e86a3afc4 100644 --- a/winaccessibility/source/UAccCOM/AccHypertext.cxx +++ b/winaccessibility/source/UAccCOM/AccHypertext.cxx @@ -336,7 +336,7 @@ STDMETHODIMP CAccHypertext::get_hyperlink(long index,IAccessibleHyperlink **hype plink->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper); if(wrapper) { - wrapper->put_XSubInterface((long)pRLink.get()/*pXI*/); + wrapper->put_XSubInterface(reinterpret_cast<hyper>(pRLink.get())); wrapper->Release(); } *hyperlink = plink; @@ -381,7 +381,7 @@ STDMETHODIMP CAccHypertext::get_hyperlinkIndex(long charIndex, long *hyperlinkIn * @param pXInterface UNO interface. * @return Result. */ -STDMETHODIMP CAccHypertext::put_XInterface(long pXInterface) +STDMETHODIMP CAccHypertext::put_XInterface(hyper pXInterface) { diff --git a/winaccessibility/source/UAccCOM/AccHypertext.h b/winaccessibility/source/UAccCOM/AccHypertext.h index eae03c808583..94c737eec886 100644 --- a/winaccessibility/source/UAccCOM/AccHypertext.h +++ b/winaccessibility/source/UAccCOM/AccHypertext.h @@ -148,7 +148,7 @@ public: STDMETHOD(get_hyperlinkIndex)(long charIndex, long *hyperlinkIndex); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); private: diff --git a/winaccessibility/source/UAccCOM/AccImage.cxx b/winaccessibility/source/UAccCOM/AccImage.cxx index bd27bbaddb87..49f403329a9b 100644 --- a/winaccessibility/source/UAccCOM/AccImage.cxx +++ b/winaccessibility/source/UAccCOM/AccImage.cxx @@ -73,7 +73,7 @@ STDMETHODIMP CAccImage::get_imageSize( * @param pXInterface UNO interface. * @return Result. */ -STDMETHODIMP CAccImage::put_XInterface(long pXInterface) +STDMETHODIMP CAccImage::put_XInterface(hyper pXInterface) { diff --git a/winaccessibility/source/UAccCOM/AccImage.h b/winaccessibility/source/UAccCOM/AccImage.h index 31e0f1edb5f6..f59e782feed5 100644 --- a/winaccessibility/source/UAccCOM/AccImage.h +++ b/winaccessibility/source/UAccCOM/AccImage.h @@ -84,7 +84,7 @@ public: long __RPC_FAR *width); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); private: diff --git a/winaccessibility/source/UAccCOM/AccRelation.cxx b/winaccessibility/source/UAccCOM/AccRelation.cxx index 14a1e211fdb4..32721e088255 100644 --- a/winaccessibility/source/UAccCOM/AccRelation.cxx +++ b/winaccessibility/source/UAccCOM/AccRelation.cxx @@ -106,10 +106,10 @@ STDMETHODIMP CAccRelation::get_target(long targetIndex, IUnknown * * target) if( targetIndex >= nCount ) return E_FAIL; - Reference<XInterface> pRAcc = xTargets[targetIndex]; + Reference<XAccessible> xRAcc(xTargets[targetIndex], UNO_QUERY); IAccessible* pRet = NULL; - BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet); + BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible(xRAcc.get(), &pRet); if(isGet) { *target = /*(IAccessible2 *)*/(IUnknown*)pRet; @@ -172,10 +172,10 @@ STDMETHODIMP CAccRelation::get_targets(long, IUnknown * * target, long * nTarget * @param pXSubInterface AccessibleRelation pointer. * @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; } diff --git a/winaccessibility/source/UAccCOM/AccRelation.h b/winaccessibility/source/UAccCOM/AccRelation.h index ae05d16b5f18..eec77f015f34 100644 --- a/winaccessibility/source/UAccCOM/AccRelation.h +++ b/winaccessibility/source/UAccCOM/AccRelation.h @@ -73,7 +73,7 @@ public: STDMETHOD(get_targets)(long maxTargets, IUnknown * * target, long * nTargets); // Overide of IUNOXWrapper. - STDMETHOD(put_XSubInterface)(long pXSubInterface); + STDMETHOD(put_XSubInterface)(hyper pXSubInterface); //static OLECHAR* getRelationTypeOLECHAR(int type); static BSTR getRelationTypeBSTR(int type); diff --git a/winaccessibility/source/UAccCOM/AccTable.cxx b/winaccessibility/source/UAccCOM/AccTable.cxx index 52f0cd123bbb..e7935b2f2cf0 100644 --- a/winaccessibility/source/UAccCOM/AccTable.cxx +++ b/winaccessibility/source/UAccCOM/AccTable.cxx @@ -66,7 +66,7 @@ STDMETHODIMP CAccTable::get_accessibleAt(long row, long column, IUnknown * * acc IAccessible* pRet = NULL; - BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet); + BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get(), &pRet); if(isTRUE) { *accessible = (IAccessible2 *)pRet; @@ -78,7 +78,7 @@ STDMETHODIMP CAccTable::get_accessibleAt(long row, long column, IUnknown * * acc Reference<XAccessible> pxTable(GetXInterface(),UNO_QUERY); 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) { @@ -220,7 +220,8 @@ STDMETHODIMP CAccTable::get_columnHeader(IAccessibleTable __RPC_FAR *__RPC_FAR * (void **)&m_pIMacc ); DeactivateActContext(); - ((CMAccessible*)m_pIMacc)->SetXAccessible((long)pRXColumnHeader.get()); + ((CMAccessible*)m_pIMacc)->SetXAccessible( + reinterpret_cast<hyper>(pRXColumnHeader.get())); m_pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable); if( SUCCEEDED(hr) ) { @@ -452,7 +453,8 @@ STDMETHODIMP CAccTable::get_rowHeader(IAccessibleTable __RPC_FAR *__RPC_FAR *acc (void **)&m_pIMacc ); DeactivateActContext(); - ((CMAccessible*)m_pIMacc)->SetXAccessible((long)pRXRowHeader.get()); + ((CMAccessible*)m_pIMacc)->SetXAccessible( + reinterpret_cast<hyper>(pRXRowHeader.get())); m_pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable); if( SUCCEEDED(hr) ) { @@ -568,7 +570,7 @@ STDMETHODIMP CAccTable::get_summary(IUnknown * * accessible) Reference<XAccessible> pRAcc = GetXInterface()->getAccessibleSummary(); IAccessible* pRet = NULL; - BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet); + BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get(), &pRet); if(pRet) { @@ -856,7 +858,7 @@ STDMETHODIMP CAccTable::unselectColumn(long column) * * @param pXInterface the pointer of UNO interface. */ -STDMETHODIMP CAccTable::put_XInterface(long pXInterface) +STDMETHODIMP CAccTable::put_XInterface(hyper pXInterface) { CHECK_ENABLE_INF diff --git a/winaccessibility/source/UAccCOM/AccTable.h b/winaccessibility/source/UAccCOM/AccTable.h index a8c23a13d9cd..664f0a06f079 100644 --- a/winaccessibility/source/UAccCOM/AccTable.h +++ b/winaccessibility/source/UAccCOM/AccTable.h @@ -158,7 +158,7 @@ public: STDMETHOD(get_modelChange)(IA2TableModelChange *modelChange); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); private: diff --git a/winaccessibility/source/UAccCOM/AccText.cxx b/winaccessibility/source/UAccCOM/AccText.cxx index fa63de0fabf8..84e98c243b7f 100644 --- a/winaccessibility/source/UAccCOM/AccText.cxx +++ b/winaccessibility/source/UAccCOM/AccText.cxx @@ -272,7 +272,7 @@ STDMETHODIMP CAccText::scrollSubstringTo(long startIndex, long endIndex,enum IA2 * @param pXInterface UNO interface. * @return Result. */ -STDMETHODIMP CAccText::put_XInterface(long pXInterface) +STDMETHODIMP CAccText::put_XInterface(hyper pXInterface) { return CAccTextBase::put_XInterface(pXInterface); diff --git a/winaccessibility/source/UAccCOM/AccText.h b/winaccessibility/source/UAccCOM/AccText.h index f8c54b37a3b9..f0adb9787c59 100644 --- a/winaccessibility/source/UAccCOM/AccText.h +++ b/winaccessibility/source/UAccCOM/AccText.h @@ -131,7 +131,7 @@ public: STDMETHOD(get_oldText)( IA2TextSegment *oldText); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); }; diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx b/winaccessibility/source/UAccCOM/AccTextBase.cxx index 6e45ff050af7..86968e36f003 100644 --- a/winaccessibility/source/UAccCOM/AccTextBase.cxx +++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx @@ -936,7 +936,7 @@ STDMETHODIMP CAccTextBase::scrollSubstringTo(long, long, IA2ScrollType) * @param pXInterface UNO interface. * @return Result. */ -STDMETHODIMP CAccTextBase::put_XInterface(long pXInterface) +STDMETHODIMP CAccTextBase::put_XInterface(hyper pXInterface) { CHECK_ENABLE_INF diff --git a/winaccessibility/source/UAccCOM/AccTextBase.h b/winaccessibility/source/UAccCOM/AccTextBase.h index 8494936c026d..e320b44c95d1 100644 --- a/winaccessibility/source/UAccCOM/AccTextBase.h +++ b/winaccessibility/source/UAccCOM/AccTextBase.h @@ -103,7 +103,7 @@ public: STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y ); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); private: diff --git a/winaccessibility/source/UAccCOM/AccValue.cxx b/winaccessibility/source/UAccCOM/AccValue.cxx index 608a5591135e..45218cb2dfd8 100644 --- a/winaccessibility/source/UAccCOM/AccValue.cxx +++ b/winaccessibility/source/UAccCOM/AccValue.cxx @@ -196,7 +196,7 @@ STDMETHODIMP CAccValue::get_minimumValue(VARIANT *mininumValue) * @param pXInterface UNO interface. * @return Result. */ -STDMETHODIMP CAccValue::put_XInterface(long pXInterface) +STDMETHODIMP CAccValue::put_XInterface(hyper pXInterface) { diff --git a/winaccessibility/source/UAccCOM/AccValue.h b/winaccessibility/source/UAccCOM/AccValue.h index 3c61f307f69a..bf385be22049 100644 --- a/winaccessibility/source/UAccCOM/AccValue.h +++ b/winaccessibility/source/UAccCOM/AccValue.h @@ -86,7 +86,7 @@ public: STDMETHOD(get_minimumValue)(VARIANT *mininumValue); // Overide of IUNOXWrapper. - STDMETHOD(put_XInterface)(long pXInterface); + STDMETHOD(put_XInterface)(hyper pXInterface); private: diff --git a/winaccessibility/source/UAccCOM/EnumVariant.cxx b/winaccessibility/source/UAccCOM/EnumVariant.cxx index 418de1d039e3..0eaa4860f0e3 100644 --- a/winaccessibility/source/UAccCOM/EnumVariant.cxx +++ b/winaccessibility/source/UAccCOM/EnumVariant.cxx @@ -58,7 +58,8 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Next(ULONG cElements,VARIANT __RPC_FAR * { Reference< XAccessible > pRXAcc = m_pXAccessibleSelection->getSelectedAccessibleChild(l1); IAccessible* pChild = NULL; - BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible((long)pRXAcc.get(),&pChild); + BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible(pRXAcc.get(), + &pChild); if(isGet) { pvar[l2].vt = VT_I4; @@ -68,7 +69,8 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Next(ULONG cElements,VARIANT __RPC_FAR * { if(CMAccessible::g_pAgent) 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) { pvar[l2].vt = VT_I4; @@ -135,7 +137,7 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Clone(IEnumVARIANT __RPC_FAR *__RPC_FAR hr = Create(&penum); if( hr == S_OK ) { - penum->PutSelection((long)pUNOInterface); + penum->PutSelection(reinterpret_cast<hyper>(pUNOInterface)); *ppenum = penum; } else @@ -221,9 +223,9 @@ static Reference<XAccessibleSelection> GetXAccessibleSelection(XAccessible* pXAc * @param pXSelection XAccessible interface. * @return Result.. */ -STDMETHODIMP CEnumVariant::PutSelection(long pXSelection) +STDMETHODIMP CEnumVariant::PutSelection(hyper pXSelection) { - pUNOInterface = (XAccessible*)pXSelection; + pUNOInterface = reinterpret_cast<XAccessible*>(pXSelection); m_pXAccessibleSelection = GetXAccessibleSelection(pUNOInterface); return S_OK; } diff --git a/winaccessibility/source/UAccCOM/EnumVariant.h b/winaccessibility/source/UAccCOM/EnumVariant.h index f584b96187b9..0a87a3f5df40 100644 --- a/winaccessibility/source/UAccCOM/EnumVariant.h +++ b/winaccessibility/source/UAccCOM/EnumVariant.h @@ -77,7 +77,7 @@ public: // IEnumVariant // - HRESULT STDMETHODCALLTYPE PutSelection(long pXSelection); + HRESULT STDMETHODCALLTYPE PutSelection(hyper pXSelection); // static HRESULT STDMETHODCALLTYPE Create(CEnumVariant __RPC_FAR *__RPC_FAR *ppenum); diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 1030a5c19d4b..8998ec94dce7 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -1335,9 +1335,9 @@ STDMETHODIMP CMAccessible::Put_XAccChildID(long dChildID) * @param pAgent, the AccObjectManagerAgent point. * @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; } @@ -1390,12 +1390,13 @@ IMAccessible* CMAccessible::GetChildInterface(long dChildID)//for test IAccessible* pChild = NULL; Reference< XAccessible > pXChild = pRContext->getAccessibleChild(dChildID-1); - BOOL isGet = get_IAccessibleFromXAccessible((long)pXChild.get(),&pChild); + BOOL isGet = get_IAccessibleFromXAccessible(pXChild.get(), &pChild); if(!isGet) { - g_pAgent->InsertAccObj(pXChild.get(),pUNOInterface,(long)m_hwnd); - isGet = get_IAccessibleFromXAccessible((long)pXChild.get(),&pChild); + g_pAgent->InsertAccObj(pXChild.get(), pUNOInterface, + reinterpret_cast<sal_Int64>(m_hwnd)); + isGet = get_IAccessibleFromXAccessible(pXChild.get(), &pChild); } if(isGet) @@ -1460,7 +1461,7 @@ IMAccessible* CMAccessible::GetNavigateChildForDM(VARIANT varCur, short flags) { return NULL; } - pCurChild->GetUNOInterface((long*)&pChildXAcc); + pCurChild->GetUNOInterface(reinterpret_cast<hyper*>(&pChildXAcc)); if(pChildXAcc==NULL) { return NULL; @@ -1728,7 +1729,8 @@ STDMETHODIMP CMAccessible::get_relation( long relationIndex, IAccessibleRelation if(SUCCEEDED(hr)) { AccessibleRelation accRelation = pRrelationSet->getRelation(relationIndex); - wrapper->put_XSubInterface((long)&accRelation); + wrapper->put_XSubInterface( + reinterpret_cast<hyper>(&accRelation)); wrapper->Release(); *relation = pRelation; return S_OK; @@ -1790,7 +1792,8 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_ if(SUCCEEDED(hr)) { AccessibleRelation accRelation = pRrelationSet->getRelation(i); - wrapper->put_XSubInterface((long)&accRelation); + wrapper->put_XSubInterface( + reinterpret_cast<hyper>(&accRelation)); wrapper->Release(); } (relation)[i] = pRelation; @@ -2268,11 +2271,12 @@ HRESULT CMAccessible::DeSelectMutipleChildren( XAccessible** pItem,int size ) * @param pXAcc, the XAccessible object of current object. * @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; - m_pEnumVar->PutSelection(/*XAccessibleSelection*/(long)pUNOInterface); + m_pEnumVar->PutSelection(/*XAccessibleSelection*/ + reinterpret_cast<hyper>(pUNOInterface)); pRContext = pUNOInterface->getAccessibleContext(); pRContextInterface = (XAccessibleContext*)pRContext.is(); @@ -2327,13 +2331,13 @@ STDMETHODIMP CMAccessible::accSelect(long flagsSelect, VARIANT varChild) if( flagsSelect&SELFLAG_TAKEFOCUS ) { - long pTempUNO = 0; - pSelectAcc->GetUNOInterface( &pTempUNO); + XAccessible * pTempUNO = 0; + pSelectAcc->GetUNOInterface(reinterpret_cast<hyper*>(&pTempUNO)); if( pTempUNO == NULL ) return NULL; - Reference< XAccessibleContext > pRContext = ( (XAccessible*)pTempUNO)->getAccessibleContext(); + Reference<XAccessibleContext> pRContext = pTempUNO->getAccessibleContext(); Reference< XAccessibleComponent > pRComponent(pRContext,UNO_QUERY); Reference< XAccessible > pRParentXAcc = pRContext->getAccessibleParent(); Reference< XAccessibleContext > pRParentContext = pRParentXAcc->getAccessibleContext(); @@ -2383,13 +2387,13 @@ STDMETHODIMP CMAccessible::accSelect(long flagsSelect, VARIANT varChild) * @param pXAcc, [in, out] the Uno interface of the current object. * @return S_OK if successful. */ -STDMETHODIMP CMAccessible::GetUNOInterface(long* pXAcc) +STDMETHODIMP CMAccessible::GetUNOInterface(hyper * pXAcc) { // #CHECK# if(pXAcc == NULL) return E_INVALIDARG; - *pXAcc = (long)pUNOInterface; + *pXAcc = reinterpret_cast<hyper>(pUNOInterface); return S_OK; } @@ -2398,9 +2402,9 @@ STDMETHODIMP CMAccessible::GetUNOInterface(long* pXAcc) * @param pAction, the default action point of the current object. * @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; } @@ -2590,7 +2594,8 @@ HRESULT WINAPI CMAccessible::SmartQI(void* pv, REFIID iid, void** ppvObject) ((IUnknown*)*ppvObject)->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper); if(wrapper) { - wrapper->put_XInterface((long)pUNOInterface); + wrapper->put_XInterface( + reinterpret_cast<hyper>(pUNOInterface)); wrapper->Release(); } return S_OK; @@ -2605,7 +2610,8 @@ HRESULT WINAPI CMAccessible::SmartQI(void* pv, REFIID iid, void** ppvObject) LEAVE_PROTECTED_BLOCK } -BOOL CMAccessible::get_IAccessibleFromXAccessible(long pXAcc, IAccessible **ppIA) +BOOL +CMAccessible::get_IAccessibleFromXAccessible(XAccessible * pXAcc, IAccessible **ppIA) { ENTER_PROTECTED_BLOCK @@ -2617,7 +2623,7 @@ BOOL CMAccessible::get_IAccessibleFromXAccessible(long pXAcc, IAccessible **ppIA } BOOL isGet = FALSE; if(g_pAgent) - isGet = g_pAgent->GetIAccessibleFromXAccessible((XAccessible*)pXAcc,ppIA); + isGet = g_pAgent->GetIAccessibleFromXAccessible(pXAcc, ppIA); if(isGet) return TRUE; @@ -2958,12 +2964,12 @@ void CMAccessible::ConvertAnyToVariant(const ::com::sun::star::uno::Any &rAnyVal if(pXAcc.is()) { IAccessible* pIAcc = NULL; - get_IAccessibleFromXAccessible((long)pXAcc.get(), &pIAcc); + get_IAccessibleFromXAccessible(pXAcc.get(), &pIAcc); if(pIAcc == NULL) { Reference< XAccessibleContext > pXAccContext = pXAcc->getAccessibleContext(); g_pAgent->InsertAccObj(pXAcc.get(),pXAccContext->getAccessibleParent().get()); - get_IAccessibleFromXAccessible((long)pXAcc.get(), &pIAcc); + get_IAccessibleFromXAccessible(pXAcc.get(), &pIAcc); } if(pIAcc) { diff --git a/winaccessibility/source/UAccCOM/MAccessible.h b/winaccessibility/source/UAccCOM/MAccessible.h index 7d8399ffb2bb..def117112ee7 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.h +++ b/winaccessibility/source/UAccCOM/MAccessible.h @@ -195,12 +195,12 @@ public: STDMETHOD(Put_XAccParent)(IMAccessible __RPC_FAR *pIParent); STDMETHOD(Put_XAccWindowHandle)(HWND hwnd); STDMETHOD(Put_XAccChildID)(long dChildID); - STDMETHOD(Put_XAccAgent)(long pAgent); + STDMETHOD(Put_XAccAgent)(hyper pAgent); STDMETHOD(NotifyDestroy)(BOOL isDestroy); STDMETHOD(Put_ActionDescription)( const OLECHAR* szAction); - STDMETHOD(SetDefaultAction)(long pAction); - STDMETHOD(GetUNOInterface)(long*); - STDMETHOD(SetXAccessible)(long); + STDMETHOD(SetDefaultAction)(hyper pAction); + STDMETHOD(GetUNOInterface)(hyper*); + STDMETHOD(SetXAccessible)(hyper); private: OLECHAR* m_pszName; @@ -270,7 +270,8 @@ public: // implement some specific MSAA methods,such as accSelection,accNavigate 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; XGUIDToComObjHash m_containedObjects; diff --git a/winaccessibility/source/UAccCOM/UNOXWrapper.h b/winaccessibility/source/UAccCOM/UNOXWrapper.h index 8787b94d8f7b..4dd7a07c2dbc 100644 --- a/winaccessibility/source/UAccCOM/UNOXWrapper.h +++ b/winaccessibility/source/UAccCOM/UNOXWrapper.h @@ -38,24 +38,24 @@ public: public: // IUNOXWrapper - STDMETHOD(put_XInterface)(long pXInterface) + STDMETHOD(put_XInterface)(hyper pXInterface) { pUNOInterface = (com::sun::star::accessibility::XAccessible*)pXInterface; return S_OK; } - STDMETHOD(put_XSubInterface)(long) + STDMETHOD(put_XSubInterface)(hyper) { 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; } - STDMETHOD(get_XSubInterface)(/*[out,retval]*/long *) + STDMETHOD(get_XSubInterface)(/*[out,retval]*/hyper *) { return S_OK; } diff --git a/winaccessibility/source/UAccCOMIDL/UAccCOM.idl b/winaccessibility/source/UAccCOMIDL/UAccCOM.idl index f7cfeb543e17..4d5da884a440 100644 --- a/winaccessibility/source/UAccCOMIDL/UAccCOM.idl +++ b/winaccessibility/source/UAccCOMIDL/UAccCOM.idl @@ -43,11 +43,11 @@ import "defines.idl"; [id(10), helpstring("method Put_XAccParent")] HRESULT Put_XAccParent(IMAccessible* pIParent); [id(13), helpstring("method Put_XAccWindowHandle")] HRESULT Put_XAccWindowHandle(HWND hwnd); [id(14), helpstring("method Put_XAccChildID")] HRESULT Put_XAccChildID(long dChildID); - [id(19), helpstring("method SetXAccessible")] HRESULT SetXAccessible( long XAccessible); - [id(20), helpstring("method GetUNOInterface")] HRESULT GetUNOInterface(long* UNOInterface); - [id(23), helpstring("method SetDefaultAction")] HRESULT SetDefaultAction(long pAction); + [id(19), helpstring("method SetXAccessible")] HRESULT SetXAccessible(hyper XAccessible); + [id(20), helpstring("method GetUNOInterface")] HRESULT GetUNOInterface(hyper* UNOInterface); + [id(23), helpstring("method SetDefaultAction")] HRESULT SetDefaultAction(hyper pAction); [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(30), helpstring("method Get_XAccChildID")] HRESULT Get_XAccChildID([out,retval] long* childID); }; @@ -61,7 +61,7 @@ import "defines.idl"; interface IEnumVariant : IEnumVARIANT { [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, @@ -72,10 +72,10 @@ import "defines.idl"; ] interface IUNOXWrapper : IUnknown { - [id(1), helpstring("method put_XInterface")] HRESULT put_XInterface(long pXInterface); - [id(2), helpstring("method put_XSubInterface")] HRESULT put_XSubInterface(long pXSubInterface); - [id(3), helpstring("method get_XInterface")] HRESULT get_XInterface([out,retval]long* pXInterface); - [id(4), helpstring("method get_XSubInterface")] HRESULT get_XSubInterface([out,retval]long* pXSubInterface); + [id(1), helpstring("method put_XInterface")] HRESULT put_XInterface(hyper pXInterface); + [id(2), helpstring("method put_XSubInterface")] HRESULT put_XSubInterface(hyper pXSubInterface); + [id(3), helpstring("method get_XInterface")] HRESULT get_XInterface([out,retval]hyper* pXInterface); + [id(4), helpstring("method get_XSubInterface")] HRESULT get_XSubInterface([out,retval]hyper * pXSubInterface); }; [ diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index c9d4a05cbe3e..db7566086ffa 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -161,9 +161,9 @@ AccObject::AccObject(XAccessible* pAcc, AccObjectManagerAgent* pAgent, m_accRole = m_xAccContextRef -> getAccessibleRole(); if( m_pIMAcc ) { - m_pIMAcc->SetXAccessible((long) m_xAccRef.get()); - m_pIMAcc->Put_XAccAgent((long)pAgent); - m_pIMAcc->SetDefaultAction((long)m_xAccActionRef.get()); + m_pIMAcc->SetXAccessible(reinterpret_cast<hyper>(m_xAccRef.get())); + m_pIMAcc->Put_XAccAgent(reinterpret_cast<hyper>(pAgent)); + m_pIMAcc->SetDefaultAction(reinterpret_cast<hyper>(m_xAccActionRef.get())); } } /** @@ -317,7 +317,8 @@ void AccObject::UpdateAction() if( m_xAccActionRef->getAccessibleActionCount() > 0 ) { UpdateDefaultAction( ); - m_pIMAcc->SetDefaultAction((long)m_xAccActionRef.get()); + m_pIMAcc->SetDefaultAction( + reinterpret_cast<hyper>(m_xAccActionRef.get())); } } } |