[Libreoffice-commits] core.git: editeng/source

Eike Rathke erack at redhat.com
Fri May 5 22:38:13 UTC 2017


 editeng/source/editeng/editdoc.cxx |    4 ----
 1 file changed, 4 deletions(-)

New commits:
commit 274ecb49b70b3f01d47546e3b44317946c106042
Author: Eike Rathke <erack at redhat.com>
Date:   Sat May 6 00:37:17 2017 +0200

    ParaPortionList::SafeGetObject: remove SAL_WARN_IF, called on purpose
    
    Gazillions of warnings leading nowhere.. all calling places now should handle
    this gracefully.
    
    Change-Id: I74b6dacb5a4a5adb9af73aa1adeee2c5b2a9323a

diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 01c6cab35811..67ab2af678b9 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -824,15 +824,11 @@ sal_Int32 ParaPortionList::FindParagraph(long nYOffset) const
 
 const ParaPortion* ParaPortionList::SafeGetObject(sal_Int32 nPos) const
 {
-    SAL_WARN_IF( nPos < 0 || nPos >= (sal_Int32)maPortions.size(), "editeng",
-            "ParaPortionList::SafeGetObject - nPos out of bounds: " << nPos << " size: " << maPortions.size());
     return 0 <= nPos && nPos < (sal_Int32)maPortions.size() ? maPortions[nPos].get() : nullptr;
 }
 
 ParaPortion* ParaPortionList::SafeGetObject(sal_Int32 nPos)
 {
-    SAL_WARN_IF( nPos < 0 || nPos >= (sal_Int32)maPortions.size(), "editeng",
-            "ParaPortionList::SafeGetObject - nPos out of bounds: " << nPos << " size: " << maPortions.size());
     return 0 <= nPos && nPos < (sal_Int32)maPortions.size() ? maPortions[nPos].get() : nullptr;
 }
 


More information about the Libreoffice-commits mailing list