[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Mar 7 09:10:43 PST 2011


 sc/source/ui/unoobj/nameuno.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 62e50b05cb60794dab7d9440044595d0374a7f95
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Mar 7 12:09:37 2011 -0500

    Duh!  I forgot to loop.  Silly me.
    
    This caused saving of a document to ods to cause a crash unconditionally.

diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 0632a5d..048a0b1 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -673,8 +673,9 @@ sal_Int32 SAL_CALL ScNamedRangesObj::getCount() throw(uno::RuntimeException)
         if (pNames)
         {
             ScRangeName::const_iterator itr = pNames->begin(), itrEnd = pNames->end();
-            if (lcl_UserVisibleName(*itr))
-                ++nRet;
+            for (; itr != itrEnd; ++itr)
+                if (lcl_UserVisibleName(*itr))
+                    ++nRet;
         }
     }
     return nRet;


More information about the Libreoffice-commits mailing list