Kaydet (Commit) 1aafe495 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:staticvar in hwpfilter..sal

Change-Id: I8bf3509637cb295847e0dd667c1862269a192bbe
Reviewed-on: https://gerrit.libreoffice.org/61881
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 6626281b
......@@ -408,7 +408,7 @@ static struct
}
LineStyle[] =
const LineStyle[] =
{
{ 0.0, 0.0, 0.0 },
{
......
......@@ -27,16 +27,16 @@ using namespace com::sun::star::uno;
namespace i18nutil {
static Mapping mapping_03a3[] = {{0, 1, {0x03c2, 0, 0}},{0, 1, {0x03c3, 0, 0}}};
static Mapping mapping_0307[] = {{0, 0, {0, 0, 0}},{0, 1, {0x0307, 0, 0}}};
static Mapping mapping_004a[] = {{0, 2, {0x006a, 0x0307, 0}},{0, 1, {0x006a, 0, 0}}};
static Mapping mapping_012e[] = {{0, 2, {0x012f, 0x0307, 0}},{0, 1, {0x012f, 0, 0}}};
static Mapping mapping_00cc[] = {{0, 3, {0x0069, 0x0307, 0x0300}},{0, 1, {0x00ec, 0, 0}}};
static Mapping mapping_00cd[] = {{0, 3, {0x0069, 0x0307, 0x0301}},{0, 1, {0x00ed, 0, 0}}};
static Mapping mapping_0128[] = {{0, 3, {0x0069, 0x0307, 0x0303}},{0, 1, {0x0129, 0, 0}}};
static Mapping mapping_0049[] = {{0, 2, {0x0069, 0x0307, 0}},{0, 1, {0x0131, 0, 0}},{0, 1, {0x0069, 0, 0}}};
static Mapping mapping_0069[] = {{0, 1, {0x0130, 0, 0}},{0, 1, {0x0049, 0, 0}}};
static Mapping mapping_0130[] = {{0, 1, {0x0069, 0, 0}},{0, 1, {0x0130, 0, 0}}};
static const Mapping mapping_03a3[] = {{0, 1, {0x03c2, 0, 0}},{0, 1, {0x03c3, 0, 0}}};
static const Mapping mapping_0307[] = {{0, 0, {0, 0, 0}},{0, 1, {0x0307, 0, 0}}};
static const Mapping mapping_004a[] = {{0, 2, {0x006a, 0x0307, 0}},{0, 1, {0x006a, 0, 0}}};
static const Mapping mapping_012e[] = {{0, 2, {0x012f, 0x0307, 0}},{0, 1, {0x012f, 0, 0}}};
static const Mapping mapping_00cc[] = {{0, 3, {0x0069, 0x0307, 0x0300}},{0, 1, {0x00ec, 0, 0}}};
static const Mapping mapping_00cd[] = {{0, 3, {0x0069, 0x0307, 0x0301}},{0, 1, {0x00ed, 0, 0}}};
static const Mapping mapping_0128[] = {{0, 3, {0x0069, 0x0307, 0x0303}},{0, 1, {0x0129, 0, 0}}};
static const Mapping mapping_0049[] = {{0, 2, {0x0069, 0x0307, 0}},{0, 1, {0x0131, 0, 0}},{0, 1, {0x0069, 0, 0}}};
static const Mapping mapping_0069[] = {{0, 1, {0x0130, 0, 0}},{0, 1, {0x0049, 0, 0}}};
static const Mapping mapping_0130[] = {{0, 1, {0x0069, 0, 0}},{0, 1, {0x0130, 0, 0}}};
#define langIs(lang) (aLocale.Language == lang)
......
......@@ -494,7 +494,7 @@ static const Value CaseMappingValue[] = {
#define MaxCaseMappingExtras 3
static Mapping CaseMappingExtra[] = {
static Mapping const CaseMappingExtra[] = {
{0x80, 0, {0x0000, 0x0000, 0x0000}}, // 0x0000 (0 0x0)
{0x60, 1, {0x0131, 0x0000, 0x0000}}, // 0x0049 (1 0x1)
{0x8a, 0, {0x0000, 0x0000, 0x0000}}, // 0x0049 (2 0x2)
......
......@@ -56,7 +56,7 @@ sal_Unicode oneToOneMapping::find(const sal_Unicode nKey) const
return nKey;
}
oneToOneMappingWithFlag::oneToOneMappingWithFlag( UnicodePairWithFlag *rpTableWF, const size_t rnSize, const UnicodePairFlag rnFlag )
oneToOneMappingWithFlag::oneToOneMappingWithFlag( UnicodePairWithFlag const *rpTableWF, const size_t rnSize, const UnicodePairFlag rnFlag )
: oneToOneMapping( nullptr, rnSize, sizeof(UnicodePairWithFlag) ),
mpTableWF ( rpTableWF ),
mnFlag ( rnFlag ),
......@@ -69,7 +69,7 @@ oneToOneMappingWithFlag::~oneToOneMappingWithFlag()
{
if( mbHasIndex )
{
for (UnicodePairWithFlag** i : mpIndex)
for (UnicodePairWithFlag const ** i : mpIndex)
delete [] i;
}
}
......@@ -80,7 +80,7 @@ void oneToOneMappingWithFlag::makeIndex()
{
int current = -1;
for (UnicodePairWithFlag**& i : mpIndex)
for (UnicodePairWithFlag const **& i : mpIndex)
i = nullptr;
for( size_t k = 0; k < mnSize; k++ )
......@@ -90,7 +90,7 @@ void oneToOneMappingWithFlag::makeIndex()
if( high != current )
{
current = high;
mpIndex[high] = new UnicodePairWithFlag*[256];
mpIndex[high] = new UnicodePairWithFlag const *[256];
for (int j = 0; j < 256; ++j)
mpIndex[high][j] = nullptr;
......
......@@ -248,7 +248,7 @@ const decomposition_table_entry_t decomposition_table[] = {
#define FULL2HALF_ASC_FUNCTION 0x02
#define FULL2HALF_KATAKANA_ONLY 0x04
UnicodePairWithFlag full2half[] = {
UnicodePairWithFlag const full2half[] = {
{ 0x2015, 0xFF70, FULL2HALF_ASC_FUNCTION }, // HORIZONTAL BAR --> KATAKANA-HIRAGANA PROLONGED SOUND MARK
{ 0x2018, 0x0060, FULL2HALF_ASC_FUNCTION }, // LEFT SINGLE QUOTATION MARK => GRAVE ACCENT
{ 0x2019, 0x0027, FULL2HALF_ASC_FUNCTION }, // RIGHT SINGLE QUOTATION MARK => APOSTROPHE
......@@ -698,7 +698,7 @@ const sal_Unicode composition_table[][2] = {
#define HALF2FULL_JIS_FUNCTION 0x02
#define HALF2FULL_KATAKANA_ONLY 0x04
UnicodePairWithFlag half2full[] = {
UnicodePairWithFlag const half2full[] = {
{ 0x0020, 0x3000, HALF2FULL_NORMAL }, // SPACE --> IDEOGRAPHIC SPACE
{ 0x0021, 0xFF01, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION }, // EXCLAMATION MARK --> FULLWIDTH EXCLAMATION MARK
{ 0x0022, 0xFF02, HALF2FULL_NORMAL }, // QUOTATION MARK --> FULLWIDTH QUOTATION MARK
......
......@@ -69,7 +69,7 @@ private:
friend class widthfolding;
public:
oneToOneMappingWithFlag( UnicodePairWithFlag *rpTableWF, const size_t rnSize, const UnicodePairFlag rnFlag );
oneToOneMappingWithFlag( UnicodePairWithFlag const *rpTableWF, const size_t rnSize, const UnicodePairFlag rnFlag );
virtual ~oneToOneMappingWithFlag() override;
// make index for fast search
......@@ -78,9 +78,9 @@ public:
// index search
virtual sal_Unicode find( const sal_Unicode nKey ) const override;
private:
UnicodePairWithFlag *mpTableWF;
UnicodePairWithFlag const *mpTableWF;
UnicodePairFlag mnFlag;
UnicodePairWithFlag **mpIndex[256];
UnicodePairWithFlag const **mpIndex[256];
bool mbHasIndex;
};
......
......@@ -83,7 +83,7 @@ bool passesPositiveList(const OUString& rUrl) {
void handleCommand(
const OString& rInPath, const OString& rOutPath,
const OString& rExecutable)
const std::string& rExecutable)
{
OStringBuffer buf;
if (rExecutable == "uiex" || rExecutable == "hrcex")
......@@ -96,7 +96,7 @@ void handleCommand(
buf.append(OString(getenv("WORKDIR_FOR_BUILD")));
buf.append("/LinkTarget/Executable/");
}
buf.append(rExecutable);
buf.append(rExecutable.data());
buf.append(" -i ");
buf.append(rInPath);
buf.append(" -o ");
......@@ -173,7 +173,7 @@ bool handleFile(const OString& rProject, const OUString& rUrl, const OString& rP
{
struct Command {
OUStringLiteral extension;
OString executable;
std::string executable;
bool positive;
};
static Command const commands[] = {
......
......@@ -233,7 +233,7 @@ static uno::Reference<io::XInputStream> lcl_StoreOwnAsOOXML(
char const* pMediaType;
char const* pProgID;
char const* pSuffix;
} s_Mapping[] = {
} const s_Mapping[] = {
{ {SO3_SW_CLASSID_60}, "MS Word 2007 XML", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Word.Document.12", "docx" },
{ {SO3_SC_CLASSID_60}, "Calc MS Excel 2007 XML", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "Excel.Sheet.12", "xlsx" },
{ {SO3_SIMPRESS_CLASSID_60}, "Impress MS PowerPoint 2007 XML", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "PowerPoint.Show.12", "pptx" },
......
......@@ -114,7 +114,7 @@ public:
classIdToGUIDCNamePairMap::classIdToGUIDCNamePairMap()
{
IdCntrlData initialCntrlData[] =
static IdCntrlData const initialCntrlData[] =
{
// Command button MUST be at index 0
{ FormComponentType::COMMANDBUTTON,
......@@ -174,7 +174,7 @@ classIdToGUIDCNamePairMap::classIdToGUIDCNamePairMap()
}
};
int const length = SAL_N_ELEMENTS( initialCntrlData );
IdCntrlData* pData = initialCntrlData;
IdCntrlData const * pData = initialCntrlData;
for ( int index = 0; index < length; ++index, ++pData )
mnIdToGUIDCNamePairMap[ pData->nId ] = pData->aData;
};
......
......@@ -41,7 +41,7 @@ using namespace ::com::sun::star::registry;
namespace
{
cppu::ImplementationEntry entries[] = {
cppu::ImplementationEntry const entries[] = {
{ &OReportDefinition::create, &OReportDefinition::getImplementationName_Static, &OReportDefinition::getSupportedServiceNames_Static,
&cppu::createSingleComponentFactory, nullptr, 0 },
{ &OFormattedField::create, &OFormattedField::getImplementationName_Static, &OFormattedField::getSupportedServiceNames_Static,
......
......@@ -36,7 +36,7 @@ using namespace ::com::sun::star::registry;
namespace
{
cppu::ImplementationEntry entries[] = {
cppu::ImplementationEntry const entries[] = {
{ &ORptFilter::create, &ORptFilter::getImplementationName_Static, &ORptFilter::getSupportedServiceNames_Static,
&cppu::createSingleComponentFactory, nullptr, 0 },
{ &ORptTypeDetection::create, &ORptTypeDetection::getImplementationName_Static, &ORptTypeDetection::getSupportedServiceNames_Static,
......
......@@ -98,7 +98,7 @@ namespace rptui
// service names for all our handlers
const struct
static const struct
{
const sal_Char* serviceName;
} aFactories[] = {
......
......@@ -37,7 +37,7 @@ using namespace ::com::sun::star::registry;
namespace
{
cppu::ImplementationEntry entries[] = {
cppu::ImplementationEntry const entries[] = {
{ &OReportController::create, &OReportController::getImplementationName_Static, &OReportController::getSupportedServiceNames_Static,
&cppu::createSingleComponentFactory, nullptr, 0 },
{ &OStatusbarController::create, &OStatusbarController::getImplementationName_Static, &OStatusbarController::getSupportedServiceNames_Static,
......
......@@ -45,7 +45,7 @@ static struct
{
int const errcode;
oslPipeError error;
} PipeError[]= {
} const PipeError[]= {
{ 0, osl_Pipe_E_None }, /* no error */
{ EPROTOTYPE, osl_Pipe_E_NoProtocol }, /* Protocol wrong type for socket */
{ ENOPROTOOPT, osl_Pipe_E_NoProtocol }, /* Protocol not available */
......
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