const up various static locals

Change-Id: I0bbfd1daca973cc158f8d3a60b8df44cd5565f57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187825
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2025-07-23 15:55:16 +02:00
parent 9a4b985143
commit 58b9b2fa7a
14 changed files with 33 additions and 33 deletions
@@ -3021,7 +3021,7 @@ namespace pcr
whose UI is to be disabled while the SQL command property is
being edited.
*/
virtual OUString* getPropertiesToDisable() = 0;
virtual const OUString* getPropertiesToDisable() = 0;
};
@@ -3056,7 +3056,7 @@ namespace pcr
virtual void setEscapeProcessing( const bool _bEscapeProcessing ) const override;
// ISQLCommandPropertyUI
virtual OUString* getPropertiesToDisable() override;
virtual const OUString* getPropertiesToDisable() override;
};
@@ -3099,14 +3099,14 @@ namespace pcr
}
OUString* FormSQLCommandUI::getPropertiesToDisable()
const OUString* FormSQLCommandUI::getPropertiesToDisable()
{
static OUString s_aCommandProps[] = {
static constexpr OUString s_aCommandProps[] = {
PROPERTY_DATASOURCE,
PROPERTY_COMMAND,
PROPERTY_COMMANDTYPE,
PROPERTY_ESCAPE_PROCESSING,
OUString()
u""_ustr
};
return s_aCommandProps;
}
@@ -3125,7 +3125,7 @@ namespace pcr
virtual void setEscapeProcessing( const bool _bEscapeProcessing ) const override;
// ISQLCommandPropertyUI
virtual OUString* getPropertiesToDisable() override;
virtual const OUString* getPropertiesToDisable() override;
private:
mutable bool m_bPropertyValueIsList;
};
@@ -3194,12 +3194,12 @@ namespace pcr
}
OUString* ValueListCommandUI::getPropertiesToDisable()
const OUString* ValueListCommandUI::getPropertiesToDisable()
{
static OUString s_aListSourceProps[] = {
static constexpr OUString s_aListSourceProps[] = {
PROPERTY_LISTSOURCETYPE,
PROPERTY_LISTSOURCE,
OUString()
u""_ustr
};
return s_aListSourceProps;
}
+8 -8
View File
@@ -64,7 +64,7 @@
#define OSL_INVALID_SOCKET INVALID_SOCKET /* WIN32 */
#define OSL_SOCKET_ERROR SOCKET_ERROR /* WIN32 */
static DWORD FamilyMap[]= {
static const DWORD FamilyMap[]= {
AF_INET, /* osl_Socket_FamilyInet */
AF_IPX, /* osl_Socket_FamilyIpx */
0 /* osl_Socket_FamilyInvalid */
@@ -85,7 +85,7 @@ static oslAddrFamily osl_AddrFamilyFromNative(DWORD nativeType)
#define FAMILY_FROM_NATIVE(y) osl_AddrFamilyFromNative(y)
#define FAMILY_TO_NATIVE(x) static_cast<short>(FamilyMap[x])
static DWORD ProtocolMap[]= {
static const DWORD ProtocolMap[]= {
0, /* osl_Socket_FamilyInet */
NSPROTO_IPX, /* osl_Socket_FamilyIpx */
NSPROTO_SPX, /* osl_Socket_ProtocolSpx */
@@ -95,7 +95,7 @@ static DWORD ProtocolMap[]= {
#define PROTOCOL_TO_NATIVE(x) ProtocolMap[x]
static DWORD TypeMap[]= {
static const DWORD TypeMap[]= {
SOCK_STREAM, /* osl_Socket_TypeStream */
SOCK_DGRAM, /* osl_Socket_TypeDgram */
SOCK_RAW, /* osl_Socket_TypeRaw */
@@ -119,7 +119,7 @@ static oslSocketType osl_SocketTypeFromNative(DWORD nativeType)
#define TYPE_TO_NATIVE(x) TypeMap[x]
#define TYPE_FROM_NATIVE(y) osl_SocketTypeFromNative(y)
static DWORD OptionMap[]= {
static const DWORD OptionMap[]= {
SO_DEBUG, /* osl_Socket_OptionDebug */
SO_ACCEPTCONN, /* osl_Socket_OptionAcceptConn */
SO_REUSEADDR, /* osl_Socket_OptionReuseAddr */
@@ -143,7 +143,7 @@ static DWORD OptionMap[]= {
#define OPTION_TO_NATIVE(x) OptionMap[x]
static DWORD OptionLevelMap[]= {
static const DWORD OptionLevelMap[]= {
SOL_SOCKET, /* osl_Socket_LevelSocket */
IPPROTO_TCP, /* osl_Socket_LevelTcp */
0 /* osl_invalid_SocketLevel */
@@ -151,7 +151,7 @@ static DWORD OptionLevelMap[]= {
#define OPTION_LEVEL_TO_NATIVE(x) OptionLevelMap[x]
static DWORD SocketMsgFlagMap[]= {
static const DWORD SocketMsgFlagMap[]= {
0, /* osl_Socket_MsgNormal */
MSG_OOB, /* osl_Socket_MsgOOB */
MSG_PEEK, /* osl_Socket_MsgPeek */
@@ -161,7 +161,7 @@ static DWORD SocketMsgFlagMap[]= {
#define MSG_FLAG_TO_NATIVE(x) SocketMsgFlagMap[x]
static DWORD SocketDirection[]= {
static const DWORD SocketDirection[]= {
SD_RECEIVE, /* osl_Socket_DirRead */
SD_SEND, /* osl_Socket_DirWrite */
SD_BOTH /* osl_Socket_DirReadwrite */
@@ -169,7 +169,7 @@ static DWORD SocketDirection[]= {
#define DIRECTION_TO_NATIVE(x) SocketDirection[x]
static int SocketError[]= {
static const int SocketError[]= {
0, /* no error */
WSAENOTSOCK, /* Socket operation on non-socket */
WSAEDESTADDRREQ, /* Destination address required */
+2 -2
View File
@@ -475,14 +475,14 @@ SvXMLImportContext *ScXMLImport::CreateScriptContext()
void ScXMLImport::SetStatistics(const uno::Sequence<beans::NamedValue> & i_rStats)
{
static const char* s_stats[] =
static const char* const s_stats[] =
{ "TableCount", "CellCount", "ObjectCount", nullptr };
SvXMLImport::SetStatistics(i_rStats);
sal_uInt64 nCount(0);
for (const auto& rStat : i_rStats) {
for (const char** pStat = s_stats; *pStat != nullptr; ++pStat) {
for (const char*const* pStat = s_stats; *pStat != nullptr; ++pStat) {
if (rStat.Name.equalsAscii(*pStat)) {
sal_Int32 val = 0;
if (rStat.Value >>= val) {
+1 -1
View File
@@ -2894,7 +2894,7 @@ void AnimationImporter::dump( Any& rAny )
{
if( aEvent.Trigger != EventTrigger::NONE )
{
static const char* triggers[] =
static const char* const triggers[] =
{
"none","onbegin","onend","begin",
"end","onclick","ondoubleclick","onmouseenter",
+1 -1
View File
@@ -887,7 +887,7 @@ for entry in sorted(custom_widgets):
print ('void make' + entry + '();')
print ('typedef void (*custom_widget_func)();')
print ('#if !ENABLE_FUZZERS')
print ('static struct { const char *name; custom_widget_func func; } custom_widgets[] = {')
print ('static struct { const char *name; custom_widget_func func; } const custom_widgets[] = {')
for entry in sorted(custom_widgets):
print (' { "make' + entry + '", make' + entry + ' },')
print ('};')
+1 -1
View File
@@ -1414,7 +1414,7 @@ std::span<const SfxItemPropertyMapEntry> SwUnoPropertyMapProvider::GetPropertyMa
break;
case PROPERTY_MAP_TEXT_VIEW :
{
static SfxItemPropertyMapEntry pTextViewMap[] =
static SfxItemPropertyMapEntry const pTextViewMap[] =
{
{UNO_NAME_PAGE_COUNT, WID_PAGE_COUNT, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::READONLY, 0},
{UNO_NAME_LINE_COUNT, WID_LINE_COUNT, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::READONLY, 0},
+1 -1
View File
@@ -2543,7 +2543,7 @@ void WW8AttributeOutput::TableDefinition(const ww8::WW8TableNodeInfoInner::Point
lcl_TCFlags(m_rWW8Export.m_rDoc, pTabBox1, *aItRowSpans);
m_rWW8Export.InsUInt16( nFlags );
static sal_uInt8 aNullBytes[] = { 0x0, 0x0 };
static const sal_uInt8 aNullBytes[] = { 0x0, 0x0 };
m_rWW8Export.m_pO->insert( m_rWW8Export.m_pO->end(), aNullBytes, aNullBytes+2 ); // dummy
if (pBoxFormat != nullptr)
+1 -1
View File
@@ -38,7 +38,7 @@ using namespace osl;
static ErrCode GetSvError( DWORD nWntError )
{
static struct { DWORD wnt; ErrCode sv; } errArr[] =
static const struct { DWORD wnt; ErrCode sv; } errArr[] =
{
{ ERROR_SUCCESS, ERRCODE_NONE },
{ ERROR_ACCESS_DENIED, SVSTREAM_ACCESS_DENIED },
+2 -2
View File
@@ -40,7 +40,7 @@ using namespace ::com::sun::star::uno ; // Reference
using namespace ::com::sun::star::beans ; // PropertyValue
using namespace ::com::sun::star::configuration ;
const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] =
const char* const FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] =
{
IMP_BMP, IMP_GIF, IMP_PNG, IMP_JPEG, IMP_TIFF, IMP_WEBP,
IMP_XBM, IMP_XPM, IMP_TGA, IMP_PICT, IMP_MET, IMP_RAS,
@@ -53,7 +53,7 @@ void FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString
{
bIsPixelFormat = false;
sFilterName = rUserDataEntry;
const char** pPtr;
const char*const* pPtr;
for ( pPtr = InternalPixelFilterNameList; *pPtr; pPtr++ )
{
if ( sFilterName.equalsIgnoreAsciiCaseAscii( *pPtr ) )
+1 -1
View File
@@ -44,7 +44,7 @@ class FilterConfigCache
void CreateFilterName( const OUString& rUserDataEntry );
OUString GetShortName( );
static const char* InternalPixelFilterNameList[];
static const char* const InternalPixelFilterNameList[];
};
+1 -1
View File
@@ -83,7 +83,7 @@ namespace
}
MapMode::ImplType GetUnitDefault(MapUnit mapUnit)
{
static MapMode::ImplType defaults[]
static const MapMode::ImplType defaults[]
{
MapMode::ImplType( MapMode::ImplMapMode(MapUnit::Map100thMM) ),
MapMode::ImplType( MapMode::ImplMapMode(MapUnit::Map10thMM) ),
+1 -1
View File
@@ -1305,7 +1305,7 @@ extern "C" VclBuilder::customMakeWidget lo_get_custom_widget_func(const char* na
extern "C" void makeNotebookbarTabControl(VclPtr<vcl::Window> &rRet, const VclPtr<vcl::Window> &pParent, VclBuilder::stringmap &rVec);
extern "C" void makeNotebookbarToolBox(VclPtr<vcl::Window> &rRet, const VclPtr<vcl::Window> &pParent, VclBuilder::stringmap &rVec);
static struct { const char *name; VclBuilder::customMakeWidget func; } custom_widgets[] = {
static struct { const char *name; VclBuilder::customMakeWidget func; } const custom_widgets[] = {
{ "makeNotebookbarTabControl", makeNotebookbarTabControl },
{ "makeNotebookbarToolBox", makeNotebookbarToolBox },
};
+2 -2
View File
@@ -1447,8 +1447,8 @@ KeySym SalDisplay::GetKeySym( XKeyEvent *pEvent,
}
// Pointer
static unsigned char nullmask_bits[] = { 0x00, 0x00, 0x00, 0x00 };
static unsigned char nullcurs_bits[] = { 0x00, 0x00, 0x00, 0x00 };
const unsigned char nullmask_bits[] = { 0x00, 0x00, 0x00, 0x00 };
const unsigned char nullcurs_bits[] = { 0x00, 0x00, 0x00, 0x00 };
#define MAKE_BITMAP( name ) \
XCreateBitmapFromData( pDisp_, \
+2 -2
View File
@@ -580,14 +580,14 @@ void SdXMLImport::SetConfigurationSettings(const css::uno::Sequence<css::beans::
void SdXMLImport::SetStatistics(
const uno::Sequence<beans::NamedValue> & i_rStats)
{
static const char* s_stats[] =
static const char* const s_stats[] =
{ "ObjectCount", nullptr };
SvXMLImport::SetStatistics(i_rStats);
sal_uInt32 nCount(10);
for (const auto& rStat : i_rStats) {
for (const char** pStat = s_stats; *pStat != nullptr; ++pStat) {
for (const char*const* pStat = s_stats; *pStat != nullptr; ++pStat) {
if (rStat.Name.equalsAscii(*pStat)) {
sal_Int32 val = 0;
if (rStat.Value >>= val) {