vcl/inc/unx/i18n_ic.hxx         |    4 ++--
 vcl/inc/unx/i18n_im.hxx         |    2 --
 vcl/unx/generic/app/i18n_ic.cxx |    6 +++---
 vcl/unx/generic/app/i18n_im.cxx |   12 ++++++------
 4 files changed, 11 insertions(+), 13 deletions(-)

New commits:
commit 645951278170296b5d4f1b76e7a40235f79ebb15
Author:     Michael Weghorn <[email protected]>
AuthorDate: Mon Mar 2 04:41:19 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Mon Mar 2 17:18:07 2026 +0100

    vcl: Use bool instead of Xlib-specific Bool
    
    ... for SalI18N_InputContext::mbUseable.
    
    The value is only used LO-internally, not
    passed to any Xlib APIs.
    
    Also drop the bUseInputMethodDefault define.
    
    Change-Id: If58219f3327444e2797ecccbdb5143cdc12cec69
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200758
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/inc/unx/i18n_ic.hxx b/vcl/inc/unx/i18n_ic.hxx
index 62b59a4dd4f5..03f9ea76065f 100644
--- a/vcl/inc/unx/i18n_ic.hxx
+++ b/vcl/inc/unx/i18n_ic.hxx
@@ -28,7 +28,7 @@ class SalI18N_InputContext
 
 private:
 
-    Bool    mbUseable; // system supports current locale ?
+    bool mbUseable; // system supports current locale ?
     XIC     maContext;
 
     XIMStyle mnSupportedPreeditStyle;
@@ -54,7 +54,7 @@ private:
 
 public:
 
-    Bool UseContext() const { return mbUseable; }
+    bool UseContext() const { return mbUseable; }
     bool IsPreeditMode() const { return maClientData.eState == 
PreeditStatus::Active; }
     XIC  GetContext() const { return maContext; }
 
diff --git a/vcl/inc/unx/i18n_im.hxx b/vcl/inc/unx/i18n_im.hxx
index d283f54451f6..c23a0308a783 100644
--- a/vcl/inc/unx/i18n_im.hxx
+++ b/vcl/inc/unx/i18n_im.hxx
@@ -21,8 +21,6 @@
 
 #include <X11/Xlib.h>
 
-#define bUseInputMethodDefault True
-
 class SalI18N_InputMethod
 {
     bool        mbUseable;  // system supports locale as well as status
diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx
index 07b70cfbb8f3..0ba873ce65a3 100644
--- a/vcl/unx/generic/app/i18n_ic.cxx
+++ b/vcl/unx/generic/app/i18n_ic.cxx
@@ -121,7 +121,7 @@ const XIMStyle g_nSupportedStatusStyle(
 // Constructor for an InputContext (IC)
 
 SalI18N_InputContext::SalI18N_InputContext(X11SalFrame* pFrame) :
-        mbUseable( True ),
+        mbUseable(true),
         maContext( nullptr ),
         mnSupportedPreeditStyle(
                                 XIMPreeditCallbacks |
@@ -319,7 +319,7 @@ SalI18N_InputContext::SalI18N_InputContext(X11SalFrame* 
pFrame) :
         SAL_WARN("vcl.app", "input context creation failed.");
 #endif
 
-        mbUseable = False;
+        mbUseable = false;
 
         if ( mpAttributes != nullptr )
             XFree( mpAttributes );
@@ -388,7 +388,7 @@ void
 SalI18N_InputContext::HandleDestroyIM()
 {
     maContext = nullptr;      // don't change
-    mbUseable = False;
+    mbUseable = false;
 }
 
 //  make sure, the input method gets all the X-Events it needs, this is only
diff --git a/vcl/unx/generic/app/i18n_im.cxx b/vcl/unx/generic/app/i18n_im.cxx
index 16ac1d583483..eaffe9226675 100644
--- a/vcl/unx/generic/app/i18n_im.cxx
+++ b/vcl/unx/generic/app/i18n_im.cxx
@@ -208,7 +208,7 @@ SalI18N_InputMethod::SetLocale()
             SetSystemEnvironment( "C" );
 #endif
             if (! IsXWindowCompatibleLocale(locale))
-                mbUseable = False;
+                mbUseable = false;
         }
     }
 
@@ -218,7 +218,7 @@ SalI18N_InputMethod::SetLocale()
         SAL_WARN("vcl.app",
                 "I18N: Can't set X modifiers for locale \""
                 << locale << "\".");
-        mbUseable = False;
+        mbUseable = false;
     }
 }
 
@@ -233,7 +233,7 @@ SalI18N_InputMethod::PosixLocale()
 // Constructor / Destructor / Initialisation
 
 SalI18N_InputMethod::SalI18N_InputMethod( )
-    : mbUseable( bUseInputMethodDefault )
+    : mbUseable(true)
     , maMethod( nullptr )
     , mpStyles( nullptr )
 {
@@ -340,7 +340,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
         {
             if (   XGetIMValues(maMethod, XNQueryInputStyle, &mpStyles, 
nullptr)
                 != nullptr)
-                mbUseable = False;
+                mbUseable = false;
 #if OSL_DEBUG_LEVEL > 1
             SAL_INFO("vcl.app", "Creating Mono-Lingual InputMethod.");
             PrintInputStyle( mpStyles );
@@ -348,7 +348,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
         }
         else
         {
-            mbUseable = False;
+            mbUseable = false;
         }
     }
 
@@ -401,7 +401,7 @@ SalI18N_InputMethod::FilterEvent( XEvent *pEvent, ::Window 
window    )
 void
 SalI18N_InputMethod::HandleDestroyIM()
 {
-    mbUseable       = False;
+    mbUseable = false;
     maMethod        = nullptr;
 }
 

Reply via email to