summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-08-31 13:17:51 -0400
committerEike Rathke <erack@redhat.com>2012-08-31 20:17:02 +0200
commit6781ee7039adc7248d887589b1369dda4dc45791 (patch)
tree6d6d5aebc58bb6b1ae2e931350a83e7fcba523a1
parent98ec92335d18bb361a63cea3e1e71a87dddded2b (diff)
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 <erack@redhat.com>
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index 5b5622c39451..fe3dfcbae96b 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.