Resolves: fdo#80938 fix SQL view to be editable

regression from

commit d60392fb5b387175dbd2e575848993c02c56922f
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Thu Mar 6 12:05:24 2014 +0000
    coverity#706316 help out coverity re tortured logic

Change-Id: I2ee7bd3b7421ae46878d1b565ef14dd7b0bbd10e
(cherry picked from commit 6269b62b525ec22471db56015ac2daed813ec5ff)
Reviewed-on: https://gerrit.libreoffice.org/13245
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>