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

loplugin:staticvar in avmedia..connectivity

Change-Id: I5dcac79131c810787e8fa49df75e55cc78147860
Reviewed-on: https://gerrit.libreoffice.org/61834
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 6ee43757
...@@ -25,7 +25,7 @@ namespace wrapper ...@@ -25,7 +25,7 @@ namespace wrapper
{ {
bool Common::LoadSymbols() bool Common::LoadSymbols()
{ {
ApiMap const VLC_COMMON_API[] = static ApiMap const VLC_COMMON_API[] =
{ {
SYM_MAP( libvlc_get_version ), SYM_MAP( libvlc_get_version ),
SYM_MAP( libvlc_errmsg ) SYM_MAP( libvlc_errmsg )
......
...@@ -47,7 +47,7 @@ void EventManager::Handler( const libvlc_event_t *event, void *pData ) ...@@ -47,7 +47,7 @@ void EventManager::Handler( const libvlc_event_t *event, void *pData )
bool EventManager::LoadSymbols() bool EventManager::LoadSymbols()
{ {
ApiMap const VLC_EVENT_MANAGER_API[] = static ApiMap const VLC_EVENT_MANAGER_API[] =
{ {
SYM_MAP( libvlc_media_player_event_manager ), SYM_MAP( libvlc_media_player_event_manager ),
SYM_MAP( libvlc_event_attach ), SYM_MAP( libvlc_event_attach ),
......
...@@ -25,7 +25,7 @@ namespace wrapper ...@@ -25,7 +25,7 @@ namespace wrapper
{ {
bool Instance::LoadSymbols() bool Instance::LoadSymbols()
{ {
ApiMap const VLC_INSTANCE_API[] = static ApiMap const VLC_INSTANCE_API[] =
{ {
SYM_MAP( libvlc_new ), SYM_MAP( libvlc_new ),
SYM_MAP( libvlc_release ), SYM_MAP( libvlc_release ),
......
...@@ -46,7 +46,7 @@ namespace ...@@ -46,7 +46,7 @@ namespace
bool Media::LoadSymbols() bool Media::LoadSymbols()
{ {
ApiMap const VLC_MEDIA_API[] = static ApiMap const VLC_MEDIA_API[] =
{ {
SYM_MAP( libvlc_media_new_path ), SYM_MAP( libvlc_media_new_path ),
SYM_MAP( libvlc_media_release ), SYM_MAP( libvlc_media_release ),
......
...@@ -67,7 +67,7 @@ namespace wrapper ...@@ -67,7 +67,7 @@ namespace wrapper
{ {
bool Player::LoadSymbols() bool Player::LoadSymbols()
{ {
ApiMap const VLC_PLAYER_API[] = static ApiMap const VLC_PLAYER_API[] =
{ {
SYM_MAP( libvlc_media_player_new_from_media ), SYM_MAP( libvlc_media_player_new_from_media ),
SYM_MAP( libvlc_media_player_release ), SYM_MAP( libvlc_media_player_release ),
......
...@@ -133,7 +133,7 @@ namespace basctl ...@@ -133,7 +133,7 @@ namespace basctl
const sal_Char* pEventName; const sal_Char* pEventName;
void (DocumentEventListener::*listenerMethod)( const ScriptDocument& _rDocument ); void (DocumentEventListener::*listenerMethod)( const ScriptDocument& _rDocument );
}; };
EventEntry const aEvents[] = { static EventEntry const aEvents[] = {
{ "OnNew", &DocumentEventListener::onDocumentCreated }, { "OnNew", &DocumentEventListener::onDocumentCreated },
{ "OnLoad", &DocumentEventListener::onDocumentOpened }, { "OnLoad", &DocumentEventListener::onDocumentOpened },
{ "OnSave", &DocumentEventListener::onDocumentSave }, { "OnSave", &DocumentEventListener::onDocumentSave },
......
...@@ -268,7 +268,7 @@ xmlDocPtr Chart2ExportTest::parseExport(const OUString& rDir, const OUString& rF ...@@ -268,7 +268,7 @@ xmlDocPtr Chart2ExportTest::parseExport(const OUString& rDir, const OUString& rF
void Chart2ExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) void Chart2ExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
{ {
struct { char const * pPrefix; char const * pURI; } aNamespaces[] = static struct { char const * pPrefix; char const * pURI; } const aNamespaces[] =
{ {
{ "w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main" }, { "w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main" },
{ "v", "urn:schemas-microsoft-com:vml" }, { "v", "urn:schemas-microsoft-com:vml" },
...@@ -895,7 +895,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX() ...@@ -895,7 +895,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX()
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aIndices[1]); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aIndices[1]);
*/ */
const Check aDataPoints[] = static const Check aDataPoints[] =
{ {
{ 0, css::drawing::LineStyle_SOLID, 0x00FFFF00 }, // solid yellow { 0, css::drawing::LineStyle_SOLID, 0x00FFFF00 }, // solid yellow
{ 2, css::drawing::LineStyle_SOLID, 0x00FF0000 } // solid red { 2, css::drawing::LineStyle_SOLID, 0x00FF0000 } // solid red
......
...@@ -77,7 +77,7 @@ struct AxisLabelPosMap ...@@ -77,7 +77,7 @@ struct AxisLabelPosMap
css::chart::ChartAxisLabelPosition ePos; css::chart::ChartAxisLabelPosition ePos;
}; };
AxisLabelPosMap aLabelPosMap[] = { static AxisLabelPosMap const aLabelPosMap[] = {
{ 0, css::chart::ChartAxisLabelPosition_NEAR_AXIS }, { 0, css::chart::ChartAxisLabelPosition_NEAR_AXIS },
{ 1, css::chart::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE }, { 1, css::chart::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE },
{ 2, css::chart::ChartAxisLabelPosition_OUTSIDE_START }, { 2, css::chart::ChartAxisLabelPosition_OUTSIDE_START },
...@@ -99,7 +99,7 @@ sal_Int32 getLabelPosition(const css::uno::Reference<css::frame::XModel>& xModel ...@@ -99,7 +99,7 @@ sal_Int32 getLabelPosition(const css::uno::Reference<css::frame::XModel>& xModel
css::chart::ChartAxisLabelPosition ePos; css::chart::ChartAxisLabelPosition ePos;
aAny >>= ePos; aAny >>= ePos;
for (AxisLabelPosMap & i : aLabelPosMap) for (AxisLabelPosMap const & i : aLabelPosMap)
{ {
if (i.ePos == ePos) if (i.ePos == ePos)
return i.nPos; return i.nPos;
...@@ -118,7 +118,7 @@ void setLabelPosition(const css::uno::Reference<css::frame::XModel>& xModel, ...@@ -118,7 +118,7 @@ void setLabelPosition(const css::uno::Reference<css::frame::XModel>& xModel,
return; return;
css::chart::ChartAxisLabelPosition ePos; css::chart::ChartAxisLabelPosition ePos;
for (AxisLabelPosMap & i : aLabelPosMap) for (AxisLabelPosMap const & i : aLabelPosMap)
{ {
if (i.nPos == nPos) if (i.nPos == nPos)
ePos = i.ePos; ePos = i.ePos;
......
...@@ -121,7 +121,7 @@ struct ErrorBarTypeMap ...@@ -121,7 +121,7 @@ struct ErrorBarTypeMap
sal_Int32 nApi; sal_Int32 nApi;
}; };
ErrorBarTypeMap aErrorBarType[] = { static ErrorBarTypeMap const aErrorBarType[] = {
{ 0, css::chart::ErrorBarStyle::ABSOLUTE }, { 0, css::chart::ErrorBarStyle::ABSOLUTE },
{ 1, css::chart::ErrorBarStyle::RELATIVE }, { 1, css::chart::ErrorBarStyle::RELATIVE },
{ 2, css::chart::ErrorBarStyle::FROM_DATA }, { 2, css::chart::ErrorBarStyle::FROM_DATA },
...@@ -148,7 +148,7 @@ sal_Int32 getTypePos(const css::uno::Reference<css::frame::XModel>& xModel, ...@@ -148,7 +148,7 @@ sal_Int32 getTypePos(const css::uno::Reference<css::frame::XModel>& xModel,
sal_Int32 nApi = 0; sal_Int32 nApi = 0;
aAny >>= nApi; aAny >>= nApi;
for (ErrorBarTypeMap & i : aErrorBarType) for (ErrorBarTypeMap const & i : aErrorBarType)
{ {
if (i.nApi == nApi) if (i.nApi == nApi)
return i.nPos; return i.nPos;
...@@ -167,7 +167,7 @@ void setTypePos(const css::uno::Reference<css::frame::XModel>& xModel, ...@@ -167,7 +167,7 @@ void setTypePos(const css::uno::Reference<css::frame::XModel>& xModel,
return; return;
sal_Int32 nApi = 0; sal_Int32 nApi = 0;
for (ErrorBarTypeMap & i : aErrorBarType) for (ErrorBarTypeMap const & i : aErrorBarType)
{ {
if (i.nPos == nPos) if (i.nPos == nPos)
nApi = i.nApi; nApi = i.nApi;
......
...@@ -84,7 +84,7 @@ struct LabelPlacementMap ...@@ -84,7 +84,7 @@ struct LabelPlacementMap
sal_Int32 nApi; sal_Int32 nApi;
}; };
LabelPlacementMap aLabelPlacementMap[] = { static LabelPlacementMap const aLabelPlacementMap[] = {
{ 0, css::chart::DataLabelPlacement::TOP }, { 0, css::chart::DataLabelPlacement::TOP },
{ 1, css::chart::DataLabelPlacement::BOTTOM }, { 1, css::chart::DataLabelPlacement::BOTTOM },
{ 2, css::chart::DataLabelPlacement::CENTER }, { 2, css::chart::DataLabelPlacement::CENTER },
...@@ -109,7 +109,7 @@ sal_Int32 getDataLabelPlacement(const css::uno::Reference<css::frame::XModel>& x ...@@ -109,7 +109,7 @@ sal_Int32 getDataLabelPlacement(const css::uno::Reference<css::frame::XModel>& x
sal_Int32 nPlacement = 0; sal_Int32 nPlacement = 0;
aAny >>= nPlacement; aAny >>= nPlacement;
for (LabelPlacementMap & i : aLabelPlacementMap) for (LabelPlacementMap const & i : aLabelPlacementMap)
{ {
if (i.nApi == nPlacement) if (i.nApi == nPlacement)
return i.nPos; return i.nPos;
...@@ -128,7 +128,7 @@ void setDataLabelPlacement(const css::uno::Reference<css::frame::XModel>& xModel ...@@ -128,7 +128,7 @@ void setDataLabelPlacement(const css::uno::Reference<css::frame::XModel>& xModel
return; return;
sal_Int32 nApi = 0; sal_Int32 nApi = 0;
for (LabelPlacementMap & i : aLabelPlacementMap) for (LabelPlacementMap const & i : aLabelPlacementMap)
{ {
if (i.nPos == nPos) if (i.nPos == nPos)
{ {
......
...@@ -880,7 +880,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA ...@@ -880,7 +880,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA
namespace namespace
{ {
cppu::ImplementationEntry entries[] = { cppu::ImplementationEntry const entries[] = {
{ &ODatabaseMetaDataResultSet_CreateInstance, &ODatabaseMetaDataResultSet::getImplementationName_Static, &ODatabaseMetaDataResultSet::getSupportedServiceNames_Static, { &ODatabaseMetaDataResultSet_CreateInstance, &ODatabaseMetaDataResultSet::getImplementationName_Static, &ODatabaseMetaDataResultSet::getSupportedServiceNames_Static,
&cppu::createSingleComponentFactory, nullptr, 0 }, &cppu::createSingleComponentFactory, nullptr, 0 },
{ &ParameterSubstitution::create, &ParameterSubstitution::getImplementationName_Static, &ParameterSubstitution::getSupportedServiceNames_Static, { &ParameterSubstitution::create, &ParameterSubstitution::getImplementationName_Static, &ParameterSubstitution::getSupportedServiceNames_Static,
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbc;
TypeInfoDef mysqlc_types[] = { TypeInfoDef const mysqlc_types[] = {
// ------------- MySQL-Type: BIT. SDBC-Type: Bit ------------- // ------------- MySQL-Type: BIT. SDBC-Type: Bit -------------
{ {
......
...@@ -39,7 +39,7 @@ struct TypeInfoDef ...@@ -39,7 +39,7 @@ struct TypeInfoDef
sal_Int32 maxScale; sal_Int32 maxScale;
}; };
extern TypeInfoDef mysqlc_types[]; extern TypeInfoDef const mysqlc_types[];
#endif // INCLUDED_MYSQLC_SOURCE_MYSQLC_TYPES_HXX #endif // INCLUDED_MYSQLC_SOURCE_MYSQLC_TYPES_HXX
......
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