diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-03 21:15:48 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-03 21:28:24 +0100 |
commit | d85108355c1802c7aed1ef1d9a19f6c633c4a0f8 (patch) | |
tree | bf5547132a44ceea5623a2943fe090a8c6ec3388 /extensions | |
parent | 1459ffdffee61f3c4a552a28c5aa43facb3f4fcf (diff) |
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I27bf92770431f6a1f35e1c8224c0847555a8d43f
Reviewed-on: https://gerrit.libreoffice.org/62819
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/propctrlr/formlinkdialog.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index b9ecb6d92fc7..e52ab453d168 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -588,16 +588,11 @@ namespace pcr try { - bool bEnable = true; - // only show the button when both forms are based on the same data source - if ( bEnable ) - { - OUString sMasterDS, sDetailDS; - xMasterFormProps->getPropertyValue( PROPERTY_DATASOURCE ) >>= sMasterDS; - xDetailFormProps->getPropertyValue( PROPERTY_DATASOURCE ) >>= sDetailDS; - bEnable = ( sMasterDS == sDetailDS ); - } + OUString sMasterDS, sDetailDS; + xMasterFormProps->getPropertyValue( PROPERTY_DATASOURCE ) >>= sMasterDS; + xDetailFormProps->getPropertyValue( PROPERTY_DATASOURCE ) >>= sDetailDS; + bool bEnable = ( sMasterDS == sDetailDS ); // only show the button when the connection supports relations if ( bEnable ) |