24 #include <com/sun/star/uno/Any.hxx>
25 #include <com/sun/star/uno/Sequence.hxx>
26 #include <com/sun/star/beans/PropertyValue.hpp>
37 #define SETTINGS_CONFIGNODE "VCL/Settings"
47 SettingsConfigItem::SettingsConfigItem()
63 OUString aKeyName( setting.first );
64 AddNode( OUString(), aKeyName );
66 PropertyValue*
pValues = aValues.getArray();
68 for (
auto const& elem : setting.second)
70 pValues[nIndex].Name = aKeyName +
"/" + elem.first;
71 pValues[nIndex].Handle = 0;
72 pValues[nIndex].Value <<= elem.second;
73 pValues[nIndex].State = PropertyState_DIRECT_VALUE;
91 for(
const auto& aKeyName : aNames )
93 #if OSL_DEBUG_LEVEL > 2
94 SAL_INFO(
"vcl",
"found settings data for " << aKeyName );
98 std::transform(aKeys.begin(), aKeys.end(), aSettingsKeys.begin(),
99 [&aKeyName](
const OUString& rKey) -> OUString {
return aKeyName +
"/" + rKey; });
101 const OUString* pFrom = aKeys.getConstArray();
102 const Any* pValue = aValues.getConstArray();
103 for(
int i = 0;
i < aValues.getLength();
i++, pValue++ )
105 if(
auto pLine = o3tl::tryAccess<OUString>(*pValue) )
107 if( !pLine->isEmpty() )
109 #if OSL_DEBUG_LEVEL > 2
110 SAL_INFO(
"vcl",
" \"" << aKeys.getConstArray()[
i] <<
"\"=\"" << *pLine <<
"\"" );
119 std::unordered_map< OUString, SmallOUStrMap >::const_iterator
group =
m_aSettings.find( rGroup );
120 if( group ==
m_aSettings.end() || group->second.find( rKey ) == group->second.end() )
124 return group->second.find(rKey)->second;
129 bool bModified =
m_aSettings[ rGroup ][ rKey ] != rValue;
virtual ~SettingsConfigItem() override
std::unique_ptr< vcl::SettingsConfigItem > mpSettingsConfigItem
virtual void ImplCommit() override
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
ImplSVData * ImplGetSVData()
bool ReplaceSetProperties(const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues)
void setValue(const OUString &rGroup, const OUString &rKey, const OUString &rValue)
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
OUString getValue(const OUString &rGroup, const OUString &rKey) const
::comphelper::NamedValueCollection m_aSettings
const PropertyValue * pValues
std::unordered_map< OUString, SmallOUStrMap > m_aSettings
bool AddNode(const OUString &rNode, const OUString &rNewNode)
#define SAL_INFO(area, stream)
css::uno::Sequence< OUString > GetNodeNames(const OUString &rNode)
virtual void Notify(const css::uno::Sequence< OUString > &rPropertyNames) override
#define SETTINGS_CONFIGNODE