diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2024-11-25 19:42:55 +0530 |
---|---|---|
committer | Pranam Lashkari <lpranam@collabora.com> | 2024-12-03 16:08:04 +0100 |
commit | 36108acc124efd73a5e69f5780e8e8220cf0875c (patch) | |
tree | d83a3a6f6cf44fa175c28c7e7d4e7fedc03ff931 /sc/source/ui/view | |
parent | dcf48b9d2dab74412b024ec1a3c12a6348f0c5f1 (diff) |
Revert "sc: now conditions can be edited from easy conditional format dialog"
This reverts commit 8115c82f1f7f2621e2d99c93e1a3b2196279602a.
Change-Id: Ie3f389561ee8f734ac76b3dec352382281f91c30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177284
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177335
Tested-by: Pranam Lashkari <lpranam@collabora.com>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 13 |
2 files changed, 16 insertions, 13 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 7593b037020c..331ba8a5efca 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2933,7 +2933,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) pDlg->SetModified(); pDlg->StartExecuteAsync( - [pDlg, &rData, pTabViewShell, rDlgItem, aPos](sal_Int32 nRet) + [this, pDlg, &rData, pTabViewShell, rDlgItem, aPos](sal_Int32 nRet) { std::unique_ptr<ScConditionalFormatList> pCondFormatList = pDlg->GetConditionalFormatList(); @@ -2948,7 +2948,19 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) } else if (nRet == DLG_RET_EDIT) { - pDlg->ShowEasyConditionalDialog(true); + ScConditionalFormat* pFormat = pDlg->GetCondFormatSelected(); + sal_Int32 nIndex = pFormat ? pFormat->GetKey() : -1; + // Put the xml string parameter to initialize the + // Conditional Format Dialog. ( edit selected conditional format ) + pTabViewShell->setScCondFormatDlgItem( + std::make_shared<ScCondFormatDlgData>( + std::shared_ptr<ScConditionalFormatList>( + pCondFormatList.release()), + nIndex, true)); + + // Queue message to open Conditional Format Dialog + GetViewData().GetDispatcher().Execute(SID_OPENDLG_CONDFRMT, + SfxCallMode::ASYNCHRON); } else pCondFormatList.reset(); diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index 2e36d876bf33..6206ace72f65 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -470,22 +470,13 @@ void ScCellShell::Execute( SfxRequest& rReq ) const SfxPoolItem* pFormula; OUString formula; - if (pReqArgs->HasItem(FN_PARAM_5, &pFormula)) + if (pReqArgs->HasItem(FN_PARAM_3, &pFormula)) { formula = static_cast<const SfxStringItem*>(pFormula)->GetValue(); } - const SfxPoolItem *pFormatKey, *pEntryIndex; - sal_Int32 nFormatKey = -1, nEntryIndex = -1; - if (pReqArgs->HasItem(FN_PARAM_3, &pFormatKey) - && pReqArgs->HasItem(FN_PARAM_4, &pEntryIndex)) - { - nFormatKey = static_cast<const SfxInt32Item*>(pFormatKey)->GetValue(); - nEntryIndex = static_cast<const SfxInt32Item*>(pEntryIndex)->GetValue(); - } GetViewData().GetDocument().SetEasyConditionalFormatDialogData( - ScConditionEasyDialogData(&nFormat, bManaged, nFormatKey, nEntryIndex, - formula)); + ScConditionEasyDialogData(&nFormat, bManaged, formula)); pScMod->SetRefDialog( nId, pWindow == nullptr ); } |