sc/source/filter/xml/XMLExportDataPilot.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 6781ee7039adc7248d887589b1369dda4dc45791 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Fri Aug 31 13:17:51 2012 -0400 Don't export the internal field name suffix '*' to ods. These '*' suffix is used internally to make duplicate field names unique. However, we were exporting the raw names (names with the '*'s) by mistake when saving to ods. We need to stop this ASAP before someone gets hurt. Change-Id: Iaff7a6343cf202f5fb9855fb7dfe59b872920e4f (cherry picked from commit fe0ef1b2f13d1c2cc8e4f777911c158390183053) Signed-off-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index 5b5622c..fe3dfcb 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -48,6 +48,7 @@ #include "dpsdbtab.hxx" #include "dpdimsave.hxx" #include "dpgroup.hxx" +#include "dputil.hxx" #include "rangeutl.hxx" #include "queryentry.hxx" #include <com/sun/star/sheet/DataImportMode.hpp> @@ -610,8 +611,9 @@ void ScXMLExportDataPilot::WriteGroupDimAttributes(const ScDPSaveGroupDimension* { if (pGroupDim) { + OUString aSrcFieldName = ScDPUtil::getSourceDimensionName(pGroupDim->GetSourceDimName()); rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_IS_GROUP_FIELD, XML_TRUE); - rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, pGroupDim->GetSourceDimName()); + rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, aSrcFieldName); if (pGroupDim->GetDatePart()) { WriteDatePart(pGroupDim->GetDatePart()); @@ -684,7 +686,8 @@ void ScXMLExportDataPilot::WriteGroupDimElements(ScDPSaveDimension* pDim, const void ScXMLExportDataPilot::WriteDimension(ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData) { - rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, rtl::OUString(pDim->GetName())); + OUString aSrcDimName = ScDPUtil::getSourceDimensionName(pDim->GetName()); + rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, aSrcDimName); if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012) { // Export display names only for ODF 1.2 extended or later. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits