tdf#109240, tdf#112571: don't export dupe built-in named ranges
commitbba57a7eb9dd118df5772068b3a70aedb3602003
authorAron Budea <aron.budea@collabora.com>
Tue, 28 Nov 2017 06:23:12 +0000 (28 07:23 +0100)
committerAndras Timar <andras.timar@collabora.com>
Tue, 28 Nov 2017 21:27:17 +0000 (28 22:27 +0100)
tree227e304f63b0c7e34ce26cd6530952099a091d9e
parent394506840a6bfc8684e89292cefff7088557a915
tdf#109240, tdf#112571: don't export dupe built-in named ranges

XclTools::GetBuiltInDefNameIndex(...) only checked for prefix used in
binary Excel format, and didn't recognize OOXML built-in names, which
resulted in saving them twice in OOXML files.

Adapt to check both binary and OOXML prefixes, similarly to
XclTools::IsBuiltInStyleName(...).

Saving "bad" files after the fix will purge bad "_0", "_0_0" etc.
suffixed built-in names due to how GetBuiltInDefNameIndex(...) works.

Change-Id: I1bbe11f9c654a142a4626003df4cb0fd2a0f9c71
sc/source/filter/excel/xltools.cxx
sc/source/filter/inc/xltools.hxx