diff options
author | Philipp Hofer <philipp.hofer@protonmail.com> | 2020-11-12 13:03:16 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-21 13:19:17 +0100 |
commit | 01baeab99890e5650b3dabc15f8d900490a5a133 (patch) | |
tree | 64a1b30b20a53262605312fff4d035876fc7c811 /include/jvmaccess | |
parent | tdf#123936 Formatting files in module starmath with clang-format (diff) | |
download | core-01baeab99890e5650b3dabc15f8d900490a5a133.tar.gz core-01baeab99890e5650b3dabc15f8d900490a5a133.zip |
tdf#123936 Formatting files in module include with clang-format
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
Diffstat (limited to 'include/jvmaccess')
-rw-r--r-- | include/jvmaccess/classpath.hxx | 26 | ||||
-rw-r--r-- | include/jvmaccess/jvmaccessdllapi.h | 4 | ||||
-rw-r--r-- | include/jvmaccess/unovirtualmachine.hxx | 29 | ||||
-rw-r--r-- | include/jvmaccess/virtualmachine.hxx | 32 |
4 files changed, 45 insertions, 46 deletions
diff --git a/include/jvmaccess/classpath.hxx b/include/jvmaccess/classpath.hxx index 9882a42ce25e..d1e1c658a44c 100644 --- a/include/jvmaccess/classpath.hxx +++ b/include/jvmaccess/classpath.hxx @@ -27,19 +27,23 @@ #include <jvmaccess/jvmaccessdllapi.h> #include <rtl/ustring.hxx> -namespace com::sun::star::uno { - class XComponentContext; +namespace com::sun::star::uno +{ +class XComponentContext; } -namespace com::sun::star::uno { template <typename > class Reference; } - -namespace jvmaccess { +namespace com::sun::star::uno +{ +template <typename> class Reference; +} +namespace jvmaccess +{ /** Helper functions for class path handling. */ -namespace ClassPath { - +namespace ClassPath +{ /** translates a class path into a java.net.URL[] instance. @@ -65,12 +69,10 @@ namespace ClassPath { @throws com::sun::star::uno::RuntimeException */ -JVMACCESS_DLLPUBLIC jobjectArray translateToUrls( - css::uno::Reference<css::uno::XComponentContext> const & context, - JNIEnv * environment, OUString const & classPath); - +JVMACCESS_DLLPUBLIC jobjectArray +translateToUrls(css::uno::Reference<css::uno::XComponentContext> const& context, + JNIEnv* environment, OUString const& classPath); } - } #endif diff --git a/include/jvmaccess/jvmaccessdllapi.h b/include/jvmaccess/jvmaccessdllapi.h index 0f6651b5dbf8..1c57d1484266 100644 --- a/include/jvmaccess/jvmaccessdllapi.h +++ b/include/jvmaccess/jvmaccessdllapi.h @@ -13,9 +13,9 @@ #include <sal/types.h> #if defined JVMACCESS_DLLIMPLEMENTATION -# define JVMACCESS_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#define JVMACCESS_DLLPUBLIC SAL_DLLPUBLIC_EXPORT #else -# define JVMACCESS_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#define JVMACCESS_DLLPUBLIC SAL_DLLPUBLIC_IMPORT #endif #define JVMACCESS_DLLPRIVATE SAL_DLLPRIVATE diff --git a/include/jvmaccess/unovirtualmachine.hxx b/include/jvmaccess/unovirtualmachine.hxx index c412b34b959f..ac7cf107f4d4 100644 --- a/include/jvmaccess/unovirtualmachine.hxx +++ b/include/jvmaccess/unovirtualmachine.hxx @@ -25,14 +25,15 @@ #include <salhelper/simplereferenceobject.hxx> #include <rtl/ref.hxx> -namespace jvmaccess { - +namespace jvmaccess +{ class VirtualMachine; /** An encapsulating wrapper around a Java virtual machine and an appropriate UNO class loader. */ -class JVMACCESS_DLLPUBLIC UnoVirtualMachine final : public salhelper::SimpleReferenceObject { +class JVMACCESS_DLLPUBLIC UnoVirtualMachine final : public salhelper::SimpleReferenceObject +{ public: /** An exception indicating failure to create a UnoVirtualMachine. */ @@ -41,11 +42,11 @@ public: public: CreationException(); - CreationException(CreationException const &); + CreationException(CreationException const&); ~CreationException(); - CreationException & operator =(CreationException const &); + CreationException& operator=(CreationException const&); }; /** Create a wrapper around a Java virtual machine and an appropriate UNO @@ -65,16 +66,15 @@ public: @exception CreationException Thrown in case creation fails (due to a JNI problem). */ - UnoVirtualMachine( - rtl::Reference< jvmaccess::VirtualMachine > const & virtualMachine, - void * classLoader); + UnoVirtualMachine(rtl::Reference<jvmaccess::VirtualMachine> const& virtualMachine, + void* classLoader); /** Get the Java virtual machine wrapper. @return The Java virtual machine wrapper. Will never be null. */ - const rtl::Reference< jvmaccess::VirtualMachine >& getVirtualMachine() const; + const rtl::Reference<jvmaccess::VirtualMachine>& getVirtualMachine() const; /** Get the UNO class loader. @@ -85,18 +85,17 @@ public: different for different JDK versions, so that the mangled C++ name of the function would depend on the JDK version used at compile time. */ - void * getClassLoader() const { return m_classLoader;} + void* getClassLoader() const { return m_classLoader; } private: - UnoVirtualMachine(UnoVirtualMachine const &) = delete; - UnoVirtualMachine& operator =(UnoVirtualMachine const &) = delete; + UnoVirtualMachine(UnoVirtualMachine const&) = delete; + UnoVirtualMachine& operator=(UnoVirtualMachine const&) = delete; virtual ~UnoVirtualMachine() override; - rtl::Reference< jvmaccess::VirtualMachine > m_virtualMachine; - void * m_classLoader; + rtl::Reference<jvmaccess::VirtualMachine> m_virtualMachine; + void* m_classLoader; }; - } #endif diff --git a/include/jvmaccess/virtualmachine.hxx b/include/jvmaccess/virtualmachine.hxx index 2076a02577bd..a95668cdfa32 100644 --- a/include/jvmaccess/virtualmachine.hxx +++ b/include/jvmaccess/virtualmachine.hxx @@ -26,8 +26,8 @@ #include <jni.h> -namespace jvmaccess { - +namespace jvmaccess +{ /** An encapsulating wrapper around a Java virtual machine. */ class JVMACCESS_DLLPUBLIC VirtualMachine final : public salhelper::SimpleReferenceObject @@ -53,11 +53,11 @@ public: public: CreationException(); - CreationException(CreationException const &); + CreationException(CreationException const&); ~CreationException(); - CreationException & operator =(CreationException const &); + CreationException& operator=(CreationException const&); }; /** Attach the current thread to a virtual machine. @@ -68,7 +68,7 @@ public: @exception CreationException Thrown in case attaching fails (due to a JNI problem). */ - explicit AttachGuard(rtl::Reference< VirtualMachine > const & rMachine); + explicit AttachGuard(rtl::Reference<VirtualMachine> const& rMachine); /** Detach the current thread from the virtual machine again. */ @@ -79,14 +79,14 @@ public: @return A valid JNI environment pointer. Will never be null. */ - JNIEnv * getEnvironment() const { return m_pEnvironment; } + JNIEnv* getEnvironment() const { return m_pEnvironment; } private: - AttachGuard(AttachGuard const &) = delete; - AttachGuard& operator =(AttachGuard const &) = delete; + AttachGuard(AttachGuard const&) = delete; + AttachGuard& operator=(AttachGuard const&) = delete; - rtl::Reference< VirtualMachine > m_xMachine; - JNIEnv * m_pEnvironment; + rtl::Reference<VirtualMachine> m_xMachine; + JNIEnv* m_pEnvironment; bool m_bDetach; }; @@ -124,26 +124,24 @@ public: anyway). This parameter is currently unused (but may be used again in the future). */ - VirtualMachine(JavaVM * pVm, int nVersion, bool bDestroy, - JNIEnv const * pMainThreadEnv); + VirtualMachine(JavaVM* pVm, int nVersion, bool bDestroy, JNIEnv const* pMainThreadEnv); private: - VirtualMachine(VirtualMachine const &) = delete; - VirtualMachine& operator =(VirtualMachine const & ) = delete; + VirtualMachine(VirtualMachine const&) = delete; + VirtualMachine& operator=(VirtualMachine const&) = delete; virtual ~VirtualMachine() override; - JNIEnv * attachThread(bool * pAttached) const; + JNIEnv* attachThread(bool* pAttached) const; void detachThread() const; - JavaVM * m_pVm; + JavaVM* m_pVm; jint m_nVersion; bool m_bDestroy; friend class AttachGuard; // to access attachThread, detachThread }; - } #endif // INCLUDED_JVMACCESS_VIRTUALMACHINE_HXX |