cppuhelper/source/component_context.cxx | 22 +++++++++++----------- include/cppuhelper/component_context.hxx | 14 +++++++------- 2 files changed, 18 insertions(+), 18 deletions(-)
New commits: commit b85184f3b88687f27c7593ad161c59e3e91966b5 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Thu Aug 14 09:34:01 2025 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Thu Aug 14 18:58:24 2025 +0200 cppuhelper: Prefix ContextEntry_Init struct members with 'm_' Change-Id: Ic7b05c322e8f013a1192c9cdfc129d9700c941e6 Signed-off-by: Henry Castro <hcas...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189608 Tested-by: Jenkins diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index a8c58c4812e9..c7e5476594d6 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -464,23 +464,23 @@ ComponentContext::ComponentContext( { ContextEntry_Init const & rEntry = pEntries[ nPos ]; - if ( rEntry.name == SMGR_SINGLETON ) + if ( rEntry.m_sName == SMGR_SINGLETON ) { - rEntry.value >>= m_xSMgr; + rEntry.m_aValue >>= m_xSMgr; } - if (rEntry.bLateInitService) + if (rEntry.m_bLateInitService) { // singleton entry - m_map.emplace( rEntry.name, ContextEntry( Any(), true ) ); + m_map.emplace( rEntry.m_sName, ContextEntry( Any(), true ) ); // service - m_map.emplace( rEntry.name + "/service", ContextEntry( rEntry.value, false ) ); + m_map.emplace( rEntry.m_sName + "/service", ContextEntry( rEntry.m_aValue, false ) ); // initial-arguments are provided as optional context entry } else { // only value, no late init factory nor string - m_map.emplace( rEntry.name, ContextEntry( rEntry.value, false ) ); + m_map.emplace( rEntry.m_sName, ContextEntry( rEntry.m_aValue, false ) ); } } @@ -566,12 +566,12 @@ Reference< XComponentContext > SAL_CALL createComponentContext( std::unique_ptr<ContextEntry_Init[]> mapped_entries(new ContextEntry_Init[nEntries]); for (sal_Int32 nPos = 0; nPos < nEntries; ++ nPos) { - mapped_entries[nPos].bLateInitService = pEntries[nPos].bLateInitService; - mapped_entries[nPos].name = pEntries[nPos].name; + mapped_entries[nPos].m_bLateInitService = pEntries[nPos].m_bLateInitService; + mapped_entries[nPos].m_sName = pEntries[nPos].m_sName; - uno_type_any_constructAndConvert(&mapped_entries[nPos].value, - const_cast<void *>(pEntries[nPos].value.getValue()), - pEntries[nPos].value.getValueTypeRef(), + uno_type_any_constructAndConvert(&mapped_entries[nPos].m_aValue, + const_cast<void *>(pEntries[nPos].m_aValue.getValue()), + pEntries[nPos].m_aValue.getValueTypeRef(), curr2source.get()); } diff --git a/include/cppuhelper/component_context.hxx b/include/cppuhelper/component_context.hxx index 787264ab514a..049818e75975 100644 --- a/include/cppuhelper/component_context.hxx +++ b/include/cppuhelper/component_context.hxx @@ -44,18 +44,18 @@ struct SAL_WARN_UNUSED ContextEntry_Init object as value (to instantiate the object) or a string as value for raising a service via the used service manager. */ - bool bLateInitService; + bool m_bLateInitService; /** name of context value */ - ::rtl::OUString name; + ::rtl::OUString m_sName; /** context value */ - css::uno::Any value; + css::uno::Any m_aValue; /** Default ctor. */ ContextEntry_Init() - : bLateInitService( false ) + : m_bLateInitService( false ) {} /** Ctor. @@ -71,9 +71,9 @@ struct SAL_WARN_UNUSED ContextEntry_Init ::rtl::OUString const & name_, css::uno::Any const & value_, bool bLateInitService_ = false ) - : bLateInitService( bLateInitService_ ), - name( name_ ), - value( value_ ) + : m_bLateInitService( bLateInitService_ ), + m_sName( name_ ), + m_aValue( value_ ) {} };