diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-10-25 00:18:12 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-10-25 00:22:16 +0200 |
commit | 4607005c380f230d8a44671f91a456598dfe6081 (patch) | |
tree | 70cc16074a23953e8290f71c4b9265aa4af7403a /sc | |
parent | f7c8774b2f3423095d794e90c58ab505ef8a1706 (diff) |
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
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 9e6b151acc1d..aa1daef67f97 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 ) { |