bin/find-can-be-private-symbols.functions.results           |    1 
 bin/find-mergedlib-can-be-private-symbols.functions.results |    1 
 compilerplugins/clang/store/deletedspecial.cxx              |    1 
 officecfg/registry/schema/org/openoffice/VCL.xcs            |   10 
 solenv/clang-format/excludelist                             |    2 
 vcl/IwyuFilter_vcl.yaml                                     |    3 
 vcl/Library_vcl.mk                                          |    1 
 vcl/inc/configsettings.hxx                                  |   60 -----
 vcl/inc/pch/precompiled_vcl.hxx                             |    1 
 vcl/inc/svdata.hxx                                          |    2 
 vcl/source/app/svdata.cxx                                   |    3 
 vcl/source/app/svmain.cxx                                   |    2 
 vcl/source/gdi/configsettings.cxx                           |  134 ------------
 13 files changed, 221 deletions(-)

New commits:
commit 314a36c21bff7e7edcba832f19a70389d4c93b56
Author:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
AuthorDate: Wed Jun 25 22:03:03 2025 +0200
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Fri Jun 27 11:00:12 2025 +0200

    [API CHANGE] Remove VCL/Settings, VCL/ConfigurableSettings
    
    in order to simplify code.
    
    The flexibility provided by the ConfigurableSettings template
    is not really necessary for the simple settings VCL has
    
    Drop this now that keys that actually used them are migrated
    to VCL/VCLSettings
    
    Change-Id: I39609cd5f0ccda7f451bc6457a42b05b585b9b10
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187007
    Tested-by: Jenkins
    Reviewed-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>

diff --git a/bin/find-can-be-private-symbols.functions.results 
b/bin/find-can-be-private-symbols.functions.results
index 223f26a67015..dff9c5bd31af 100644
--- a/bin/find-can-be-private-symbols.functions.results
+++ b/bin/find-can-be-private-symbols.functions.results
@@ -15724,7 +15724,6 @@ vcl::Region::GetAsRegionBand() const
 vcl::Region::Overlaps(tools::Rectangle const&) const
 vcl::Region::Scale(double, double)
 vcl::ScriptRun::next()
-vcl::SettingsConfigItem::getValues()
 vcl::Vectorizer::updateProgress(long)
 vcl::Window::ImplGetWindow() const
 vcl::Window::SetTextAlign(TextAlign)
diff --git a/bin/find-mergedlib-can-be-private-symbols.functions.results 
b/bin/find-mergedlib-can-be-private-symbols.functions.results
index 4e45fc09b1f9..13d2eab86187 100644
--- a/bin/find-mergedlib-can-be-private-symbols.functions.results
+++ b/bin/find-mergedlib-can-be-private-symbols.functions.results
@@ -16319,7 +16319,6 @@ vcl::Region::XOr(vcl::Region const&)
 vcl::RoadmapWizardMachine::getStateDisplayName(short) const
 vcl::RoadmapWizardMachine::knowsState(short) const
 vcl::SetGetSpecialCharsFunction(rtl::OUString (*)(weld::Widget*, vcl::Font 
const&))
-vcl::SettingsConfigItem::getValues()
 vcl::Vectorizer::updateProgress(long)
 vcl::Window::AlwaysEnableInput(bool, bool)
 vcl::Window::ApplyControlBackground(OutputDevice&, Color const&)
diff --git a/compilerplugins/clang/store/deletedspecial.cxx 
b/compilerplugins/clang/store/deletedspecial.cxx
index 52e717d340e7..484fbf35bfa3 100644
--- a/compilerplugins/clang/store/deletedspecial.cxx
+++ b/compilerplugins/clang/store/deletedspecial.cxx
@@ -117,7 +117,6 @@ bool DeletedSpecial::VisitCXXMethodDecl(CXXMethodDecl const 
* decl) {
                 || allowlist(decl, "sd::RemoteServer", 
"sd/source/ui/inc/RemoteServer.hxx")
                 || allowlist(decl, "sd::slidesorter::cache::PageCacheManager", 
"sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx")
                 || allowlist(decl, "framework::CommandInfoProvider", 
"include/framework/commandinfoprovider.hxx")
-                || allowlist(decl, "vcl::SettingsConfigItem", 
"vcl/inc/configsettings.hxx")
                 || allowlist(decl, "writerfilter::ooxml::OOXMLFactory", 
"writerfilter/source/ooxml/OOXMLFactory.hxx"))
             {
                 return true;
diff --git a/officecfg/registry/schema/org/openoffice/VCL.xcs 
b/officecfg/registry/schema/org/openoffice/VCL.xcs
index 2aeddada6d42..be38282ff72a 100644
--- a/officecfg/registry/schema/org/openoffice/VCL.xcs
+++ b/officecfg/registry/schema/org/openoffice/VCL.xcs
@@ -52,11 +52,6 @@
         </info>
       </prop>
     </group>
-    <group oor:name="ConfigurableSettings" oor:extensible="true">
-      <info>
-        <desc>Specifies an extensible set of options that are ordered into 
key/value pairs for the VCL. For example, a valid key for describing whether 
printing is deactivated is: "DisablePrinting" (valid values = "true", 
"false").</desc>
-      </info>
-    </group>
     <group oor:name="ExtraLanguage">
       <info>
         <desc>Specifies an extensible list of languages that should be added 
to the various language selection lists</desc>
@@ -84,11 +79,6 @@
     </set>
   </templates>
   <component>
-    <set oor:name="Settings" oor:node-type="ConfigurableSettings">
-      <info>
-        <desc>Contains the settings for VCL (see template description).</desc>
-      </info>
-    </set>
     <set oor:name="ExtraLanguages" oor:node-type="ExtraLanguage">
       <info>
         <desc>Specifies extra language tags to support</desc>
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 99e9b4b2b93b..4c870069fac2 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -14150,7 +14150,6 @@ vcl/inc/brdwin.hxx
 vcl/inc/bubblewindow.hxx
 vcl/inc/calendar.hxx
 vcl/inc/canvasbitmap.hxx
-vcl/inc/configsettings.hxx
 vcl/inc/debugevent.hxx
 vcl/inc/displayconnectiondispatch.hxx
 vcl/inc/dndeventdispatcher.hxx
@@ -14675,7 +14674,6 @@ vcl/source/fontsubset/sft.cxx
 vcl/source/fontsubset/ttcr.cxx
 vcl/source/fontsubset/ttcr.hxx
 vcl/source/gdi/CommonSalLayout.cxx
-vcl/source/gdi/configsettings.cxx
 vcl/source/gdi/cvtgrf.cxx
 vcl/source/gdi/embeddedfontshelper.cxx
 vcl/source/gdi/formpdfexport.cxx
diff --git a/vcl/IwyuFilter_vcl.yaml b/vcl/IwyuFilter_vcl.yaml
index b725f3133590..221d5fb0cd86 100644
--- a/vcl/IwyuFilter_vcl.yaml
+++ b/vcl/IwyuFilter_vcl.yaml
@@ -61,9 +61,6 @@ excludelist:
     vcl/source/filter/wmf/wmfexternal.cxx:
     # Actually these are used
     - com/sun/star/beans/PropertyValue.hpp
-    vcl/source/gdi/configsettings.cxx:
-    # Needed for OSL_DEBUG_LEVEL > 2
-    - sal/log.hxx
     vcl/source/gdi/salgdilayout.cxx:
     # Needed on WIN32
     - desktop/exithelper.h
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 1568ad506b52..2ae251b651c8 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -322,7 +322,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/treelist/svlbitm \
     vcl/source/treelist/uiobject \
     vcl/source/gdi/formpdfexport \
-    vcl/source/gdi/configsettings \
     vcl/source/gdi/cvtgrf \
     vcl/source/gdi/embeddedfontshelper \
     vcl/source/gdi/FileDefinitionWidgetDraw \
diff --git a/vcl/inc/configsettings.hxx b/vcl/inc/configsettings.hxx
deleted file mode 100644
index 6d688bdd1838..000000000000
--- a/vcl/inc/configsettings.hxx
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#pragma once
-
-#include <rtl/ustring.hxx>
-#include <unotools/configitem.hxx>
-#include <vcl/dllapi.h>
-
-#include <unordered_map>
-
-namespace vcl
-{
-    typedef std::unordered_map< OUString, OUString > OUStrMap;
-    class SmallOUStrMap : public OUStrMap { public: SmallOUStrMap() : 
OUStrMap(1) {} };
-
-
-    //= SettingsConfigItem
-
-    class VCL_DLLPUBLIC SettingsConfigItem final : public ::utl::ConfigItem
-    {
-    private:
-        std::unordered_map< OUString, SmallOUStrMap > m_aSettings;
-
-        SAL_DLLPRIVATE virtual void Notify( const css::uno::Sequence< OUString 
>& rPropertyNames ) override;
-
-        void getValues();
-        SAL_DLLPRIVATE SettingsConfigItem();
-
-        SAL_DLLPRIVATE virtual void ImplCommit() override;
-
-    public:
-        SAL_DLLPRIVATE virtual ~SettingsConfigItem() override;
-
-        static SettingsConfigItem* get();
-
-        OUString getValue( const OUString& rGroup, const OUString& rKey ) 
const;
-        SAL_DLLPRIVATE void setValue( const OUString& rGroup, const OUString& 
rKey, const OUString& rValue );
-
-    };
-
-
-} // namespace vcl
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index da64d418e0f5..3d87bca95728 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -283,7 +283,6 @@
 #include <ImplOutDevData.hxx>
 #include <accel.hxx>
 #include <brdwin.hxx>
-#include <configsettings.hxx>
 #include <dndlistenercontainer.hxx>
 #include <drawmode.hxx>
 #include <fontattributes.hxx>
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 9311b0ffbb33..e32c3fdb9b28 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -130,7 +130,6 @@ namespace com::sun::star::datatransfer::clipboard { class 
XClipboard; }
 namespace vcl
 {
     class DisplayConnectionDispatch;
-    class SettingsConfigItem;
     class Window;
 }
 
@@ -402,7 +401,6 @@ struct ImplSVData
     rtl::Reference< vcl::DisplayConnectionDispatch > mxDisplayConnection;
 
     css::uno::Reference< css::lang::XComponent > mxAccessBridge;
-    std::unique_ptr<vcl::SettingsConfigItem> mpSettingsConfigItem;
     std::unordered_map< int, OUString > maPaperNames;
     o3tl::sorted_vector<CacheOwner*> maCacheOwners;
 
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 1cdda1edb520..6d32a2d22076 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -26,7 +26,6 @@
 #include <unotools/resmgr.hxx>
 #include <sal/log.hxx>
 
-#include <configsettings.hxx>
 #include <vcl/QueueInfo.hxx>
 #include <vcl/cvtgrf.hxx>
 #include <vcl/dockwin.hxx>
@@ -89,8 +88,6 @@ void ImplDeInitSVData()
     ImplSVData* pSVData = ImplGetSVData();
 
     // delete global instance data
-    pSVData->mpSettingsConfigItem.reset();
-
     pSVData->mpDockingManager.reset();
 
     pSVData->maCtrlData.maFieldUnitStrings.clear();
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 70b44ad16129..79d03ccc2e75 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -45,7 +45,6 @@
 #include <vcl/ImageTree.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/toolkit/unowrap.hxx>
-#include <configsettings.hxx>
 #include <tools/lazydelete.hxx>
 #include <vcl/embeddedfontshelper.hxx>
 #include <vcl/toolkit/dialog.hxx>
@@ -475,7 +474,6 @@ void DeInitVCL()
 
     // free global data
     pSVData->maGDIData.mxGrfConverter.reset();
-    pSVData->mpSettingsConfigItem.reset();
 
     // prevent unnecessary painting during Scheduler shutdown
     // as this processes all pending events in debug builds.
diff --git a/vcl/source/gdi/configsettings.cxx 
b/vcl/source/gdi/configsettings.cxx
deleted file mode 100644
index b39adbf54118..000000000000
--- a/vcl/source/gdi/configsettings.cxx
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <configsettings.hxx>
-
-#include <svdata.hxx>
-
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <o3tl/any.hxx>
-#include <sal/log.hxx>
-
-using namespace utl;
-using namespace vcl;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::container;
-
-constexpr OUStringLiteral SETTINGS_CONFIGNODE = u"VCL/Settings";
-
-SettingsConfigItem* SettingsConfigItem::get()
-{
-    ImplSVData* pSVData = ImplGetSVData();
-    if( ! pSVData->mpSettingsConfigItem )
-        pSVData->mpSettingsConfigItem.reset( new SettingsConfigItem() );
-    return pSVData->mpSettingsConfigItem.get();
-}
-
-SettingsConfigItem::SettingsConfigItem()
- :  ConfigItem( SETTINGS_CONFIGNODE, ConfigItemMode::NONE ),
-    m_aSettings( 0 )
-{
-    getValues();
-}
-
-SettingsConfigItem::~SettingsConfigItem()
-{
-    assert(!IsModified()); // should have been committed
-}
-
-void SettingsConfigItem::ImplCommit()
-{
-    for (auto const& setting : m_aSettings)
-    {
-        OUString aKeyName( setting.first );
-        /*bool bAdded =*/ AddNode( OUString(), aKeyName );
-        Sequence< PropertyValue > aValues( setting.second.size() );
-        PropertyValue* pValues = aValues.getArray();
-        int nIndex = 0;
-        for (auto const& elem : setting.second)
-        {
-            pValues[nIndex].Name    = aKeyName + "/" + elem.first;
-            pValues[nIndex].Handle  = 0;
-            pValues[nIndex].Value <<= elem.second;
-            pValues[nIndex].State   = PropertyState_DIRECT_VALUE;
-            nIndex++;
-        }
-        ReplaceSetProperties( aKeyName, aValues );
-    }
-}
-
-void SettingsConfigItem::Notify( const Sequence< OUString >& )
-{
-    getValues();
-}
-
-void SettingsConfigItem::getValues()
-{
-    m_aSettings.clear();
-
-    const Sequence< OUString > aNames( GetNodeNames( OUString() ) );
-
-    for( const auto& aKeyName : aNames )
-    {
-#if OSL_DEBUG_LEVEL > 2
-        SAL_INFO( "vcl", "found settings data for " << aKeyName );
-#endif
-        const Sequence< OUString > aKeys( GetNodeNames( aKeyName ) );
-        Sequence< OUString > aSettingsKeys( aKeys.getLength() );
-        std::transform(aKeys.begin(), aKeys.end(), aSettingsKeys.getArray(),
-            [&aKeyName](const OUString& rKey) -> OUString { return aKeyName + 
"/" + rKey; });
-        const Sequence< Any > aValues( GetProperties( aSettingsKeys ) );
-        for( int i = 0; i < aValues.getLength(); i++ )
-        {
-            if( auto pLine = o3tl::tryAccess<OUString>(aValues[i]) )
-            {
-                if( !pLine->isEmpty() )
-                    m_aSettings[ aKeyName ][ aKeys[i] ] = *pLine;
-#if OSL_DEBUG_LEVEL > 2
-                SAL_INFO( "vcl", "   \"" << aKeys.getConstArray()[i] << 
"\"=\"" << *pLine << "\"" );
-#endif
-            }
-        }
-    }
-}
-
-OUString SettingsConfigItem::getValue( const OUString& rGroup, const OUString& 
rKey ) const
-{
-    std::unordered_map< OUString, SmallOUStrMap >::const_iterator group = 
m_aSettings.find( rGroup );
-    if( group == m_aSettings.end() || group->second.find( rKey ) == 
group->second.end() )
-    {
-        return OUString();
-    }
-    return group->second.find(rKey)->second;
-}
-
-void SettingsConfigItem::setValue( const OUString& rGroup, const OUString& 
rKey, const OUString& rValue )
-{
-    bool bModified = m_aSettings[ rGroup ][ rKey ] != rValue;
-    if( bModified )
-    {
-        m_aSettings[ rGroup ][ rKey ] = rValue;
-        SetModified();
-    }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to