diff options
-rw-r--r-- | sc/Library_sc.mk | 1 | ||||
-rw-r--r-- | sc/Library_scui.mk | 1 | ||||
-rw-r--r-- | sc/inc/scabstdlg.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh2.cxx | 22 |
6 files changed, 4 insertions, 41 deletions
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index 8304a9adf44d..d082a6bd62df 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -403,6 +403,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/dbgui/PivotLayoutTreeListLabel \ sc/source/ui/dbgui/PivotLayoutTreeList \ sc/source/ui/dbgui/sfiltdlg \ + sc/source/ui/dbgui/validate \ sc/source/ui/dialogs/searchresults \ sc/source/ui/docshell/arealink \ sc/source/ui/docshell/autostyl \ diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk index 75d6966d64b6..fa9d6ea6796e 100644 --- a/sc/Library_scui.mk +++ b/sc/Library_scui.mk @@ -74,7 +74,6 @@ $(eval $(call gb_Library_add_exception_objects,scui,\ sc/source/ui/dbgui/textimportoptions \ sc/source/ui/dbgui/tpsort \ sc/source/ui/dbgui/tpsubt \ - sc/source/ui/dbgui/validate \ sc/source/ui/docshell/tpstat \ sc/source/ui/miscdlgs/crdlg \ sc/source/ui/miscdlgs/datafdlg \ diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index d994763a3a20..52d8a62380e5 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -485,13 +485,10 @@ public: virtual SfxAbstractTabDialog * CreateScParagraphDlg(vcl::Window* pParent, const SfxItemSet* pAttr) = 0; - virtual SfxAbstractTabDialog * CreateScValidationDlg(vcl::Window* pParent, - const SfxItemSet* pArgSet, ScTabViewShell *pTabVwSh) = 0; virtual SfxAbstractTabDialog * CreateScSortDlg(vcl::Window* pParent, const SfxItemSet* pArgSet) = 0; // for tabpage virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0; - virtual GetTabPageRanges GetTabPageRangesFunc() = 0; protected: ~ScAbstractDialogFactory() {} diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index a7a2540006f1..5078aed30061 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -55,7 +55,6 @@ #include "styledlg.hxx" #include "subtdlg.hxx" #include "textdlgs.hxx" -#include "validate.hxx" #include "sortdlg.hxx" #include "textimportoptions.hxx" #include "opredlin.hxx" @@ -998,13 +997,6 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScParagraphDlg( return new ScAbstractTabDialog_Impl(pDlg); } -SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScValidationDlg(vcl::Window* pParent, - const SfxItemSet* pArgSet, ScTabViewShell *pTabVwSh) -{ - VclPtr<SfxTabDialog> pDlg = VclPtr<ScValidationDlg>::Create(pParent, pArgSet, pTabVwSh); - return new ScAbstractTabDialog_Impl(pDlg); -} - SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg(vcl::Window* pParent, const SfxItemSet* pArgSet) { VclPtr<SfxTabDialog> pDlg = VclPtr<ScSortDlg>::Create( pParent, pArgSet ); @@ -1043,9 +1035,4 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nI return nullptr; } -GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc() -{ - return ScTPValidationValue::GetRanges; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 014057e5d3d3..356f519ad01a 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -549,16 +549,11 @@ public: virtual SfxAbstractTabDialog * CreateScParagraphDlg(vcl::Window* pParent, const SfxItemSet* pAttr) override; - virtual SfxAbstractTabDialog * CreateScValidationDlg(vcl::Window* pParent, - const SfxItemSet* pArgSet, ScTabViewShell *pTabVwSh) override; - virtual SfxAbstractTabDialog * CreateScSortDlg(vcl::Window* pParent, const SfxItemSet* pArgSet) override; // For TabPage virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) override; - virtual GetTabPageRanges GetTabPageRangesFunc() override; - }; #endif diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 354ae1f02c11..240248fdc6e8 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -52,6 +52,7 @@ #include "dbnamdlg.hxx" #include "reffact.hxx" #include "validat.hxx" +#include "validate.hxx" #include "scresid.hxx" #include "scui_def.hxx" @@ -201,15 +202,6 @@ static bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam ) return bSort; } -//after end execute from !IsModalInputMode, it is safer to delay deleting -namespace -{ - void DelayDeleteAbstractDialog( void *pAbstractDialog, void * /*pArg*/ ) - { - delete static_cast<SfxAbstractTabDialog*>( pAbstractDialog ); - } -} - void ScCellShell::ExecuteDB( SfxRequest& rReq ) { ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); @@ -798,11 +790,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) } else { - ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - ::GetTabPageRanges ScTPValidationValueGetRanges = pFact->GetTabPageRangesFunc(); - OSL_ENSURE(ScTPValidationValueGetRanges, "TabPage create fail!"); - SfxItemSet aArgSet( GetPool(), (*ScTPValidationValueGetRanges)() ); + SfxItemSet aArgSet( GetPool(), ScTPValidationValue::GetRanges() ); ScValidationMode eMode = SC_VALID_ANY; ScConditionMode eOper = SC_COND_EQUAL; OUString aExpr1, aExpr2; @@ -861,8 +849,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) } // cell range picker - SfxAbstractTabDialog* pDlg = pFact->CreateScValidationDlg(nullptr, &aArgSet, pTabViewShell); - assert(pDlg); //Dialog create fail! + auto pDlg = VclPtr<ScValidationDlg>::Create(nullptr, &aArgSet, pTabViewShell); short nResult = pDlg->Execute(); if ( nResult == RET_OK ) @@ -961,9 +948,6 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) pTabViewShell->TestHintWindow(); rReq.Done( *pOutSet ); } - //after end execute from !IsModalInputMode, it is safer to delay deleting - //delete pDlg; - Application::PostUserEvent( Link<void*,void>( pDlg, &DelayDeleteAbstractDialog ) ); } } break; |