dbaccess/source/ui/app/AppController.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
New commits: commit a74ef20928828d5879f136bf075e4a3e1f3f451e Author: Bogdan Buzea <buzea.bog...@libreoffice.org> AuthorDate: Mon Oct 21 08:25:34 2024 +0200 Commit: David Gilbert <freedesk...@treblig.org> CommitDate: Sun Oct 27 01:24:45 2024 +0200 tdf#163486: PVS: Identical branches V1037 Two or more case-branches perform the same actions. Check lines: 817, 830 V1037 Two or more case-branches perform the same actions. Check lines: 1251, 1254 Change-Id: I4e121ec3b0c4465f5637b114d2e91e5b639c398c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175276 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesk...@treblig.org> diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index c433f8c83f44..ed10f38e660b 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -814,6 +814,8 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const aReturn.bChecked = getContainer()->getPreviewMode() == PreviewMode::Document; break; case ID_BROWSER_UNDO: + case SID_DB_APP_SENDREPORTTOWRITER: + case SID_DB_APP_DBADMIN: aReturn.bEnabled = false; break; case SID_MAIL_SENDDOC: @@ -825,10 +827,6 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const aReturn.bEnabled = E_REPORT == eType && getContainer()->getSelectionCount() > 0 && getContainer()->isALeafSelected(); } break; - case SID_DB_APP_SENDREPORTTOWRITER: - case SID_DB_APP_DBADMIN: - aReturn.bEnabled = false; - break; case SID_DB_APP_STATUS_TYPE: aReturn.bEnabled = m_xDataSource.is(); if ( aReturn.bEnabled ) @@ -1248,8 +1246,6 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa case SID_DB_APP_QUERY_OPEN: case SID_DB_APP_FORM_OPEN: case SID_DB_APP_REPORT_OPEN: - doAction( _nId, ElementOpenMode::Normal ); - break; case SID_DB_APP_CONVERTTOVIEW: doAction( _nId, ElementOpenMode::Normal ); break;