[Libreoffice-commits] core.git: dbaccess/source reportdesign/source xmloff/source

Julien Nabet serval2412 at yahoo.fr
Sat May 17 00:38:16 PDT 2014


 dbaccess/source/filter/xml/xmlDataSourceSetting.cxx   |    1 +
 reportdesign/source/filter/xml/xmlControlProperty.cxx |    1 +
 xmloff/source/forms/propertyimport.cxx                |    5 +++++
 3 files changed, 7 insertions(+)

New commits:
commit f62de9113a4866f7152acbe0e8221c594b7a7b68
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat May 17 09:36:18 2014 +0200

    Comment why it's not a copy paste error
    
    See http://nabble.documentfoundation.org/Question-unoType-for-getXmlToken-dbaccess-reportdesign-module-td4109071.html
    Thank you Lionel!
    
    Change-Id: I999bad0d6de0327bea7ba04a6c61a497d45f53a0

diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index 5618378..6c6bacf 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -74,6 +74,7 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport
                     if (s_aTypeNameMap.empty())
                     {
                         s_aTypeNameMap[GetXMLToken( XML_BOOLEAN)]   = ::getBooleanCppuType();
+                        // Not a copy paste error, see comment xmloff/source/forms/propertyimport.cxx lines 244-248
                         s_aTypeNameMap[GetXMLToken( XML_FLOAT)]     = ::cppu::UnoType<double>::get();
                         s_aTypeNameMap[GetXMLToken( XML_DOUBLE)]    = ::cppu::UnoType<double>::get();
                         s_aTypeNameMap[GetXMLToken( XML_STRING)]    = ::cppu::UnoType<OUString>::get();
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index 5545bb2..942cf3f 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -85,6 +85,7 @@ OXMLControlProperty::OXMLControlProperty( ORptFilter& rImport
                     if (s_aTypeNameMap.empty())
                     {
                         s_aTypeNameMap[GetXMLToken( XML_BOOLEAN)]   = ::getBooleanCppuType();
+                        // Not a copy paste error, see comment xmloff/source/forms/propertyimport.cxx lines 244-248
                         s_aTypeNameMap[GetXMLToken( XML_FLOAT)]     = cppu::UnoType<double>::get();
                         s_aTypeNameMap[GetXMLToken( XML_DOUBLE)]    = cppu::UnoType<double>::get();
                         s_aTypeNameMap[GetXMLToken( XML_STRING)]    = cppu::UnoType<OUString>::get();
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index 1b47bf3..c992b6f 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -241,6 +241,11 @@ Type PropertyConversion::xmlTypeToUnoType( const OUString& _rType )
     if ( s_aTypeNameMap.empty() )
     {
         s_aTypeNameMap[ token::GetXMLToken( token::XML_BOOLEAN ) ] = ::getBooleanCppuType();
+        // Not a copy paste error, quotation from:
+        // http://nabble.documentfoundation.org/Question-unoType-for-getXmlToken-dbaccess-reportdesign-module-tp4109071p4109116.html
+        // all numeric types (including the UNO double)
+        // consistently map to XML_FLOAT, so taking the extra precision from the
+        // C++ type "float" to "double" makes absolute sense
         s_aTypeNameMap[ token::GetXMLToken( token::XML_FLOAT )   ] = ::cppu::UnoType<double>::get();
         s_aTypeNameMap[ token::GetXMLToken( token::XML_STRING )  ] = ::cppu::UnoType<OUString>::get();
         s_aTypeNameMap[ token::GetXMLToken( token::XML_VOID )    ] = ::getVoidCppuType();


More information about the Libreoffice-commits mailing list