summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-04-12 09:21:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-15 15:53:25 +0200
commit6c934d0feb6a391fda0939e8db5d12aafeb93cc6 (patch)
tree6d256b92dc7913cfd195b199440e90226c772413 /sw/source/core
parent6c9a86a6392662f1115d3fe6b793a451101429b7 (diff)
store ptr to the original entries in SfxItemPropertyMap
instead of copying them to a new data structure that is practically identical. Helps startup time since we build a ton of these when loading documents. And use o3tl::sorted_vector as a dense map data structure to reduce allocations and improve cache friendliness, since this is a build-once thing. Change-Id: I950be03b1a21c0c81c40f2677d4215f5e8e256cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114015 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/access/accpara.cxx18
-rw-r--r--sw/source/core/inc/unoport.hxx2
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx10
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx18
-rw-r--r--sw/source/core/unocore/unodraw.cxx10
-rw-r--r--sw/source/core/unocore/unofield.cxx6
-rw-r--r--sw/source/core/unocore/unoframe.cxx10
-rw-r--r--sw/source/core/unocore/unoidx.cxx8
-rw-r--r--sw/source/core/unocore/unomap.cxx2
-rw-r--r--sw/source/core/unocore/unoobj.cxx22
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx24
-rw-r--r--sw/source/core/unocore/unoport.cxx10
-rw-r--r--sw/source/core/unocore/unosect.cxx10
-rw-r--r--sw/source/core/unocore/unosett.cxx16
-rw-r--r--sw/source/core/unocore/unosrch.cxx6
-rw-r--r--sw/source/core/unocore/unostyle.cxx130
-rw-r--r--sw/source/core/unocore/unotbl.cxx16
-rw-r--r--sw/source/core/unocore/unotext.cxx2
18 files changed, 160 insertions, 160 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 3939e274021e..63378702ad18 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1488,16 +1488,16 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
{
const SfxItemPropertyMap& rPropMap =
aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXT_CURSOR )->getPropertyMap();
- for ( const auto& rPair : rPropMap.getPropertyEntries() )
+ for ( const auto pEntry : rPropMap.getPropertyEntries() )
{
- const SfxPoolItem* pItem = pSet->GetItem( rPair.second.nWID );
+ const SfxPoolItem* pItem = pSet->GetItem( pEntry->nWID );
if ( pItem )
{
uno::Any aVal;
- pItem->QueryValue( aVal, rPair.second.nMemberId );
+ pItem->QueryValue( aVal, pEntry->nMemberId );
PropertyValue rPropVal;
- rPropVal.Name = rPair.first;
+ rPropVal.Name = pEntry->aName;
rPropVal.Value = aVal;
rPropVal.Handle = -1;
rPropVal.State = beans::PropertyState_DEFAULT_VALUE;
@@ -1680,18 +1680,18 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
const SfxItemPropertyMap& rPropMap =
aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXT_CURSOR )->getPropertyMap();
- for ( const auto& rPair : rPropMap.getPropertyEntries() )
+ for ( const auto pEntry : rPropMap.getPropertyEntries() )
{
const SfxPoolItem* pItem( nullptr );
// #i82637# - Found character attributes, whose value equals the value of
// the corresponding default character attributes, are excluded.
- if ( aSet.GetItemState( rPair.second.nWID, true, &pItem ) == SfxItemState::SET )
+ if ( aSet.GetItemState( pEntry->nWID, true, &pItem ) == SfxItemState::SET )
{
uno::Any aVal;
- pItem->QueryValue( aVal, rPair.second.nMemberId );
+ pItem->QueryValue( aVal, pEntry->nMemberId );
PropertyValue rPropVal;
- rPropVal.Name = rPair.first;
+ rPropVal.Name = pEntry->aName;
rPropVal.Value = aVal;
rPropVal.Handle = -1;
rPropVal.State = PropertyState_DIRECT_VALUE;
@@ -1776,7 +1776,7 @@ void SwAccessibleParagraph::_getSupplementalAttributesImpl(
{
const SfxItemPropertyMapEntry* pPropMap(
aSwMapProvider.GetPropertyMapEntries( PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE ) );
- while ( !pPropMap->aName.empty() )
+ while ( !pPropMap->aName.isEmpty() )
{
const SfxPoolItem* pItem = pSet->GetItem( pPropMap->nWID );
if ( pItem )
diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx
index 84ed54d0bc86..eee83c4a7771 100644
--- a/sw/source/core/inc/unoport.hxx
+++ b/sw/source/core/inc/unoport.hxx
@@ -137,7 +137,7 @@ protected:
const css::uno::Sequence< OUString >& aPropertyNames );
void GetPropertyValue( css::uno::Any &rVal,
- const SfxItemPropertySimpleEntry& rEntry, SwUnoCursor *pUnoCursor, std::unique_ptr<SfxItemSet> &pSet );
+ const SfxItemPropertyMapEntry& rEntry, SwUnoCursor *pUnoCursor, std::unique_ptr<SfxItemSet> &pSet );
/// @throws css::uno::RuntimeException
css::uno::Sequence<css::beans::GetDirectPropertyTolerantResult> GetPropertyValuesTolerant_Impl(
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index 19ceff59db05..9961effe2b05 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -64,7 +64,7 @@ void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName,
SolarMutexGuard aGuard;
if (!m_pDoc)
throw RuntimeException();
- const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if (!pMap)
throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
if ( pMap->nFlags & PropertyAttribute::READONLY)
@@ -124,7 +124,7 @@ Any SAL_CALL SwXTextDefaults::getPropertyValue( const OUString& rPropertyName )
SolarMutexGuard aGuard;
if (!m_pDoc)
throw RuntimeException();
- const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if (!pMap)
throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
Any aRet;
@@ -160,7 +160,7 @@ PropertyState SAL_CALL SwXTextDefaults::getPropertyState( const OUString& rPrope
PropertyState eRet = PropertyState_DIRECT_VALUE;
if (!m_pDoc)
throw RuntimeException();
- const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if (!pMap)
throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -185,7 +185,7 @@ void SAL_CALL SwXTextDefaults::setPropertyToDefault( const OUString& rPropertyNa
{
if (!m_pDoc)
throw RuntimeException();
- const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if (!pMap)
throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
if ( pMap->nFlags & PropertyAttribute::READONLY)
@@ -198,7 +198,7 @@ Any SAL_CALL SwXTextDefaults::getPropertyDefault( const OUString& rPropertyName
{
if (!m_pDoc)
throw RuntimeException();
- const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if (!pMap)
throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
Any aRet;
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index fdcdb0f76c1e..7536e49cce4c 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -317,20 +317,20 @@ static uno::Any GetParaListAutoFormat(SwTextNode const& rNode)
SfxItemPropertyMap const& rMap(rPropSet.getPropertyMap());
std::vector<beans::NamedValue> props;
// have to iterate the map, not the item set?
- for (auto const& rPair : rMap.getPropertyEntries())
+ for (auto const pEntry : rMap.getPropertyEntries())
{
- if (rPropSet.getPropertyState(rPair.second, rSet) == PropertyState_DIRECT_VALUE)
+ if (rPropSet.getPropertyState(*pEntry, rSet) == PropertyState_DIRECT_VALUE)
{
Any value;
- rPropSet.getPropertyValue(rPair.second, rSet, value);
- props.emplace_back(OUString(rPair.first), value);
+ rPropSet.getPropertyValue(*pEntry, rSet, value);
+ props.emplace_back(pEntry->aName, value);
}
}
return uno::makeAny(comphelper::containerToSequence(props));
}
// Read the special properties of the cursor
-bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry
+bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry
, SwPaM& rPam
, Any *pAny
, PropertyState& eState
@@ -983,7 +983,7 @@ void GetCurPageStyle(SwPaM const & rPaM, OUString &rString)
}
// reset special properties of the cursor
-void resetCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam)
+void resetCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry, SwPaM& rPam)
{
SwDoc& rDoc = rPam.GetDoc();
switch(rEntry.nWID)
@@ -1290,7 +1290,7 @@ void makeRedline( SwPaM const & rPaM,
// Build set of attributes we want to fetch
std::vector<sal_uInt16> aWhichPairs;
- std::vector<SfxItemPropertySimpleEntry const*> aEntries;
+ std::vector<SfxItemPropertyMapEntry const*> aEntries;
std::vector<uno::Any> aValues;
aEntries.reserve(aRevertProperties.getLength());
sal_uInt16 nStyleId = USHRT_MAX;
@@ -1298,7 +1298,7 @@ void makeRedline( SwPaM const & rPaM,
for (const auto& rRevertProperty : std::as_const(aRevertProperties))
{
const OUString &rPropertyName = rRevertProperty.Name;
- SfxItemPropertySimpleEntry const* pEntry = rPropSet.getPropertyMap().getByName(rPropertyName);
+ SfxItemPropertyMapEntry const* pEntry = rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
@@ -1336,7 +1336,7 @@ void makeRedline( SwPaM const & rPaM,
for (size_t i = 0; i < aEntries.size(); ++i)
{
- SfxItemPropertySimpleEntry const*const pEntry = aEntries[i];
+ SfxItemPropertyMapEntry const*const pEntry = aEntries[i];
const uno::Any &rValue = aValues[i];
if (i == nNumId)
{
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index cb20c5853291..79c3ac7fd8e7 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1039,7 +1039,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
{
SolarMutexGuard aGuard;
SwFrameFormat* pFormat = GetFrameFormat();
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if(!m_xShapeAgg.is())
return;
@@ -1450,7 +1450,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
SwFrameFormat* pFormat = GetFrameFormat();
if(m_xShapeAgg.is())
{
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if(pEntry)
{
if(pFormat)
@@ -1776,7 +1776,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
uno::Reference< XPropertyState > xShapePrState;
for(sal_Int32 nProperty = 0; nProperty < aPropertyNames.getLength(); nProperty++)
{
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( pNames[nProperty] );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( pNames[nProperty] );
if(pEntry)
{
if(RES_OPAQUE == pEntry->nWID)
@@ -1874,7 +1874,7 @@ void SwXShape::setPropertyToDefault( const OUString& rPropertyName )
if(!m_xShapeAgg.is())
throw uno::RuntimeException();
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if(pEntry)
{
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
@@ -1936,7 +1936,7 @@ uno::Any SwXShape::getPropertyDefault( const OUString& rPropertyName )
if(!m_xShapeAgg.is())
throw uno::RuntimeException();
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if(pEntry)
{
if(!(pEntry->nWID < RES_FRMATR_END && pFormat))
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 73d8d2e4e188..07a5b0bed2cc 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -314,7 +314,7 @@ static sal_uInt16 GetFieldTypeMId( std::u16string_view rProperty, const SwFieldT
nId = USHRT_MAX;
else
{
- const SfxItemPropertySimpleEntry* pEntry = pSet->getPropertyMap().getByName(rProperty);
+ const SfxItemPropertyMapEntry* pEntry = pSet->getPropertyMap().getByName(rProperty);
nId = pEntry ? pEntry->nWID : USHRT_MAX;
}
return nId;
@@ -2164,7 +2164,7 @@ SwXTextField::setPropertyValue(
SwField const*const pField = m_pImpl->GetField();
const SfxItemPropertySet* _pPropSet = aSwMapProvider.GetPropertySet(
lcl_GetPropertyMapOfService(m_pImpl->m_nServiceId));
- const SfxItemPropertySimpleEntry* pEntry = _pPropSet->getPropertyMap().getByName(rPropertyName);
+ const SfxItemPropertyMapEntry* pEntry = _pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -2317,7 +2317,7 @@ uno::Any SAL_CALL SwXTextField::getPropertyValue(const OUString& rPropertyName)
SwField const*const pField = m_pImpl->GetField();
const SfxItemPropertySet* _pPropSet = aSwMapProvider.GetPropertySet(
lcl_GetPropertyMapOfService(m_pImpl->m_nServiceId));
- const SfxItemPropertySimpleEntry* pEntry = _pPropSet->getPropertyMap().getByName(rPropertyName);
+ const SfxItemPropertyMapEntry* pEntry = _pPropSet->getPropertyMap().getByName(rPropertyName);
if(!pEntry )
{
const SfxItemPropertySet* _pParaPropSet = aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH_EXTENSIONS);
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 93a99f5fd973..2772c4cdb3fb 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1414,7 +1414,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
return;
}
- const ::SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
+ const ::SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -1980,7 +1980,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
SolarMutexGuard aGuard;
uno::Any aAny;
SwFrameFormat* pFormat = GetFrameFormat();
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -2390,7 +2390,7 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
const SwAttrSet& rFormatSet = pFormat->GetAttrSet();
for(int i = 0; i < aPropertyNames.getLength(); i++)
{
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(pNames[i]);
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName(pNames[i]);
if (!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + pNames[i], static_cast < cppu::OWeakObject * > ( this ) );
@@ -2468,7 +2468,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
SwFrameFormat* pFormat = GetFrameFormat();
if(pFormat)
{
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
@@ -2560,7 +2560,7 @@ uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName )
SwFrameFormat* pFormat = GetFrameFormat();
if(pFormat)
{
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
if(!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 697f57358d5c..7783e65756e1 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -528,7 +528,7 @@ SwXDocumentIndex::setPropertyValue(
{
SolarMutexGuard aGuard;
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
@@ -861,7 +861,7 @@ SwXDocumentIndex::getPropertyValue(const OUString& rPropertyName)
SolarMutexGuard aGuard;
uno::Any aRet;
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
@@ -2042,7 +2042,7 @@ SwXDocumentIndexMark::setPropertyValue(
{
SolarMutexGuard aGuard;
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
@@ -2179,7 +2179,7 @@ SwXDocumentIndexMark::getPropertyValue(const OUString& rPropertyName)
SolarMutexGuard aGuard;
uno::Any aRet;
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index ff415b7ab658..247f3d84ece5 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -707,7 +707,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
SfxItemPropertyMapEntry* aTextDefaultMap_Impl = GetTextDefaultPropertyMap();
m_aMapEntriesArr[nPropertyId] = aTextDefaultMap_Impl;
for( SfxItemPropertyMapEntry * pMap = aTextDefaultMap_Impl;
- !pMap->aName.empty(); ++pMap )
+ !pMap->aName.isEmpty(); ++pMap )
{
// UNO_NAME_PAGE_DESC_NAME should keep its MAYBEVOID flag
if (RES_PAGEDESC != pMap->nWID || MID_PAGEDESC_PAGEDESCNAME != pMap->nMemberId)
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 0a465bb170eb..079e69ba2abc 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -435,7 +435,7 @@ lcl_setRubyCharstyle(SfxItemSet & rItemSet, uno::Any const& rValue)
bool
SwUnoCursorHelper::SetCursorPropertyValue(
- SfxItemPropertySimpleEntry const& rEntry, const uno::Any& rValue,
+ SfxItemPropertyMapEntry const& rEntry, const uno::Any& rValue,
SwPaM & rPam, SfxItemSet & rItemSet)
{
if (!(rEntry.nFlags & beans::PropertyAttribute::MAYBEVOID) &&
@@ -526,7 +526,7 @@ SwUnoCursorHelper::SetCursorPropertyValue(
for (beans::NamedValue const & prop : std::as_const(props))
{
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
rMap.getByName(prop.Name);
if (!pEntry)
{
@@ -1722,7 +1722,7 @@ uno::Any SwUnoCursorHelper::GetPropertyValue(
std::u16string_view rPropertyName)
{
uno::Any aAny;
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
@@ -1789,13 +1789,13 @@ void SwUnoCursorHelper::SetPropertyValues(
// Build set of attributes we want to fetch
const sal_uInt16 zero = 0;
SfxItemSet aItemSet(rDoc.GetAttrPool(), &zero);
- std::vector<std::pair<const SfxItemPropertySimpleEntry*, const uno::Any&>> aEntries;
+ std::vector<std::pair<const SfxItemPropertyMapEntry*, const uno::Any&>> aEntries;
aEntries.reserve(rPropertyValues.getLength());
for (const auto& rPropVal : rPropertyValues)
{
const OUString &rPropertyName = rPropVal.Name;
- SfxItemPropertySimpleEntry const* pEntry =
+ SfxItemPropertyMapEntry const* pEntry =
rPropSet.getPropertyMap().getByName(rPropertyName);
// Queue up any exceptions until the end ...
@@ -1820,7 +1820,7 @@ void SwUnoCursorHelper::SetPropertyValues(
bool bPreviousPropertyCausesSideEffectsInNodes = false;
for (size_t i = 0; i < aEntries.size(); ++i)
{
- SfxItemPropertySimpleEntry const*const pEntry = aEntries[i].first;
+ SfxItemPropertyMapEntry const*const pEntry = aEntries[i].first;
bool bPropertyCausesSideEffectsInNodes =
propertyCausesSideEffectsInNodes(pEntry->nWID);
@@ -1872,7 +1872,7 @@ SwUnoCursorHelper::GetPropertyStates(
for (sal_Int32 i = 0, nEnd = rPropertyNames.getLength(); i < nEnd; i++)
{
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
rMap.getByName( pNames[i] );
if(!pEntry)
{
@@ -2003,7 +2003,7 @@ void SwUnoCursorHelper::SetPropertyToDefault(
std::u16string_view rPropertyName)
{
SwDoc& rDoc = rPaM.GetDoc();
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
@@ -2041,7 +2041,7 @@ uno::Any SwUnoCursorHelper::GetPropertyDefault(
SwPaM const & rPaM, const SfxItemPropertySet& rPropSet,
std::u16string_view rPropertyName)
{
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
@@ -2357,7 +2357,7 @@ SwXTextCursor::setPropertiesToDefault(
o3tl::sorted_vector<sal_uInt16> aParaWhichIds;
for (const OUString& rName : rPropertyNames)
{
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName( rName );
if (!pEntry)
{
@@ -2421,7 +2421,7 @@ SwXTextCursor::getPropertyDefaults(
uno::Any *pAny = aRet.getArray();
for (sal_Int32 i = 0; i < nCount; i++)
{
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName( pNames[i] );
if (!pEntry)
{
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 4ad34f531871..249956dd17c9 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -106,7 +106,7 @@ SwParaSelection::~SwParaSelection()
static beans::PropertyState lcl_SwXParagraph_getPropertyState(
const SwTextNode& rTextNode,
const SwAttrSet** ppSet,
- const SfxItemPropertySimpleEntry& rEntry,
+ const SfxItemPropertyMapEntry& rEntry,
bool &rAttrSetFetched );
class SwXParagraph::Impl
@@ -173,7 +173,7 @@ public:
/// @throws uno::RuntimeException
void GetSinglePropertyValue_Impl(
- const SfxItemPropertySimpleEntry& rEntry,
+ const SfxItemPropertyMapEntry& rEntry,
const SfxItemSet& rSet,
uno::Any& rAny ) const;
@@ -391,7 +391,7 @@ void SwXParagraph::Impl::SetPropertyValues_Impl(
uno::Sequence< beans::PropertyValue > aValues( rPropertyNames.getLength() );
for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
{
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
rMap.getByName( pPropertyNames[nProp] );
if (!pEntry)
{
@@ -434,7 +434,7 @@ void SAL_CALL SwXParagraph::setPropertyValues(
// Support for DrawingLayer FillStyles for GetPropertyValue() usages
void SwXParagraph::Impl::GetSinglePropertyValue_Impl(
- const SfxItemPropertySimpleEntry& rEntry,
+ const SfxItemPropertyMapEntry& rEntry,
const SfxItemSet& rSet,
uno::Any& rAny ) const
{
@@ -535,7 +535,7 @@ uno::Sequence< uno::Any > SwXParagraph::Impl::GetPropertyValues_Impl(
const SwAttrSet& rAttrSet( rTextNode.GetSwAttrSet() );
for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
{
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
rMap.getByName( pPropertyNames[nProp] );
if (!pEntry)
{
@@ -648,7 +648,7 @@ SwXParagraph::setPropertyValuesTolerant(
{
pFailed[ nFailed ].Name = pProp[i];
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
rPropMap.getByName( pProp[i] );
if (!pEntry)
{
@@ -757,7 +757,7 @@ SwXParagraph::Impl::GetPropertyValuesTolerant_Impl(
{
rResult.Name = rProp;
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
rPropMap.getByName( rProp );
if (!pEntry) // property available?
{
@@ -903,7 +903,7 @@ SwXParagraph::removeVetoableChangeListener(
static beans::PropertyState lcl_SwXParagraph_getPropertyState(
const SwTextNode& rTextNode,
const SwAttrSet** ppSet,
- const SfxItemPropertySimpleEntry& rEntry,
+ const SfxItemPropertyMapEntry& rEntry,
bool &rAttrSetFetched)
{
beans::PropertyState eRet(beans::PropertyState_DEFAULT_VALUE);
@@ -1013,7 +1013,7 @@ SwXParagraph::getPropertyState(const OUString& rPropertyName)
SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
const SwAttrSet* pSet = nullptr;
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
@@ -1045,7 +1045,7 @@ SwXParagraph::getPropertyStates(
for (sal_Int32 i = 0, nEnd = PropertyNames.getLength(); i < nEnd;
++i, ++pStates, ++pNames)
{
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
rMap.getByName( *pNames );
if (!pEntry)
{
@@ -1086,7 +1086,7 @@ SwXParagraph::setPropertyToDefault(const OUString& rPropertyName)
// select paragraph
SwParaSelection aParaSel( aCursor );
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName( rPropertyName );
if (!pEntry)
{
@@ -1169,7 +1169,7 @@ SwXParagraph::getPropertyDefault(const OUString& rPropertyName)
return aRet;
}
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 926d7db5b837..d559cee1a133 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -210,7 +210,7 @@ void SwXTextPortion::setPropertyValue(const OUString& rPropertyName,
void SwXTextPortion::GetPropertyValue(
uno::Any &rVal,
- const SfxItemPropertySimpleEntry& rEntry,
+ const SfxItemPropertyMapEntry& rEntry,
SwUnoCursor *pUnoCursor,
std::unique_ptr<SfxItemSet> &pSet )
{
@@ -385,7 +385,7 @@ uno::Sequence< uno::Any > SwXTextPortion::GetPropertyValues_Impl(
const SfxItemPropertyMap& rMap = m_pPropSet->getPropertyMap();
for(sal_Int32 nProp = 0; nProp < nLength; nProp++)
{
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(pPropertyNames[nProp]);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(pPropertyNames[nProp]);
if(!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) );
GetPropertyValue( pValues[nProp], *pEntry, &rUnoCursor, pSet );
@@ -415,7 +415,7 @@ void SwXTextPortion::SetPropertyValues_Impl(
uno::Sequence< beans::PropertyValue > aValues( rPropertyNames.getLength() );
for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
{
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(pPropertyNames[nProp]);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(pPropertyNames[nProp]);
if (!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) );
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
@@ -505,7 +505,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXTextPortion::setPr
{
pFailed[ nFailed ].Name = pProp[i];
- const SfxItemPropertySimpleEntry* pEntry = rPropMap.getByName( pProp[i] );
+ const SfxItemPropertyMapEntry* pEntry = rPropMap.getByName( pProp[i] );
if (!pEntry)
pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
else
@@ -609,7 +609,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SwXTextPortion::GetPrope
}
else
{
- const SfxItemPropertySimpleEntry* pEntry = rPropMap.getByName( pProp[i] );
+ const SfxItemPropertyMapEntry* pEntry = rPropMap.getByName( pProp[i] );
if (!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + pProp[i], static_cast < cppu::OWeakObject * > ( this ) );
aResult.State = pPropertyStates[i];
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 6a3a0d8c6d9e..1cd3f8d50a20 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -597,7 +597,7 @@ void SwXTextSection::Impl::SetPropertyValues_Impl(
for (sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength();
nProperty++)
{
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_rPropSet.getPropertyMap().getByName(pPropertyNames[nProperty]);
if (!pEntry)
{
@@ -980,7 +980,7 @@ SwXTextSection::Impl::GetPropertyValues_Impl(
for (sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength();
nProperty++)
{
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_rPropSet.getPropertyMap().getByName(pPropertyNames[nProperty]);
if (!pEntry)
{
@@ -1383,7 +1383,7 @@ SwXTextSection::getPropertyStates(
for (sal_Int32 i = 0; i < rPropertyNames.getLength(); i++)
{
pStates[i] = beans::PropertyState_DEFAULT_VALUE;
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName( pNames[i]);
if (!pEntry)
{
@@ -1458,7 +1458,7 @@ SwXTextSection::setPropertyToDefault(const OUString& rPropertyName)
throw uno::RuntimeException();
}
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
@@ -1596,7 +1596,7 @@ SwXTextSection::getPropertyDefault(const OUString& rPropertyName)
uno::Any aRet;
SwSectionFormat *const pFormat = m_pImpl->GetSectionFormat();
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index a79e4d57e62f..073cee394e96 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -308,7 +308,7 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
if(!m_pDoc)
throw uno::RuntimeException();
- const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -429,7 +429,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
if(!m_pDoc)
throw uno::RuntimeException();
- const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
if(!pEntry)
throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -587,7 +587,7 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const
if(!m_pDoc)
return;
- const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
if(!pEntry)
throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -661,7 +661,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
uno::Any aRet;
if(m_pDoc)
{
- const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
if(!pEntry)
throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -790,7 +790,7 @@ void SwXLineNumberingProperties::setPropertyValue(
if(!m_pDoc)
throw uno::RuntimeException();
- const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
if(!pEntry)
throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -904,7 +904,7 @@ Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName)
if(!m_pDoc)
throw uno::RuntimeException();
- const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
if(!pEntry)
throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -2299,7 +2299,7 @@ uno::Reference< XPropertySetInfo > SwXTextColumns::getPropertySetInfo( )
void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any& aValue )
{
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if (!pEntry)
throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
if ( pEntry->nFlags & PropertyAttribute::READONLY)
@@ -2372,7 +2372,7 @@ void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any&
Any SwXTextColumns::getPropertyValue( const OUString& rPropertyName )
{
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if (!pEntry)
throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx
index 0c4e6a50aee7..db0a98b2e7ea 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -150,7 +150,7 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, bool bIsValueSearch)
for(auto const & rPair : maValues)
{
SfxPoolItem* pTempItem = nullptr;
- const SfxItemPropertySimpleEntry & rPropEntry = mrMap.getPropertyEntries().find(std::u16string_view(rPair.first))->second;
+ const SfxItemPropertyMapEntry & rPropEntry = *mrMap.getByName(rPair.first);
sal_uInt16 nWID = rPropEntry.nWID;
switch(nWID)
{
@@ -391,7 +391,7 @@ uno::Reference< beans::XPropertySetInfo > SwXTextSearch::getPropertySetInfo()
void SwXTextSearch::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
{
SolarMutexGuard aGuard;
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -423,7 +423,7 @@ uno::Any SwXTextSearch::getPropertyValue(const OUString& rPropertyName)
SolarMutexGuard aGuard;
uno::Any aRet;
- const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
+ const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName);
bool bSet = false;
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 3c70dc9eaa93..3acda97229b4 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -323,13 +323,13 @@ protected:
css::uno::Reference<css::beans::XPropertySet> m_xStyleData;
template<sal_uInt16>
- void SetPropertyValue(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any&, SwStyleBase_Impl&);
+ void SetPropertyValue(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any&, SwStyleBase_Impl&);
void SetPropertyValues_Impl( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues );
SfxStyleSheetBase* GetStyleSheetBase();
void PrepareStyleBase(SwStyleBase_Impl& rBase);
template<sal_uInt16>
- uno::Any GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase);
- uno::Any GetStyleProperty_Impl(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase);
+ uno::Any GetStyleProperty(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase);
+ uno::Any GetStyleProperty_Impl(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase);
uno::Any GetPropertyValue_Impl(const SfxItemPropertySet* pPropSet, SwStyleBase_Impl& rBase, const OUString& rPropertyName);
public:
@@ -418,8 +418,8 @@ public:
/// @throws lang::IllegalArgumentException
/// @throws lang::WrappedTargetException
/// @throws uno::RuntimeException
- void SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& rBase);
- void PutItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rVal, SwStyleBase_Impl& rBaseImpl);
+ void SetStyleProperty(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& rBase);
+ void PutItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySet& rPropSet, const SfxItemPropertyMapEntry& rEntry, const uno::Any& rVal, SwStyleBase_Impl& rBaseImpl);
};
class SwXFrameStyle
@@ -1587,7 +1587,7 @@ const SwPageDesc* SwStyleBase_Impl::GetOldPageDesc()
-static sal_uInt8 lcl_TranslateMetric(const SfxItemPropertySimpleEntry& rEntry, SwDoc* pDoc, uno::Any& o_aValue)
+static sal_uInt8 lcl_TranslateMetric(const SfxItemPropertyMapEntry& rEntry, SwDoc* pDoc, uno::Any& o_aValue)
{
// check for needed metric translation
if(!(rEntry.nMoreFlags & PropertyMoreFlags::METRIC_ITEM))
@@ -1608,7 +1608,7 @@ static sal_uInt8 lcl_TranslateMetric(const SfxItemPropertySimpleEntry& rEntry, S
return rEntry.nMemberId;
}
template<>
-void SwXStyle::SetPropertyValue<HINT_BEGIN>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<HINT_BEGIN>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
// default ItemSet handling
SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
@@ -1618,7 +1618,7 @@ void SwXStyle::SetPropertyValue<HINT_BEGIN>(const SfxItemPropertySimpleEntry& rE
rStyleSet.Put(aSet);
}
template<>
-void SwXStyle::SetPropertyValue<FN_UNO_HIDDEN>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<FN_UNO_HIDDEN>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
bool bHidden = false;
if(rValue >>= bHidden)
@@ -1630,14 +1630,14 @@ void SwXStyle::SetPropertyValue<FN_UNO_HIDDEN>(const SfxItemPropertySimpleEntry&
SetPropertyValue<HINT_BEGIN>(rEntry, rPropSet, rValue, o_rStyleBase);
}
template<>
-void SwXStyle::SetPropertyValue<FN_UNO_STYLE_INTEROP_GRAB_BAG>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<FN_UNO_STYLE_INTEROP_GRAB_BAG>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
o_rStyleBase.getNewBase()->GetItemSet();
o_rStyleBase.getNewBase()->SetGrabBagItem(rValue);
SetPropertyValue<HINT_BEGIN>(rEntry, rPropSet, rValue, o_rStyleBase);
}
template<>
-void SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
uno::Any aValue(rValue);
const auto nMemberId(lcl_TranslateMetric(rEntry, m_pDoc, aValue));
@@ -1664,7 +1664,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>(const SfxItemPro
SetPropertyValue<HINT_BEGIN>(rEntry, rPropSet, aValue, o_rStyleBase);
}
template<>
-void SwXStyle::SetPropertyValue<sal_uInt16(RES_BACKGROUND)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_BACKGROUND)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
const std::unique_ptr<SvxBrushItem> aOriginalBrushItem(getSvxBrushItemFromSourceSet(rStyleSet, RES_BACKGROUND, true, m_pDoc->IsInXMLImport()));
@@ -1683,7 +1683,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(RES_BACKGROUND)>(const SfxItemPropert
setSvxBrushItemAsFillAttributesToTargetSet(*aChangedBrushItem, rStyleSet);
}
template<>
-void SwXStyle::SetPropertyValue<OWN_ATTR_FILLBMP_MODE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<OWN_ATTR_FILLBMP_MODE>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
drawing::BitmapMode eMode;
if(!(rValue >>= eMode))
@@ -1697,7 +1697,7 @@ void SwXStyle::SetPropertyValue<OWN_ATTR_FILLBMP_MODE>(const SfxItemPropertySimp
rStyleSet.Put(XFillBmpTileItem(drawing::BitmapMode_REPEAT == eMode));
}
template<>
-void SwXStyle::SetPropertyValue<sal_uInt16(RES_PAPER_BIN)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_PAPER_BIN)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(!rValue.has<OUString>())
throw lang::IllegalArgumentException();
@@ -1727,7 +1727,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(RES_PAPER_BIN)>(const SfxItemProperty
rStyleSet.Put(aSet);
}
template<>
-void SwXStyle::SetPropertyValue<FN_UNO_NUM_RULES>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<FN_UNO_NUM_RULES>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(!rValue.has<uno::Reference<container::XIndexReplace>>() || !rValue.has<uno::Reference<lang::XUnoTunnel>>())
throw lang::IllegalArgumentException();
@@ -1778,7 +1778,7 @@ void SwXStyle::SetPropertyValue<FN_UNO_NUM_RULES>(const SfxItemPropertySimpleEnt
o_rStyleBase.getNewBase()->SetNumRule(aSetRule);
}
template<>
-void SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_OUTLINELEVEL)>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_OUTLINELEVEL)>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(!rValue.has<sal_Int16>())
return;
@@ -1787,7 +1787,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_OUTLINELEVEL)>(const SfxIt
o_rStyleBase.getNewBase()->GetCollection()->SetAttrOutlineLevel(nLevel);
}
template<>
-void SwXStyle::SetPropertyValue<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(!rValue.has<OUString>())
return;
@@ -1797,7 +1797,7 @@ void SwXStyle::SetPropertyValue<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertySimple
o_rStyleBase.getNewBase()->SetFollow(aString);
}
template<>
-void SwXStyle::SetPropertyValue<sal_uInt16(RES_PAGEDESC)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_PAGEDESC)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(MID_PAGEDESC_PAGEDESCNAME != rEntry.nMemberId)
{
@@ -1834,7 +1834,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(RES_PAGEDESC)>(const SfxItemPropertyS
}
}
template<>
-void SwXStyle::SetPropertyValue<sal_uInt16(RES_TEXT_VERT_ADJUST)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_TEXT_VERT_ADJUST)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(m_rEntry.m_eFamily != SfxStyleFamily::Page)
{
@@ -1848,7 +1848,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(RES_TEXT_VERT_ADJUST)>(const SfxItemP
pPageDesc->SetVerticalAdjustment(rValue.get<drawing::TextVerticalAdjust>());
}
template<>
-void SwXStyle::SetPropertyValue<FN_UNO_IS_AUTO_UPDATE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<FN_UNO_IS_AUTO_UPDATE>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(!rValue.has<bool>())
throw lang::IllegalArgumentException();
@@ -1859,7 +1859,7 @@ void SwXStyle::SetPropertyValue<FN_UNO_IS_AUTO_UPDATE>(const SfxItemPropertySimp
o_rStyleBase.getNewBase()->GetFrameFormat()->SetAutoUpdateFormat(bAuto);
}
template<>
-void SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
static_assert(COND_COMMAND_COUNT == 28, "invalid size of command count?");
using expectedarg_t = uno::Sequence<beans::NamedValue>;
@@ -1895,7 +1895,7 @@ void SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPrope
o_rStyleBase.GetItemSet().Put(aCondItem);
}
template<>
-void SwXStyle::SetPropertyValue<FN_UNO_CATEGORY>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<FN_UNO_CATEGORY>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(!o_rStyleBase.getNewBase()->IsUserDefined() || !rValue.has<paragraphstyle_t>())
throw lang::IllegalArgumentException();
@@ -1913,7 +1913,7 @@ void SwXStyle::SetPropertyValue<FN_UNO_CATEGORY>(const SfxItemPropertySimpleEntr
o_rStyleBase.getNewBase()->SetMask( pUnoToCoreIt->second|SfxStyleSearchBits::UserDefined );
}
template<>
-void SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
OUString sName;
rValue >>= sName;
@@ -1925,7 +1925,7 @@ void SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>(const SfxItemProperty
o_rStyleBase.GetItemSet().Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aString ) );
}
template<>
-void SwXStyle::SetPropertyValue<sal_uInt16(RES_TXTATR_CJK_RUBY)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_TXTATR_CJK_RUBY)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(MID_RUBY_CHARSTYLE != rEntry.nMemberId)
return;
@@ -1952,7 +1952,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(RES_TXTATR_CJK_RUBY)>(const SfxItemPr
SetPropertyValue<HINT_BEGIN>(rEntry, rPropSet, rValue, o_rStyleBase);
}
template<>
-void SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_DROP)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_DROP)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(MID_DROPCAP_CHAR_STYLE_NAME != rEntry.nMemberId)
{
@@ -1981,7 +1981,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_DROP)>(const SfxItemProper
rStyleSet.Put(*pDrop);
}
template<>
-void SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_NUMRULE)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_NUMRULE)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
uno::Any aValue(rValue);
lcl_TranslateMetric(rEntry, m_pDoc, aValue);
@@ -1999,10 +1999,10 @@ void SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_NUMRULE)>(const SfxItemPro
}
}
-void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& rBase)
+void SwXStyle::SetStyleProperty(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& rBase)
{
using propertytype_t = decltype(rEntry.nWID);
- using coresetter_t = std::function<void(SwXStyle&, const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any&, SwStyleBase_Impl&)>;
+ using coresetter_t = std::function<void(SwXStyle&, const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any&, SwStyleBase_Impl&)>;
static std::unique_ptr<std::map<propertytype_t, coresetter_t>> pUnoToCore;
if(!pUnoToCore)
{
@@ -2070,7 +2070,7 @@ void SwXStyle::SetPropertyValues_Impl(const uno::Sequence<OUString>& rPropertyNa
const uno::Any* pValues = rValues.getConstArray();
for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); ++nProp)
{
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(pNames[nProp]);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(pNames[nProp]);
if(!pEntry || (!m_bIsConditional && pNames[nProp] == UNO_NAME_PARA_STYLE_CONDITIONS))
throw beans::UnknownPropertyException("Unknown property: " + pNames[nProp], static_cast<cppu::OWeakObject*>(this));
if(pEntry->nFlags & beans::PropertyAttribute::READONLY)
@@ -2120,9 +2120,9 @@ void SwXStyle::PrepareStyleBase(SwStyleBase_Impl& rBase)
}
template<>
-uno::Any SwXStyle::GetStyleProperty<HINT_BEGIN>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase);
+uno::Any SwXStyle::GetStyleProperty<HINT_BEGIN>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase);
template<>
-uno::Any SwXStyle::GetStyleProperty<FN_UNO_IS_PHYSICAL>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl&)
+uno::Any SwXStyle::GetStyleProperty<FN_UNO_IS_PHYSICAL>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl&)
{
SfxStyleSheetBase* pBase(GetStyleSheetBase());
if(!pBase)
@@ -2136,7 +2136,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_IS_PHYSICAL>(const SfxItemPropertySim
return uno::makeAny<bool>(bPhys);
}
template<>
-uno::Any SwXStyle::GetStyleProperty<FN_UNO_HIDDEN>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl&)
+uno::Any SwXStyle::GetStyleProperty<FN_UNO_HIDDEN>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl&)
{
SfxStyleSheetBase* pBase(GetStyleSheetBase());
if(!pBase)
@@ -2145,7 +2145,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_HIDDEN>(const SfxItemPropertySimpleEn
return uno::makeAny(xBase->IsHidden());
}
template<>
-uno::Any SwXStyle::GetStyleProperty<FN_UNO_STYLE_INTEROP_GRAB_BAG>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl&)
+uno::Any SwXStyle::GetStyleProperty<FN_UNO_STYLE_INTEROP_GRAB_BAG>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl&)
{
SfxStyleSheetBase* pBase(GetStyleSheetBase());
if(!pBase)
@@ -2156,7 +2156,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_STYLE_INTEROP_GRAB_BAG>(const SfxItem
return aRet;
}
template<>
-uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAPER_BIN)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAPER_BIN)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
SfxItemSet& rSet = rBase.GetItemSet();
@@ -2171,7 +2171,7 @@ uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAPER_BIN)>(const SfxItemProp
return uno::makeAny(pPrinter->GetPaperBinName(nBin));
}
template<>
-uno::Any SwXStyle::GetStyleProperty<FN_UNO_NUM_RULES>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<FN_UNO_NUM_RULES>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
const SwNumRule* pRule = rBase.getNewBase()->GetNumRule();
@@ -2180,14 +2180,14 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_NUM_RULES>(const SfxItemPropertySimpl
return uno::makeAny<uno::Reference<container::XIndexReplace>>(xRules);
}
template<>
-uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PARATR_OUTLINELEVEL)>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PARATR_OUTLINELEVEL)>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
SAL_WARN_IF(SfxStyleFamily::Para != GetFamily(), "sw.uno", "only paras");
return uno::makeAny<sal_Int16>(rBase.getNewBase()->GetCollection()->GetAttrOutlineLevel());
}
template<>
-uno::Any SwXStyle::GetStyleProperty<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
OUString aString;
@@ -2195,7 +2195,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertySi
return uno::makeAny(aString);
}
template<>
-uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAGEDESC)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAGEDESC)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
if(MID_PAGEDESC_PAGEDESCNAME != rEntry.nMemberId)
@@ -2212,7 +2212,7 @@ uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAGEDESC)>(const SfxItemPrope
return uno::makeAny(aString);
}
template<>
-uno::Any SwXStyle::GetStyleProperty<FN_UNO_IS_AUTO_UPDATE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<FN_UNO_IS_AUTO_UPDATE>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
switch(GetFamily())
@@ -2223,13 +2223,13 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_IS_AUTO_UPDATE>(const SfxItemProperty
}
}
template<>
-uno::Any SwXStyle::GetStyleProperty<FN_UNO_DISPLAY_NAME>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<FN_UNO_DISPLAY_NAME>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
return uno::makeAny(rBase.getNewBase()->GetName());
}
template<>
-uno::Any SwXStyle::GetStyleProperty<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
static_assert(COND_COMMAND_COUNT == 28, "invalid size of command count?");
@@ -2259,7 +2259,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemP
return uno::makeAny(aSeq);
}
template<>
-uno::Any SwXStyle::GetStyleProperty<FN_UNO_CATEGORY>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<FN_UNO_CATEGORY>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
static std::unique_ptr<std::map<collectionbits_t, paragraphstyle_t>> pUnoToCore;
@@ -2277,7 +2277,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_CATEGORY>(const SfxItemPropertySimple
return uno::makeAny(pUnoToCoreIt->second);
}
template<>
-uno::Any SwXStyle::GetStyleProperty<SID_SWREGISTER_COLLECTION>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<SID_SWREGISTER_COLLECTION>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
const SwPageDesc *pPageDesc = rBase.getNewBase()->GetPageDesc();
@@ -2291,7 +2291,7 @@ uno::Any SwXStyle::GetStyleProperty<SID_SWREGISTER_COLLECTION>(const SfxItemProp
return uno::makeAny(aName);
}
template<>
-uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_BACKGROUND)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_BACKGROUND)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
const SfxItemSet& rSet = rBase.GetItemSet();
@@ -2302,7 +2302,7 @@ uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_BACKGROUND)>(const SfxItemPro
return aResult;
}
template<>
-uno::Any SwXStyle::GetStyleProperty<OWN_ATTR_FILLBMP_MODE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<OWN_ATTR_FILLBMP_MODE>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
const SfxItemSet& rSet = rBase.GetItemSet();
@@ -2313,7 +2313,7 @@ uno::Any SwXStyle::GetStyleProperty<OWN_ATTR_FILLBMP_MODE>(const SfxItemProperty
return uno::makeAny(drawing::BitmapMode_NO_REPEAT);
}
template<>
-uno::Any SwXStyle::GetStyleProperty<HINT_BEGIN>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<HINT_BEGIN>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
SfxItemSet& rSet = rBase.GetItemSet();
@@ -2339,10 +2339,10 @@ uno::Any SwXStyle::GetStyleProperty<HINT_BEGIN>(const SfxItemPropertySimpleEntry
return aResult;
}
-uno::Any SwXStyle::GetStyleProperty_Impl(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty_Impl(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
{
using propertytype_t = decltype(rEntry.nWID);
- using coresetter_t = std::function<uno::Any(SwXStyle&, const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl&)>;
+ using coresetter_t = std::function<uno::Any(SwXStyle&, const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl&)>;
static std::unique_ptr<std::map<propertytype_t, coresetter_t>> pUnoToCore;
if(!pUnoToCore)
{
@@ -2374,7 +2374,7 @@ uno::Any SwXStyle::GetStyleProperty_Impl(const SfxItemPropertySimpleEntry& rEntr
uno::Any SwXStyle::GetPropertyValue_Impl(const SfxItemPropertySet* pPropSet, SwStyleBase_Impl& rBase, const OUString& rPropertyName)
{
const SfxItemPropertyMap& rMap = pPropSet->getPropertyMap();
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(rPropertyName);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(rPropertyName);
if(!pEntry || (!m_bIsConditional && rPropertyName == UNO_NAME_PARA_STYLE_CONDITIONS))
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast<cppu::OWeakObject*>(this));
if(m_pBasePool)
@@ -2514,7 +2514,7 @@ uno::Sequence<beans::PropertyState> SwXStyle::getPropertyStates(const uno::Seque
for(sal_Int32 i = 0; i < rPropertyNames.getLength(); ++i)
{
const OUString sPropName = pNames[i];
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(sPropName);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(sPropName);
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + sPropName, static_cast<cppu::OWeakObject*>(this));
@@ -2629,7 +2629,7 @@ void SAL_CALL SwXStyle::setPropertiesToDefault(const uno::Sequence<OUString>& aP
const SfxItemPropertyMap &rMap = pPropSet->getPropertyMap();
for(const auto& rName : aPropertyNames)
{
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(rName);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(rName);
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rName, static_cast<cppu::OWeakObject*>(this));
if(pEntry->nWID == FN_UNO_FOLLOW_STYLE || pEntry->nWID == FN_UNO_NUM_RULES)
@@ -2748,7 +2748,7 @@ uno::Sequence<uno::Any> SAL_CALL SwXStyle::getPropertyDefaults(const uno::Sequen
const SfxItemSet &rSet = xStyle->GetItemSet(), *pParentSet = rSet.GetParent();
for(sal_Int32 i = 0; i < nCount; ++i)
{
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(aPropertyNames[i]);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(aPropertyNames[i]);
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + aPropertyNames[i], static_cast < cppu::OWeakObject * >(this));
@@ -2812,7 +2812,7 @@ SwXPageStyle::SwXPageStyle(SwDocShell* pDocSh)
: SwXStyle(pDocSh->GetDoc(), SfxStyleFamily::Page)
{ }
-void SwXStyle::PutItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rVal, SwStyleBase_Impl& rBaseImpl)
+void SwXStyle::PutItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySet& rPropSet, const SfxItemPropertyMapEntry& rEntry, const uno::Any& rVal, SwStyleBase_Impl& rBaseImpl)
{
// create a new SvxSetItem and get it's ItemSet as new target
const std::unique_ptr<SvxSetItem> pNewSetItem(pSetItem->Clone());
@@ -2862,7 +2862,7 @@ void SwXPageStyle::SetPropertyValues_Impl(const uno::Sequence<OUString>& rProper
for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); ++nProp)
{
const OUString& rPropName = rPropertyNames[nProp];
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(rPropName);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(rPropName);
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropName, static_cast<cppu::OWeakObject*>(this));
@@ -3103,7 +3103,7 @@ uno::Sequence<uno::Any> SwXPageStyle::GetPropertyValues_Impl(const uno::Sequence
for(sal_Int32 nProp = 0; nProp < nLength; ++nProp)
{
const OUString& rPropName = rPropertyNames[nProp];
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(rPropName);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(rPropName);
if (!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -3595,7 +3595,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
{
const OUString& rPropName = rValue.Name;
uno::Any aValue(rValue.Value);
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(rPropName);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(rPropName);
if (!pEntry)
{
@@ -3982,7 +3982,7 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl(
for( sal_Int32 i = 0; i < nLen; ++i )
{
const OUString sPropName = pNames[i];
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(sPropName);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(sPropName);
if(!pEntry)
{
throw beans::UnknownPropertyException("Unknown property: " + sPropName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -4179,7 +4179,7 @@ uno::Sequence< beans::PropertyState > SwXAutoStyle::getPropertyStates(
for(sal_Int32 i = 0; i < rPropertyNames.getLength(); i++)
{
const OUString sPropName = pNames[i];
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(sPropName);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(sPropName);
if(!pEntry)
{
throw beans::UnknownPropertyException("Unknown property: " + sPropName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -4278,13 +4278,13 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties()
// TODO: Optimize - and fix! the old iteration filled each WhichId
// only once but there are more properties than WhichIds
- for( const auto& rPair : rMap.getPropertyEntries() )
+ for( const auto pEntry : rMap.getPropertyEntries() )
{
- if ( rPair.second.nWID == nWID )
+ if ( pEntry->nWID == nWID )
{
beans::PropertyValue aPropertyValue;
- aPropertyValue.Name = rPair.first;
- pItem->QueryValue( aPropertyValue.Value, rPair.second.nMemberId );
+ aPropertyValue.Name = pEntry->aName;
+ pItem->QueryValue( aPropertyValue.Value, pEntry->nMemberId );
aPropertyVector.push_back( aPropertyValue );
}
}
@@ -4861,7 +4861,7 @@ css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL SwXTextCellStyle::get
void SAL_CALL SwXTextCellStyle::setPropertyValue(const OUString& rPropertyName, const css::uno::Any& aValue)
{
SolarMutexGuard aGuard;
- const SfxItemPropertySimpleEntry *const pEntry = aSwMapProvider.GetPropertySet(PROPERTY_MAP_CELL_STYLE)->getPropertyMap().getByName(rPropertyName);
+ const SfxItemPropertyMapEntry *const pEntry = aSwMapProvider.GetPropertySet(PROPERTY_MAP_CELL_STYLE)->getPropertyMap().getByName(rPropertyName);
if(pEntry)
{
switch(pEntry->nWID)
@@ -5051,7 +5051,7 @@ css::uno::Any SAL_CALL SwXTextCellStyle::getPropertyValue(const OUString& rPrope
{
SolarMutexGuard aGuard;
uno::Any aRet;
- const SfxItemPropertySimpleEntry *const pEntry = aSwMapProvider.GetPropertySet(PROPERTY_MAP_CELL_STYLE)->getPropertyMap().getByName(rPropertyName);
+ const SfxItemPropertyMapEntry *const pEntry = aSwMapProvider.GetPropertySet(PROPERTY_MAP_CELL_STYLE)->getPropertyMap().getByName(rPropertyName);
if(pEntry)
{
switch(pEntry->nWID)
@@ -5251,7 +5251,7 @@ css::uno::Sequence<css::beans::PropertyState> SAL_CALL SwXTextCellStyle::getProp
for(sal_Int32 i=0; i < aPropertyNames.getLength(); ++i)
{
const OUString sPropName = pNames[i];
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(sPropName);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(sPropName);
if(pEntry)
{
uno::Any aAny1, aAny2;
@@ -5395,7 +5395,7 @@ void SAL_CALL SwXTextCellStyle::setPropertyToDefault(const OUString& rPropertyNa
SolarMutexGuard aGuard;
const SwBoxAutoFormat& rDefaultBoxFormat = SwTableAutoFormat::GetDefaultBoxFormat();
const SfxItemPropertyMap& rMap = aSwMapProvider.GetPropertySet(PROPERTY_MAP_CELL_STYLE)->getPropertyMap();
- const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(rPropertyName);
+ const SfxItemPropertyMapEntry* pEntry = rMap.getByName(rPropertyName);
if(!pEntry)
return;
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index e78d66974702..757ca7e54ead 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -184,7 +184,7 @@ static bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSv
/// @throws lang::IllegalArgumentException
/// @throws uno::RuntimeException
static void lcl_SetSpecialProperty(SwFrameFormat* pFormat,
- const SfxItemPropertySimpleEntry* pEntry,
+ const SfxItemPropertyMapEntry* pEntry,
const uno::Any& aValue)
{
// special treatment for "non-items"
@@ -263,7 +263,7 @@ static void lcl_SetSpecialProperty(SwFrameFormat* pFormat,
}
}
-static uno::Any lcl_GetSpecialProperty(SwFrameFormat* pFormat, const SfxItemPropertySimpleEntry* pEntry )
+static uno::Any lcl_GetSpecialProperty(SwFrameFormat* pFormat, const SfxItemPropertyMapEntry* pEntry )
{
switch(pEntry->nWID)
{
@@ -1292,7 +1292,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
}
else
{
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertyMapEntry* pEntry =
m_pPropSet->getPropertyMap().getByName(rPropertyName);
SwDoc* pDoc = pFormat->GetDoc();
if (!pEntry)
@@ -1351,7 +1351,7 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName)
SwTableLine* pLn = SwXTextTableRow::FindLine(pTable, pLine);
if(pLn)
{
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertyMapEntry* pEntry =
m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -2483,7 +2483,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
SwFrameFormat* pFormat = GetFrameFormat();
if(!aValue.hasValue())
throw lang::IllegalArgumentException();
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertyMapEntry* pEntry =
m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
if( !pEntry )
throw lang::IllegalArgumentException();
@@ -2737,7 +2737,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
SolarMutexGuard aGuard;
uno::Any aRet;
SwFrameFormat* pFormat = GetFrameFormat();
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertyMapEntry* pEntry =
m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
@@ -3362,7 +3362,7 @@ SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
if(!pFormat)
return;
- const SfxItemPropertySimpleEntry *const pEntry =
+ const SfxItemPropertyMapEntry *const pEntry =
m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -3480,7 +3480,7 @@ uno::Any SAL_CALL SwXCellRange::getPropertyValue(const OUString& rPropertyName)
SwFrameFormat *const pFormat = m_pImpl->GetFrameFormat();
if(pFormat)
{
- const SfxItemPropertySimpleEntry *const pEntry =
+ const SfxItemPropertyMapEntry *const pEntry =
m_pImpl->m_pPropSet->getPropertyMap().getByName(rPropertyName);
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 6542d96ca277..32cadcff761b 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1120,7 +1120,7 @@ SwXText::getPropertyValue(
throw uno::RuntimeException();
}
- SfxItemPropertySimpleEntry const*const pEntry =
+ SfxItemPropertyMapEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{