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

loplugin:staticvar in editeng..framework

Change-Id: I8e555a98f74f61e6e40122564b7ad19ca07a8a91
Reviewed-on: https://gerrit.libreoffice.org/61866
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 48b41d73
...@@ -2970,7 +2970,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo ...@@ -2970,7 +2970,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
DefaultFontType nFontType; DefaultFontType nFontType;
LanguageType nLanguage; LanguageType nLanguage;
} }
aOutTypeArr[ nItemCnt ] = const aOutTypeArr[ nItemCnt ] =
{ {
{ DefaultFontType::LATIN_TEXT, LANGUAGE_ENGLISH_US }, { DefaultFontType::LATIN_TEXT, LANGUAGE_ENGLISH_US },
{ DefaultFontType::CJK_TEXT, LANGUAGE_ENGLISH_US }, { DefaultFontType::CJK_TEXT, LANGUAGE_ENGLISH_US },
......
...@@ -703,7 +703,7 @@ namespace ...@@ -703,7 +703,7 @@ namespace
//various stream names that can contain the real document contents for //various stream names that can contain the real document contents for
//this object in a straightforward direct way //this object in a straightforward direct way
const OUStringLiteral aStreamNames[] = static const OUStringLiteral aStreamNames[] =
{ {
"CONTENTS", "CONTENTS",
"Package", "Package",
......
...@@ -102,11 +102,11 @@ namespace pcr ...@@ -102,11 +102,11 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
// service names for all our handlers // service names for all our handlers
struct static struct
{ {
const sal_Char* serviceName; const sal_Char* serviceName;
bool isFormOnly; bool isFormOnly;
} aFactories[] = { } const aFactories[] = {
// a generic handler for form component properties (must precede the ButtonNavigationHandler) // a generic handler for form component properties (must precede the ButtonNavigationHandler)
{ "com.sun.star.form.inspection.FormComponentPropertyHandler", false }, { "com.sun.star.form.inspection.FormComponentPropertyHandler", false },
...@@ -156,12 +156,12 @@ namespace pcr ...@@ -156,12 +156,12 @@ namespace pcr
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
struct static struct
{ {
const sal_Char* programmaticName; const sal_Char* programmaticName;
const char* uiNameResId; const char* uiNameResId;
const sal_Char* helpId; const sal_Char* helpId;
} aCategories[] = { } const aCategories[] = {
{ "General", RID_STR_PROPPAGE_DEFAULT, HID_FM_PROPDLG_TAB_GENERAL }, { "General", RID_STR_PROPPAGE_DEFAULT, HID_FM_PROPDLG_TAB_GENERAL },
{ "Data", RID_STR_PROPPAGE_DATA, HID_FM_PROPDLG_TAB_DATA }, { "Data", RID_STR_PROPPAGE_DATA, HID_FM_PROPDLG_TAB_DATA },
{ "Events", RID_STR_EVENTS, HID_FM_PROPDLG_TAB_EVT } { "Events", RID_STR_EVENTS, HID_FM_PROPDLG_TAB_EVT }
......
...@@ -50,7 +50,7 @@ void PriorityFilterTest::testPriority() ...@@ -50,7 +50,7 @@ void PriorityFilterTest::testPriority()
static struct { static struct {
const char *pURL; const char *pURL;
const char *pFormat; const char *pFormat;
} aToCheck[] = { } const aToCheck[] = {
{ "file:///tmp/foo.xls", "calc_MS_Excel_97" } { "file:///tmp/foo.xls", "calc_MS_Excel_97" }
// TODO: expand this to check more of these priorities // TODO: expand this to check more of these priorities
}; };
......
...@@ -7018,7 +7018,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo ...@@ -7018,7 +7018,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
sal_uInt32 n1; sal_uInt32 n1;
sal_uInt16 n2, n3; sal_uInt16 n2, n3;
sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15; sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
} aArr[] = { } const aArr[] = {
{ OLE_MATHTYPE_2_STARMATH, "smath", MSO_EQUATION3_CLASSID }, { OLE_MATHTYPE_2_STARMATH, "smath", MSO_EQUATION3_CLASSID },
{ OLE_MATHTYPE_2_STARMATH, "smath", MSO_EQUATION2_CLASSID }, { OLE_MATHTYPE_2_STARMATH, "smath", MSO_EQUATION2_CLASSID },
{ OLE_WINWORD_2_STARWRITER, "swriter", MSO_WW8_CLASSID }, { OLE_WINWORD_2_STARWRITER, "swriter", MSO_WW8_CLASSID },
......
...@@ -136,7 +136,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef const & rObj ...@@ -136,7 +136,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef const & rObj
sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15; sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
} }
aGlNmIds[4]; aGlNmIds[4];
} aArr[] = { } const aArr[] = {
{ OLE_STARMATH_2_MATHTYPE, "MathType 3.x", { OLE_STARMATH_2_MATHTYPE, "MathType 3.x",
{{SO3_SM_CLASSID_60}, {SO3_SM_CLASSID_50}, {{SO3_SM_CLASSID_60}, {SO3_SM_CLASSID_50},
{SO3_SM_CLASSID_40}, {SO3_SM_CLASSID_30 }}}, {SO3_SM_CLASSID_40}, {SO3_SM_CLASSID_30 }}},
......
...@@ -220,12 +220,12 @@ namespace frm ...@@ -220,12 +220,12 @@ namespace frm
) )
{ {
bool bLoad = KEY_F11 == nCode; bool bLoad = KEY_F11 == nCode;
struct static struct
{ {
const sal_Char* pDescription; const sal_Char* pDescription;
const sal_Char* pExtension; const sal_Char* pExtension;
EETextFormat eFormat; EETextFormat eFormat;
} aExportFormats[] = } const aExportFormats[] =
{ {
{ "OASIS OpenDocument (*.xml)", "*.xml", EETextFormat::Xml }, { "OASIS OpenDocument (*.xml)", "*.xml", EETextFormat::Xml },
{ "HyperText Markup Language (*.html)", "*.html", EETextFormat::Html }, { "HyperText Markup Language (*.html)", "*.html", EETextFormat::Html },
......
...@@ -238,12 +238,12 @@ namespace frm ...@@ -238,12 +238,12 @@ namespace frm
// items. We could duplicate all the information here in our lib // items. We could duplicate all the information here in our lib
// (such as the item text and the image), but why should we? // (such as the item text and the image), but why should we?
struct FeatureDescription static struct FeatureDescription
{ {
sal_uInt16 nId; sal_uInt16 nId;
bool bRepeat; bool bRepeat;
bool bItemWindow; bool bItemWindow;
} aSupportedFeatures[] = } const aSupportedFeatures[] =
{ {
{ LID_RECORD_LABEL, false, true }, { LID_RECORD_LABEL, false, true },
{ FormFeature::MoveAbsolute, false, true }, { FormFeature::MoveAbsolute, false, true },
...@@ -270,8 +270,8 @@ namespace frm ...@@ -270,8 +270,8 @@ namespace frm
{ FormFeature::RemoveFilterAndSort, false, false }, { FormFeature::RemoveFilterAndSort, false, false },
}; };
FeatureDescription* pSupportedFeatures = aSupportedFeatures; FeatureDescription const * pSupportedFeatures = aSupportedFeatures;
FeatureDescription* pSupportedFeaturesEnd = aSupportedFeatures + SAL_N_ELEMENTS( aSupportedFeatures ); FeatureDescription const * pSupportedFeaturesEnd = aSupportedFeatures + SAL_N_ELEMENTS( aSupportedFeatures );
for ( ; pSupportedFeatures < pSupportedFeaturesEnd; ++pSupportedFeatures ) for ( ; pSupportedFeatures < pSupportedFeaturesEnd; ++pSupportedFeatures )
{ {
if ( pSupportedFeatures->nId ) if ( pSupportedFeatures->nId )
......
...@@ -33,7 +33,7 @@ using namespace ::com::sun::star::registry; ...@@ -33,7 +33,7 @@ using namespace ::com::sun::star::registry;
namespace namespace
{ {
cppu::ImplementationEntry entries[] = { cppu::ImplementationEntry const entries[] = {
{ &FormulaOpCodeMapperObj::create, &FormulaOpCodeMapperObj::getImplementationName_Static, &FormulaOpCodeMapperObj::getSupportedServiceNames_Static, { &FormulaOpCodeMapperObj::create, &FormulaOpCodeMapperObj::getImplementationName_Static, &FormulaOpCodeMapperObj::getSupportedServiceNames_Static,
&cppu::createSingleComponentFactory, nullptr, 0 }, &cppu::createSingleComponentFactory, nullptr, 0 },
{ nullptr, nullptr, nullptr, nullptr, nullptr, 0 } { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
......
...@@ -27,7 +27,7 @@ namespace framework ...@@ -27,7 +27,7 @@ namespace framework
// helper // helper
KeyMapping::KeyIdentifierInfo KeyMapping::KeyIdentifierMap[] = KeyMapping::KeyIdentifierInfo const KeyMapping::KeyIdentifierMap[] =
{ {
{css::awt::Key::NUM0 , "KEY_0" }, {css::awt::Key::NUM0 , "KEY_0" },
{css::awt::Key::NUM1 , "KEY_1" }, {css::awt::Key::NUM1 , "KEY_1" },
......
...@@ -61,7 +61,7 @@ class KeyMapping ...@@ -61,7 +61,7 @@ class KeyMapping
private: private:
static KeyIdentifierInfo KeyIdentifierMap[]; static KeyIdentifierInfo const KeyIdentifierMap[];
/** @short hash to map identifier to key codes. */ /** @short hash to map identifier to key codes. */
Identifier2CodeHash m_lIdentifierHash; Identifier2CodeHash m_lIdentifierHash;
......
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