diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-07-02 13:17:47 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-07-02 17:24:09 +0200 |
commit | 441af1f1ca53ca03736e0417414bbcf067aaaefa (patch) | |
tree | 33eb111d8ae28feb9290882298438fcc08bdcb05 /vcl/source | |
parent | f0d4f96a0c7c84ea6f81e14f9df1ca37be54db04 (diff) |
Upcoming improved loplugin:staticanonymous -> redundantstatic: vcl
Change-Id: I7559ab5c98a22e315549b5dfc651e937697cac22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97742
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source')
34 files changed, 76 insertions, 76 deletions
diff --git a/vcl/source/app/IconThemeInfo.cxx b/vcl/source/app/IconThemeInfo.cxx index 84d85883b1cf..ae094bbcd2b1 100644 --- a/vcl/source/app/IconThemeInfo.cxx +++ b/vcl/source/app/IconThemeInfo.cxx @@ -20,9 +20,9 @@ const OUStringLiteral vcl::IconThemeInfo::HIGH_CONTRAST_ID("sifr"); namespace { -static const OUStringLiteral KARASA_JAGA_ID("karasa_jaga"); -static const OUStringLiteral KARASA_JAGA_DISPLAY_NAME("Karasa Jaga"); -static const OUStringLiteral HELPIMG_FAKE_THEME("helpimg"); +const OUStringLiteral KARASA_JAGA_ID("karasa_jaga"); +const OUStringLiteral KARASA_JAGA_DISPLAY_NAME("Karasa Jaga"); +const OUStringLiteral HELPIMG_FAKE_THEME("helpimg"); OUString filename_from_url(const OUString& url) @@ -39,9 +39,9 @@ filename_from_url(const OUString& url) namespace vcl { -static const char ICON_THEME_PACKAGE_PREFIX[] = "images_"; +const char ICON_THEME_PACKAGE_PREFIX[] = "images_"; -static const char EXTENSION_FOR_ICON_PACKAGES[] = ".zip"; +const char EXTENSION_FOR_ICON_PACKAGES[] = ".zip"; IconThemeInfo::IconThemeInfo() { diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index ea01d31c0829..12a21ee04fac 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -84,7 +84,7 @@ void InitSettings(ImplSVData* pSVData); } // keycodes handled internally by VCL -static vcl::KeyCode const ReservedKeys[] +vcl::KeyCode const ReservedKeys[] { vcl::KeyCode(KEY_F1,0) , vcl::KeyCode(KEY_F1,KEY_SHIFT) , diff --git a/vcl/source/app/watchdog.cxx b/vcl/source/app/watchdog.cxx index c45e51c04194..588cf6d579be 100644 --- a/vcl/source/app/watchdog.cxx +++ b/vcl/source/app/watchdog.cxx @@ -27,9 +27,9 @@ namespace { -static volatile bool gbWatchdogFiring = false; -static osl::Condition* gpWatchdogExit = nullptr; -static rtl::Reference<WatchdogThread> gxWatchdog; +volatile bool gbWatchdogFiring = false; +osl::Condition* gpWatchdogExit = nullptr; +rtl::Reference<WatchdogThread> gxWatchdog; template <typename Zone> struct WatchdogHelper { diff --git a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx index 94e0c6e02f80..6237d3db97ff 100644 --- a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx +++ b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx @@ -199,7 +199,7 @@ BitmapEx BitmapConvolutionMatrixFilter::execute(BitmapEx const& rBitmapEx) const return BitmapEx(); } -static const long g_SharpenMatrix[] = { -1, -1, -1, -1, 16, -1, -1, -1, -1 }; +const long g_SharpenMatrix[] = { -1, -1, -1, -1, 16, -1, -1, -1, -1 }; BitmapSharpenFilter::BitmapSharpenFilter() : BitmapConvolutionMatrixFilter(g_SharpenMatrix) diff --git a/vcl/source/bitmap/BitmapFilterStackBlur.cxx b/vcl/source/bitmap/BitmapFilterStackBlur.cxx index da51daedfacc..69e7c8b2e3ec 100644 --- a/vcl/source/bitmap/BitmapFilterStackBlur.cxx +++ b/vcl/source/bitmap/BitmapFilterStackBlur.cxx @@ -17,7 +17,7 @@ namespace { -static const sal_Int16 constMultiplyTable[255] +const sal_Int16 constMultiplyTable[255] = { 512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, @@ -34,7 +34,7 @@ static const sal_Int16 constMultiplyTable[255] 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259 }; -static const sal_Int16 constShiftTable[255] +const sal_Int16 constShiftTable[255] = { 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, diff --git a/vcl/source/bitmap/checksum.cxx b/vcl/source/bitmap/checksum.cxx index d33d884033f9..a5c92c5559d4 100644 --- a/vcl/source/bitmap/checksum.cxx +++ b/vcl/source/bitmap/checksum.cxx @@ -26,7 +26,7 @@ * vcl_crc64Table (CRC polynomial 0x95AC9329AC4BC9B5ULL). * *======================================================================*/ -static const sal_uInt64 vcl_crc64Table[256] = { +const sal_uInt64 vcl_crc64Table[256] = { 0x0000000000000000ULL, 0x7ad870c830358979ULL, 0xf5b0e190606b12f2ULL, 0x8f689158505e9b8bULL, 0xc038e5739841b68fULL, 0xbae095bba8743ff6ULL, 0x358804e3f82aa47dULL, 0x4f50742bc81f2d04ULL, 0xab28ecb46814fe75ULL, diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 05e8aa46eca7..8d9b269ea823 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -50,18 +50,18 @@ using namespace css; -static constexpr auto PUSHBUTTON_VIEW_STYLE = WB_3DLOOK | +constexpr auto PUSHBUTTON_VIEW_STYLE = WB_3DLOOK | WB_LEFT | WB_CENTER | WB_RIGHT | WB_TOP | WB_VCENTER | WB_BOTTOM | WB_WORDBREAK | WB_NOLABEL | WB_DEFBUTTON | WB_NOLIGHTBORDER | WB_RECTSTYLE | WB_SMALLSTYLE | WB_TOGGLE; -static constexpr auto RADIOBUTTON_VIEW_STYLE = WB_3DLOOK | +constexpr auto RADIOBUTTON_VIEW_STYLE = WB_3DLOOK | WB_LEFT | WB_CENTER | WB_RIGHT | WB_TOP | WB_VCENTER | WB_BOTTOM | WB_WORDBREAK | WB_NOLABEL; -static constexpr auto CHECKBOX_VIEW_STYLE = WB_3DLOOK | +constexpr auto CHECKBOX_VIEW_STYLE = WB_3DLOOK | WB_LEFT | WB_CENTER | WB_RIGHT | WB_TOP | WB_VCENTER | WB_BOTTOM | WB_WORDBREAK | WB_NOLABEL; diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index e7a6472713fa..f18005f0bb57 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -1089,7 +1089,7 @@ static FieldUnit ImplMetricGetUnit(const OUString& rStr) // twip in km = 254 / 14 400 000 000 // expressions too big for default size 32 bit need LL to avoid overflow -static const sal_Int64 aImplFactor[sal_uInt16(FieldUnit::LINE) + 1] +const sal_Int64 aImplFactor[sal_uInt16(FieldUnit::LINE) + 1] [sal_uInt16(FieldUnit::LINE) + 1] = { /* mm/100 mm cm m km twip point pica inch foot mile char line */ diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index dcecf67e4def..91e001ac9bc9 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -28,17 +28,17 @@ #define FIXEDLINE_TEXT_BORDER 4 -static constexpr auto FIXEDTEXT_VIEW_STYLE = WB_3DLOOK | +constexpr auto FIXEDTEXT_VIEW_STYLE = WB_3DLOOK | WB_LEFT | WB_CENTER | WB_RIGHT | WB_TOP | WB_VCENTER | WB_BOTTOM | WB_WORDBREAK | WB_NOLABEL | WB_PATHELLIPSIS; -static constexpr auto FIXEDLINE_VIEW_STYLE = WB_3DLOOK | WB_NOLABEL; -static constexpr auto FIXEDBITMAP_VIEW_STYLE = WB_3DLOOK | +constexpr auto FIXEDLINE_VIEW_STYLE = WB_3DLOOK | WB_NOLABEL; +constexpr auto FIXEDBITMAP_VIEW_STYLE = WB_3DLOOK | WB_LEFT | WB_CENTER | WB_RIGHT | WB_TOP | WB_VCENTER | WB_BOTTOM | WB_SCALE; -static constexpr auto FIXEDIMAGE_VIEW_STYLE = WB_3DLOOK | +constexpr auto FIXEDIMAGE_VIEW_STYLE = WB_3DLOOK | WB_LEFT | WB_CENTER | WB_RIGHT | WB_TOP | WB_VCENTER | WB_BOTTOM | WB_SCALE; diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index b6a2902b0417..0da0fa88d509 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -39,7 +39,7 @@ #include <memory> #include <vcl/idle.hxx> -static constexpr auto DRAWTEXT_FLAGS_ICON = +constexpr auto DRAWTEXT_FLAGS_ICON = DrawTextFlags::Center | DrawTextFlags::Top | DrawTextFlags::EndEllipsis | DrawTextFlags::Clip | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak | DrawTextFlags::Mnemonic; diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 0a04c7df9830..475124a94d27 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star; -static constexpr long gnBorder = 1; +constexpr long gnBorder = 1; void ImplInitDropDownButton( PushButton* pButton ) { diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 8e0f7a1616b9..e5465c52c402 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -223,9 +223,9 @@ void TextEngine::SetMaxTextWidth( long nMaxWidth ) } } -static const sal_Unicode static_aLFText[] = { '\n', 0 }; -static const sal_Unicode static_aCRText[] = { '\r', 0 }; -static const sal_Unicode static_aCRLFText[] = { '\r', '\n', 0 }; +const sal_Unicode static_aLFText[] = { '\n', 0 }; +const sal_Unicode static_aCRText[] = { '\r', 0 }; +const sal_Unicode static_aCRLFText[] = { '\r', '\n', 0 }; static const sal_Unicode* static_getLineEndText( LineEnd aLineEnd ) { diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx index 4d11f275b361..ae9335232679 100644 --- a/vcl/source/edit/xtextedt.cxx +++ b/vcl/source/edit/xtextedt.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star; -static const std::wstring gaGroupChars = L"(){}[]"; +const std::wstring gaGroupChars = L"(){}[]"; ExtTextEngine::ExtTextEngine() { diff --git a/vcl/source/filter/ixpm/rgbtable.hxx b/vcl/source/filter/ixpm/rgbtable.hxx index bff3f0d844b2..1ded061e79db 100644 --- a/vcl/source/filter/ixpm/rgbtable.hxx +++ b/vcl/source/filter/ixpm/rgbtable.hxx @@ -30,7 +30,7 @@ struct XPMRGBTab sal_uInt8 blue; }; -static const XPMRGBTab pRGBTable[] = { +const XPMRGBTab pRGBTable[] = { { "white", 255, 255, 255 }, { "black", 0, 0, 0 }, { "snow", 255, 250, 250 }, diff --git a/vcl/source/filter/png/pngread.cxx b/vcl/source/filter/png/pngread.cxx index bd530689f47c..ff13402d0605 100644 --- a/vcl/source/filter/png/pngread.cxx +++ b/vcl/source/filter/png/pngread.cxx @@ -51,7 +51,7 @@ namespace vcl #define DISPLAY_GAMMA 1.0 -static const sal_uInt8 mpDefaultColorTable[ 256 ] = +const sal_uInt8 mpDefaultColorTable[ 256 ] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index c40077dc1b1e..20465f3a6ec2 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -918,7 +918,7 @@ std::unique_ptr<ImplDeviceFontSizeList> PhysicalFontCollection::GetDeviceFontSiz // These are the metric-compatible replacement fonts that are bundled with // LibreOffice, we prefer them over generic substitutions that might be // provided by the system. -static const std::vector<std::pair<OUString, OUString>> aMetricCompatibleMap = +const std::vector<std::pair<OUString, OUString>> aMetricCompatibleMap = { { "Times New Roman", "Liberation Serif" }, { "Arial", "Liberation Sans" }, diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index 4db757cd7532..cc24f06f33eb 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -533,7 +533,7 @@ namespace return bResult; } - static struct WeightSearchEntry + struct WeightSearchEntry { const char* string; int string_len; diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx index f8c95e796b20..61f22f48f141 100644 --- a/vcl/source/font/fontcharmap.cxx +++ b/vcl/source/font/fontcharmap.cxx @@ -35,8 +35,8 @@ CmapResult::CmapResult( bool bSymbolic, {} static ImplFontCharMapRef g_pDefaultImplFontCharMap; -static const sal_UCS4 aDefaultUnicodeRanges[] = {0x0020,0xD800, 0xE000,0xFFF0}; -static const sal_UCS4 aDefaultSymbolRanges[] = {0x0020,0x0100, 0xF020,0xF100}; +const sal_UCS4 aDefaultUnicodeRanges[] = {0x0020,0xD800, 0xE000,0xFFF0}; +const sal_UCS4 aDefaultSymbolRanges[] = {0x0020,0x0100, 0xF020,0xF100}; ImplFontCharMap::~ImplFontCharMap() { diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index dd7da8d92ae7..6dfe0cc6b8ee 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -1077,7 +1077,7 @@ void CffSubsetterContext::callType2Subr( bool bGlobal, int nSubrNumber) mpReadEnd = pOldReadEnd; } -static const int MAX_T1OPS_SIZE = 81920; // TODO: use dynamic value +const int MAX_T1OPS_SIZE = 81920; // TODO: use dynamic value int CffSubsetterContext::convert2Type1Ops( CffLocal* pCffLocal, const U8* const pT2Ops, int nT2Len, U8* const pT1Ops) { diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index e16335a70449..cad283431bc7 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -49,9 +49,9 @@ namespace vcl /*- module identification */ -static const char * const modname = "SunTypeTools-TT"; -static const char * const modver = "1.0"; -static const char * const modextra = "gelf"; +const char * const modname = "SunTypeTools-TT"; +const char * const modver = "1.0"; +const char * const modextra = "gelf"; /*- private functions, constants and data types */ diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx index 62690a2157b2..3bea9bd1e535 100644 --- a/vcl/source/fontsubset/ttcr.cxx +++ b/vcl/source/fontsubset/ttcr.cxx @@ -478,7 +478,7 @@ static void TrueTypeTableDispose_post(TrueTypeTable *_this) /* destructor vtable */ -static struct { +struct { sal_uInt32 tag; void (*f)(TrueTypeTable *); } const vtable1[] = @@ -804,7 +804,7 @@ static int GetRawData_post(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le return ret; } -static struct { +struct { sal_uInt32 tag; int (*f)(TrueTypeTable *, sal_uInt8 **, sal_uInt32 *, sal_uInt32 *); } const vtable2[] = diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index 60027e19cb1c..a750586fc38c 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -77,7 +77,7 @@ struct ChainMove { long nDX; long nDY; }; } -static const ChainMove aImplMove[ 8 ] = { +const ChainMove aImplMove[ 8 ] = { { 1, 0 }, { 0, -1 }, { -1, 0 }, @@ -88,7 +88,7 @@ static const ChainMove aImplMove[ 8 ] = { { 1, 1 } }; -static const ChainMove aImplMoveInner[ 8 ] = { +const ChainMove aImplMoveInner[ 8 ] = { { 0, 1 }, { 1, 0 }, { 0, -1 }, @@ -99,7 +99,7 @@ static const ChainMove aImplMoveInner[ 8 ] = { { -1, 0 } }; -static const ChainMove aImplMoveOuter[ 8 ] = { +const ChainMove aImplMoveOuter[ 8 ] = { { 0, -1 }, { -1, 0 }, { 0, 1 }, diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index e68642aa5100..a4d6f640eb52 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -115,8 +115,8 @@ static bool g_bDebugDisableCompression = getenv("VCL_DEBUG_DISABLE_PDFCOMPRESSIO #define MAX_SIGNATURE_CONTENT_LENGTH 50000 #endif -static const sal_Int32 nLog10Divisor = 3; -static const double fDivisor = 1000.0; +const sal_Int32 nLog10Divisor = 3; +const double fDivisor = 1000.0; static double pixelToPoint( double px ) { return px/fDivisor; } static sal_Int32 pointToPixel( double pt ) { return sal_Int32(pt*fDivisor); } diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 443e51e3aebb..0701561de576 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -1444,7 +1444,7 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter, /* end i12626 methods */ -static const long unsetRun[256] = +const long unsetRun[256] = { 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x00 - 0x0f */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 - 0x1f */ @@ -1464,7 +1464,7 @@ static const long unsetRun[256] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 - 0xff */ }; -static const long setRun[256] = +const long setRun[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 - 0x0f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 - 0x1f */ @@ -1616,7 +1616,7 @@ struct PixelCode } -static const PixelCode WhitePixelCodes[] = +const PixelCode WhitePixelCodes[] = { { 0, 8, 0x35 }, // 0011 0101 { 1, 6, 0x7 }, // 0001 11 @@ -1724,7 +1724,7 @@ static const PixelCode WhitePixelCodes[] = { 2560, 12, 0x1F } // 0000 0001 1111 }; -static const PixelCode BlackPixelCodes[] = +const PixelCode BlackPixelCodes[] = { { 0, 10, 0x37 }, // 0000 1101 11 { 1, 3, 0x2 }, // 010 diff --git a/vcl/source/gdi/scrptrun.cxx b/vcl/source/gdi/scrptrun.cxx index b18816cac26c..c0da5c5322ed 100644 --- a/vcl/source/gdi/scrptrun.cxx +++ b/vcl/source/gdi/scrptrun.cxx @@ -130,7 +130,7 @@ UScriptCode getScript(UChar32 ch, UErrorCode* status) } -static const PairIndices gPairIndices; +const PairIndices gPairIndices; namespace vcl { diff --git a/vcl/source/helper/svtaccessiblefactory.cxx b/vcl/source/helper/svtaccessiblefactory.cxx index 5b966d48620c..d999dd1eba3f 100644 --- a/vcl/source/helper/svtaccessiblefactory.cxx +++ b/vcl/source/helper/svtaccessiblefactory.cxx @@ -38,12 +38,12 @@ namespace vcl namespace { #ifndef DISABLE_DYNLOADING - static oslModule s_hAccessibleImplementationModule = nullptr; + oslModule s_hAccessibleImplementationModule = nullptr; #endif #if HAVE_FEATURE_DESKTOP - static GetSvtAccessibilityComponentFactory s_pAccessibleFactoryFunc = nullptr; + GetSvtAccessibilityComponentFactory s_pAccessibleFactoryFunc = nullptr; #endif - static ::rtl::Reference< IAccessibleFactory > s_pFactory; + ::rtl::Reference< IAccessibleFactory > s_pFactory; //= AccessibleDummyFactory diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 1ea130942ba0..fcc028ebd635 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -165,7 +165,7 @@ static void addPreamble(OString& rShaderSource, const OString& rPreamble) namespace { - static const sal_uInt32 GLenumSize = sizeof(GLenum); + const sal_uInt32 GLenumSize = sizeof(GLenum); OString getHexString(const sal_uInt8* pData, sal_uInt32 nLength) { @@ -824,7 +824,7 @@ public: } }; -static CrashWatchdogTimings gWatchdogTimings; +CrashWatchdogTimings gWatchdogTimings; CrashWatchdogTimings::CrashWatchdogTimings() : maTimingValues{ diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 1ee5b7e93a32..e5ea1b416884 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -36,10 +36,10 @@ #include <o3tl/enumarray.hxx> // we don't actually handle units beyond, hence the zeros in the arrays -static const MapUnit s_MaxValidUnit = MapUnit::MapPixel; -static const o3tl::enumarray<MapUnit,long> aImplNumeratorAry = +const MapUnit s_MaxValidUnit = MapUnit::MapPixel; +const o3tl::enumarray<MapUnit,long> aImplNumeratorAry = { 1, 1, 5, 50, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }; -static const o3tl::enumarray<MapUnit,long> aImplDenominatorAry = +const o3tl::enumarray<MapUnit,long> aImplDenominatorAry = { 2540, 254, 127, 127, 1000, 100, 10, 1, 72, 1440, 1, 0, 0, 0 }; /* diff --git a/vcl/source/treelist/inetimg.cxx b/vcl/source/treelist/inetimg.cxx index c7bc99ebb20a..87ca6fef5f27 100644 --- a/vcl/source/treelist/inetimg.cxx +++ b/vcl/source/treelist/inetimg.cxx @@ -23,7 +23,7 @@ #include <vcl/inetimg.hxx> -static const sal_Unicode TOKEN_SEPARATOR = '\001'; +const sal_Unicode TOKEN_SEPARATOR = '\001'; void INetImage::Write( SvStream& rOStm, SotClipboardFormatId nFormat ) const { diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index 5c8661f901d7..3abdac30b91f 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::accessibility; -static constexpr SvLBoxTabFlags MYTABMASK = +constexpr SvLBoxTabFlags MYTABMASK = SvLBoxTabFlags::ADJUST_RIGHT | SvLBoxTabFlags::ADJUST_LEFT | SvLBoxTabFlags::ADJUST_CENTER | SvLBoxTabFlags::FORCE; // SvTreeListBox callback diff --git a/vcl/source/window/EnumContext.cxx b/vcl/source/window/EnumContext.cxx index 3229301e3f2b..b7d001c1b50b 100644 --- a/vcl/source/window/EnumContext.cxx +++ b/vcl/source/window/EnumContext.cxx @@ -29,13 +29,13 @@ namespace { typedef ::std::map<OUString,EnumContext::Application> ApplicationMap; -static ApplicationMap maApplicationMap; -static o3tl::enumarray<EnumContext::Application, OUString> maApplicationVector; +ApplicationMap maApplicationMap; +o3tl::enumarray<EnumContext::Application, OUString> maApplicationVector; typedef ::std::map<OUString,EnumContext::Context> ContextMap; -static ContextMap maContextMap; -static o3tl::enumarray<EnumContext::Context, OUString> maContextVector; +ContextMap maContextMap; +o3tl::enumarray<EnumContext::Context, OUString> maContextVector; } diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx b/vcl/source/window/NotebookBarAddonsMerger.cxx index 9d6bf3dd98ea..1c042017a3fc 100644 --- a/vcl/source/window/NotebookBarAddonsMerger.cxx +++ b/vcl/source/window/NotebookBarAddonsMerger.cxx @@ -28,17 +28,17 @@ #include <vcl/IPrioritable.hxx> #include <OptionalBox.hxx> -static const char STYLE_TEXT[] = "Text"; -static const char STYLE_ICON[] = "Icon"; - -static const char MERGE_NOTEBOOKBAR_URL[] = "URL"; -static const char MERGE_NOTEBOOKBAR_TITLE[] = "Title"; -static const char MERGE_NOTEBOOKBAR_IMAGEID[] = "ImageIdentifier"; -static const char MERGE_NOTEBOOKBAR_CONTEXT[] = "Context"; -static const char MERGE_NOTEBOOKBAR_TARGET[] = "Target"; -static const char MERGE_NOTEBOOKBAR_CONTROLTYPE[] = "ControlType"; -static const char MERGE_NOTEBOOKBAR_WIDTH[] = "Width"; -static const char MERGE_NOTEBOOKBAR_STYLE[] = "Style"; +const char STYLE_TEXT[] = "Text"; +const char STYLE_ICON[] = "Icon"; + +const char MERGE_NOTEBOOKBAR_URL[] = "URL"; +const char MERGE_NOTEBOOKBAR_TITLE[] = "Title"; +const char MERGE_NOTEBOOKBAR_IMAGEID[] = "ImageIdentifier"; +const char MERGE_NOTEBOOKBAR_CONTEXT[] = "Context"; +const char MERGE_NOTEBOOKBAR_TARGET[] = "Target"; +const char MERGE_NOTEBOOKBAR_CONTROLTYPE[] = "ControlType"; +const char MERGE_NOTEBOOKBAR_WIDTH[] = "Width"; +const char MERGE_NOTEBOOKBAR_STYLE[] = "Style"; static void GetAddonNotebookBarItem(const css::uno::Sequence<css::beans::PropertyValue>& pExtension, AddonNotebookBarItem& aAddonNotebookBarItem) diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index fab8f183ca9d..b99335dd4804 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -23,7 +23,7 @@ #include <vcl/window.hxx> #include <vcl/ctrl.hxx> -static constexpr auto BUTTON_DRAW_FLATTEST = DrawButtonFlags::Flat | +constexpr auto BUTTON_DRAW_FLATTEST = DrawButtonFlags::Flat | DrawButtonFlags::Pressed | DrawButtonFlags::Checked | DrawButtonFlags::Highlight; diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx index 451e859f6aa6..0c8939ae0979 100644 --- a/vcl/source/window/keycod.cxx +++ b/vcl/source/window/keycod.cxx @@ -26,7 +26,7 @@ #include <vcl/window.hxx> #include <vcl/keycod.hxx> -static const sal_uInt16 aImplKeyFuncTab[(static_cast<int>(KeyFuncType::FRONT)+1)*4] = +const sal_uInt16 aImplKeyFuncTab[(static_cast<int>(KeyFuncType::FRONT)+1)*4] = { 0, 0, 0, 0, // KeyFuncType::DONTKNOW KEY_N | KEY_MOD1, 0, 0, 0, // KeyFuncType::NEW |