vcl/unx/gtk3/a11y/atkwrapper.cxx |   30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 2bb92e0a9da148df662bc697eeb835cc1161544a
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Nov 19 22:11:18 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Nov 20 20:36:44 2024 +0100

    gtk3 a11y: Use OString literals
    
    Change-Id: I23365943e79847e3c7162808de3dc176f7db2b0c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176804
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx
index 6c71c40d0ed3..317c8290f461 100644
--- a/vcl/unx/gtk3/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx
@@ -814,61 +814,61 @@ static bool isTableCell(uno::XInterface* pInterface)
 extern "C" {
 typedef  GType (* GetGIfaceType ) ();
 }
-const struct {
-        const char          *name;
+constexpr struct {
+        OString sName;
         GInterfaceInitFunc const   aInit;
         GetGIfaceType const        aGetGIfaceType;
         const uno::Type &  (*aGetUnoType) ();
 } aTypeTable[] = {
 // re-location heaven:
     {
-        "Comp", componentIfaceInit,
+        "Comp"_ostr, componentIfaceInit,
         atk_component_get_type,
         cppu::UnoType<accessibility::XAccessibleComponent>::get
     },
     {
-        "Act",  actionIfaceInit,
+        "Act"_ostr,  actionIfaceInit,
         atk_action_get_type,
         cppu::UnoType<accessibility::XAccessibleAction>::get
     },
     {
-        "Txt",  textIfaceInit,
+        "Txt"_ostr,  textIfaceInit,
         atk_text_get_type,
         cppu::UnoType<accessibility::XAccessibleText>::get
     },
     {
-        "Val",  valueIfaceInit,
+        "Val"_ostr,  valueIfaceInit,
         atk_value_get_type,
         cppu::UnoType<accessibility::XAccessibleValue>::get
     },
     {
-        "Tab",  tableIfaceInit,
+        "Tab"_ostr,  tableIfaceInit,
         atk_table_get_type,
         cppu::UnoType<accessibility::XAccessibleTable>::get
     },
     {
-        "Cell",  tablecellIfaceInit,
+        "Cell"_ostr,  tablecellIfaceInit,
         atk_table_cell_get_type,
         // there is no UNO a11y interface for table cells, so this case is 
handled separately below
         nullptr
     },
     {
-        "Edt",  editableTextIfaceInit,
+        "Edt"_ostr,  editableTextIfaceInit,
         atk_editable_text_get_type,
         cppu::UnoType<accessibility::XAccessibleEditableText>::get
     },
     {
-        "Img",  imageIfaceInit,
+        "Img"_ostr,  imageIfaceInit,
         atk_image_get_type,
         cppu::UnoType<accessibility::XAccessibleImage>::get
     },
     {
-        "Hyp",  hypertextIfaceInit,
+        "Hyp"_ostr,  hypertextIfaceInit,
         atk_hypertext_get_type,
         cppu::UnoType<accessibility::XAccessibleHypertext>::get
     },
     {
-        "Sel",  selectionIfaceInit,
+        "Sel"_ostr,  selectionIfaceInit,
         atk_selection_get_type,
         cppu::UnoType<accessibility::XAccessibleSelection>::get
     }
@@ -887,19 +887,19 @@ ensureTypeFor( uno::XInterface *pAccessible )
 
     for( i = 0; i < aTypeTableSize; i++ )
     {
-        if(!g_strcmp0(aTypeTable[i].name, "Cell"))
+        if (aTypeTable[i].sName == "Cell")
         {
             // there is no UNO interface for table cells, but AtkTableCell can 
be supported
             // for table cells via the methods of the parent that is a table
             if (isTableCell(pAccessible))
             {
-                aTypeNameBuf.append(aTypeTable[i].name);
+                aTypeNameBuf.append(aTypeTable[i].sName);
                 bTypes[i] = true;
             }
         }
         else if (isOfType( pAccessible, aTypeTable[i].aGetUnoType() ) )
         {
-            aTypeNameBuf.append(aTypeTable[i].name);
+            aTypeNameBuf.append(aTypeTable[i].sName);
             bTypes[i] = true;
         }
     }

Reply via email to