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 .
23 #include <accHelper.hxx>
26 #pragma clang diagnostic push
27 #pragma clang diagnostic ignored "-Wnon-virtual-dtor"
31 #pragma clang diagnostic pop
35 #pragma clang diagnostic push
36 #pragma clang diagnostic ignored "-Wextra-tokens"
37 // "#endif !_MIDL_USE_GUIDDEF_" in midl-generated code
39 #include <UAccCOM_i.c>
40 #include <ia2_api_all_i.c>
42 #pragma clang diagnostic pop
45 #include "MAccessible.h"
46 #include "EnumVariant.h"
47 #include "UNOXWrapper.h"
48 #include "AccComponent.h"
49 #include "AccRelation.h"
50 #include "AccAction.h"
52 #include "AccEditableText.h"
56 #include "AccHyperLink.h"
57 #include "AccHypertext.h"
62 BEGIN_OBJECT_MAP(ObjectMap
)
63 OBJECT_ENTRY(CLSID_MAccessible
, CMAccessible
)
64 OBJECT_ENTRY(CLSID_EnumVariant
, CEnumVariant
)
65 OBJECT_ENTRY(CLSID_AccComponent
, CAccComponent
)
66 OBJECT_ENTRY(CLSID_AccRelation
, CAccRelation
)
67 OBJECT_ENTRY(CLSID_AccAction
, CAccAction
)
68 OBJECT_ENTRY(CLSID_AccText
, CAccText
)
69 OBJECT_ENTRY(CLSID_AccEditableText
, CAccEditableText
)
70 OBJECT_ENTRY(CLSID_AccImage
, CAccImage
)
71 OBJECT_ENTRY(CLSID_AccValue
, CAccValue
)
72 OBJECT_ENTRY(CLSID_AccTable
, CAccTable
)
73 OBJECT_ENTRY(CLSID_AccHyperLink
, CAccHyperLink
)
74 OBJECT_ENTRY(CLSID_AccHypertext
, CAccHypertext
)
76 #pragma clang diagnostic push
77 #pragma clang diagnostic ignored "-Wmissing-field-initializers"
81 #pragma clang diagnostic pop
87 BOOL WINAPI
DllMain(HINSTANCE hInstance
, DWORD dwReason
, LPVOID
/*lpReserved*/)
89 if (dwReason
== DLL_PROCESS_ATTACH
)
91 _Module
.Init(ObjectMap
, hInstance
, &LIBID_UACCCOMLib
);
92 DisableThreadLibraryCalls(hInstance
);
94 else if (dwReason
== DLL_PROCESS_DETACH
)
100 // Used to determine whether the DLL can be unloaded by OLE
102 STDAPI
DllCanUnloadNow()
104 return (_Module
.GetLockCount()==0) ? S_OK
: E_FAIL
;
108 // Returns a class factory to create an object of the requested type
110 STDAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
* ppv
)
112 return _Module
.GetClassObject(rclsid
, riid
, ppv
);
116 IMAccessible
* UAccCOMCreateInstance()
118 IMAccessible
* pIMA
= nullptr;
119 HRESULT hr
= createInstance
<CMAccessible
>(IID_IMAccessible
, &pIMA
);
120 return (S_OK
== hr
) ? pIMA
: nullptr;
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */