diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-17 09:31:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-17 12:07:46 +0200 |
commit | ef5b895afe63eae029363ddb5d7960d7e34e5e35 (patch) | |
tree | 872cd53623c1c29b6b9ae5080ee92d8c4d50a307 | |
parent | 48b41d73cb62dc89fc0594ccfd6fa664a460d142 (diff) |
loplugin:staticvar in editeng..framework
Change-Id: I8e555a98f74f61e6e40122564b7ad19ca07a8a91
Reviewed-on: https://gerrit.libreoffice.org/61866
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | editeng/source/items/textitem.cxx | 2 | ||||
-rw-r--r-- | embeddedobj/source/msole/oleembed.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/defaultforminspection.cxx | 8 | ||||
-rw-r--r-- | filter/qa/cppunit/priority-test.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/msoleexp.cxx | 2 | ||||
-rw-r--r-- | forms/source/richtext/richtextvclcontrol.cxx | 4 | ||||
-rw-r--r-- | forms/source/solar/control/navtoolbar.cxx | 8 | ||||
-rw-r--r-- | formula/source/core/api/services.cxx | 2 | ||||
-rw-r--r-- | framework/source/accelerators/keymapping.cxx | 2 | ||||
-rw-r--r-- | framework/source/inc/accelerators/keymapping.hxx | 2 |
11 files changed, 18 insertions, 18 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index e995a7ba5796..9c397090454a 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -2970,7 +2970,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo DefaultFontType nFontType; LanguageType nLanguage; } - aOutTypeArr[ nItemCnt ] = + const aOutTypeArr[ nItemCnt ] = { { DefaultFontType::LATIN_TEXT, LANGUAGE_ENGLISH_US }, { DefaultFontType::CJK_TEXT, LANGUAGE_ENGLISH_US }, diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 0a51bdd7253e..7f84b91ead18 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -703,7 +703,7 @@ namespace //various stream names that can contain the real document contents for //this object in a straightforward direct way - const OUStringLiteral aStreamNames[] = + static const OUStringLiteral aStreamNames[] = { "CONTENTS", "Package", diff --git a/extensions/source/propctrlr/defaultforminspection.cxx b/extensions/source/propctrlr/defaultforminspection.cxx index 999798518417..42d166e86545 100644 --- a/extensions/source/propctrlr/defaultforminspection.cxx +++ b/extensions/source/propctrlr/defaultforminspection.cxx @@ -102,11 +102,11 @@ namespace pcr ::osl::MutexGuard aGuard( m_aMutex ); // service names for all our handlers - struct + static struct { const sal_Char* serviceName; bool isFormOnly; - } aFactories[] = { + } const aFactories[] = { // a generic handler for form component properties (must precede the ButtonNavigationHandler) { "com.sun.star.form.inspection.FormComponentPropertyHandler", false }, @@ -156,12 +156,12 @@ namespace pcr { ::osl::MutexGuard aGuard( m_aMutex ); - struct + static struct { const sal_Char* programmaticName; const char* uiNameResId; const sal_Char* helpId; - } aCategories[] = { + } const aCategories[] = { { "General", RID_STR_PROPPAGE_DEFAULT, HID_FM_PROPDLG_TAB_GENERAL }, { "Data", RID_STR_PROPPAGE_DATA, HID_FM_PROPDLG_TAB_DATA }, { "Events", RID_STR_EVENTS, HID_FM_PROPDLG_TAB_EVT } diff --git a/filter/qa/cppunit/priority-test.cxx b/filter/qa/cppunit/priority-test.cxx index 9eff49ffc2f2..cc2bf2b28ead 100644 --- a/filter/qa/cppunit/priority-test.cxx +++ b/filter/qa/cppunit/priority-test.cxx @@ -50,7 +50,7 @@ void PriorityFilterTest::testPriority() static struct { const char *pURL; const char *pFormat; - } aToCheck[] = { + } const aToCheck[] = { { "file:///tmp/foo.xls", "calc_MS_Excel_97" } // TODO: expand this to check more of these priorities }; diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index ef8ab1e9e7d7..70a30e3eaa84 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -7018,7 +7018,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo sal_uInt32 n1; sal_uInt16 n2, n3; 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_EQUATION2_CLASSID }, { OLE_WINWORD_2_STARWRITER, "swriter", MSO_WW8_CLASSID }, diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx index 43652af5f7ea..1c2ae74e39fa 100644 --- a/filter/source/msfilter/msoleexp.cxx +++ b/filter/source/msfilter/msoleexp.cxx @@ -136,7 +136,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef const & rObj sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15; } aGlNmIds[4]; - } aArr[] = { + } const aArr[] = { { OLE_STARMATH_2_MATHTYPE, "MathType 3.x", {{SO3_SM_CLASSID_60}, {SO3_SM_CLASSID_50}, {SO3_SM_CLASSID_40}, {SO3_SM_CLASSID_30 }}}, diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index dbfa228d7c14..8d16ce737fc6 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -220,12 +220,12 @@ namespace frm ) { bool bLoad = KEY_F11 == nCode; - struct + static struct { const sal_Char* pDescription; const sal_Char* pExtension; EETextFormat eFormat; - } aExportFormats[] = + } const aExportFormats[] = { { "OASIS OpenDocument (*.xml)", "*.xml", EETextFormat::Xml }, { "HyperText Markup Language (*.html)", "*.html", EETextFormat::Html }, diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index af5428305c70..74c3461d47c9 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -238,12 +238,12 @@ namespace frm // items. We could duplicate all the information here in our lib // (such as the item text and the image), but why should we? - struct FeatureDescription + static struct FeatureDescription { sal_uInt16 nId; bool bRepeat; bool bItemWindow; - } aSupportedFeatures[] = + } const aSupportedFeatures[] = { { LID_RECORD_LABEL, false, true }, { FormFeature::MoveAbsolute, false, true }, @@ -270,8 +270,8 @@ namespace frm { FormFeature::RemoveFilterAndSort, false, false }, }; - FeatureDescription* pSupportedFeatures = aSupportedFeatures; - FeatureDescription* pSupportedFeaturesEnd = aSupportedFeatures + SAL_N_ELEMENTS( aSupportedFeatures ); + FeatureDescription const * pSupportedFeatures = aSupportedFeatures; + FeatureDescription const * pSupportedFeaturesEnd = aSupportedFeatures + SAL_N_ELEMENTS( aSupportedFeatures ); for ( ; pSupportedFeatures < pSupportedFeaturesEnd; ++pSupportedFeatures ) { if ( pSupportedFeatures->nId ) diff --git a/formula/source/core/api/services.cxx b/formula/source/core/api/services.cxx index 9010ee8be870..2e885fea41cd 100644 --- a/formula/source/core/api/services.cxx +++ b/formula/source/core/api/services.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star::registry; namespace { -cppu::ImplementationEntry entries[] = { +cppu::ImplementationEntry const entries[] = { { &FormulaOpCodeMapperObj::create, &FormulaOpCodeMapperObj::getImplementationName_Static, &FormulaOpCodeMapperObj::getSupportedServiceNames_Static, &cppu::createSingleComponentFactory, nullptr, 0 }, { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } diff --git a/framework/source/accelerators/keymapping.cxx b/framework/source/accelerators/keymapping.cxx index 8b1bc1307b17..b1bbe79cc858 100644 --- a/framework/source/accelerators/keymapping.cxx +++ b/framework/source/accelerators/keymapping.cxx @@ -27,7 +27,7 @@ namespace framework // helper -KeyMapping::KeyIdentifierInfo KeyMapping::KeyIdentifierMap[] = +KeyMapping::KeyIdentifierInfo const KeyMapping::KeyIdentifierMap[] = { {css::awt::Key::NUM0 , "KEY_0" }, {css::awt::Key::NUM1 , "KEY_1" }, diff --git a/framework/source/inc/accelerators/keymapping.hxx b/framework/source/inc/accelerators/keymapping.hxx index 0f610e599e3a..9ce8cdcd8ed7 100644 --- a/framework/source/inc/accelerators/keymapping.hxx +++ b/framework/source/inc/accelerators/keymapping.hxx @@ -61,7 +61,7 @@ class KeyMapping private: - static KeyIdentifierInfo KeyIdentifierMap[]; + static KeyIdentifierInfo const KeyIdentifierMap[]; /** @short hash to map identifier to key codes. */ Identifier2CodeHash m_lIdentifierHash; |