diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-31 13:17:51 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-31 13:19:42 -0400 |
commit | fe0ef1b2f13d1c2cc8e4f777911c158390183053 (patch) | |
tree | 87f79f006be651cffe15e23e415e1a2170997869 /sc | |
parent | testInit() with overrideDataPath() is obsolete now (diff) | |
download | core-fe0ef1b2f13d1c2cc8e4f777911c158390183053.tar.gz core-fe0ef1b2f13d1c2cc8e4f777911c158390183053.zip |
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
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/XMLExportDataPilot.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index 92532d9651bc..191319cd4485 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -46,6 +46,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> @@ -608,8 +609,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()); @@ -682,7 +684,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. |