dbaccess/source/ui/inc/linkeddocuments.hxx  |    9 ++-------
 dbaccess/source/ui/misc/linkeddocuments.cxx |   23 ++++++++++++-----------
 svtools/inc/strings.hxx                     |   13 ++++++-------
 svtools/source/misc/imagemgr.cxx            |   16 ++++++++--------
 4 files changed, 28 insertions(+), 33 deletions(-)

New commits:
commit 826a77cccf5f577d461261fe0c797c2805818810
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Jul 16 09:19:15 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Jul 16 15:46:32 2025 +0200

    use constexpr TranslateId ctor
    
    Change-Id: I8d3ed6a979e3b4ea9d8d75dcc0402a344ab24110
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187956
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/svtools/inc/strings.hxx b/svtools/inc/strings.hxx
index 1c57eb1ca711..78b2d0c28ea1 100644
--- a/svtools/inc/strings.hxx
+++ b/svtools/inc/strings.hxx
@@ -16,12 +16,11 @@
 // field label list of the dialog
 inline constexpr OUString STR_LOGICAL_FIELD_NAMES = 
u"FirstName;LastName;Company;Department;Street;Zip;City;State;Country;PhonePriv;PhoneComp;PhoneOffice;PhoneCell;PhoneOther;Pager;Fax;EMail;URL;Title;Position;Code;AddrForm;AddrFormMail;Id;CalendarURL;InviteParticipant;Note;Altfield1;Altfield2;Altfield3;Altfield4"_ustr;
 
-#define STR_DESCRIPTION_SMATH_DOC       "StarMath 2.0 - 5.0"
-#define STR_DESCRIPTION_SCHART_DOC      "StarChart 3.0 - 5.0"
-#define STR_DESCRIPTION_SDRAW_DOC       "StarDraw 3.0 / 5.0 (StarImpress)"
-#define STR_DESCRIPTION_SCALC_DOC       "StarCalc 3.0 - 5.0"
-#define STR_DESCRIPTION_SIMPRESS_DOC    "StarImpress 4.0 / 5.0"
-#define STR_DESCRIPTION_SWRITER_DOC     "StarWriter 3.0 - 5.0"
-
+inline constexpr TranslateId STR_DESCRIPTION_SMATH_DOC = { nullptr, 
u8"StarMath 2.0 - 5.0" };
+inline constexpr TranslateId STR_DESCRIPTION_SCHART_DOC = { nullptr, 
u8"StarChart 3.0 - 5.0" };
+inline constexpr TranslateId STR_DESCRIPTION_SDRAW_DOC = { nullptr, 
u8"StarDraw 3.0 / 5.0 (StarImpress)" };
+inline constexpr TranslateId STR_DESCRIPTION_SCALC_DOC = { nullptr, 
u8"StarCalc 3.0 - 5.0" };
+inline constexpr TranslateId STR_DESCRIPTION_SIMPRESS_DOC = { nullptr, 
u8"StarImpress 4.0 / 5.0" };
+inline constexpr TranslateId STR_DESCRIPTION_SWRITER_DOC = { nullptr, 
u8"StarWriter 3.0 - 5.0" };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index b64cfb8081f4..06fb0eb98039 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -57,7 +57,7 @@ struct SvtExtensionResIdMapping_Impl
 
 }
 
-SvtExtensionResIdMapping_Impl const ExtensionMap_Impl[] =
+constexpr SvtExtensionResIdMapping_Impl ExtensionMap_Impl[] =
 {
     { "awk",   true,  STR_DESCRIPTION_SOURCEFILE,            SvImageId::NONE },
     { "bas",   true,  STR_DESCRIPTION_SOURCEFILE,            SvImageId::NONE },
@@ -125,18 +125,18 @@ SvtExtensionResIdMapping_Impl const ExtensionMap_Impl[] =
     { "rtf",   false, STR_DESCRIPTION_WORD_DOC,              SvImageId::Writer 
},
     { "sbl",   false, {},                                    SvImageId::NONE },
     { "sch",   false, {},                                    SvImageId::NONE },
-    { "sda",   false, { nullptr, STR_DESCRIPTION_SDRAW_DOC}, SvImageId::Draw },
+    { "sda",   false, STR_DESCRIPTION_SDRAW_DOC,             SvImageId::Draw },
     { "sdb",   false, STR_DESCRIPTION_SDATABASE_DOC,         
SvImageId::Database },
-    { "sdc",   false, { nullptr, STR_DESCRIPTION_SCALC_DOC}, SvImageId::Calc },
-    { "sdd",   false, { nullptr, STR_DESCRIPTION_SIMPRESS_DOC},          
SvImageId::Impress },
-    { "sdp",   false, { nullptr, STR_DESCRIPTION_SIMPRESS_DOC},          
SvImageId::NONE },
-    { "sds",   false, { nullptr, STR_DESCRIPTION_SCHART_DOC},            
SvImageId::NONE },
-    { "sdw",   false, { nullptr, STR_DESCRIPTION_SWRITER_DOC},           
SvImageId::Writer },
+    { "sdc",   false, STR_DESCRIPTION_SCALC_DOC,             SvImageId::Calc },
+    { "sdd",   false, STR_DESCRIPTION_SIMPRESS_DOC,          
SvImageId::Impress },
+    { "sdp",   false, STR_DESCRIPTION_SIMPRESS_DOC,          SvImageId::NONE },
+    { "sds",   false, STR_DESCRIPTION_SCHART_DOC,            SvImageId::NONE },
+    { "sdw",   false, STR_DESCRIPTION_SWRITER_DOC,           SvImageId::Writer 
},
     { "sga",   false, {},                                    SvImageId::NONE },
     { "sgl",   false, STR_DESCRIPTION_GLOBALDOC,             
SvImageId::GlobalDoc },
     { "shtml", false, STR_DESCRIPTION_HTMLFILE,              SvImageId::HTML },
     { "sim",   false, STR_DESCRIPTION_SIMAGE_DOC,            SvImageId::SIM },
-    { "smf",   false, { nullptr, STR_DESCRIPTION_SMATH_DOC},             
SvImageId::Math },
+    { "smf",   false, STR_DESCRIPTION_SMATH_DOC,             SvImageId::Math },
     { "src",   true,  STR_DESCRIPTION_SOURCEFILE,            SvImageId::NONE },
     { "svh",   false, STR_DESCRIPTION_HELP_DOC,              SvImageId::NONE },
     { "svm",   true,  STR_DESCRIPTION_GRAPHIC_DOC,           SvImageId::SVM },
commit e44b33e39d5bc234ffa5fe814cc562843123b270
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Jul 16 12:19:11 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Jul 16 15:46:28 2025 +0200

    dbaccess: Pass service name as const OUString&
    
    ... not as const char*.
    
    Change-Id: Ie1b4947f4c7ec3563fc72f52bfa5302e1c571ebf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187954
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx 
b/dbaccess/source/ui/inc/linkeddocuments.hxx
index c20f3a87ae51..5bb5d87cb484 100644
--- a/dbaccess/source/ui/inc/linkeddocuments.hxx
+++ b/dbaccess/source/ui/inc/linkeddocuments.hxx
@@ -94,13 +94,8 @@ namespace dbaui
                 const ::comphelper::NamedValueCollection& _rAdditionalArgs
             );
 
-        void
-            impl_newWithPilot(
-                const char* _pWizardService,
-                const sal_Int32 _nCommandType,
-                const OUString& _rObjectName
-            );
-
+        void impl_newWithPilot(const OUString& rWizardService, const sal_Int32 
_nCommandType,
+                               const OUString& _rObjectName);
     };
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx 
b/dbaccess/source/ui/misc/linkeddocuments.cxx
index 03b44d955de2..4e7dd396a0ca 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -147,8 +147,9 @@ namespace dbaui
 
         return xRet;
     }
-    void OLinkedDocumentsAccess::impl_newWithPilot( const char* 
_pWizardService,
-        const sal_Int32 _nCommandType, const OUString& _rObjectName )
+    void OLinkedDocumentsAccess::impl_newWithPilot(const OUString& 
rWizardService,
+                                                   const sal_Int32 
_nCommandType,
+                                                   const OUString& 
_rObjectName)
     {
         try
         {
@@ -169,11 +170,9 @@ namespace dbaui
             Reference< XJobExecutor > xWizard;
             {
                 weld::WaitObject aWaitCursor(m_pDialogParent);
-                xWizard.set( 
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
-                    OUString::createFromAscii( _pWizardService ),
-                    aArgs.getWrappedPropertyValues(),
-                    m_xContext
-                    ), UNO_QUERY_THROW );
+                
xWizard.set(m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+                                rWizardService, 
aArgs.getWrappedPropertyValues(), m_xContext),
+                            UNO_QUERY_THROW);
             }
 
             xWizard->trigger( u"start"_ustr );
@@ -186,20 +185,22 @@ namespace dbaui
     }
     void OLinkedDocumentsAccess::newFormWithPilot( const sal_Int32 
_nCommandType,const OUString& _rObjectName )
     {
-        impl_newWithPilot( "com.sun.star.wizards.form.CallFormWizard", 
_nCommandType, _rObjectName );
+        impl_newWithPilot(u"com.sun.star.wizards.form.CallFormWizard"_ustr, 
_nCommandType,
+                          _rObjectName);
     }
 
     void OLinkedDocumentsAccess::newReportWithPilot( const sal_Int32 
_nCommandType, const OUString& _rObjectName )
     {
-        impl_newWithPilot( "com.sun.star.wizards.report.CallReportWizard", 
_nCommandType, _rObjectName );
+        
impl_newWithPilot(u"com.sun.star.wizards.report.CallReportWizard"_ustr, 
_nCommandType,
+                          _rObjectName);
     }
     void OLinkedDocumentsAccess::newTableWithPilot()
     {
-        impl_newWithPilot( "com.sun.star.wizards.table.CallTableWizard", -1, 
OUString() );
+        impl_newWithPilot(u"com.sun.star.wizards.table.CallTableWizard"_ustr, 
-1, OUString());
     }
     void OLinkedDocumentsAccess::newQueryWithPilot()
     {
-        impl_newWithPilot( "com.sun.star.wizards.query.CallQueryWizard", -1, 
OUString() );
+        impl_newWithPilot(u"com.sun.star.wizards.query.CallQueryWizard"_ustr, 
-1, OUString());
     }
     Reference< XComponent > OLinkedDocumentsAccess::newDocument( sal_Int32 
i_nActionID,
         const ::comphelper::NamedValueCollection& i_rCreationArgs, Reference< 
XComponent >& o_rDefinition )

Reply via email to