[Libreoffice-commits] .: Branch 'feature/dp-named-range-source' - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Jan 21 18:53:34 PST 2011
sc/source/filter/xml/XMLExportDataPilot.cxx | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
New commits:
commit 2a8e03313c52c4c1fe793a85caf2d444149fa6c1
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Jan 21 21:53:06 2011 -0500
Save range name to ODF 1.2 extended.
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index 842d96a..9710e7f 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();
More information about the Libreoffice-commits
mailing list