loplugin:staticvar in soltools..svx
Change-Id: Ie9f36eb0e00aaee34a27f136ed903f8f87e52dcc Reviewed-on: https://gerrit.libreoffice.org/61916 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -133,7 +133,7 @@ public:
|
||||
Array of new shape type descriptors.
|
||||
*/
|
||||
void AddShapeTypeList (int nDescriptorCount,
|
||||
ShapeTypeDescriptor aDescriptorList[]);
|
||||
ShapeTypeDescriptor const aDescriptorList[]);
|
||||
|
||||
/// get the accessible base name for an object
|
||||
///
|
||||
|
||||
@@ -48,7 +48,7 @@ struct pri
|
||||
char const ctype;
|
||||
};
|
||||
|
||||
static struct pri priority[] =
|
||||
static const struct pri priority[] =
|
||||
{
|
||||
{
|
||||
0, 0, 0
|
||||
|
||||
+2
-2
@@ -71,7 +71,7 @@ struct fsm
|
||||
int const nextstate; /* enter this state if +ve */
|
||||
};
|
||||
|
||||
static /*const*/ struct fsm fsm[] = {
|
||||
static const struct fsm fsm[] = {
|
||||
/* start state */
|
||||
{START, {C_XX}, ACT(UNCLASS, S_SELF)},
|
||||
{START, {' ', '\t', '\v'}, WS1},
|
||||
@@ -259,7 +259,7 @@ static short bigfsm[256][MAXSTATE];
|
||||
void
|
||||
expandlex(void)
|
||||
{
|
||||
/* const */ struct fsm *fp;
|
||||
const struct fsm *fp;
|
||||
int i, j, nstate;
|
||||
|
||||
for (fp = fsm; fp->state >= 0; fp++)
|
||||
|
||||
@@ -43,7 +43,7 @@ struct kwtab
|
||||
int const flag;
|
||||
};
|
||||
|
||||
static struct kwtab kwtab[] =
|
||||
static const struct kwtab kwtab[] =
|
||||
{
|
||||
{"if", KIF, ISKW},
|
||||
{"ifdef", KIFDEF, ISKW},
|
||||
@@ -76,7 +76,7 @@ unsigned long namebit[077 + 1];
|
||||
void
|
||||
setup_kwtab(void)
|
||||
{
|
||||
struct kwtab *kp;
|
||||
struct kwtab const *kp;
|
||||
Nlist *np;
|
||||
Token t;
|
||||
static Token deftoken[1] = {{NAME, 0, 7, (uchar *) "defined", 0}};
|
||||
|
||||
+2
-2
@@ -1098,11 +1098,11 @@ void Test::testIsNumberFormat()
|
||||
LanguageType eLang = LANGUAGE_ENGLISH_US;
|
||||
SvNumberFormatter aFormatter(m_xContext, eLang);
|
||||
|
||||
struct NumberFormatData
|
||||
static struct NumberFormatData
|
||||
{
|
||||
const char* pFormat;
|
||||
bool const bIsNumber;
|
||||
} aTests[] = {
|
||||
} const aTests[] = {
|
||||
{ "20.3", true },
|
||||
{ "2", true },
|
||||
{ "test", false },
|
||||
|
||||
@@ -549,7 +549,7 @@ OUString SvNumberformat::ImpObtainCalendarAndNumerals( OUStringBuffer& rString,
|
||||
break;
|
||||
}
|
||||
/** Reference language for each numeral ID */
|
||||
const LanguageType aNumeralIDtoLanguage []=
|
||||
static const LanguageType aNumeralIDtoLanguage []=
|
||||
{
|
||||
LANGUAGE_DONTKNOW, // 0x00
|
||||
LANGUAGE_ENGLISH_US, // 0x01
|
||||
|
||||
@@ -104,12 +104,10 @@ namespace {
|
||||
|
||||
uno::Sequence< OUString> GetPropertyNames(const OUString& rScheme)
|
||||
{
|
||||
uno::Sequence<OUString> aNames(2 * ColorConfigEntryCount);
|
||||
OUString* pNames = aNames.getArray();
|
||||
struct ColorConfigEntryData_Impl
|
||||
{
|
||||
OUStringLiteral const cName;
|
||||
bool const bCanBeVisible;
|
||||
OUStringLiteral cName;
|
||||
bool bCanBeVisible;
|
||||
};
|
||||
static const ColorConfigEntryData_Impl cNames[] =
|
||||
{
|
||||
@@ -164,19 +162,19 @@ uno::Sequence< OUString> GetPropertyNames(const OUString& rScheme)
|
||||
{ OUStringLiteral("/SQLParameter"), false },
|
||||
{ OUStringLiteral("/SQLComment"), false }
|
||||
};
|
||||
|
||||
uno::Sequence<OUString> aNames(2 * ColorConfigEntryCount);
|
||||
OUString* pNames = aNames.getArray();
|
||||
int nIndex = 0;
|
||||
OUString sBase = "ColorSchemes/"
|
||||
+ utl::wrapConfigurationElementName(rScheme);
|
||||
const int nCount = ColorConfigEntryCount;
|
||||
for(sal_Int32 i = 0; i < nCount; ++i)
|
||||
for(sal_Int32 i = 0; i < ColorConfigEntryCount; ++i)
|
||||
{
|
||||
OUString sBaseName = sBase + cNames[i].cName;
|
||||
pNames[nIndex] += sBaseName;
|
||||
pNames[nIndex++] += "/Color";
|
||||
pNames[nIndex++] = sBaseName + "/Color";
|
||||
if(cNames[i].bCanBeVisible)
|
||||
{
|
||||
pNames[nIndex] += sBaseName;
|
||||
pNames[nIndex++] += g_sIsVisible;
|
||||
pNames[nIndex++] = sBaseName + g_sIsVisible;
|
||||
}
|
||||
}
|
||||
aNames.realloc(nIndex);
|
||||
|
||||
+685
-834
File diff suppressed because it is too large
Load Diff
+1120
-1156
File diff suppressed because it is too large
Load Diff
@@ -147,7 +147,7 @@ ShapeTypeHandler::~ShapeTypeHandler()
|
||||
|
||||
|
||||
void ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount,
|
||||
ShapeTypeDescriptor aDescriptorList[])
|
||||
ShapeTypeDescriptor const aDescriptorList[])
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ void RegisterDrawShapeTypes()
|
||||
/** List of shape type descriptors corresponding to the
|
||||
<type>SvxShapeTypes</type> enum.
|
||||
*/
|
||||
ShapeTypeDescriptor aSvxShapeTypeList[] = {
|
||||
static ShapeTypeDescriptor const aSvxShapeTypeList[] = {
|
||||
ShapeTypeDescriptor ( DRAWING_TEXT, "com.sun.star.drawing.TextShape",
|
||||
CreateSvxAccessibleShape),
|
||||
ShapeTypeDescriptor (DRAWING_RECTANGLE, "com.sun.star.drawing.RectangleShape",
|
||||
|
||||
@@ -371,7 +371,7 @@ XPropertyList::CreatePropertyListFromURL( XPropertyListType t,
|
||||
static struct {
|
||||
XPropertyListType const t;
|
||||
const char *pExt;
|
||||
} pExtnMap[] = {
|
||||
} const pExtnMap[] = {
|
||||
{ XPropertyListType::Color, "soc" },
|
||||
{ XPropertyListType::LineEnd, "soe" },
|
||||
{ XPropertyListType::Dash, "sod" },
|
||||
|
||||
Reference in New Issue
Block a user