summaryrefslogtreecommitdiff
path: root/winaccessibility/inc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-11-24 00:52:12 +0100
committerMichael Meeks <michael.meeks@collabora.com>2013-11-25 03:21:30 -0600
commit3b86569fcba210eb6570fabef7ff8abf6aff91f0 (patch)
treef21eceaf1979a073ce941bbc1e8802daeee56846 /winaccessibility/inc
parent01a977486f0999950bf61b2c8592426e26cfe4f8 (diff)
winaccessibility: replace CoCreateInstance with direct instantiation
This is an alternative (to 732ec36edfd09d2091d70c4d71b5f182fe279c45) solution to the "CoCreateInstance does not work" problem: replace all CoCreateInstance calls with equivalent calls to create the components directly. Since the only reason why this COM stuff needs to be registered at all is that AccObject uses CoCreateInstance() to create its COM objects, another possible solution appears to be to simply link the libraries and instantiate the COM objects directly, without COM. The only difference appears to be that CoCreateInstance would automatically add proxy objects in case the COM objects reside in a single-threaded appartment; not sure if that is relevant here. Change-Id: I8ffb8af501f6084f3145fa4d4f53366a070e1691 Reviewed-on: https://gerrit.libreoffice.org/6792 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'winaccessibility/inc')
-rw-r--r--winaccessibility/inc/UAccCOMdllapi.h24
-rw-r--r--winaccessibility/inc/accHelper.hxx4
2 files changed, 28 insertions, 0 deletions
diff --git a/winaccessibility/inc/UAccCOMdllapi.h b/winaccessibility/inc/UAccCOMdllapi.h
new file mode 100644
index 000000000000..aca29b6678be
--- /dev/null
+++ b/winaccessibility/inc/UAccCOMdllapi.h
@@ -0,0 +1,24 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_UACCCOM_UACCCOMDLLAPI_H
+#define INCLUDED_UACCCOM_UACCCOMDLLAPI_H
+
+#include <sal/types.h>
+
+#if defined(UACCCOM_DLLIMPLEMENTATION)
+#define UACCCOM_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define UACCCOM_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define UACCCOM_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/inc/accHelper.hxx b/winaccessibility/inc/accHelper.hxx
index 772393a0768d..f0dd29bae440 100644
--- a/winaccessibility/inc/accHelper.hxx
+++ b/winaccessibility/inc/accHelper.hxx
@@ -20,6 +20,8 @@
#ifndef __ACCHELPER_HXX
#define __ACCHELPER_HXX
+#include <UAccCOMdllapi.h>
+
enum DIRECTION
{
FIRST_CHILD=0,
@@ -30,6 +32,8 @@ enum DIRECTION
#define UNO_MSAA_UNMAPPING 0x00000000
+struct IMAccessible;
+UACCCOM_DLLPUBLIC IMAccessible * UAccCOMCreateInstance();
#endif