summaryrefslogtreecommitdiffstats
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-06-30 15:25:15 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-06-30 19:05:48 +0200
commitd902e04bafcf7436c4c05140e82e677cd6bc826f (patch)
tree0fe1f2f76d11d798711264d56d697ef1cb876bca /basic
parentUpcoming improved loplugin:staticanonymous -> redundantstatic: binaryurp (diff)
downloadcore-d902e04bafcf7436c4c05140e82e677cd6bc826f.tar.gz
core-d902e04bafcf7436c4c05140e82e677cd6bc826f.zip
Upcoming improved loplugin:staticanonymous -> redundantstatic: basic
Change-Id: I1046ee1ea28e19afa51b0e20ee573105ced77535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97522 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/cppunit/test_scanner.cxx12
-rw-r--r--basic/source/basmgr/basmgr.cxx12
-rw-r--r--basic/source/classes/image.cxx2
-rw-r--r--basic/source/classes/sb.cxx8
-rw-r--r--basic/source/classes/sbunoobj.cxx8
-rw-r--r--basic/source/comp/buffer.cxx2
-rw-r--r--basic/source/comp/exprgen.cxx2
-rw-r--r--basic/source/comp/parser.cxx2
-rw-r--r--basic/source/comp/token.cxx2
-rw-r--r--basic/source/runtime/ddectrl.cxx2
-rw-r--r--basic/source/runtime/runtime.cxx2
-rw-r--r--basic/source/sbx/sbxscan.cxx2
12 files changed, 28 insertions, 28 deletions
diff --git a/basic/qa/cppunit/test_scanner.cxx b/basic/qa/cppunit/test_scanner.cxx
index 6f3d9d7ecae1..9b80c32512d6 100644
--- a/basic/qa/cppunit/test_scanner.cxx
+++ b/basic/qa/cppunit/test_scanner.cxx
@@ -67,12 +67,12 @@ namespace
CPPUNIT_TEST_SUITE_END();
};
- static const OUString cr = "\n";
- static const OUString rem = "REM";
- static const OUString asdf = "asdf";
- static const OUString dot = ".";
- static const OUString goto_ = "goto";
- static const OUString excl = "!";
+ const OUString cr = "\n";
+ const OUString rem = "REM";
+ const OUString asdf = "asdf";
+ const OUString dot = ".";
+ const OUString goto_ = "goto";
+ const OUString excl = "!";
std::vector<Symbol> getSymbols(const OUString& source, sal_Int32& errors, bool bCompatible = false)
{
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 753aaf04b201..c7bc2e468198 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -84,12 +84,12 @@ typedef WeakImplHelper< script::XStarBasicAccess > StarBasicAccessHelper;
// Version 2
// + bool bReference
-static const char szStdLibName[] = "Standard";
-static const char szBasicStorage[] = "StarBASIC";
-static const char szOldManagerStream[] = "BasicManager";
-static const char szManagerStream[] = "BasicManager2";
-static const char szImbedded[] = "LIBIMBEDDED";
-static const char szCryptingKey[] = "CryptedBasic";
+const char szStdLibName[] = "Standard";
+const char szBasicStorage[] = "StarBASIC";
+const char szOldManagerStream[] = "BasicManager";
+const char szManagerStream[] = "BasicManager2";
+const char szImbedded[] = "LIBIMBEDDED";
+const char szCryptingKey[] = "CryptedBasic";
const StreamMode eStreamReadMode = StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL;
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 84878136a756..bb4d8409573f 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -86,7 +86,7 @@ static void SbiCloseRecord( SvStream& r, sal_uInt64 nOff )
r.Seek( nPos );
}
-static constexpr sal_uInt32 nUnicodeDataMagicNumber = 0x556E6920; // "Uni " BE
+constexpr sal_uInt32 nUnicodeDataMagicNumber = 0x556E6920; // "Uni " BE
static bool GetToUnicodePoolData(SvStream& r, sal_uInt64 nLen, sal_uInt64 nNext)
{
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 0377d854359c..1de6c8203426 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1947,10 +1947,10 @@ void StarBASIC::DetachAllDocBasicItems()
// #118116 Implementation Collection object
-static const char pCountStr[] = "Count";
-static const char pAddStr[] = "Add";
-static const char pItemStr[] = "Item";
-static const char pRemoveStr[] = "Remove";
+const char pCountStr[] = "Count";
+const char pAddStr[] = "Add";
+const char pItemStr[] = "Item";
+const char pRemoveStr[] = "Remove";
static sal_uInt16 nCountHash = 0, nAddHash, nItemHash, nRemoveHash;
SbxInfoRef BasicCollection::xAddInfo;
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 3f5da99a6d5f..8ce98b6c3b48 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -98,11 +98,11 @@ using namespace cppu;
// Identifiers for creating the strings for dbg_Properties
-static char const ID_DBG_SUPPORTEDINTERFACES[] = "Dbg_SupportedInterfaces";
-static char const ID_DBG_PROPERTIES[] = "Dbg_Properties";
-static char const ID_DBG_METHODS[] = "Dbg_Methods";
+char const ID_DBG_SUPPORTEDINTERFACES[] = "Dbg_SupportedInterfaces";
+char const ID_DBG_PROPERTIES[] = "Dbg_Properties";
+char const ID_DBG_METHODS[] = "Dbg_Methods";
-static char const aSeqLevelStr[] = "[]";
+char const aSeqLevelStr[] = "[]";
// Gets the default property for a uno object. Note: There is some
// redirection built in. The property name specifies the name
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index 80017fcca354..3d8f6623c525 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -22,7 +22,7 @@
#include <basic/sberrors.hxx>
-const static sal_uInt32 UP_LIMIT=0xFFFFFF00;
+const sal_uInt32 UP_LIMIT=0xFFFFFF00;
// The SbiBuffer will be expanded in increments of at least 16 Bytes.
// This is necessary, because many classes emanate from a buffer length
diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx
index 2baf28a803e3..76f1ab776a63 100644
--- a/basic/source/comp/exprgen.cxx
+++ b/basic/source/comp/exprgen.cxx
@@ -34,7 +34,7 @@ struct OpTable {
}
-static const OpTable aOpTable [] = {
+const OpTable aOpTable [] = {
{ EXPON,SbiOpcode::EXP_ },
{ MUL, SbiOpcode::MUL_ },
{ DIV, SbiOpcode::DIV_ },
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 6819c3ae588d..9d53c8269113 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -47,7 +47,7 @@ struct SbiStatement {
#define Y true
#define N false
-static const SbiStatement StmntTable [] = {
+const SbiStatement StmntTable [] = {
{ ATTRIBUTE, &SbiParser::Attribute, Y, Y, }, // ATTRIBUTE
{ CALL, &SbiParser::Call, N, Y, }, // CALL
{ CLOSE, &SbiParser::Close, N, Y, }, // CLOSE
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index 37c8f9b3a475..bf47a1b2aaa8 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -32,7 +32,7 @@ struct TokenTable { SbiToken t; const char *s; };
}
-static const TokenTable aTokTable_Basic [] = {
+const TokenTable aTokTable_Basic [] = {
{ CAT, "&" },
{ MUL, "*" },
{ PLUS, "+" },
diff --git a/basic/source/runtime/ddectrl.cxx b/basic/source/runtime/ddectrl.cxx
index 37d3c7d0c44d..d1154a727f74 100644
--- a/basic/source/runtime/ddectrl.cxx
+++ b/basic/source/runtime/ddectrl.cxx
@@ -25,7 +25,7 @@
#define DDE_FIRSTERR 0x4000
#define DDE_LASTERR 0x4011
-static const ErrCode nDdeErrMap[] =
+const ErrCode nDdeErrMap[] =
{
/* DMLERR_ADVACKTIMEOUT */ ErrCode(0x4000), ERRCODE_BASIC_DDE_TIMEOUT,
/* DMLERR_BUSY */ ErrCode(0x4001), ERRCODE_BASIC_DDE_BUSY,
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index c2182e26b77a..607604f8abd6 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1778,7 +1778,7 @@ void removeDimAsNewRecoverItem( SbxVariable* pVar )
// saving object variable
// not-object variables will cause errors
-static const char pCollectionStr[] = "Collection";
+const char pCollectionStr[] = "Collection";
void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, bool bHandleDefaultProp )
{
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 24e3dba5ea35..385fec031bb3 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -292,7 +292,7 @@ ErrCode SbxValue::ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingle
}
-static const double roundArray[] = {
+const double roundArray[] = {
5.0e+0, 0.5e+0, 0.5e-1, 0.5e-2, 0.5e-3, 0.5e-4, 0.5e-5, 0.5e-6, 0.5e-7,
0.5e-8, 0.5e-9, 0.5e-10,0.5e-11,0.5e-12,0.5e-13,0.5e-14,0.5e-15 };