summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-01-21 21:53:06 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-01-21 21:53:06 -0500
commit3119de050ef5e3561e01badeb6307ae2538d215a (patch)
treea1bdaded4839ab94162b1934434944f8e9a13fad /sc/source/filter/xml
parent299c3c35fbead3aa6f66ee1324fe9b1cf2058f56 (diff)
Save range name to ODF 1.2 extended.
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index 1e8df61bd1bc..8ca1779250ec 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -844,8 +844,19 @@ void ScXMLExportDataPilot::WriteDataPilots(const uno::Reference <sheet::XSpreads
if ((*pDPs)[i]->IsSheetData())
{
const ScSheetSourceDesc* pSheetSource = (*pDPs)[i]->GetSheetDesc();
- rtl::OUString sCellRangeAddress;
- ScRangeStringConverter::GetStringFromRange( sCellRangeAddress, pSheetSource->GetSourceRange(), pDoc, ::formula::FormulaGrammar::CONV_OOO );
+
+ if (rExport.getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST)
+ {
+ if (pSheetSource->HasRangeName())
+ rExport.AddAttribute(
+ XML_NAMESPACE_TABLE, XML_NAME, pSheetSource->GetRangeName());
+ }
+
+ OUString sCellRangeAddress;
+ ScRangeStringConverter::GetStringFromRange(
+ sCellRangeAddress, pSheetSource->GetSourceRange(), pDoc,
+ ::formula::FormulaGrammar::CONV_OOO);
+
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_CELL_RANGE_ADDRESS, sCellRangeAddress);
SvXMLElementExport aElemSCR(rExport, XML_NAMESPACE_TABLE, XML_SOURCE_CELL_RANGE, sal_True, sal_True);
rExport.CheckAttrList();