Drop code that modified type for no good reason
commit8ae857370192e0b2490d88b54751641073ccee6f
authorMike Kaganski <mike.kaganski@collabora.com>
Fri, 5 Nov 2021 12:14:11 +0000 (5 15:14 +0300)
committerMike Kaganski <mike.kaganski@collabora.com>
Mon, 8 Nov 2021 11:08:20 +0000 (8 12:08 +0100)
treeac2899bb87d112135bf4765845577f72716e7cdc
parent2ab40e9ecc9092e2227a30e43a7fc319f8632a17
Drop code that modified type for no good reason

The code was there at least since 3381981e76873304b171f7df900561dac681d2af.
Alteady there it was wrong, relying on the order of the properties in the
aGeoPropSeq: if "Type" appeared prior to "AdjustmentValues", the type name
was changed by this code; otherwise, "AdjustmentValues" was modified, and
the sequence set as xPropSet's "CustomShapeGeometry" value. Also the code
relied on the detail discussed in fb3c04bd1930eedacd406874e1a285d62bbf27d9,
and the "Type" was not updated when appeared after "AdjustmentValues" only
because of accidental use of non-const operator[] in another place.

Then in commits starting from 226ff96a88876d34f7fa30148150b6aa5a7f5a7c,
a new code for presets, including their types, was introduced before the
loop (see GetConnectorShapeType and maPresetDataMap uses). This presumably
has obsoleted this code setting "Type" completely.

This change drops this obsoleted code.
It reverts part of commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 in
oox/source/drawingml/customshapeproperties.cxx.

It is possible that we should write "ooxml-CustomShape" type in some cases
when there's no type yet - but that should be done when the conditions for
that are clear.

Another possible TODO is to move the code defining "AdjustmentValues" up,
set in in aPropertyMap before writing it into aPropSet.

Change-Id: Ib22a838ca8008b181b3eee2dabdbbc14861a0f71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124749
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
oox/source/drawingml/customshapeproperties.cxx