summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-01-20 23:15:14 +0100
committerDavid Tardon <dtardon@redhat.com>2014-01-21 08:29:40 +0000
commit70c61a549184cf8611f7890ac31b0ba4c460cdec (patch)
treebf49ca8237798b9347e11a38696eec109f5d8703
parente1f9f700203d8a3b7f0f7b14a7816a939e98d1d5 (diff)
resolved fdo#70275 write correct office:string-value if text format applied
Change-Id: I52e5135139fdf88abe380b6e5ae60e2afb582289 Reviewed-on: https://gerrit.libreoffice.org/7555 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 4f9726011473..fe0a33bc8dd5 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2882,13 +2882,15 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
break;
case table::CellContentType_TEXT :
{
- GetCellText(aCell, aCellPos);
OUString sFormula(lcl_GetRawString(pDoc, aCellPos));
+ if (aCell.maBaseCell.isEmpty())
+ aCell.maBaseCell.assign( *pDoc, aCellPos);
+ OUString sCellString = aCell.maBaseCell.getString(pDoc);
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
- sFormula, aCell.sStringValue, true, true);
+ sCellString, sFormula, true, true);
if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
- sFormula, aCell.sStringValue, false, true, XML_NAMESPACE_CALC_EXT);
+ sCellString, sFormula, false, true, XML_NAMESPACE_CALC_EXT);
}
break;
case table::CellContentType_FORMULA :