From dac4ca5f682fdd0c3eee7f7ee1d98c9b3c8b7ce4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 25 Jun 2014 14:57:44 +0200 Subject: 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 --- svx/source/stbctrls/modctrl.cxx | 1 + svx/source/stbctrls/modctrl_internal.hxx | 26 ++++++++++++++++++++++++++ svx/source/stbctrls/zoomctrl.cxx | 3 +-- svx/source/svdraw/svdoutlinercache.cxx | 3 +-- 4 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 svx/source/stbctrls/modctrl_internal.hxx (limited to 'svx/source') diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index 63d50fde27c7..de7e64717529 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -28,6 +28,7 @@ #include #include +#include "modctrl_internal.hxx" using ::com::sun::star::uno::Sequence; using ::com::sun::star::beans::PropertyValue; diff --git a/svx/source/stbctrls/modctrl_internal.hxx b/svx/source/stbctrls/modctrl_internal.hxx new file mode 100644 index 000000000000..753bf95a6725 --- /dev/null +++ b/svx/source/stbctrls/modctrl_internal.hxx @@ -0,0 +1,26 @@ +/* -*- 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_SVX_SOURCE_STBCTRLS_MODCTRL_INTERNAL_HXX +#define INCLUDED_SVX_SOURCE_STBCTRLS_MODCTRL_INTERNAL_HXX + +Point centerImage(const Rectangle& rBoundingRect, const Image& rImg); + +#endif // INCLUDED_SVX_SOURCE_STBCTRLS_MODCTRL_INTERNAL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index cd711eba9a18..d5af62d7e227 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -33,6 +33,7 @@ #include #include "stbctrls.h" #include +#include "modctrl_internal.hxx" SFX_IMPL_STATUSBAR_CONTROL(SvxZoomStatusBarControl,SvxZoomItem); @@ -188,8 +189,6 @@ SvxZoomPageStatusBarControl::SvxZoomPageStatusBarControl(sal_uInt16 _nSlotId, GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(RID_SVXSTR_FIT_SLIDE)); } -extern Point centerImage(const Rectangle& rBoundingRect, const Image& rImg); - void SvxZoomPageStatusBarControl::Paint(const UserDrawEvent& rUsrEvt) { OutputDevice* pDev = rUsrEvt.GetDevice(); diff --git a/svx/source/svdraw/svdoutlinercache.cxx b/svx/source/svdraw/svdoutlinercache.cxx index 8f9eba82e52a..e9697988e043 100644 --- a/svx/source/svdraw/svdoutlinercache.cxx +++ b/svx/source/svdraw/svdoutlinercache.cxx @@ -20,8 +20,7 @@ #include "svdoutlinercache.hxx" #include #include - -extern SdrOutliner* SdrMakeOutliner( sal_uInt16 nOutlinerMode, SdrModel* pModel ); +#include SdrOutlinerCache::SdrOutlinerCache( SdrModel* pModel ) : mpModel( pModel ), -- cgit