summaryrefslogtreecommitdiff
path: root/cppu/source/typelib
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-25 14:57:44 +0200
committerNoel Grandin <noel@peralex.com>2014-07-11 14:12:25 +0200
commitdac4ca5f682fdd0c3eee7f7ee1d98c9b3c8b7ce4 (patch)
treef0f66445c3f396759c41d7e3294e728653dbfa88 /cppu/source/typelib
parent28b6325901138a6267320902ec889fc434ddde91 (diff)
new loplugin: externalandnotdefined
Find "missing headers," where a function is declared directly in the .cxx (as extern) and not defined, and should arguably instead be declared in an include file. Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
Diffstat (limited to 'cppu/source/typelib')
-rw-r--r--cppu/source/typelib/static_types.cxx18
-rw-r--r--cppu/source/typelib/typelib.cxx12
-rw-r--r--cppu/source/typelib/typelib.hxx43
3 files changed, 45 insertions, 28 deletions
diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx
index 537eff83f835..3886745712fb 100644
--- a/cppu/source/typelib/static_types.cxx
+++ b/cppu/source/typelib/static_types.cxx
@@ -30,6 +30,7 @@
#include <rtl/instance.hxx>
#include <typelib/typedescription.h>
+#include "typelib.hxx"
using namespace osl;
@@ -41,23 +42,6 @@ extern "C"
{
-sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
- const typelib_TypeDescription * pTypeDescription,
- sal_Int32 nOffset,
- sal_Int32 & rMaxIntegralTypeSize )
- SAL_THROW_EXTERN_C();
-
-void SAL_CALL typelib_typedescription_newEmpty(
- typelib_TypeDescription ** ppRet,
- typelib_TypeClass eTypeClass,
- rtl_uString * pTypeName )
- SAL_THROW_EXTERN_C();
-
-void SAL_CALL typelib_typedescriptionreference_getByName(
- typelib_TypeDescriptionReference ** ppRet,
- rtl_uString * pName )
- SAL_THROW_EXTERN_C();
-
#ifdef SAL_W32
#pragma pack(push, 8)
#endif
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 85335784929a..7a6ec94227bb 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -42,6 +42,7 @@
#include <osl/diagnose.h>
#include <typelib/typedescription.h>
#include <uno/any2.h>
+#include "typelib.hxx"
using namespace std;
using namespace osl;
@@ -148,11 +149,6 @@ static inline sal_Int32 getDescriptionSize( typelib_TypeClass eTypeClass )
-extern "C" void SAL_CALL typelib_typedescriptionreference_getByName(
- typelib_TypeDescriptionReference ** ppRet, rtl_uString * pName )
- SAL_THROW_EXTERN_C();
-
-
struct equalStr_Impl
{
bool operator()(const sal_Unicode * const & s1, const sal_Unicode * const & s2) const
@@ -383,12 +379,6 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL typelib_typedescription_revokeCallback(
}
}
-extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
- const typelib_TypeDescription * pTypeDescription,
- sal_Int32 nOffset, sal_Int32 & rMaxIntegralTypeSize )
- SAL_THROW_EXTERN_C();
-
-
static inline void typelib_typedescription_initTables(
typelib_TypeDescription * pTD )
{
diff --git a/cppu/source/typelib/typelib.hxx b/cppu/source/typelib/typelib.hxx
new file mode 100644
index 000000000000..18c8daa04b53
--- /dev/null
+++ b/cppu/source/typelib/typelib.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_CPPU_SOURCE_TYPELIB_HXX
+#define INCLUDED_CPPU_SOURCE_TYPELIB_HXX
+
+extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
+ const typelib_TypeDescription * pTypeDescription,
+ sal_Int32 nOffset,
+ sal_Int32 & rMaxIntegralTypeSize )
+ SAL_THROW_EXTERN_C();
+
+
+extern "C" void SAL_CALL typelib_typedescription_newEmpty(
+ typelib_TypeDescription ** ppRet,
+ typelib_TypeClass eTypeClass,
+ rtl_uString * pTypeName )
+ SAL_THROW_EXTERN_C();
+
+extern "C" void SAL_CALL typelib_typedescriptionreference_getByName(
+ typelib_TypeDescriptionReference ** ppRet,
+ rtl_uString * pName )
+ SAL_THROW_EXTERN_C();
+
+#endif // INCLUDED_CPPU_SOURCE_TYPELIB_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */