diff options
author | Alchemist <rhithick02@gmail.com> | 2021-01-05 19:56:16 +0530 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-01-27 12:35:39 +0100 |
commit | 8bce488df9921c845841677c17fd5f2e8c4c6dac (patch) | |
tree | a357db629f288410370620a4085cb85b4c8c34d7 | |
parent | a1146fd95022196636f8c41f7322a7257955cef4 (diff) |
tdf#96505 Get rid of cargo cult 'long' integer literals
Change-Id: I8746b7b32cbebd275fe9f47cce9c80aa87fbc583
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108809
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | cli_ure/qa/climaker/climaker.cs | 16 | ||||
-rw-r--r-- | connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java | 14 | ||||
-rw-r--r-- | include/comphelper/documentconstants.hxx | 48 | ||||
-rw-r--r-- | include/osl/file.h | 42 | ||||
-rw-r--r-- | include/sfx2/msg.hxx | 30 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/scuitphfedit.cxx | 6 | ||||
-rw-r--r-- | vcl/source/bitmap/BitmapFilterStackBlur.cxx | 12 |
7 files changed, 84 insertions, 84 deletions
diff --git a/cli_ure/qa/climaker/climaker.cs b/cli_ure/qa/climaker/climaker.cs index 37e46bf0e1ee..1fcc5351351f 100644 --- a/cli_ure/qa/climaker/climaker.cs +++ b/cli_ure/qa/climaker/climaker.cs @@ -237,8 +237,8 @@ public sealed class Test l.assure(s.p4 == 0); l.assure(s.p5 == 0); l.assure(s.p6 == 0); - l.assure(s.p7 == 0L); - l.assure(s.p8 == 0L); + l.assure(s.p7 == 0); + l.assure(s.p8 == 0); l.assure(s.p9 == 0.0f); l.assure(s.p10 == 0.0); l.assure(s.p11 == '\u0000'); @@ -255,8 +255,8 @@ public sealed class Test l.assure(s.t4 == 0); l.assure(s.t5 == 0); l.assure(s.t6 == 0); - l.assure(s.t7 == 0L); - l.assure(s.t8 == 0L); + l.assure(s.t7 == 0); + l.assure(s.t8 == 0); l.assure(s.t9 == 0.0f); l.assure(s.t10 == 0.0); l.assure(s.t11 == '\u0000'); @@ -353,8 +353,8 @@ public sealed class Test l.assure(s.p4 == 3); l.assure(s.p5 == 4); l.assure(s.p6 == 5); - l.assure(s.p7 == 6L); - l.assure(s.p8 == 7L); + l.assure(s.p7 == 6); + l.assure(s.p8 == 7); l.assure(s.p9 == 0.8f); l.assure(s.p10 == 0.9); l.assure(s.p11 == 'A'); @@ -371,8 +371,8 @@ public sealed class Test l.assure(s.t4 == 0); l.assure(s.t5 == 0); l.assure(s.t6 == 0); - l.assure(s.t7 == 0L); - l.assure(s.t8 == 0L); + l.assure(s.t7 == 0); + l.assure(s.t8 == 0); l.assure(s.t9 == 0.0f); l.assure(s.t10 == 0.0); l.assure(s.t11 == '\u0000'); diff --git a/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java b/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java index d3c802e15a40..d2ee3c680291 100644 --- a/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java +++ b/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java @@ -467,7 +467,7 @@ public class TestCacheSize { || (slow && (i + 1) % 100 == 0)) { System.out.println("Select " + (i + 1) + " : " + sw.elapsedTime() + " rps: " - + (1000L * i / (sw.elapsedTime() + 1))); + + (1000 * i / (sw.elapsedTime() + 1))); } } } catch (SQLException e) { @@ -476,7 +476,7 @@ public class TestCacheSize { System.out.println("Select random zip " + i + " rows : " + sw.elapsedTime() + " rps: " - + (1000L * i / (sw.elapsedTime() + 1))); + + (1000 * i / (sw.elapsedTime() + 1))); sw.zero(); try { @@ -500,7 +500,7 @@ public class TestCacheSize { System.out.println("Select random id " + i + " rows : " + sw.elapsedTime() + " rps: " - + (1000L * i / (sw.elapsedTime() + 1))); + + (1000 * i / (sw.elapsedTime() + 1))); sw.zero(); try { @@ -524,7 +524,7 @@ public class TestCacheSize { System.out.println("Select random zip from zip table " + i + " rows : " + sw.elapsedTime() + " rps: " - + (1000L * i / (sw.elapsedTime() + 1))); + + (1000 * i / (sw.elapsedTime() + 1))); } private void checkUpdates() { @@ -559,7 +559,7 @@ public class TestCacheSize { System.out.println("Update with random zip " + i + " UPDATE commands, " + count + " rows : " + sw.elapsedTime() + " rps: " - + (1000L * count / (sw.elapsedTime() + 1))); + + (1000 * count / (sw.elapsedTime() + 1))); sw.zero(); try { @@ -577,7 +577,7 @@ public class TestCacheSize { || (slow && (i + 1) % 100 == 0)) { System.out.println("Update " + (i + 1) + " : " + sw.elapsedTime() + " rps: " - + (1000L * i / (sw.elapsedTime() + 1))); + + (1000 * i / (sw.elapsedTime() + 1))); } } } catch (SQLException e) { @@ -586,6 +586,6 @@ public class TestCacheSize { System.out.println("Update with random id " + i + " rows : " + sw.elapsedTime() + " rps: " - + (1000L * i / (sw.elapsedTime() + 1))); + + (1000 * i / (sw.elapsedTime() + 1))); } } diff --git a/include/comphelper/documentconstants.hxx b/include/comphelper/documentconstants.hxx index 87d45852cd70..5957b818b8c7 100644 --- a/include/comphelper/documentconstants.hxx +++ b/include/comphelper/documentconstants.hxx @@ -90,37 +90,37 @@ enum class SfxFilterFlags { NONE = 0, - IMPORT = 0x00000001L, - EXPORT = 0x00000002L, - TEMPLATE = 0x00000004L, - INTERNAL = 0x00000008L, - TEMPLATEPATH = 0x00000010L, - OWN = 0x00000020L, - ALIEN = 0x00000040L, + IMPORT = 0x00000001, + EXPORT = 0x00000002, + TEMPLATE = 0x00000004, + INTERNAL = 0x00000008, + TEMPLATEPATH = 0x00000010, + OWN = 0x00000020, + ALIEN = 0x00000040, - DEFAULT = 0x00000100L, - SUPPORTSSELECTION = 0x00000400L, - NOTINFILEDLG = 0x00001000L, + DEFAULT = 0x00000100, + SUPPORTSSELECTION = 0x00000400, + NOTINFILEDLG = 0x00001000, - OPENREADONLY = 0x00010000L, - MUSTINSTALL = 0x00020000L, - CONSULTSERVICE = 0x00040000L, - STARONEFILTER = 0x00080000L, - PACKED = 0x00100000L, - EXOTIC = 0x00200000L, - COMBINED = 0x00800000L, + OPENREADONLY = 0x00010000, + MUSTINSTALL = 0x00020000, + CONSULTSERVICE = 0x00040000, + STARONEFILTER = 0x00080000, + PACKED = 0x00100000, + EXOTIC = 0x00200000, + COMBINED = 0x00800000, - ENCRYPTION = 0x01000000L, - PASSWORDTOMODIFY = 0x02000000L, - GPGENCRYPTION = 0x04000000L, - PREFERED = 0x10000000L, - STARTPRESENTATION = 0x20000000L, - SUPPORTSSIGNING = 0x40000000L, + ENCRYPTION = 0x01000000, + PASSWORDTOMODIFY = 0x02000000, + GPGENCRYPTION = 0x04000000, + PREFERED = 0x10000000, + STARTPRESENTATION = 0x20000000, + SUPPORTSSIGNING = 0x40000000, }; namespace o3tl { - template<> struct typed_flags<SfxFilterFlags> : is_typed_flags<SfxFilterFlags, 0x77bf157fL> {}; + template<> struct typed_flags<SfxFilterFlags> : is_typed_flags<SfxFilterFlags, 0x77bf157f> {}; } #define SFX_FILTER_NOTINSTALLED (SfxFilterFlags::MUSTINSTALL | SfxFilterFlags::CONSULTSERVICE) diff --git a/include/osl/file.h b/include/osl/file.h index 4ea9df8d62ef..d8e680fed360 100644 --- a/include/osl/file.h +++ b/include/osl/file.h @@ -521,15 +521,15 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_getVolumeDeviceMountPath( @{ */ -#define osl_Volume_Attribute_Removeable 0x00000001L -#define osl_Volume_Attribute_Remote 0x00000002L -#define osl_Volume_Attribute_CompactDisc 0x00000004L -#define osl_Volume_Attribute_FixedDisk 0x00000008L -#define osl_Volume_Attribute_RAMDisk 0x00000010L -#define osl_Volume_Attribute_FloppyDisk 0x00000020L +#define osl_Volume_Attribute_Removeable 0x00000001 +#define osl_Volume_Attribute_Remote 0x00000002 +#define osl_Volume_Attribute_CompactDisc 0x00000004 +#define osl_Volume_Attribute_FixedDisk 0x00000008 +#define osl_Volume_Attribute_RAMDisk 0x00000010 +#define osl_Volume_Attribute_FloppyDisk 0x00000020 -#define osl_Volume_Attribute_Case_Is_Preserved 0x00000040L -#define osl_Volume_Attribute_Case_Sensitive 0x00000080L +#define osl_Volume_Attribute_Case_Is_Preserved 0x00000040 +#define osl_Volume_Attribute_Case_Sensitive 0x00000080 /** @} */ @@ -539,15 +539,15 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_getVolumeDeviceMountPath( @{ */ -#define osl_VolumeInfo_Mask_Attributes 0x00000001L -#define osl_VolumeInfo_Mask_TotalSpace 0x00000002L -#define osl_VolumeInfo_Mask_UsedSpace 0x00000004L -#define osl_VolumeInfo_Mask_FreeSpace 0x00000008L -#define osl_VolumeInfo_Mask_MaxNameLength 0x00000010L -#define osl_VolumeInfo_Mask_MaxPathLength 0x00000020L -#define osl_VolumeInfo_Mask_FileSystemName 0x00000040L -#define osl_VolumeInfo_Mask_DeviceHandle 0x00000080L -#define osl_VolumeInfo_Mask_FileSystemCaseHandling 0x00000100L +#define osl_VolumeInfo_Mask_Attributes 0x00000001 +#define osl_VolumeInfo_Mask_TotalSpace 0x00000002 +#define osl_VolumeInfo_Mask_UsedSpace 0x00000004 +#define osl_VolumeInfo_Mask_FreeSpace 0x00000008 +#define osl_VolumeInfo_Mask_MaxNameLength 0x00000010 +#define osl_VolumeInfo_Mask_MaxPathLength 0x00000020 +#define osl_VolumeInfo_Mask_FileSystemName 0x00000040 +#define osl_VolumeInfo_Mask_DeviceHandle 0x00000080 +#define osl_VolumeInfo_Mask_FileSystemCaseHandling 0x00000100 /** @} */ @@ -627,10 +627,10 @@ typedef void *oslFileHandle; /* Open flags */ -#define osl_File_OpenFlag_Read 0x00000001L -#define osl_File_OpenFlag_Write 0x00000002L -#define osl_File_OpenFlag_Create 0x00000004L -#define osl_File_OpenFlag_NoLock 0x00000008L +#define osl_File_OpenFlag_Read 0x00000001 +#define osl_File_OpenFlag_Write 0x00000002 +#define osl_File_OpenFlag_Create 0x00000004 +#define osl_File_OpenFlag_NoLock 0x00000008 /* larger bit-fields reserved for internal use cf. detail/file.h */ /** Open a regular file. diff --git a/include/sfx2/msg.hxx b/include/sfx2/msg.hxx index 5e5a15f1d3db..e628e572c6f4 100644 --- a/include/sfx2/msg.hxx +++ b/include/sfx2/msg.hxx @@ -33,27 +33,27 @@ class SfxItemPool; enum class SfxSlotMode { - NONE = 0x0000L, // default + NONE = 0x0000, // default - TOGGLE = 0x0004L, // inverted for Execute old value - AUTOUPDATE = 0x0008L, // invalidated the status automatically after execute - ASYNCHRON = 0x0020L, // via Post-Message + TOGGLE = 0x0004, // inverted for Execute old value + AUTOUPDATE = 0x0008, // invalidated the status automatically after execute + ASYNCHRON = 0x0020, // via Post-Message - NORECORD = 0x0100L, // no recording - RECORDPERITEM = 0x0200L, // each item, one statement - RECORDPERSET = 0x0400L, // The whole Set is a Statement, default - RECORDABSOLUTE = 0x1000000L, // Recording with absolute Target + NORECORD = 0x0100, // no recording + RECORDPERITEM = 0x0200, // each item, one statement + RECORDPERSET = 0x0400, // The whole Set is a Statement, default + RECORDABSOLUTE = 0x1000000, // Recording with absolute Target - METHOD = 0x4000L, + METHOD = 0x4000, - FASTCALL = 0x8000L, // No test if disabled before Execute + FASTCALL = 0x8000, // No test if disabled before Execute - MENUCONFIG = 0x20000L, // configurable Menu - TOOLBOXCONFIG = 0x40000L, // configurable Toolboxen - ACCELCONFIG = 0x80000L, // configurable keys + MENUCONFIG = 0x20000, // configurable Menu + TOOLBOXCONFIG = 0x40000, // configurable Toolboxen + ACCELCONFIG = 0x80000, // configurable keys - CONTAINER = 0x100000L, // Operated by the container at InPlace - READONLYDOC = 0x200000L // also available for read-only Documents + CONTAINER = 0x100000, // Operated by the container at InPlace + READONLYDOC = 0x200000 // also available for read-only Documents }; namespace o3tl diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx index 6567f06b239c..cb100995f112 100644 --- a/sc/source/ui/pagedlg/scuitphfedit.cxx +++ b/sc/source/ui/pagedlg/scuitphfedit.cxx @@ -703,7 +703,7 @@ IMPL_LINK_NOARG(ScHFEditPage, ListToggleHdl_Impl, weld::ComboBox&, void) m_bDropDownActive = !m_bDropDownActive; TimeValue aNow; osl_getSystemTime(&aNow); - m_nTimeToggled = sal_Int64(aNow.Seconds) * 1000000000L + aNow.Nanosec; + m_nTimeToggled = sal_Int64(aNow.Seconds) * 1000000000 + aNow.Nanosec; } IMPL_LINK_NOARG(ScHFEditPage, ListHdl_Impl, weld::ComboBox&, void) @@ -712,14 +712,14 @@ IMPL_LINK_NOARG(ScHFEditPage, ListHdl_Impl, weld::ComboBox&, void) TimeValue aNow; osl_getSystemTime(&aNow); - sal_Int64 nNow = sal_Int64(aNow.Seconds) * 1000000000L + aNow.Nanosec; + sal_Int64 nNow = sal_Int64(aNow.Seconds) * 1000000000 + aNow.Nanosec; // order of dropdown vs select not guaranteed bool bDiscrepancy = m_xLbDefined->get_popup_shown() != m_bDropDownActive; if (bDiscrepancy) ListToggleHdl_Impl(*m_xLbDefined); - bool bFocusToTarget = !m_xLbDefined->get_popup_shown() && m_nTimeToggled != -1 && (nNow - m_nTimeToggled < 800000000L); + bool bFocusToTarget = !m_xLbDefined->get_popup_shown() && m_nTimeToggled != -1 && (nNow - m_nTimeToggled < 800000000); ProcessDefinedListSel(eSel, !bFocusToTarget); // check if we need to remove the customized entry. if (!m_bDropDownActive && eSel < eEntryCount) diff --git a/vcl/source/bitmap/BitmapFilterStackBlur.cxx b/vcl/source/bitmap/BitmapFilterStackBlur.cxx index e7d791194a94..027b84c5958d 100644 --- a/vcl/source/bitmap/BitmapFilterStackBlur.cxx +++ b/vcl/source/bitmap/BitmapFilterStackBlur.cxx @@ -276,9 +276,9 @@ void stackBlurHorizontal(BlurSharedData const& rShared, tools::Long nStart, tool for (tools::Long y = nStart; y <= nEnd; y++) { - SumFunction::set(nSum, 0L); - SumFunction::set(nInSum, 0L); - SumFunction::set(nOutSum, 0L); + SumFunction::set(nSum, 0); + SumFunction::set(nInSum, 0); + SumFunction::set(nOutSum, 0); // Pre-initialize blur data for first pixel. // aArrays.maPositionTable contains values like (for radius of 5): [0,0,0,0,0,0,1,2,3,4,5], @@ -395,9 +395,9 @@ void stackBlurVertical(BlurSharedData const& rShared, tools::Long nStart, tools: for (tools::Long x = nStart; x <= nEnd; x++) { - SumFunction::set(nSum, 0L); - SumFunction::set(nInSum, 0L); - SumFunction::set(nOutSum, 0L); + SumFunction::set(nSum, 0); + SumFunction::set(nInSum, 0); + SumFunction::set(nOutSum, 0); // Pre-initialize blur data for first pixel. // aArrays.maPositionTable contains values like (for radius of 5): [0,0,0,0,0,0,1,2,3,4,5], |