[Libreoffice-commits] core.git: 2 commits - include/xmloff xmloff/source

Michael Stahl mstahl at redhat.com
Tue Oct 17 19:11:57 UTC 2017


 include/xmloff/xmlprhdl.hxx             |   10 +++++++---
 xmloff/source/style/EnumPropertyHdl.cxx |    2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit dc8c9d8052293055f31b56fcd5db56ce13306a65
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Oct 17 17:48:11 2017 +0200

    xmloff: document return value
    
    Change-Id: I0b2012d2134a94603d95ce5a955f03944e344561

diff --git a/include/xmloff/xmlprhdl.hxx b/include/xmloff/xmlprhdl.hxx
index 0aba91b432f4..9c9a6f79b8de 100644
--- a/include/xmloff/xmlprhdl.hxx
+++ b/include/xmloff/xmlprhdl.hxx
@@ -36,7 +36,6 @@ struct XMLPropertyState;
 */
 class XMLOFF_DLLPUBLIC XMLPropertyHandler
 {
-    // ??? const SvXMLUnitConverter& rUnitConverter         Do we need this ?
 
 public:
     // Just needed for virtual destruction
@@ -46,9 +45,14 @@ public:
         By default the Any-equal-operator is called. */
     virtual bool equals( const css::uno::Any& r1, const css::uno::Any& r2 ) const;
 
-    /// Imports the given value in cas of the given XML-data-type
+    /** Imports the given value according to the XML-data-type corresponding to
+        the derived class.
+        @retval true if the value was successfully converted to Any
+        @retval false if the value was not recognised (warning will be printed)
+     */
     virtual bool importXML( const OUString& rStrImpValue, css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const =0;
-    /// Exports the given value in case of the given XML-data-type
+    /// Exports the given value according to the XML-data-type corresponding to
+    /// the derived class.
     virtual bool exportXML( OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const =0;
 };
 
commit 99772908d741c39236f36b06e237810031b8851a
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Oct 17 17:22:18 2017 +0200

    xmloff: this should be an assert()
    
    Change-Id: Ib81fd7f72964d7152c62d1f9b90dc0cf95e952cc

diff --git a/xmloff/source/style/EnumPropertyHdl.cxx b/xmloff/source/style/EnumPropertyHdl.cxx
index c20fd050676c..d4b1ee091c4b 100644
--- a/xmloff/source/style/EnumPropertyHdl.cxx
+++ b/xmloff/source/style/EnumPropertyHdl.cxx
@@ -56,7 +56,7 @@ bool XMLEnumPropertyHdl::importXML( const OUString& rStrImpValue, Any& rValue, c
             rValue <<= (sal_Int8) nValue;
             break;
         default:
-            OSL_FAIL( "Wrong type for enum property handler!" );
+            assert(!"Wrong type for enum property handler!");
             return false;
         }
         return true;


More information about the Libreoffice-commits mailing list