sw/source/core/unocore/unostyle.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
New commits: commit 1761680a8f8f4a4dfa50e5be4c9a94ffa2aa46b2 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun Sep 3 22:21:54 2023 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Mon Sep 4 09:23:36 2023 +0200 Make nPropSetId vars sal_uInt16 instead of sal_Int8 since: - for some lines, it's initialized from propMapType() which returns m_nPropMapType which is sal_uInt16 - for other lines, it's used with GetPropertySet which takes a sal_uInt16 as parameter Change-Id: I7fd29c5aabd6a32ff38f72ca245d7549627e3e51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156501 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 184a931e798b..e57beb1a72f7 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -2025,7 +2025,7 @@ void SwXStyle::SetPropertyValues_Impl(const uno::Sequence<OUString>& rPropertyNa { if(!m_pDoc) throw uno::RuntimeException(); - sal_Int8 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); + sal_uInt16 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(nPropSetId); const SfxItemPropertyMap &rMap = pPropSet->getPropertyMap(); if(rPropertyNames.getLength() != rValues.getLength()) @@ -2407,7 +2407,7 @@ uno::Any SwXStyle::getPropertyValue(const OUString& rPropertyName) throw uno::RuntimeException(); if(!m_pBasePool && !m_bIsDescriptor) throw uno::RuntimeException(); - sal_Int8 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); + sal_uInt16 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(nPropSetId); SwStyleBase_Impl aBase(*m_pDoc, m_sStyleName, &m_pDoc->GetDfltTextFormatColl()->GetAttrSet()); // add pDfltTextFormatColl as parent return GetPropertyValue_Impl(pPropSet, aBase, rPropertyName); @@ -2420,7 +2420,7 @@ uno::Sequence<uno::Any> SwXStyle::getPropertyValues(const uno::Sequence<OUString throw uno::RuntimeException(); if(!m_pBasePool && !m_bIsDescriptor) throw uno::RuntimeException(); - sal_Int8 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); + sal_uInt16 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(nPropSetId); SwStyleBase_Impl aBase(*m_pDoc, m_sStyleName, &m_pDoc->GetDfltTextFormatColl()->GetAttrSet()); // add pDfltTextFormatColl as parent uno::Sequence<uno::Any> aValues(rPropertyNames.getLength()); @@ -2492,7 +2492,7 @@ uno::Sequence<beans::PropertyState> SwXStyle::getPropertyStates(const uno::Seque const OUString* pNames = rPropertyNames.getConstArray(); rtl::Reference<SwDocStyleSheet> xStyle(new SwDocStyleSheet(*static_cast<SwDocStyleSheet*>(pBase))); - sal_Int8 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); + sal_uInt16 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(nPropSetId); const SfxItemPropertyMap& rMap = pPropSet->getPropertyMap(); @@ -2627,7 +2627,7 @@ void SAL_CALL SwXStyle::setPropertiesToDefault(const uno::Sequence<OUString>& aP m_pPropertiesImpl->ClearProperty(rName); return; } - const sal_Int8 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); + const sal_uInt16 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(nPropSetId); const SfxItemPropertyMap &rMap = pPropSet->getPropertyMap(); for(const auto& rName : aPropertyNames) @@ -2746,7 +2746,7 @@ uno::Sequence<uno::Any> SAL_CALL SwXStyle::getPropertyDefaults(const uno::Sequen if(!pBase) throw uno::RuntimeException(); rtl::Reference<SwDocStyleSheet> xStyle(new SwDocStyleSheet(*static_cast<SwDocStyleSheet*>(pBase))); - const sal_Int8 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); + const sal_uInt16 nPropSetId = m_bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : m_rEntry.propMapType(); const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(nPropSetId); const SfxItemPropertyMap& rMap = pPropSet->getPropertyMap(); @@ -3968,7 +3968,7 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl( } // query_item - sal_Int8 nPropSetId = PROPERTY_MAP_CHAR_AUTO_STYLE; + sal_uInt16 nPropSetId = PROPERTY_MAP_CHAR_AUTO_STYLE; switch(meFamily) { case IStyleAccess::AUTO_STYLE_CHAR : nPropSetId = PROPERTY_MAP_CHAR_AUTO_STYLE; break; @@ -4170,7 +4170,7 @@ uno::Sequence< beans::PropertyState > SwXAutoStyle::getPropertyStates( beans::PropertyState* pStates = aRet.getArray(); const OUString* pNames = rPropertyNames.getConstArray(); - sal_Int8 nPropSetId = PROPERTY_MAP_CHAR_AUTO_STYLE; + sal_uInt16 nPropSetId = PROPERTY_MAP_CHAR_AUTO_STYLE; switch(meFamily) { case IStyleAccess::AUTO_STYLE_CHAR : nPropSetId = PROPERTY_MAP_CHAR_AUTO_STYLE; break; @@ -4263,7 +4263,7 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() SolarMutexGuard aGuard; std::vector< beans::PropertyValue > aPropertyVector; - sal_Int8 nPropSetId = 0; + sal_uInt16 nPropSetId = 0; switch(meFamily) { case IStyleAccess::AUTO_STYLE_CHAR : nPropSetId = PROPERTY_MAP_CHAR_AUTO_STYLE; break;