sc/source/ui/view/viewdata.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 4607005c380f230d8a44671f91a456598dfe6081
Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
Date:   Sun Oct 25 00:18:12 2015 +0200

    fraction assert kills Android viewer when viewing e.g. a ods with just a 
note
    
    use SAL_WARN_IF instead - getting logged with info is more suitable for
    this - useless zoom factors won't cause other problems
    
    Change-Id: I7b8dd6551297eeff8e720ff85702f0049a4b93a2

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 9e6b151..aa1daef 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -629,8 +629,10 @@ void ScViewData::SetZoom( const Fraction& rNewX, const 
Fraction& rNewY, std::vec
         CreateTabData( tabs );
 
     // sanity check - we shouldn't need something this low / big
-    assert(rNewX > Fraction(1, 100) && rNewX < Fraction(100, 1));
-    assert(rNewY > Fraction(1, 100) && rNewY < Fraction(100, 1));
+    SAL_WARN_IF(rNewX < Fraction(1, 100) || rNewX > Fraction(100, 1), 
"sal_viewdata",
+                "fraction rNewX not sensible: " << (double) rNewX);
+    SAL_WARN_IF(rNewY < Fraction(1, 100) || rNewY > Fraction(100, 1), 
"sal_viewdata",
+                "fraction rNewY not sensible: " << (double) rNewY);
 
     if ( bAll )
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to