Skip to content

Commit

Permalink
Bug 815581 - Fixed accessible compilation on mingw r=trev.saunders
Browse files Browse the repository at this point in the history
  • Loading branch information
cjacek committed Nov 28, 2012
1 parent 645ae33 commit 7a23ef3
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion accessible/public/msaa/nsIWinAccessNode.idl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "nsISupports.idl"

%{C++
#include "Guiddef.h"
#include "guiddef.h"
%}

[ref] native MSCOMIIDRef(IID);
Expand Down
5 changes: 3 additions & 2 deletions accessible/src/msaa/AccessibleWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "AccessibleWrap.h"
#include "Accessible-inl.h"

#include "Compatibility.h"
#include "DocAccessible-inl.h"
Expand Down Expand Up @@ -41,7 +42,7 @@
#include "Accessible2_i.c"
#include "AccessibleRole.h"
#include "AccessibleStates.h"
#include "OLEACC.H"
#include "oleacc.h"

using namespace mozilla;
using namespace mozilla::a11y;
Expand Down Expand Up @@ -1376,7 +1377,7 @@ AccessibleWrap::get_uniqueID(long *uniqueID)
{
A11Y_TRYBLOCK_BEGIN

*uniqueID = - reinterpret_cast<long>(UniqueID());
*uniqueID = - reinterpret_cast<intptr_t>(UniqueID());
return S_OK;

A11Y_TRYBLOCK_END
Expand Down
2 changes: 1 addition & 1 deletion accessible/src/msaa/HyperTextAccessibleWrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "HyperTextAccessible.h"
#include "ia2AccessibleEditableText.h"
#include "ia2AccessibleHyperText.h"
#include "ia2AccessibleHypertext.h"

namespace mozilla {
namespace a11y {
Expand Down
13 changes: 11 additions & 2 deletions accessible/src/msaa/nsAccessNodeWrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
// uses SEH and 'xpAccessible' has destructor
// At this point we're catching a crash which is of much greater
// importance than the missing dereference for the nsCOMPtr<>
#ifdef _MSC_VER
#pragma warning( disable : 4509 )
#endif

#include "nsCOMPtr.h"
#include "nsIAccessible.h"
Expand All @@ -24,8 +26,8 @@
#include "nsIDOMElement.h"
#include "nsIContent.h"
#include "nsAccessNode.h"
#include "OLEIDL.H"
#include "OLEACC.H"
#include "oleidl.h"
#include "oleacc.h"
#include <winuser.h>
#ifdef MOZ_CRASHREPORTER
#include "nsICrashReporter.h"
Expand All @@ -47,6 +49,13 @@ namespace a11y {

class AccTextChangeEvent;

#ifdef __GNUC__
// Inheriting from both XPCOM and MSCOM interfaces causes a lot of warnings
// about virtual functions being hidden by each other. This is done by
// design, so silence the warning.
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif

class nsAccessNodeWrap : public nsAccessNode,
public nsIWinAccessNode,
public IServiceProvider
Expand Down
1 change: 1 addition & 0 deletions accessible/src/windows/ia2/ia2AccessibleValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "AccessibleValue_i.c"

#include "AccessibleWrap.h"
#include "Accessible-inl.h"

using namespace mozilla::a11y;

Expand Down
2 changes: 1 addition & 1 deletion accessible/src/windows/uia/uiaRawElmProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ uiaRawElmProvider::GetRuntimeId(__RPC__deref_out_opt SAFEARRAY** aRuntimeIds)
if (!aRuntimeIds)
return E_INVALIDARG;

int ids[] = { UiaAppendRuntimeId, reinterpret_cast<int>(mAcc->UniqueID()) };
int ids[] = { UiaAppendRuntimeId, static_cast<int>(reinterpret_cast<intptr_t>(mAcc->UniqueID())) };
*aRuntimeIds = SafeArrayCreateVector(VT_I4, 0, 2);
if (!*aRuntimeIds)
return E_OUTOFMEMORY;
Expand Down
2 changes: 1 addition & 1 deletion accessible/src/windows/uia/uiaRawElmProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "objbase.h"
#include "AccessibleWrap.h"
#include "UIAutomation.h"
#include "uiautomation.h"

namespace mozilla {
namespace a11y {
Expand Down

0 comments on commit 7a23ef3

Please sign in to comment.