Kaydet (Commit) f2e74301 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

New loplugin:externvar: unotools

Change-Id: I117f5166dffa1514cfc774105b4c94009183fe90
üst 3b2ec686
...@@ -20,6 +20,11 @@ $(eval $(call gb_Library_use_custom_headers,utl,\ ...@@ -20,6 +20,11 @@ $(eval $(call gb_Library_use_custom_headers,utl,\
# in case UNO services are exported: declare location of component file # in case UNO services are exported: declare location of component file
$(eval $(call gb_Library_set_componentfile,utl,unotools/util/utl)) $(eval $(call gb_Library_set_componentfile,utl,unotools/util/utl))
$(eval $(call gb_Library_set_include,utl, \
$$(INCLUDE) \
-I$(SRCDIR)/unotools/inc \
))
# add any additional definitions to be set for compilation here # add any additional definitions to be set for compilation here
# (e.g. -DLIB_DLLIMPLEMENTATION) # (e.g. -DLIB_DLLIMPLEMENTATION)
$(eval $(call gb_Library_add_defs,utl,\ $(eval $(call gb_Library_add_defs,utl,\
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* 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/.
*/
#ifndef INCLUDED_UNOTOOLS_INC_UNOTOOLSSERVICES_HXX
#define INCLUDED_UNOTOOLS_INC_UNOTOOLSSERVICES_HXX
#include <sal/config.h>
namespace comphelper { namespace service_decl { class ServiceDecl; } }
extern comphelper::service_decl::ServiceDecl const OTempFileServiceDecl;
extern comphelper::service_decl::ServiceDecl const ServiceDocumenterDecl;
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
...@@ -36,7 +36,7 @@ namespace utl ...@@ -36,7 +36,7 @@ namespace utl
{ {
class SfxMiscCfg; class SfxMiscCfg;
std::weak_ptr<SfxMiscCfg> g_pOptions; static std::weak_ptr<SfxMiscCfg> g_pOptions;
class SfxMiscCfg : public utl::ConfigItem class SfxMiscCfg : public utl::ConfigItem
{ {
......
...@@ -221,7 +221,7 @@ Sequence< OUString > SvtPrintWarningOptions_Impl::impl_GetPropertyNames() ...@@ -221,7 +221,7 @@ Sequence< OUString > SvtPrintWarningOptions_Impl::impl_GetPropertyNames()
return seqPropertyNames; return seqPropertyNames;
} }
std::weak_ptr<SvtPrintWarningOptions_Impl> g_pPrintWarningOptions; static std::weak_ptr<SvtPrintWarningOptions_Impl> g_pPrintWarningOptions;
SvtPrintWarningOptions::SvtPrintWarningOptions() SvtPrintWarningOptions::SvtPrintWarningOptions()
{ {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#include <ServiceDocumenter.hxx> #include <ServiceDocumenter.hxx>
#include <unotoolsservices.hxx>
#include <comphelper/servicedecl.hxx> #include <comphelper/servicedecl.hxx>
#include <com/sun/star/system/XSystemShellExecute.hpp> #include <com/sun/star/system/XSystemShellExecute.hpp>
using namespace com::sun::star; using namespace com::sun::star;
...@@ -59,8 +60,8 @@ void unotools::misc::ServiceDocumenter::showServiceDocs(const Reference<XService ...@@ -59,8 +60,8 @@ void unotools::misc::ServiceDocumenter::showServiceDocs(const Reference<XService
} }
namespace sdecl = ::comphelper::service_decl; namespace sdecl = ::comphelper::service_decl;
sdecl::class_< unotools::misc::ServiceDocumenter > ServiceDocumenterImpl; sdecl::class_< unotools::misc::ServiceDocumenter > const ServiceDocumenterImpl;
extern const sdecl::ServiceDecl ServiceDocumenterDecl( const sdecl::ServiceDecl ServiceDocumenterDecl(
ServiceDocumenterImpl, ServiceDocumenterImpl,
"com.sun.star.comp.unotools.misc.ServiceDocumenter", "com.sun.star.comp.unotools.misc.ServiceDocumenter",
""); "");
......
...@@ -1018,7 +1018,7 @@ enum SymbolFont ...@@ -1018,7 +1018,7 @@ enum SymbolFont
Wingdings3=32, MTExtra=64, TimesNewRoman=128 Wingdings3=32, MTExtra=64, TimesNewRoman=128
}; };
const char *aSymbolNames[] = const char * const aSymbolNames[] =
{ {
"Symbol", "Wingdings", "Monotype Sorts", "Webdings", "Wingdings 2", "Symbol", "Wingdings", "Monotype Sorts", "Webdings", "Wingdings 2",
"Wingdings 3", "MT Extra", "Times New Roman" "Wingdings 3", "MT Extra", "Times New Roman"
...@@ -1041,7 +1041,7 @@ public: ...@@ -1041,7 +1041,7 @@ public:
struct ExtraTable { sal_Unicode cStar; sal_uInt8 cMS;}; struct ExtraTable { sal_Unicode cStar; sal_uInt8 cMS;};
ExtraTable aWingDingsExtraTab[] = ExtraTable const aWingDingsExtraTab[] =
{ {
{0x25cf, 0x6C}, {0x2714, 0xFC}, {0x2717, 0xFB}, {0x2794, 0xE8}, {0x25cf, 0x6C}, {0x2714, 0xFC}, {0x2717, 0xFB}, {0x2794, 0xE8},
{0x27a2, 0xD8}, {0xe000, 0x6F}, {0xe001, 0x73}, {0xe002, 0x74}, {0x27a2, 0xD8}, {0xe000, 0x6F}, {0xe001, 0x73}, {0xe002, 0x74},
...@@ -1059,7 +1059,7 @@ ExtraTable aWingDingsExtraTab[] = ...@@ -1059,7 +1059,7 @@ ExtraTable aWingDingsExtraTab[] =
{0xe034, 0x4D}, {0xe0aa, 0x71}, {0xe422, 0x44} {0xe034, 0x4D}, {0xe0aa, 0x71}, {0xe422, 0x44}
}; };
ExtraTable aSymbolExtraTab2[] = ExtraTable const aSymbolExtraTab2[] =
{ {
{0x0020, 0x20}, {0x00A0, 0x20}, {0x0021, 0x21}, {0x2200, 0x22}, {0x0020, 0x20}, {0x00A0, 0x20}, {0x0021, 0x21}, {0x2200, 0x22},
{0x0023, 0x23}, {0x2203, 0x24}, {0x0025, 0x25}, {0x0026, 0x26}, {0x0023, 0x23}, {0x2203, 0x24}, {0x0025, 0x25}, {0x0026, 0x26},
...@@ -1087,7 +1087,7 @@ ExtraTable aSymbolExtraTab2[] = ...@@ -1087,7 +1087,7 @@ ExtraTable aSymbolExtraTab2[] =
{0x2320, 0xF3}, {0x2321, 0xF5}, {0x2013, 0x2D} {0x2320, 0xF3}, {0x2321, 0xF5}, {0x2013, 0x2D}
}; };
ExtraTable aSymbolExtraTab[] = ExtraTable const aSymbolExtraTab[] =
{ {
{0xe021, 0xD3}, {0xe024, 0xD2}, {0xe035, 0x20}, {0xe036, 0x28}, {0xe021, 0xD3}, {0xe024, 0xD2}, {0xe035, 0x20}, {0xe036, 0x28},
{0xe037, 0x29}, {0xe039, 0x20}, {0xe083, 0x2B}, {0xe084, 0x3C}, {0xe037, 0x29}, {0xe039, 0x20}, {0xe083, 0x2B}, {0xe084, 0x3C},
...@@ -1109,7 +1109,7 @@ ExtraTable aSymbolExtraTab[] = ...@@ -1109,7 +1109,7 @@ ExtraTable aSymbolExtraTab[] =
{0xe0dc, 0xAD}, {0xe0dd, 0xAF} {0xe0dc, 0xAD}, {0xe0dd, 0xAF}
}; };
ExtraTable aTNRExtraTab[] = ExtraTable const aTNRExtraTab[] =
{ {
{0xe021, 0xA9}, {0xe021, 0xA9},
{0xe022, 0x40}, {0xe022, 0x40},
...@@ -1207,7 +1207,7 @@ StarSymbolToMSMultiFontImpl::StarSymbolToMSMultiFontImpl() ...@@ -1207,7 +1207,7 @@ StarSymbolToMSMultiFontImpl::StarSymbolToMSMultiFontImpl()
const char *SymbolFontToString(int nResult) const char *SymbolFontToString(int nResult)
{ {
const char **ppName = aSymbolNames; const char * const *ppName = aSymbolNames;
int nI = Symbol; int nI = Symbol;
while (nI <= nResult) while (nI <= nResult)
{ {
......
...@@ -11,11 +11,9 @@ ...@@ -11,11 +11,9 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <uno/environment.h> #include <uno/environment.h>
namespace sdecl = ::comphelper::service_decl; #include <unotoolsservices.hxx>
extern sdecl::ServiceDecl const OTempFileServiceDecl;
extern sdecl::ServiceDecl const ServiceDocumenterDecl;
namespace sdecl = ::comphelper::service_decl;
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL utl_component_getFactory( extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL utl_component_getFactory(
sal_Char const* pImplName, void*, void*) sal_Char const* pImplName, void*, void*)
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include "XTempFile.hxx" #include "XTempFile.hxx"
#include <unotoolsservices.hxx>
#include <cppuhelper/factory.hxx> #include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx> #include <cppuhelper/typeprovider.hxx>
...@@ -402,8 +403,8 @@ throw ( css::io::IOException, css::uno::RuntimeException, std::exception ) ...@@ -402,8 +403,8 @@ throw ( css::io::IOException, css::uno::RuntimeException, std::exception )
} }
namespace sdecl = ::comphelper::service_decl; namespace sdecl = ::comphelper::service_decl;
sdecl::class_< OTempFileService> OTempFileServiceImpl; sdecl::class_< OTempFileService> const OTempFileServiceImpl;
extern const sdecl::ServiceDecl OTempFileServiceDecl( const sdecl::ServiceDecl OTempFileServiceDecl(
OTempFileServiceImpl, OTempFileServiceImpl,
"com.sun.star.io.comp.TempFile", "com.sun.star.io.comp.TempFile",
"com.sun.star.io.TempFile"); "com.sun.star.io.TempFile");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment