[Libreoffice-commits] core.git: 3 commits - reportbuilder/java reportdesign/source

Lionel Elie Mamane lionel at mamane.lu
Wed Apr 24 10:28:38 PDT 2013


 reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/TableCellLayoutController.java |    5 ---
 reportdesign/source/filter/xml/xmlExport.cxx                                                     |   16 ++++++----
 2 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit 3a4534be6594c39bf785502e15f2dec22d15b312
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Apr 24 14:56:00 2013 +0200

    fdo#330191 a NULL value of float type is not NaN
    
    but it is *still* NULL.
    
    This was initially done to "fix" i#108092,
    but i#112652 comment 13 suggests this may have been fixed more cleanly.
    
    Change-Id: I2b76af2182715bc489cb89dd45d6b77d5038b506

diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/TableCellLayoutController.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/TableCellLayoutController.java
index dd07f8b..79b5be6 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/TableCellLayoutController.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/TableCellLayoutController.java
@@ -73,11 +73,6 @@ public class TableCellLayoutController extends SectionLayoutController
             {
                 FormatValueUtility.applyValueForCell(value.getValue(), attributeMap, valueType);
             }
-            else if ( "float".equals(valueType))
-            {
-                attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS,
-                    FormatValueUtility.VALUE, "NaN");
-            }
             // #i114108#: except on form elements, the only value-type that can
             // occur without an accompanying value attribute is "string"
             else if (!"string".equals(valueType))
commit 3591f5c429d8d5f0f2afc136c03b114e26ae1bb1
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Apr 24 14:47:22 2013 +0200

    janitorial
    
    Change-Id: I5b5c679c4c6d1e0b2742249f60aec213834f7501

diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 445248c..713611f 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -860,7 +860,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
                             if ( nCellType == util::NumberFormat::TEXT )
                                 aHelper.SetNumberFormatAttributes(sEmpty, sEmpty);
                             else
-                                aHelper.SetNumberFormatAttributes(nFormatKey, 0.0,sal_False);
+                                aHelper.SetNumberFormatAttributes(nFormatKey, 0.0, sal_False);
                         }
                     }
                     SvXMLElementExport aCell(*this,XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_False);
commit 1b7235573643b898602ccc31eb983c71941aa12c
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Apr 24 14:46:32 2013 +0200

    fdo#33091 recognise General format in all languages
    
    As opposed to only the current UI language
    
    Change-Id: Iaaaec78e9cbe1891c3e42f207a6da552b2a2bf7d

diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index a4e03b5..445248c 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -848,12 +848,16 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
                     if ( xFormattedField.is() )
                     {
                         sal_Int32 nFormatKey = xFormattedField->getFormatKey();
-                        if ( 0 != nFormatKey )
+                        XMLNumberFormatAttributesExportHelper aHelper(GetNumberFormatsSupplier(),*this);
+                        bool bIsStandard = false;
+                        OUString sEmpty;
+                        sal_Int16 nCellType = aHelper.GetCellType(nFormatKey,bIsStandard);
+                        // "Standard" means "no format set, value could be anything",
+                        // so don't set a format attribute in this case.
+                        // P.S.: "Standard" is called "General" in some languages
+                        if (!bIsStandard)
                         {
-                            XMLNumberFormatAttributesExportHelper aHelper(GetNumberFormatsSupplier(),*this);
-                            bool bIsStandard = false;
-                            OUString sEmpty;
-                            if ( util::NumberFormat::TEXT == aHelper.GetCellType(nFormatKey,bIsStandard) )
+                            if ( nCellType == util::NumberFormat::TEXT )
                                 aHelper.SetNumberFormatAttributes(sEmpty, sEmpty);
                             else
                                 aHelper.SetNumberFormatAttributes(nFormatKey, 0.0,sal_False);


More information about the Libreoffice-commits mailing list