[Libreoffice-commits] core.git: Branch 'libreoffice-4-1-5' - sc/source

Eike Rathke erack at redhat.com
Mon Jan 27 19:02:38 PST 2014


 sc/source/filter/xml/xmlexprt.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 68a753b6a36560eb83ba6ebe4fe9897a8759d265
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jan 20 23:15:14 2014 +0100

    resolved fdo#70275 write correct office:string-value if text format applied
    
    Change-Id: I52e5135139fdf88abe380b6e5ae60e2afb582289
    Reviewed-on: https://gerrit.libreoffice.org/7556
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 4f97260..fe0a33b 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 :


More information about the Libreoffice-commits mailing list