diff options
author | Tor Lillqvist <tml@iki.fi> | 2021-09-27 18:47:15 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2021-09-28 10:59:20 +0200 |
commit | e37c97bc1d698c94ed6736dbe4642a784e79eeff (patch) | |
tree | 8300f28a48734cd6c20734247910cf7adfc847cc /cppuhelper/source | |
parent | 10e809e1393d65f8864b6b7a5176f0b60cc1ec8c (diff) |
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@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122756
Tested-by: Jenkins
Diffstat (limited to 'cppuhelper/source')
-rw-r--r-- | cppuhelper/source/shlib.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx index b0a938a4abac..41af3dd80ebc 100644 --- a/cppuhelper/source/shlib.cxx +++ b/cppuhelper/source/shlib.cxx @@ -23,6 +23,12 @@ #include <cstdlib> #include <string_view> +#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> @@ -267,6 +273,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>()); @@ -287,6 +296,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>()); |