LibreOffice Module connectivity (master) 1
tools.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <sal/config.h>
23
24#include <memory>
25
26#include <com/sun/star/beans/PropertyValue.hpp>
27#include <com/sun/star/uno/Sequence.h>
28
29#if defined __clang__
30#pragma clang diagnostic push
31#pragma clang diagnostic ignored "-Wunknown-attributes"
32#endif
33#include <jni.h>
34#if defined __clang__
35#pragma clang diagnostic pop
36#endif
37
38#include <com/sun/star/container/XNameAccess.hpp>
39#include <com/sun/star/io/XInputStream.hpp>
40
41
42namespace connectivity
43{
44
45 jstring convertwchar_tToJavaString(JNIEnv *pEnv,const OUString& Temp);
46 OUString JavaString2String(JNIEnv *pEnv,jstring Str);
47 class java_util_Properties;
48
51 std::unique_ptr<java_util_Properties> createStringPropertyArray(const css::uno::Sequence< css::beans::PropertyValue >& info );
52
53 jobject convertTypeMapToJavaMap(const css::uno::Reference< css::container::XNameAccess > & _rMap);
54
60 bool isExceptionOccurred(JNIEnv *pEnv);
61
62 jobject createByteInputStream(const css::uno::Reference< css::io::XInputStream >& x,sal_Int32 length);
63 jobject createCharArrayReader(const css::uno::Reference< css::io::XInputStream >& x,sal_Int32 length);
64}
65
66/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
jobject convertTypeMapToJavaMap(const css::uno::Reference< css::container::XNameAccess > &_rMap)
bool isExceptionOccurred(JNIEnv *pEnv)
return if an exception occurred the exception will be cleared.
Definition: tools.cxx:190
jobject createCharArrayReader(const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length)
Definition: tools.cxx:233
OUString JavaString2String(JNIEnv *pEnv, jstring Str)
Definition: tools.cxx:162
jstring convertwchar_tToJavaString(JNIEnv *pEnv, const OUString &Temp)
Definition: tools.cxx:93
jobject createByteInputStream(const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length)
Definition: tools.cxx:206
std::unique_ptr< java_util_Properties > createStringPropertyArray(const css::uno::Sequence< css::beans::PropertyValue > &info)