UnoControls/source/inc/progressmonitor.hxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1c7a8cb769f46c6ed3f1aa4006f1f8b4754741e4
Author:     kelvin <[email protected]>
AuthorDate: Sun Nov 2 05:01:25 2025 +0100
Commit:     Hossein <[email protected]>
CommitDate: Wed Nov 5 16:32:41 2025 +0100

    tdf#145614 Convert #define to constexpr in progressmonitor.hxx
    
    Convert C-style #define constants to modern C++ constexpr for
    better type safety and debugging.
    
    Fixed build by using numeric color values instead of Color constructor.
    Use sal_Int32 for consistency with usage in implementation.
    
    Change-Id: I5691a2e2fe35da039bcc1f636b2498792d8aab9a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193296
    Tested-by: Jenkins
    Reviewed-by: Hossein <[email protected]>

diff --git a/UnoControls/source/inc/progressmonitor.hxx 
b/UnoControls/source/inc/progressmonitor.hxx
index e62b215db30d..1a317136d1ab 100644
--- a/UnoControls/source/inc/progressmonitor.hxx
+++ b/UnoControls/source/inc/progressmonitor.hxx
@@ -35,13 +35,13 @@ namespace unocontrols {
 
 class ProgressBar;
 
-#define PROGRESSMONITOR_FREEBORDER                      10                     
                                 // border around and between the controls
+constexpr sal_Int32 PROGRESSMONITOR_FREEBORDER = 10;                           
                          // border around and between the controls
 inline constexpr OUString PROGRESSMONITOR_DEFAULT_TOPIC  = u""_ustr;
 inline constexpr OUString PROGRESSMONITOR_DEFAULT_TEXT = u""_ustr;
-#define PROGRESSMONITOR_LINECOLOR_BRIGHT                sal_Int32(Color( 0xFF, 
0xFF, 0xFF ))             // white
-#define PROGRESSMONITOR_LINECOLOR_SHADOW                sal_Int32(Color( 0x00, 
0x00, 0x00 ))             // black
-#define PROGRESSMONITOR_DEFAULT_WIDTH                   350
-#define PROGRESSMONITOR_DEFAULT_HEIGHT                  100
+constexpr sal_Int32 PROGRESSMONITOR_LINECOLOR_BRIGHT = 0xFFFFFF;             
// white
+constexpr sal_Int32 PROGRESSMONITOR_LINECOLOR_SHADOW = 0x000000;             
// black
+constexpr sal_Int32 PROGRESSMONITOR_DEFAULT_WIDTH = 350;
+constexpr sal_Int32 PROGRESSMONITOR_DEFAULT_HEIGHT = 100;
 
 /// Item of TextList
 struct IMPL_TextlistItem

Reply via email to