configure.ac | 2 +- sc/source/filter/excel/xltools.cxx | 6 +++++- sc/source/filter/inc/xltools.hxx | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-)
New commits: commit b1da09649d96dbef2a989a9b1a02054bd7c65ba5 Author: Andras Timar <andras.ti...@collabora.com> Date: Tue Nov 28 23:48:30 2017 +0100 Bump version to 5.3-32 Change-Id: Ia81627cb441158edd1e24d4cfb4b9c3f95853ec6 diff --git a/configure.ac b/configure.ac index 069cee6af162..8b8bc3bf26b9 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([Collabora Office],[5.3.10.31],[],[],[https://collaboraoffice.com/]) +AC_INIT([Collabora Office],[5.3.10.32],[],[],[https://collaboraoffice.com/]) AC_PREREQ([2.59]) commit bba57a7eb9dd118df5772068b3a70aedb3602003 Author: Aron Budea <aron.bu...@collabora.com> Date: Tue Nov 28 07:23:12 2017 +0100 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 diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx index f2e33cff9539..f8a670d3f477 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -482,8 +482,12 @@ OUString XclTools::GetBuiltInDefNameXml( sal_Unicode cBuiltIn ) sal_Unicode XclTools::GetBuiltInDefNameIndex( const OUString& rDefName ) { - sal_Int32 nPrefixLen = strlen(maDefNamePrefix); + sal_Int32 nPrefixLen = 0; if( rDefName.startsWithIgnoreAsciiCase( maDefNamePrefix ) ) + nPrefixLen = strlen(maDefNamePrefix); + else if( rDefName.startsWithIgnoreAsciiCase( maDefNamePrefixXml ) ) + nPrefixLen = strlen(maDefNamePrefixXml); + if( nPrefixLen > 0 ) { for( sal_Unicode cBuiltIn = 0; cBuiltIn < EXC_BUILTIN_UNKNOWN; ++cBuiltIn ) { diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx index 2a202c3800b4..0939cddd6947 100644 --- a/sc/source/filter/inc/xltools.hxx +++ b/sc/source/filter/inc/xltools.hxx @@ -189,8 +189,8 @@ public: static OUString GetBuiltInDefNameXml( sal_Unicode cBuiltIn ); /** Returns the Excel built-in name index of the passed defined name from Calc. @descr Ignores any characters following a valid representation of a built-in name. - @param pcBuiltIn (out-param) If not 0, the index of the built-in name will be returned here. - @return true = passed string is a built-in name; false = user-defined name. */ + @param rDefName raw English UI representation of a built-in defined name used in NAME records. + @return the index of the built-in name, or EXC_BUILTIN_UNKNOWN if it is not a built-in name. */ static sal_Unicode GetBuiltInDefNameIndex( const OUString& rDefName ); // built-in style names --------------------------------------------------- _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits