summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorPranam Lashkari <lpranam@collabora.com>2024-11-25 19:47:26 +0530
committerPranam Lashkari <lpranam@collabora.com>2024-12-03 16:12:38 +0100
commitf643a98b2b60ccad63f7b4647ff6bc0141df0718 (patch)
tree008d5329631ad6ecc37be1044dbda4b60766d27d /sc/source/ui/view
parentacc8b8c49da3a0f2a1cc25e4425a56ed87edff4b (diff)
Revert "sc: manage conditional format with simpler dialog"
This reverts commit 58c3f70c514ef4ce0de5419ab7daa3bebfb96f37. Change-Id: I500a96508684547c158cdd1814540a4b24f667d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177290 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177341 Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/cellsh1.cxx12
-rw-r--r--sc/source/ui/view/cellsh3.cxx15
2 files changed, 14 insertions, 13 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 331ba8a5efca..4b94a67eed1a 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2944,7 +2944,16 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else if (nRet == DLG_RET_ADD)
{
- pDlg->ShowEasyConditionalDialog();
+ // Put the xml string parameter to initialize the
+ // Conditional Format Dialog. ( add new )
+ pTabViewShell->setScCondFormatDlgItem(
+ std::make_shared<ScCondFormatDlgData>(
+ std::shared_ptr<ScConditionalFormatList>(
+ pCondFormatList.release()),
+ -1, true));
+ // Queue message to open Conditional Format Dialog
+ GetViewData().GetDispatcher().Execute(SID_OPENDLG_CONDFRMT,
+ SfxCallMode::ASYNCHRON);
}
else if (nRet == DLG_RET_EDIT)
{
@@ -2957,7 +2966,6 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
std::shared_ptr<ScConditionalFormatList>(
pCondFormatList.release()),
nIndex, true));
-
// Queue message to open Conditional Format Dialog
GetViewData().GetDispatcher().Execute(SID_OPENDLG_CONDFRMT,
SfxCallMode::ASYNCHRON);
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 98a67f26e32a..033ecf8982cb 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -456,20 +456,13 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxPoolItem* pFormat;
if (pReqArgs->HasItem( FN_PARAM_1, &pFormat))
{
- ScConditionMode nFormat = static_cast<ScConditionMode>(
- static_cast<const SfxInt16Item*>(pFormat)->GetValue());
+ sal_Int16 nFormat = static_cast<const SfxInt16Item*>(pFormat)->GetValue();
sal_uInt16 nId = sc::ConditionalFormatEasyDialogWrapper::GetChildWindowId();
SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWindow = rViewFrame.GetChildWindow( nId );
- const SfxPoolItem* pManaged;
- bool bManaged = false;
- if (pReqArgs->HasItem(FN_PARAM_2, &pManaged))
- {
- bManaged = static_cast<const SfxBoolItem*>(pManaged)->GetValue();
- }
-
+ SfxChildWindow* pWindow = rViewFrame.GetChildWindow(nId);
GetViewData().GetDocument().SetEasyConditionalFormatDialogData(
- ScConditionEasyDialogData(&nFormat, bManaged));
+ std::make_unique<ScConditionMode>(
+ static_cast<ScConditionMode>(nFormat)));
pScMod->SetRefDialog( nId, pWindow == nullptr );
}