diff options
31 files changed, 38 insertions, 131 deletions
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index daa74c8ea07d..27011d27bc82 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -51,8 +51,6 @@ class TabBar; class BaseWindow; class LocalizationMgr; -bool RemoveDialog( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName ); - class Shell : public SfxViewShell, public DocumentEventListener diff --git a/basic/source/inc/rtlproto.hxx b/basic/source/inc/rtlproto.hxx index 7a03a0383dc4..7236f78ed2ad 100644 --- a/basic/source/inc/rtlproto.hxx +++ b/basic/source/inc/rtlproto.hxx @@ -226,7 +226,6 @@ extern RTLFUNC(Timer); extern RTLFUNC(Weekday); extern RTLFUNC(WeekdayName); extern RTLFUNC(Year); -extern RTLFUNC(Date); extern RTLFUNC(InputBox); extern RTLFUNC(Me); extern RTLFUNC(MsgBox); diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 77d0828545a2..95ac76ea9306 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -84,8 +84,6 @@ using namespace com::sun::star::uno; #include <ctype.h> #include <errno.h> -SbxVariable* getDefaultProp( SbxVariable* pRef ); - #include "sbobjmod.hxx" #ifdef WNT diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx index ac6be9f8fe7f..99259373a0a6 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx @@ -384,8 +384,6 @@ typelib_TypeClass cpp_vtable_call( return eRet; } -extern "C" void privateSnippetExecutor(); - const int codeSnippetSize = 24; // Generate a trampoline that redirects method calls to diff --git a/compilerplugins/clang/unreffun.cxx b/compilerplugins/clang/unreffun.cxx index 8c726e3d0845..3b9c616414b3 100644 --- a/compilerplugins/clang/unreffun.cxx +++ b/compilerplugins/clang/unreffun.cxx @@ -45,6 +45,19 @@ bool hasCLanguageLinkageType(FunctionDecl const * decl) { return false; } +bool isFriendDecl(Decl const * decl) { + return decl->getFriendObjectKind() != Decl::FOK_None; +} + +Decl const * getPreviousNonFriendDecl(Decl const * decl) { + for (;;) { + decl = decl->getPreviousDecl(); + if (decl == nullptr || !isFriendDecl(decl)) { + return decl; + } + } +} + class UnrefFun: public RecursiveASTVisitor<UnrefFun>, public loplugin::Plugin { public: explicit UnrefFun(InstantiationData const & data): Plugin(data) {} @@ -69,6 +82,26 @@ bool UnrefFun::VisitFunctionDecl(FunctionDecl const * decl) { return true; } + if (!(decl->isThisDeclarationADefinition() || isFriendDecl(decl) + || decl->isFunctionTemplateSpecialization())) + { + Decl const * prev = getPreviousNonFriendDecl(decl); + if (prev != nullptr/* && prev != decl->getPrimaryTemplate()*/) { + report( + DiagnosticsEngine::Warning, + "redundant function%0 redeclaration", decl->getLocation()) + << ((decl->getTemplatedKind() + == FunctionDecl::TK_FunctionTemplate) + ? " template" : "") + << decl->getSourceRange(); + report( + DiagnosticsEngine::Note, "previous declaration is here", + prev->getLocation()) + << prev->getSourceRange(); + return true; + } + } + FunctionDecl const * canon = decl->getCanonicalDecl(); //TODO: is that the first? if (canon->isDeleted() || canon->isReferenced() diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx index c94534be7088..6d0dde33fe5b 100644 --- a/connectivity/source/drivers/odbc/ORealDriver.cxx +++ b/connectivity/source/drivers/odbc/ORealDriver.cxx @@ -25,7 +25,6 @@ namespace connectivity { - bool LoadLibrary_ODBC3(OUString &_rPath); // extern declaration of the function pointer extern T3SQLAllocHandle pODBC3SQLAllocHandle; extern T3SQLConnect pODBC3SQLConnect; diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx index 91daa4be675b..efea4760fab5 100644 --- a/hwpfilter/source/lexer.cxx +++ b/hwpfilter/source/lexer.cxx @@ -988,14 +988,6 @@ int token_debug(const char *format, ...); * section 1. */ -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - #ifndef YY_NO_UNPUT //static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif diff --git a/include/canvas/verifyinput.hxx b/include/canvas/verifyinput.hxx index 64d85670f12e..14f86769b299 100644 --- a/include/canvas/verifyinput.hxx +++ b/include/canvas/verifyinput.hxx @@ -162,29 +162,6 @@ namespace canvas ::com::sun::star::uno::XInterface >& xIf, ::sal_Int16 nArgPos ); - /** Verify that the given point contains valid floating point - values. - - @param rPoint - Point to check - - @param xIf - The interface that should be reported as the one - generating the exception. - - @param nArgPos - Argument position on the call site (i.e. the position of - the argument, checked here, on the UNO interface - method. Counting starts at 0). - - @throws an lang::IllegalArgumentException, if anything is wrong - */ - CANVASTOOLS_DLLPUBLIC void verifyInput( const ::com::sun::star::geometry::RealPoint2D& rPoint, - const char* pStr, - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface >& xIf, - ::sal_Int16 nArgPos ); - /** Verify that the given rectangle contains valid floating point values. diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index 287b2a583d88..b7cf288adf57 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -28,10 +28,6 @@ #include <string.h> -#ifndef _NO_PROTO -int AddInclude( char *pIncStr ); /* BP, 11.09.91, Forward-Deklaration */ -#endif - #if (OSL_DEBUG_LEVEL > 1) && (HOST == SYS_VMS || HOST == SYS_UNIX) #include <signal.h> #endif @@ -75,7 +71,6 @@ void addfile(FILE* fp, char* filename) */ { FILEINFO *file; - extern FILEINFO *getfile( int, char * ); file = getfile(NBUFF, filename); file->fp = fp; /* Better remember FILE * */ file->buffer[0] = EOS; /* Initialize for first read */ @@ -440,10 +435,6 @@ void initdefines() int i; time_t tvec; -#if !defined( WNT ) && !defined(G3) - extern char *ctime(time_t const *); -#endif - /* * Predefine the built-in symbols. Allow the * implementor to pre-define a symbol as "" to diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index 6473669e7b63..087f15fbccfe 100644 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -397,7 +397,6 @@ void expand(DEFBUF* tokenp) { int c; FILEINFO *file; - extern FILEINFO *getfile(int, char *); #if OSL_DEBUG_LEVEL > 1 if (debug) @@ -553,7 +552,6 @@ void expstuff(DEFBUF* tokenp) char *defend; /* -> output buff end */ int string_magic; /* String formal hack */ FILEINFO *file; /* Funny #include */ - extern FILEINFO *getfile(int, char *); file = getfile(NBUFF, tokenp->name); inp = tokenp->repl; /* -> macro replacement */ diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index 4b09f60d453c..7d26842c4dde 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -218,7 +218,6 @@ eval() int skip; /* For short-circuit testing */ int value[NEXP]; /* Value stack */ OPTAB opstack[NEXP]; /* Operand stack */ - extern int *evaleval(int *, int, int); /* Does actual evaluation */ valp = value; opp = opstack; opp->op = OP_END; /* Mark bottom of stack */ diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c index 75909647dc39..963676d597cf 100644 --- a/rsc/source/rscpp/cpp6.c +++ b/rsc/source/rscpp/cpp6.c @@ -1021,7 +1021,6 @@ void ungetstring(char* text) */ { FILEINFO *file; - extern FILEINFO *getfile(int, char *); file = getfile(strlen(text) + 1, ""); strcpy(file->buffer, text); } diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 3d4adf74dfef..6c39a974dec7 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -85,7 +85,6 @@ using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; using ::com::sun::star::drawing::XShape; -extern OUString getPageApiNameFromUiName( const OUString& rUIName ); extern OUString getUiNameFromPageApiNameImpl( const OUString& rApiName ); typedef std::map<sal_uIntPtr, SfxExtItemPropertySetInfo*> SdExtPropertySetInfoCache; diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 0195c32b7357..930df6e117a9 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -19,6 +19,7 @@ #include "filterdet.hxx" +#include "inc/pdfihelper.hxx" #include "inc/pdfparse.hxx" #include <osl/diagnose.h> diff --git a/sdext/source/pdfimport/filterdet.hxx b/sdext/source/pdfimport/filterdet.hxx index 6a5c59f88234..334e68fc8aa8 100644 --- a/sdext/source/pdfimport/filterdet.hxx +++ b/sdext/source/pdfimport/filterdet.hxx @@ -94,12 +94,6 @@ bool checkDocChecksum( const OUString& rInPDFFileURL, sal_uInt32 nBytes, const OUString& rChkSum ); -bool getPassword( const css::uno::Reference< css::task::XInteractionHandler >& xHandler, - OUString& o_rPwd, - bool bFirstTry, - const OUString& i_rDocName - ); - } #endif diff --git a/svl/source/items/rngitem.cxx b/svl/source/items/rngitem.cxx index 841b13ab2cc7..a3d9a680e859 100644 --- a/svl/source/items/rngitem.cxx +++ b/svl/source/items/rngitem.cxx @@ -32,10 +32,6 @@ static inline sal_uInt16 Count_Impl(const sal_uInt16 * pRanges) TYPEINIT1_AUTOFACTORY(SfxRangeItem, SfxPoolItem); TYPEINIT1_AUTOFACTORY(SfxUShortRangesItem, SfxPoolItem); -sal_uInt16 Count_Impl( const sal_uInt16 *pRanges ); - - - SfxRangeItem::SfxRangeItem() { nFrom = 0; diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index c090b3f0dfae..dd95d13492f7 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -302,7 +302,6 @@ public: }; bool CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, bool bChkSection ); -bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove ); #endif // INCLUDED_SW_INC_PAM_HXX diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 3ab0b228c3c4..b91aa41f84ad 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -559,7 +559,6 @@ void GetRTFWriter( const OUString&, const OUString&, WriterRef& ); void GetASCWriter( const OUString&, const OUString&, WriterRef& ); void GetHTMLWriter( const OUString&, const OUString&, WriterRef& ); void GetXMLWriter( const OUString&, const OUString&, WriterRef& ); -void GetWW8Writer( const OUString&, const OUString&, WriterRef& ); #endif diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 1abeb5b43397..a42044306506 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -132,8 +132,6 @@ using namespace ::com::sun::star; -extern void _FrmFinit(); - // some ranges for sets in collections/ nodes // AttrSet range for the 2 break attributes diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 0e5d0e771b2d..b5bad26e746a 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -159,8 +159,6 @@ typedef bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, bool #ifdef DBG_UTIL -void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize ); - #define CHECKBOXWIDTH \ { \ SwTwips nSize = GetFrmFmt()->GetFrmSize().GetWidth(); \ diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 0b104a395a21..20df05ef5c94 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -49,6 +49,7 @@ #include <tabcol.hxx> #include <cellatr.hxx> #include <pam.hxx> +#include <pamtyp.hxx> #include <viscrs.hxx> #include <tblsel.hxx> #include <swtblfmt.hxx> diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx index 489119fa7446..b6db0ef213f7 100644 --- a/sw/source/core/inc/flowfrm.hxx +++ b/sw/source/core/inc/flowfrm.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_SW_SOURCE_CORE_INC_FLOWFRM_HXX #define INCLUDED_SW_SOURCE_CORE_INC_FLOWFRM_HXX +#include "frmtool.hxx" + class SwPageFrm; class SwRect; class SwBorderAttrs; @@ -28,8 +30,6 @@ class SwNodeIndex; // #i44049# class SwObjectFormatterTxtFrm; -void MakeFrms( SwDoc *, const SwNodeIndex &, const SwNodeIndex & ); - /** Base class that provides the general functionalities for frames that are allowed at page breaks (flow) and shall continue on the next page (can be split), e.g. paragraphs (CntntFrm) or tables (TabFrm). diff --git a/sw/source/core/inc/unofreg.hxx b/sw/source/core/inc/unofreg.hxx index fb172079e289..990b58491806 100644 --- a/sw/source/core/inc/unofreg.hxx +++ b/sw/source/core/inc/unofreg.hxx @@ -110,10 +110,6 @@ css::uno::Sequence< OUString > SAL_CALL SwXMailMerge_getSupportedServiceNames() OUString SAL_CALL SwXMailMerge_getImplementationName() throw(); css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMailMerge_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception ); -css::uno::Sequence< OUString > SAL_CALL SwXMailMerge_getSupportedServiceNames() throw(); -OUString SAL_CALL SwXMailMerge_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMailMerge_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception ); - // Layout dump filter css::uno::Sequence< OUString > SAL_CALL LayoutDumpFilter_getSupportedServiceNames() throw(); OUString SAL_CALL LayoutDumpFilter_getImplementationName() throw(); diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index cf5b25b07dc7..b89aed3fd965 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1003,8 +1003,6 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, #ifdef DBG_UTIL { -// to be found in tblrwcl.cxx -extern void _CheckBoxWidth( const SwTableLine&, SwTwips ); // do some checking for correct table widths SwTwips nSize = GetFrmFmt()->GetFrmSize().GetWidth(); for (size_t n = 0; n < aLines.size(); ++n) diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index f99b377537b4..bb546746fa81 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -27,6 +27,7 @@ #include <docary.hxx> #include <swundo.hxx> #include <pam.hxx> +#include <pamtyp.hxx> #include <ndtxt.hxx> #include <UndoCore.hxx> #include <rolbck.hxx> diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index a6ca75737946..395953508d8e 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -47,9 +47,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star; using namespace ::rtl; -//impl in envimg.cxx -extern SW_DLLPUBLIC OUString MakeSender(); - SwEnvPreview::SwEnvPreview(Window* pParent, WinBits nStyle) : Window(pParent, nStyle) { diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index b411bb205d0a..f63907a3322d 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -66,8 +66,6 @@ #include <svx/dialogs.hrc> #include <svx/flagsdef.hxx> -extern SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell(); - // the dialog's carrier SwTemplateDlg::SwTemplateDlg(Window* pParent, SfxStyleSheetBase& rBase, diff --git a/xmloff/inc/MetaExportComponent.hxx b/xmloff/inc/MetaExportComponent.hxx index 69cbb77949b9..749d414d17ef 100644 --- a/xmloff/inc/MetaExportComponent.hxx +++ b/xmloff/inc/MetaExportComponent.hxx @@ -54,21 +54,6 @@ protected: virtual void _ExportContent() SAL_OVERRIDE; }; -// global functions to support the component - -::com::sun::star::uno::Sequence< OUString > SAL_CALL - XMLMetaExportComponent_getSupportedServiceNames() - throw(); - -OUString SAL_CALL XMLMetaExportComponent_getImplementationName() - throw(); - -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - XMLMetaExportComponent_createInstance( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > & ) - throw( ::com::sun::star::uno::Exception ); - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLAutoTextEventExport.hxx b/xmloff/source/text/XMLAutoTextEventExport.hxx index 79d104da466b..ec8eadfdfb09 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.hxx +++ b/xmloff/source/text/XMLAutoTextEventExport.hxx @@ -97,36 +97,6 @@ protected: virtual void _ExportContent() SAL_OVERRIDE; }; - - -// global functions to support the component - -::com::sun::star::uno::Sequence< OUString > SAL_CALL - XMLAutoTextEventExport_getSupportedServiceNames() - throw(); - -OUString SAL_CALL XMLAutoTextEventExport_getImplementationName() - throw(); - -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - XMLAutoTextEventExportOOO_createInstance( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > & ) - throw( ::com::sun::star::uno::Exception ); - -::com::sun::star::uno::Sequence< OUString > SAL_CALL - XMLAutoTextEventExportOOO_getSupportedServiceNames() - throw(); - -OUString SAL_CALL XMLAutoTextEventExportOOO_getImplementationName() - throw(); - -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - XMLAutoTextEventExportOOO_createInstance( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > & ) - throw( ::com::sun::star::uno::Exception ); - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 7d51d95001d3..890a5f06b58c 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -47,8 +47,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::beans; -OUString SAL_CALL OOo2OasisTransformer_getImplementationName() throw(); - enum XMLUserDefinedTransformerAction { XML_ETACTION_DOCUMENT=XML_ETACTION_USER_DEFINED, diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 2969ef12fb98..e2d1696c8d39 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -52,8 +52,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::beans; -OUString SAL_CALL Oasis2OOoTransformer_getImplementationName() throw(); - enum XMLUserDefinedTransformerAction { XML_ETACTION_META=XML_ETACTION_USER_DEFINED, |