[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - cppuhelper/Library_cppuhelper.mk cppuhelper/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 28 06:59:29 UTC 2021
cppuhelper/Library_cppuhelper.mk | 6 ++++++
cppuhelper/source/shlib.cxx | 12 ++++++++++++
2 files changed, 18 insertions(+)
New commits:
commit fb81598a9103b90fe1da8401184e8ae5c6a4197f
Author: Tor Lillqvist <tml at iki.fi>
AuthorDate: Mon Sep 27 18:47:15 2021 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Sep 28 08:58:55 2021 +0200
Warn harder about unknown constructors and factories on iOS in Xcode
Use NSLog() and not just SAL_WARN(). There are so many irrelevant
SAL_WARN() warnings displayed that these ones that can be extremely
relevant are easily missed. I typically run the app in Xcode with
SAL_LOG=-WARN.
(Such warnings are typically caused by something missing from the
solenv/bin/native-code.py.)
Change-Id: I4ab16f4f652ac34319021c9427e2e9f911ee29e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122721
Tested-by: Tor Lillqvist <tml at collabora.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/cppuhelper/Library_cppuhelper.mk b/cppuhelper/Library_cppuhelper.mk
index 5741eea6476f..9c19c5bc4c65 100644
--- a/cppuhelper/Library_cppuhelper.mk
+++ b/cppuhelper/Library_cppuhelper.mk
@@ -37,6 +37,12 @@ $(eval $(call gb_Library_use_static_libraries,cppuhelper,\
findsofficepath \
))
+ifeq ($(OS),iOS)
+$(eval $(call gb_Library_add_cxxflags,cppuhelper,\
+ $(gb_OBJCXXFLAGS) \
+))
+endif
+
$(eval $(call gb_Library_add_exception_objects,cppuhelper,\
cppuhelper/source/access_control \
cppuhelper/source/bootstrap \
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 89ce8b8554db..6a7f4aa63984 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -22,6 +22,12 @@
#include <cassert>
#include <cstdlib>
+#ifdef IOS
+#include <premac.h>
+#include <Foundation/Foundation.h>
+#include <postmac.h>
+#endif
+
#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
#include <com/sun/star/registry/CannotRegisterImplementationException.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
@@ -266,6 +272,9 @@ void cppuhelper::detail::loadSharedLibComponentFactory(
}
if (fp == 0) {
SAL_WARN("cppuhelper", "unknown factory name \"" << uri << "\"");
+#ifdef IOS
+ NSLog(@"Unknown factory %s", uri.toUtf8().getStr());
+#endif
throw css::loader::CannotActivateFactoryException(
"unknown factory name \"" + uri + "\"",
css::uno::Reference<css::uno::XInterface>());
@@ -286,6 +295,9 @@ void cppuhelper::detail::loadSharedLibComponentFactory(
}
}
SAL_WARN("cppuhelper", "unknown constructor name \"" << constructor << "\"");
+#ifdef IOS
+ NSLog(@"Unknown constructor %s", constructor.toUtf8().getStr());
+#endif
throw css::loader::CannotActivateFactoryException(
"unknown constructor name \"" + constructor + "\"",
css::uno::Reference<css::uno::XInterface>());
More information about the Libreoffice-commits
mailing list