diff options
Diffstat (limited to 'ios')
-rw-r--r-- | ios/Module_ios.mk | 1 | ||||
-rw-r--r-- | ios/StaticLibrary_ios.mk | 20 | ||||
-rw-r--r-- | ios/source/ios.cxx | 35 |
3 files changed, 56 insertions, 0 deletions
diff --git a/ios/Module_ios.mk b/ios/Module_ios.mk index b70f48264a80..97823c9784f1 100644 --- a/ios/Module_ios.mk +++ b/ios/Module_ios.mk @@ -11,6 +11,7 @@ $(eval $(call gb_Module_Module,ios)) ifeq ($(OS),IOS) $(eval $(call gb_Module_add_targets,ios,\ + StaticLibrary_ios \ CustomTarget_iOS_setup \ )) diff --git a/ios/StaticLibrary_ios.mk b/ios/StaticLibrary_ios.mk new file mode 100644 index 000000000000..36baff4e064b --- /dev/null +++ b/ios/StaticLibrary_ios.mk @@ -0,0 +1,20 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# 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/. + +$(eval $(call gb_StaticLibrary_StaticLibrary,ios)) + +$(eval $(call gb_StaticLibrary_use_api,ios,\ + udkapi \ + offapi \ +)) + +$(eval $(call gb_StaticLibrary_add_exception_objects,ios,\ + ios/source/ios \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/ios/source/ios.cxx b/ios/source/ios.cxx new file mode 100644 index 000000000000..60b455d287ee --- /dev/null +++ b/ios/source/ios.cxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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/. + */ + +#include <cassert> + +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/ucb/InteractiveAugmentedIOException.hpp" +#include "ios/ios.hxx" + +namespace +{ +template <class E> void tryThrow(css::uno::Any const& aException) +{ + E aSpecificException; + if (aException >>= aSpecificException) + throw aSpecificException; +} +} + +void lo_ios_throwException(css::uno::Any const& aException) +{ + assert(aException.getValueTypeClass() == css::uno::TypeClass_EXCEPTION); + + tryThrow<css::ucb::InteractiveAugmentedIOException>(aException); + + assert(false); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |