cui/source/dialogs/cuihyperdlg.cxx |    2 +-
 cui/source/options/treeopt.cxx     |    4 ++--
 desktop/source/app/app.cxx         |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4b498646142e4d0acb8eb2e50eb503ac6002d82e
Author:     shlok3640 <[email protected]>
AuthorDate: Tue Dec 2 13:30:50 2025 +0000
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Wed Dec 3 07:08:40 2025 +0100

    tdf#164685 Modernize SfxItemSetFixed usage
    
    Replaces the old explicit template instantiation with the
    modern SfxItemSet::makeFixedSfxItemSet helper function.
    This simplifies the syntax and enables auto type deduction.
    
    Change-Id: I23102ca679756f6e2b1caca182469fdaacd501a1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194927
    Tested-by: Jenkins
    Reviewed-by: Ilmari Lauhakangas <[email protected]>

diff --git a/cui/source/dialogs/cuihyperdlg.cxx 
b/cui/source/dialogs/cuihyperdlg.cxx
index 7ee7151ffbdc..b52be13ef485 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -187,7 +187,7 @@ void SvxHpLinkDlg::Close()
 
 void SvxHpLinkDlg::Apply()
 {
-    SfxItemSetFixed<SID_HYPERLINK_GETLINK, SID_HYPERLINK_SETLINK> aItemSet( 
SfxGetpApp()->GetPool() );
+    auto aItemSet = SfxItemSet::makeFixedSfxItemSet<SID_HYPERLINK_GETLINK, 
SID_HYPERLINK_SETLINK>( SfxGetpApp()->GetPool() );
 
     SvxHyperlinkTabPageBase* pCurrentPage = 
static_cast<SvxHyperlinkTabPageBase*>(
                                                 GetTabPage( GetCurPageId() ) );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 69a7e7a726ce..97e075332892 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1396,7 +1396,7 @@ std::optional<SfxItemSet> 
OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId )
                     SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER,
                     SID_ATTR_YEAR2000, SID_ATTR_YEAR2000> );
 
-            SfxItemSetFixed<SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER> 
aOptSet( SfxGetpApp()->GetPool() );
+            auto aOptSet = 
SfxItemSet::makeFixedSfxItemSet<SID_ATTR_QUICKLAUNCHER, 
SID_ATTR_QUICKLAUNCHER>( SfxGetpApp()->GetPool() );
             SfxApplication::GetOptions(aOptSet);
             pRet->Put(aOptSet);
 
@@ -1536,7 +1536,7 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, 
const SfxItemSet& rSet
         {
             std::shared_ptr<comphelper::ConfigurationChanges> 
batch(comphelper::ConfigurationChanges::create());
 
-            SfxItemSetFixed<SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER> 
aOptSet(SfxGetpApp()->GetPool());
+            auto aOptSet = 
SfxItemSet::makeFixedSfxItemSet<SID_ATTR_QUICKLAUNCHER, 
SID_ATTR_QUICKLAUNCHER>( SfxGetpApp()->GetPool() );
             aOptSet.Put(rSet);
             if(aOptSet.Count())
                 SfxApplication::SetOptions( aOptSet );
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 00f845124271..78b6b98cc2d0 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -303,7 +303,7 @@ bool shouldLaunchQuickstart()
     bool bQuickstart = Desktop::GetCommandLineArgs().IsQuickstart();
     if (!bQuickstart)
     {
-        SfxItemSetFixed<SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER> 
aQLSet(SfxGetpApp()->GetPool());
+        auto aQLSet = SfxItemSet::makeFixedSfxItemSet<SID_ATTR_QUICKLAUNCHER, 
SID_ATTR_QUICKLAUNCHER>(SfxGetpApp()->GetPool());
         SfxApplication::GetOptions(aQLSet);
         const SfxBoolItem* pLauncherItem = 
aQLSet.GetItemIfSet(SID_ATTR_QUICKLAUNCHER, false);
         if (pLauncherItem)

Reply via email to