[Libreoffice-commits] core.git: 2 commits - codemaker/source configure.ac include/osl
Douglas Mencken
dougmencken at gmail.com
Thu Dec 19 05:42:38 PST 2013
codemaker/source/cppumaker/cpputype.cxx | 31 ++++++++++++++++++++--
configure.ac | 12 +++++---
include/osl/detail/component-defines.h | 44 ++++++++++++++++++++++++++++++++
3 files changed, 79 insertions(+), 8 deletions(-)
New commits:
commit d70f5d1e5477f3fce6cf35884b3cecb260d504e1
Author: Douglas Mencken <dougmencken at gmail.com>
Date: Wed Dec 18 13:40:46 2013 -0500
Don't enable OpenCL on OS X 10.5
Change-Id: I5b74d9a043c793ff5176b10786c09041207509a6
Reviewed-on: https://gerrit.libreoffice.org/7138
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/configure.ac b/configure.ac
index 534894a..1734796 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10448,13 +10448,15 @@ AC_MSG_CHECKING([whether to build with the OpenCL support.])
ENABLE_OPENCL=
if test $_os != iOS -a $_os != Android -a "x$enable_opencl" != "xno"; then
- AC_MSG_RESULT([yes])
- enable_opencl=yes
- ENABLE_OPENCL=TRUE
- AC_DEFINE(HAVE_FEATURE_OPENCL)
+ if test $_os = Darwin -a "$with_macosx_sdk" = "10.5"; then
+ AC_MSG_RESULT([disabled on OS X 10.5])
+ else
+ AC_MSG_RESULT([yes])
+ ENABLE_OPENCL=YES
+ AC_DEFINE(HAVE_FEATURE_OPENCL)
+ fi
else
AC_MSG_RESULT([no])
- enable_opencl=no
fi
AC_SUBST(ENABLE_OPENCL)
commit 15abebbde560e17413f17b16b8b2e9c1f31f01a5
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Dec 19 14:42:10 2013 +0100
WIP: Direct service ctor calls at least on Android/iOS
Change-Id: I8a1907bc4b8f2134efb15d38a0fb5176b4384317
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 0a710a8..dc5874c 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -3408,6 +3408,17 @@ void ServiceType::dumpHxxFile(
OUString headerDefine(dumpHeaderDefine(o, "HPP"));
o << "\n";
includes.dump(o, 0);
+ if (!entity_->getConstructors().empty()) {
+ o << ("\n#if defined ANDROID || defined IOS //TODO\n"
+ "#include <osl/detail/component-defines.h>\n#endif\n\n"
+ "#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_")
+ << name_.replaceAll(".", "_dot_")
+ << " && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_"
+ << name_.replaceAll(".", "_dot_") << ") && defined LO_URE_CTOR_FUN_"
+ << name_.replaceAll(".", "_dot_")
+ << "\nextern \"C\" void * SAL_CALL LO_URE_CTOR_FUN_"
+ << name_.replaceAll(".", "_dot_") << "(void *, void *);\n#endif\n";
+ }
o << "\n";
if (codemaker::cppumaker::dumpNamespaceOpen(o, name_, false)) {
o << "\n";
@@ -3436,14 +3447,28 @@ void ServiceType::dumpHxxFile(
<< "::css::uno::Reference< " << scopedBaseName
<< " > the_instance;\n" << indent() << "try {\n";
inc();
- o << indent()
- << "the_instance = ::css::uno::Reference< "
+ o << ("#if defined LO_URE_CURRENT_ENV && defined "
+ "LO_URE_CTOR_ENV_")
+ << name_.replaceAll(".", "_dot_")
+ << " && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_"
+ << name_.replaceAll(".", "_dot_")
+ << ") && defined LO_URE_CTOR_FUN_"
+ << name_.replaceAll(".", "_dot_") << "\n" << indent()
+ << "the_instance = ::css::uno::Reference< " << scopedBaseName
+ << (" >(::css::uno::Reference< ::css::uno::XInterface >("
+ "static_cast< ::css::uno::XInterface * >((*"
+ "LO_URE_CTOR_FUN_")
+ << name_.replaceAll(".", "_dot_")
+ << (")(the_context.get(), ::css::uno::Sequence<"
+ " ::css::uno::Any >().get())), ::SAL_NO_ACQUIRE),"
+ " ::css::uno::UNO_QUERY);\n#else\n")
+ << indent() << "the_instance = ::css::uno::Reference< "
<< scopedBaseName
<< (" >(the_context->getServiceManager()->"
"createInstanceWithContext(::rtl::OUString("
" \"")
<< name_
- << "\" ), the_context), ::css::uno::UNO_QUERY);\n";
+ << "\" ), the_context), ::css::uno::UNO_QUERY);\n#endif\n";
dec();
o << indent()
<< "} catch (const ::css::uno::RuntimeException &) {\n";
diff --git a/include/osl/detail/component-defines.h b/include/osl/detail/component-defines.h
new file mode 100644
index 0000000..63893ea
--- /dev/null
+++ b/include/osl/detail/component-defines.h
@@ -0,0 +1,44 @@
+/* -*- 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_OSL_DETAIL_COMPONENT_DEFINES_H
+#define INCLUDED_OSL_DETAIL_COMPONENT_DEFINES_H
+
+/* Experimental direct constructor calls, under construction */
+
+#define LO_URE_CURRENT_ENV 1 /*TODO*/
+
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_comp_dot_extensions_dot_xml_dot_sax_dot_FastParser 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_comp_dot_extensions_dot_xml_dot_sax_dot_FastParser com_sun_star_comp_extensions_xml_sax_FastParser
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_comp_dot_extensions_dot_xml_dot_sax_dot_ParserExpat 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_comp_dot_extensions_dot_xml_dot_sax_dot_ParserExpat com_sun_star_comp_extensions_xml_sax_ParserExpat
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_DLLComponentLoader 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_DLLComponentLoader com_sun_star_comp_stoc_DLLComponentLoader
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_ImplementationRegistration 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_ImplementationRegistration com_sun_star_comp_stoc_ImplementationRegistration
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_NestedRegistry 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_NestedRegistry com_sun_star_comp_stoc_NestedRegistry
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_ORegistryServiceManager 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_ORegistryServiceManager com_sun_star_comp_stoc_ORegistryServiceManager
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_OServiceManager 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_OServiceManager com_sun_star_comp_stoc_OServiceManager
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_OServiceManagerWrapper 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_OServiceManagerWrapper com_sun_star_comp_stoc_OServiceManagerWrapper
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_SimpleRegistry 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_comp_dot_stoc_dot_SimpleRegistry com_sun_star_comp_stoc_SimpleRegistry
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_extensions_dot_xml_dot_sax_dot_Writer 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_extensions_dot_xml_dot_sax_dot_Writer com_sun_star_extensions_xml_sax_Writer
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_security_dot_comp_dot_stoc_dot_AccessController 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_security_dot_comp_dot_stoc_dot_AccessController com_sun_star_security_comp_stoc_AccessController
+#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_security_dot_comp_dot_stoc_dot_FilePolicy 1 /*TODO*/
+#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_security_dot_comp_dot_stoc_dot_FilePolicy com_sun_star_security_comp_stoc_FilePolicy
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list