summaryrefslogtreecommitdiff
path: root/chart2/source/view/main/PropertyMapper.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-01-04 12:54:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-04 14:41:28 +0100
commit3e9786b4dcbf342aab469940710e8a01be62d694 (patch)
tree1f7c397bd556e1ab8fef501cbf2c51849e97025c /chart2/source/view/main/PropertyMapper.cxx
parent971b029308c527737d4085559e91fa8495b93d9c (diff)
drop the OverwriteMap stuff in chart2
as a step towards setting properties directly on SdrObject Change-Id: Ia05487408eeb97598742e7ceb94834095e7dff1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view/main/PropertyMapper.cxx')
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx38
1 files changed, 2 insertions, 36 deletions
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 6d6df42303c0..6f78cad7815a 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -34,23 +34,10 @@ namespace chart
{
using namespace ::com::sun::star;
-namespace
-{
-
-void lcl_overwriteOrAppendValues(
- tPropertyNameValueMap &rMap, const tPropertyNameValueMap& rOverwriteMap )
-{
- for (auto const& elem : rOverwriteMap)
- rMap[ elem.first ] = elem.second;
-}
-
-} // anonymous namespace
-
void PropertyMapper::setMappedProperties(
SvxShape& xTarget
, const uno::Reference< beans::XPropertySet >& xSource
- , const tPropertyNameMap& rMap
- , tPropertyNameValueMap const * pOverwriteMap )
+ , const tPropertyNameMap& rMap )
{
if( !xSource.is() )
return;
@@ -58,24 +45,13 @@ void PropertyMapper::setMappedProperties(
tNameSequence aNames;
tAnySequence aValues;
getMultiPropertyLists(aNames, aValues, xSource, rMap );
- if(pOverwriteMap && (aNames.getLength() == aValues.getLength()))
- {
- tPropertyNameValueMap aNewMap;
- for( sal_Int32 nI=0; nI<aNames.getLength(); ++nI )
- aNewMap[ aNames[nI] ] = aValues[nI];
- lcl_overwriteOrAppendValues( aNewMap, *pOverwriteMap );
- aNames = comphelper::mapKeysToSequence( aNewMap );
- aValues = comphelper::mapValuesToSequence( aNewMap );
- }
-
PropertyMapper::setMultiProperties( aNames, aValues, xTarget );
}
void PropertyMapper::setMappedProperties(
const uno::Reference< beans::XPropertySet >& xTarget
, const uno::Reference< beans::XPropertySet >& xSource
- , const tPropertyNameMap& rMap
- , tPropertyNameValueMap const * pOverwriteMap )
+ , const tPropertyNameMap& rMap )
{
if( !xTarget.is() || !xSource.is() )
return;
@@ -83,16 +59,6 @@ void PropertyMapper::setMappedProperties(
tNameSequence aNames;
tAnySequence aValues;
getMultiPropertyLists(aNames, aValues, xSource, rMap );
- if(pOverwriteMap && (aNames.getLength() == aValues.getLength()))
- {
- tPropertyNameValueMap aNewMap;
- for( sal_Int32 nI=0; nI<aNames.getLength(); ++nI )
- aNewMap[ aNames[nI] ] = aValues[nI];
- lcl_overwriteOrAppendValues( aNewMap, *pOverwriteMap );
- aNames = comphelper::mapKeysToSequence( aNewMap );
- aValues = comphelper::mapValuesToSequence( aNewMap );
- }
-
PropertyMapper::setMultiProperties( aNames, aValues, xTarget );
}