1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
24 #include <accHelper.hxx>
27 #pragma clang diagnostic push
28 #pragma clang diagnostic ignored \
29 "-Wextra-tokens" // "#endif !_MIDL_USE_GUIDDEF_" in midl-generated code
31 #include <UAccCOM_i.c>
32 #include <ia2_api_all_i.c>
34 #pragma clang diagnostic pop
37 #include "MAccessible.h"
38 #include "EnumVariant.h"
39 #include "UNOXWrapper.h"
40 #include "AccComponent.h"
41 #include "AccRelation.h"
42 #include "AccAction.h"
44 #include "AccEditableText.h"
48 #include "AccTableCell.h"
49 #include "AccHyperLink.h"
50 #include "AccHypertext.h"
54 BEGIN_OBJECT_MAP(ObjectMap
)
55 OBJECT_ENTRY(CLSID_MAccessible
, CMAccessible
)
56 OBJECT_ENTRY(CLSID_EnumVariant
, CEnumVariant
)
57 OBJECT_ENTRY(CLSID_AccComponent
, CAccComponent
)
58 OBJECT_ENTRY(CLSID_AccRelation
, CAccRelation
)
59 OBJECT_ENTRY(CLSID_AccAction
, CAccAction
)
60 OBJECT_ENTRY(CLSID_AccText
, CAccText
)
61 OBJECT_ENTRY(CLSID_AccEditableText
, CAccEditableText
)
62 OBJECT_ENTRY(CLSID_AccImage
, CAccImage
)
63 OBJECT_ENTRY(CLSID_AccValue
, CAccValue
)
64 OBJECT_ENTRY(CLSID_AccTable
, CAccTable
)
65 OBJECT_ENTRY(CLSID_AccTableCell
, CAccTableCell
)
66 OBJECT_ENTRY(CLSID_AccHyperLink
, CAccHyperLink
)
67 OBJECT_ENTRY(CLSID_AccHypertext
, CAccHypertext
)
69 #pragma clang diagnostic push
70 #pragma clang diagnostic ignored "-Wmissing-field-initializers"
74 #pragma clang diagnostic pop
79 extern "C" BOOL WINAPI
DllMain(HINSTANCE hInstance
, DWORD dwReason
, LPVOID
/*lpReserved*/)
81 if (dwReason
== DLL_PROCESS_ATTACH
)
83 _Module
.Init(ObjectMap
, hInstance
, &LIBID_UACCCOMLib
);
84 DisableThreadLibraryCalls(hInstance
);
86 else if (dwReason
== DLL_PROCESS_DETACH
)
91 // Used to determine whether the DLL can be unloaded by OLE
93 STDAPI
DllCanUnloadNow() { return (_Module
.GetLockCount() == 0) ? S_OK
: E_FAIL
; }
95 // Returns a class factory to create an object of the requested type
97 STDAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
* ppv
)
99 return _Module
.GetClassObject(rclsid
, riid
, ppv
);
102 IMAccessible
* UAccCOMCreateInstance()
104 IMAccessible
* pIMA
= nullptr;
105 HRESULT hr
= createInstance
<CMAccessible
>(IID_IMAccessible
, &pIMA
);
106 return (S_OK
== hr
) ? pIMA
: nullptr;
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */