Fraction: rewrite condition 'GetDenominator()==-1'

Change-Id: I483024fd0ef3e4e187a143631b2e8bd953fa3a52
Reviewed-on: https://gerrit.libreoffice.org/12240
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>