From 45bee7678319325942664d23688367c639bdf83b Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Tue, 20 Sep 2022 21:25:48 +0200 Subject: tdf#117764: fix context menu item "Conditional formatting" Respond to https://bugs.documentfoundation.org/show_bug.cgi?id=117764#c1 a) the function should be *available* on "clean" cells (removed after comment in gerrit) b) answering "No", one would not edit the existing format, *but will edit a new format instead* c) answering "Yes", one would edit the existing format Change-Id: I8c578a59084c557939a853d4746efffbaf4e56e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140266 Tested-by: Jenkins Reviewed-by: Julien Nabet --- sc/source/ui/view/cellsh1.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sc/source') diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index e0ccc37d5545..b3e03a488a6a 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2213,6 +2213,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { pCondFormat = pList->GetFormat(rCondFormats[0]); assert(pCondFormat); + nIndex = pCondFormat->GetKey(); bCondFormatDlg = true; } else @@ -2225,7 +2226,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) else { // define an overlapping conditional format - // does not need to be handled here + pCondFormat = pList->GetFormat(rCondFormats[0]); + assert(pCondFormat); + bCondFormatDlg = true; } } -- cgit