[Libreoffice-commits] core.git: include/svx sd/source

Stephan Bergmann sbergman at redhat.com
Tue Aug 5 03:10:50 PDT 2014


 include/svx/xtable.hxx                      |    1 +
 sd/source/ui/unoidl/UnoDocumentSettings.cxx |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c05105151b730b5d1014475b7b89857bc486629f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Aug 5 12:10:11 2014 +0200

    Avoid undef out-of-range value -1 for XPropertyListType enum
    
    Change-Id: If2dedafe6d8517eba4dd4921d15dd2d969d181dd

diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index a658596..3b8b368 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -172,6 +172,7 @@ public:
 
 
 enum XPropertyListType {
+    UNKNOWN_XPROPERTYLISTTYPE = -1,
     XCOLOR_LIST,
     XLINE_END_LIST,
     XDASH_LIST,
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index e792db8..094c08d 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -281,7 +281,7 @@ static XPropertyListType getTypeOfName( const OUString &aName )
         if( aName.equalsAscii( aURLPropertyNames[i].pName ) )
             return aURLPropertyNames[i].t;
     }
-    return (XPropertyListType) -1;
+    return UNKNOWN_XPROPERTYLISTTYPE;
 }
 
 static OUString getNameOfType( XPropertyListType t )
@@ -306,7 +306,7 @@ uno::Sequence<beans::PropertyValue>
     for( sal_Int32 i = 0; i < aConfigProps.getLength(); i++ )
     {
         XPropertyListType t = getTypeOfName( aConfigProps[i].Name );
-        if (t < 0)
+        if (t == UNKNOWN_XPROPERTYLISTTYPE)
             aRet[nRet++] = aConfigProps[i];
         else
         {


More information about the Libreoffice-commits mailing list