fpicker/source/office/OfficeControlAccess.cxx |   10 +++-------
 vcl/qt5/QtFilePicker.cxx                      |    4 +---
 2 files changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 2e309e24188e72c3b0f26853114765cc788c347d
Author:     Michael Weghorn <[email protected]>
AuthorDate: Fri Dec 5 23:18:40 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Sat Dec 6 10:06:27 2025 +0100

    qt: Simplify QtFilePicker::getResString
    
    Use existing helper function to convert the
    VCL accelerator/mnemonic to a Qt one.
    
    Change-Id: Ibaccd74267311add2abfd3e022b3fc90d68176b1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195129
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/qt5/QtFilePicker.cxx b/vcl/qt5/QtFilePicker.cxx
index adf23cb134ca..80aa625e3d9e 100644
--- a/vcl/qt5/QtFilePicker.cxx
+++ b/vcl/qt5/QtFilePicker.cxx
@@ -577,9 +577,7 @@ QString QtFilePicker::getResString(TranslateId pResId)
     if (!pResId)
         return aResString;
 
-    aResString = toQString(FpsResId(pResId));
-
-    return aResString.replace('~', '&');
+    return vclToQtStringWithAccelerator(FpsResId(pResId));
 }
 
 void QtFilePicker::applyTemplate(sal_Int16 nTemplateId)
commit aa4a56e26e1f8a3b20aeb80e6ebcf559361017c8
Author:     Michael Weghorn <[email protected]>
AuthorDate: Fri Dec 5 22:34:39 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Sat Dec 6 10:06:19 2025 +0100

    fpicker: Drop ControlDescIterator typedef
    
    It's only used a single time anyway. While at it,
    also switch the loop variable name to use a "p" prefix,
    because it's a pointer.
    
    Change-Id: I73b015961b91ded4668d3082abc4932b397eb692
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195128
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/fpicker/source/office/OfficeControlAccess.cxx 
b/fpicker/source/office/OfficeControlAccess.cxx
index e675ea138e9e..f83122e8cf5c 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -59,10 +59,6 @@ namespace svt
             PropFlags       nPropertyFlags;
         };
 
-
-        typedef const ControlDescription* ControlDescIterator;
-
-
         #define PROPERTY_FLAGS_COMMON       ( PropFlags::Enabled | 
PropFlags::Visible | PropFlags::HelpUrl )
         #define PROPERTY_FLAGS_LISTBOX      ( PropFlags::ListItems | 
PropFlags::SelectedItem | PropFlags::SelectedItemIndex )
         #define PROPERTY_FLAGS_CHECKBOX     ( PropFlags::Checked | 
PropFlags::Text )
@@ -273,10 +269,10 @@ namespace svt
         OUString* pControls = aControls.getArray();
 
         // collect the names of all _actually_existent_ controls
-        for ( ControlDescIterator aControl = s_pControls; aControl != 
s_pControlsEnd; ++aControl )
+        for (const ControlDescription* pControl = s_pControls; pControl != 
s_pControlsEnd; ++pControl)
         {
-            if ( m_pFilePicker->getControl( aControl->nControlId ) )
-                *pControls++ = OUString::createFromAscii( 
aControl->pControlName );
+            if (m_pFilePicker->getControl(pControl->nControlId))
+                *pControls++ = 
OUString::createFromAscii(pControl->pControlName);
         }
 
         aControls.realloc( pControls - aControls.getArray() );

Reply via email to