Upcoming improved loplugin:staticanonymous -> redundantstatic: comphelper

Change-Id: I222ea673a44528cb04847a912cd8da971bb1be3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97542
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2020-06-30 18:33:06 +02:00
parent dbfcdc4b70
commit e28faafba4
9 changed files with 27 additions and 27 deletions

View File

@@ -56,7 +56,7 @@ public:
namespace comphelper_ifcontainer
{
static const int nTests = 10;
const int nTests = 10;
class IfTest : public CppUnit::TestFixture
{
osl::Mutex m_aGuard;

View File

@@ -48,7 +48,7 @@ using namespace comphelper;
using namespace css;
using namespace css::xml::dom;
static const sal_uInt32 BACKUP_FILE_HELPER_BLOCK_SIZE = 16384;
const sal_uInt32 BACKUP_FILE_HELPER_BLOCK_SIZE = 16384;
namespace
{
@@ -353,7 +353,7 @@ namespace
typedef std::vector< ExtensionInfoEntry > ExtensionInfoEntryVector;
static const OUStringLiteral gaRegPath { "/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend/backenddb.xml" };
const OUStringLiteral gaRegPath { "/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend/backenddb.xml" };
class ExtensionInfo
{

View File

@@ -24,7 +24,7 @@
namespace comphelper{
static const char ERRMSG_INVALID_COMPONENT_PARAM[] = "NULL as component reference not allowed.";
const char ERRMSG_INVALID_COMPONENT_PARAM[] = "NULL as component reference not allowed.";
NumberedCollection::NumberedCollection()

View File

@@ -19,15 +19,15 @@
namespace comphelper {
/// Will handle com::sun::star::ucb::InteractiveIOException and derived classes
static const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION = 0;
const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION = 0;
/// Will handle com::sun::star::ucb::UnsupportedDataSinkException
static const sal_Int32 HANDLE_UNSUPPORTEDDATASINKEXCEPTION = 1;
const sal_Int32 HANDLE_UNSUPPORTEDDATASINKEXCEPTION = 1;
/// Will handle com::sun::star::ucb::InteractiveNetworkException
static const sal_Int32 HANDLE_INTERACTIVENETWORKEXCEPTION = 2;
const sal_Int32 HANDLE_INTERACTIVENETWORKEXCEPTION = 2;
/// Will handle com::sun::star::ucb::CertificateValidationRequest
static const sal_Int32 HANDLE_CERTIFICATEREQUEST = 3;
const sal_Int32 HANDLE_CERTIFICATEREQUEST = 3;
/// Will handle com::sun::star::ucb::AuthenticationRequest
static const sal_Int32 HANDLE_AUTHENTICATIONREQUEST = 4;
const sal_Int32 HANDLE_AUTHENTICATIONREQUEST = 4;
SimpleFileAccessInteraction::SimpleFileAccessInteraction(
const css::uno::Reference< css::task::XInteractionHandler >& xHandler )

View File

@@ -28,7 +28,7 @@
namespace comphelper {
namespace {
static SolarMutex* g_pSolarMutex = nullptr;
SolarMutex* g_pSolarMutex = nullptr;
}
SolarMutex *SolarMutex::get()

View File

@@ -75,8 +75,8 @@ static bool makeCanonicalFileURL( OUString & rURL )
namespace comphelper {
static OUString const g_aOfficeBrandDirMacro("$(brandbaseurl)");
static OUString const g_aUserDirMacro("$(userdataurl)");
OUString const g_aOfficeBrandDirMacro("$(brandbaseurl)");
OUString const g_aUserDirMacro("$(userdataurl)");
OfficeInstallationDirectories::OfficeInstallationDirectories(
const uno::Reference< uno::XComponentContext > & xCtx )

View File

@@ -269,20 +269,20 @@ uno::Sequence< uno::Sequence< beans::StringPair > > ReadSequence_Impl(
} // namespace OFOPXMLHelper
// Relations info related strings
static OUString const g_aRelListElement("Relationships");
static OUString const g_aRelElement( "Relationship" );
static OUString const g_aIDAttr( "Id" );
static OUString const g_aTypeAttr( "Type" );
static OUString const g_aTargetModeAttr( "TargetMode" );
static OUString const g_aTargetAttr( "Target" );
OUString const g_aRelListElement("Relationships");
OUString const g_aRelElement( "Relationship" );
OUString const g_aIDAttr( "Id" );
OUString const g_aTypeAttr( "Type" );
OUString const g_aTargetModeAttr( "TargetMode" );
OUString const g_aTargetAttr( "Target" );
// ContentType related strings
static OUString const g_aTypesElement( "Types" );
static OUString const g_aDefaultElement( "Default" );
static OUString const g_aOverrideElement( "Override" );
static OUString const g_aExtensionAttr( "Extension" );
static OUString const g_aPartNameAttr( "PartName" );
static OUString const g_aContentTypeAttr( "ContentType" );
OUString const g_aTypesElement( "Types" );
OUString const g_aDefaultElement( "Default" );
OUString const g_aOverrideElement( "Override" );
OUString const g_aExtensionAttr( "Extension" );
OUString const g_aPartNameAttr( "PartName" );
OUString const g_aContentTypeAttr( "ContentType" );
OFOPXMLHelper_Impl::OFOPXMLHelper_Impl( sal_uInt16 nFormat )
: m_nFormat( nFormat )

View File

@@ -19,7 +19,7 @@ namespace
//Will be inside an xml comment, so can't use '-' in case '--' appears in
//output, etc. Despite what *is* legal in an xml comment, just using the
//base-64 subset to avoid pain with simplistic third-party parsers
static const sal_uInt8 aChaffEncoder[] =
const sal_uInt8 aChaffEncoder[] =
{
'A', 'Q', 'g', 'w', 'B', 'R', 'h', 'x',
'C', 'S', 'i', 'y', 'D', 'T', 'j', 'z',

View File

@@ -26,8 +26,8 @@
namespace comphelper
{
static const size_t nThreadCountGlobal = std::thread::hardware_concurrency();
const static bool bHyperThreadingActive = cpuid::hasHyperThreading();
const size_t nThreadCountGlobal = std::thread::hardware_concurrency();
const bool bHyperThreadingActive = cpuid::hasHyperThreading();
static comphelper::ThreadPool& rTPool(comphelper::ThreadPool::getSharedOptimalPool());
static thread_local std::mt19937 aGenerator{ std::random_device{}() };