tdf#160252 ITEM remove unnecessary cleanups of shared_ptr

Change-Id: I5654d65097bf88b70cb85937de3ce111fa7e4345
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165552
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index ac70ef4..a829730 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2919,9 +2919,6 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                    else
                        pCondFormatList.reset();

                    if (rDlgItem)
                        pTabViewShell->setScCondFormatDlgItem(nullptr);

                    pDlg->disposeOnce();
                });
            }
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index caa21c0..7904290 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -436,6 +436,8 @@ std::shared_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
                xResult = std::make_shared<ScCondFormatDlg>(pB, pCW, pParent, &rViewData, rDlgItem);

                // Remove the pool item stored by Conditional Format Manager Dialog.
                // tdf#160252 still needed *after* change to ScCondFormatDlgData due to
                // UnitTest UITest_conditional_format
                setScCondFormatDlgItem(nullptr);
            }