diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-24 08:43:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-24 16:04:39 +0200 |
commit | 1733b527ac07fcb0067905e7277227f086b53afb (patch) | |
tree | f88ec1d8adb133243413e4ef6857dcc993ebf17a /sd/source | |
parent | 8213923c183c95c58b8c82ab6ad5e3f1611a4202 (diff) |
cid#1451642 silence Division or modulo by zero
Change-Id: I728528ecbb69c23b63807944e4ae0beb9cb86cbb
Reviewed-on: https://gerrit.libreoffice.org/76222
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 3add9902b8c7..2b426a632380 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -701,7 +701,9 @@ DocumentSettings::_setPropertyValues(const PropertyMapEntry** ppEntries, sal_Int32 nValue = 0; if( *pValues >>= nValue ) { - Fraction aFract( pDoc->GetUIScale().GetNumerator(), nValue ); + auto nNumerator = pDoc->GetUIScale().GetNumerator(); + assert(nNumerator != 0); + Fraction aFract(nNumerator, nValue); pDoc->SetUIScale( aFract ); bOk = true; bChanged = true; |