summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx40
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx10
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx1
-rw-r--r--sc/source/ui/docshell/docfuncutil.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/docshell/tablink.cxx4
-rw-r--r--sc/source/ui/inc/docfuncutil.hxx2
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx2
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.cxx1
-rw-r--r--sc/source/ui/view/tabvwsha.cxx6
-rw-r--r--sc/source/ui/view/tabvwshc.cxx78
11 files changed, 74 insertions, 76 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 613f5711a470..e947993cacd2 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -940,7 +940,7 @@ VclPtr<AbstractScImportAsciiDlg> ScAbstractDialogFactory_Impl::CreateScImportAsc
const OUString& aDatName,
SvStream* pInStream, ScImportAsciiCall eCall)
{
- return VclPtr<AbstractScImportAsciiDlg_Impl>::Create(std::make_unique<ScImportAsciiDlg>(pParent, aDatName,pInStream, eCall));
+ return VclPtr<AbstractScImportAsciiDlg_Impl>::Create(std::make_shared<ScImportAsciiDlg>(pParent, aDatName,pInStream, eCall));
}
VclPtr<AbstractScTextImportOptionsDlg> ScAbstractDialogFactory_Impl::CreateScTextImportOptionsDlg(weld::Window* pParent)
@@ -969,7 +969,7 @@ VclPtr<AbstractScSortWarningDlg> ScAbstractDialogFactory_Impl::CreateScSortWarni
VclPtr<AbstractScCondFormatManagerDlg> ScAbstractDialogFactory_Impl::CreateScCondFormatMgrDlg(weld::Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList )
{
- return VclPtr<AbstractScCondFormatManagerDlg_Impl>::Create(std::make_unique<ScCondFormatManagerDlg>(pParent, pDoc, pFormatList));
+ return VclPtr<AbstractScCondFormatManagerDlg_Impl>::Create(std::make_shared<ScCondFormatManagerDlg>(pParent, pDoc, pFormatList));
}
VclPtr<AbstractScDataPilotDatabaseDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg(weld::Window* pParent)
@@ -1132,7 +1132,7 @@ VclPtr<AbstractScNewScenarioDlg> ScAbstractDialogFactory_Impl::CreateScNewScenar
VclPtr<AbstractScShowTabDlg> ScAbstractDialogFactory_Impl::CreateScShowTabDlg(weld::Window* pParent)
{
- return VclPtr<AbstractScShowTabDlg_Impl>::Create(new ScShowTabDlg(pParent));
+ return VclPtr<AbstractScShowTabDlg_Impl>::Create(std::make_shared<ScShowTabDlg>(pParent));
}
VclPtr<AbstractScStringInputDlg> ScAbstractDialogFactory_Impl::CreateScStringInputDlg(weld::Window* pParent,
@@ -1164,7 +1164,7 @@ VclPtr<AbstractScImportOptionsDlg> ScAbstractDialogFactory_Impl::CreateScImportO
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_unique<ScAttrDlg>(pParent, pCellAttrs));
+ return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScAttrDlg>(pParent, pCellAttrs));
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScHFEditDlg( weld::Window* pParent,
@@ -1172,42 +1172,42 @@ VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScHFEditDlg( we
const OUString& rPageStyle,
sal_uInt16 nResId )
{
- std::unique_ptr<SfxTabDialogController> xDlg;
+ std::shared_ptr<SfxTabDialogController> xDlg;
switch (nResId)
{
case RID_SCDLG_HFED_HEADER:
case RID_SCDLG_HFEDIT_HEADER:
- xDlg = std::make_unique<ScHFEditHeaderDlg>(pParent, rCoreSet, rPageStyle);
+ xDlg = std::make_shared<ScHFEditHeaderDlg>(pParent, rCoreSet, rPageStyle);
break;
case RID_SCDLG_HFED_FOOTER:
case RID_SCDLG_HFEDIT_FOOTER:
- xDlg = std::make_unique<ScHFEditFooterDlg>(pParent, rCoreSet, rPageStyle);
+ xDlg = std::make_shared<ScHFEditFooterDlg>(pParent, rCoreSet, rPageStyle);
break;
case RID_SCDLG_HFEDIT_LEFTHEADER:
- xDlg = std::make_unique<ScHFEditLeftHeaderDlg>(pParent, rCoreSet, rPageStyle);
+ xDlg = std::make_shared<ScHFEditLeftHeaderDlg>(pParent, rCoreSet, rPageStyle);
break;
case RID_SCDLG_HFEDIT_RIGHTHEADER:
- xDlg = std::make_unique<ScHFEditRightHeaderDlg>(pParent, rCoreSet, rPageStyle);
+ xDlg = std::make_shared<ScHFEditRightHeaderDlg>(pParent, rCoreSet, rPageStyle);
break;
case RID_SCDLG_HFEDIT_LEFTFOOTER:
- xDlg = std::make_unique<ScHFEditLeftFooterDlg>(pParent, rCoreSet, rPageStyle);
+ xDlg = std::make_shared<ScHFEditLeftFooterDlg>(pParent, rCoreSet, rPageStyle);
break;
case RID_SCDLG_HFEDIT_RIGHTFOOTER:
- xDlg = std::make_unique<ScHFEditRightFooterDlg>(pParent, rCoreSet, rPageStyle);
+ xDlg = std::make_shared<ScHFEditRightFooterDlg>(pParent, rCoreSet, rPageStyle);
break;
case RID_SCDLG_HFEDIT_SHDR:
- xDlg = std::make_unique<ScHFEditSharedHeaderDlg>(pParent, rCoreSet, rPageStyle);
+ xDlg = std::make_shared<ScHFEditSharedHeaderDlg>(pParent, rCoreSet, rPageStyle);
break;
case RID_SCDLG_HFEDIT_SFTR:
- xDlg = std::make_unique<ScHFEditSharedFooterDlg>(pParent, rCoreSet, rPageStyle);
+ xDlg = std::make_shared<ScHFEditSharedFooterDlg>(pParent, rCoreSet, rPageStyle);
break;
case RID_SCDLG_HFEDIT_ALL:
- xDlg = std::make_unique<ScHFEditAllDlg>(pParent, rCoreSet, rPageStyle);
+ xDlg = std::make_shared<ScHFEditAllDlg>(pParent, rCoreSet, rPageStyle);
break;
default:
case RID_SCDLG_HFEDIT:
- xDlg = std::make_unique<ScHFEditActiveDlg>(pParent, rCoreSet, rPageStyle);
+ xDlg = std::make_shared<ScHFEditActiveDlg>(pParent, rCoreSet, rPageStyle);
break;
}
@@ -1218,29 +1218,29 @@ VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScStyleDlg(weld
SfxStyleSheetBase& rStyleBase,
bool bPage)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_unique<ScStyleDlg>(pParent, rStyleBase, bPage));
+ return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScStyleDlg>(pParent, rStyleBase, bPage));
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScSubTotalDlg(weld::Window* pParent, const SfxItemSet* pArgSet)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_unique<ScSubTotalDlg>(pParent, pArgSet));
+ return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScSubTotalDlg>(pParent, pArgSet));
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScCharDlg(
weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, bool bDrawText)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_unique<ScCharDlg>(pParent, pAttr, pDocShell, bDrawText));
+ return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScCharDlg>(pParent, pAttr, pDocShell, bDrawText));
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScParagraphDlg(
weld::Window* pParent, const SfxItemSet* pAttr)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_unique<ScParagraphDlg>(pParent, pAttr));
+ return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScParagraphDlg>(pParent, pAttr));
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScSortDlg(weld::Window* pParent, const SfxItemSet* pArgSet)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_unique<ScSortDlg>(pParent, pArgSet));
+ return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScSortDlg>(pParent, pArgSet));
}
//------------------ Factories for TabPages--------------------
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 527a81e6e2d1..ddcdef3cadf7 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -103,7 +103,7 @@ class AbstractScImportAsciiDlg_Impl : public AbstractScImportAsciiDlg
{
std::shared_ptr<ScImportAsciiDlg> m_xDlg;
public:
- explicit AbstractScImportAsciiDlg_Impl(std::unique_ptr<ScImportAsciiDlg> p)
+ explicit AbstractScImportAsciiDlg_Impl(std::shared_ptr<ScImportAsciiDlg> p)
: m_xDlg(std::move(p))
{
}
@@ -151,7 +151,7 @@ class AbstractScCondFormatManagerDlg_Impl : public AbstractScCondFormatManagerDl
{
std::shared_ptr<ScCondFormatManagerDlg> m_xDlg;
public:
- explicit AbstractScCondFormatManagerDlg_Impl(std::unique_ptr<ScCondFormatManagerDlg> p)
+ explicit AbstractScCondFormatManagerDlg_Impl(std::shared_ptr<ScCondFormatManagerDlg> p)
: m_xDlg(std::move(p))
{
}
@@ -544,8 +544,8 @@ class AbstractScShowTabDlg_Impl : public AbstractScShowTabDlg
{
std::shared_ptr<ScShowTabDlg> m_xDlg;
public:
- explicit AbstractScShowTabDlg_Impl(ScShowTabDlg* p)
- : m_xDlg(p)
+ explicit AbstractScShowTabDlg_Impl(std::shared_ptr<ScShowTabDlg> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -633,7 +633,7 @@ class ScAbstractTabController_Impl : public SfxAbstractTabDialog
{
std::shared_ptr<SfxTabDialogController> m_xDlg;
public:
- explicit ScAbstractTabController_Impl(std::unique_ptr<SfxTabDialogController> p)
+ explicit ScAbstractTabController_Impl(std::shared_ptr<SfxTabDialogController> p)
: m_xDlg(std::move(p))
{
}
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index f892851a087c..69903842c2f0 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -46,7 +46,6 @@ using ::com::sun::star::accessibility::XAccessibleContext;
ScMenuFloatingWindow::MenuItemData::MenuItemData() :
mbEnabled(true), mbSeparator(false),
- mpAction(static_cast<ScCheckListMenuWindow::Action*>(nullptr)),
mpSubMenuWin(static_cast<ScMenuFloatingWindow*>(nullptr))
{
}
diff --git a/sc/source/ui/docshell/docfuncutil.cxx b/sc/source/ui/docshell/docfuncutil.cxx
index 1b780db420a3..d65d5b696b7a 100644
--- a/sc/source/ui/docshell/docfuncutil.cxx
+++ b/sc/source/ui/docshell/docfuncutil.cxx
@@ -89,10 +89,10 @@ void DocFuncUtil::addDeleteContentsUndo(
pUndoMgr->AddUndoAction(std::move(pUndo));
}
-std::unique_ptr<ScSimpleUndo::DataSpansType> DocFuncUtil::getNonEmptyCellSpans(
+std::shared_ptr<ScSimpleUndo::DataSpansType> DocFuncUtil::getNonEmptyCellSpans(
const ScDocument& rDoc, const ScMarkData& rMark, const ScRange& rRange )
{
- std::unique_ptr<ScSimpleUndo::DataSpansType> pDataSpans(new ScSimpleUndo::DataSpansType);
+ auto pDataSpans = std::make_shared<ScSimpleUndo::DataSpansType>();
for (const SCTAB nTab : rMark)
{
SCCOL nCol1 = rRange.aStart.Col(), nCol2 = rRange.aEnd.Col();
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index be9ac2921f40..226fad060971 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -748,7 +748,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScDocumentLoader::RemoveAppPrefix( aFilterName );
std::shared_ptr<const SfxFilter> pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( aFilterName );
- std::unique_ptr<SfxItemSet> pSet(new SfxAllItemSet( pApp->GetPool() ));
+ auto pSet = std::make_shared<SfxAllItemSet>( pApp->GetPool() );
if (!aOptions.isEmpty())
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
if ( nVersion != 0 )
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 9ef612caa161..51d0095161e0 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -185,7 +185,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter,
aOptions = *pNewOptions;
// always create ItemSet, so that DocShell can set the options
- std::unique_ptr<SfxItemSet> pSet(new SfxAllItemSet( SfxGetpApp()->GetPool() ));
+ auto pSet = std::make_shared<SfxAllItemSet>( SfxGetpApp()->GetPool() );
if (!aOptions.isEmpty())
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
@@ -494,7 +494,7 @@ SfxMedium* ScDocumentLoader::CreateMedium( const OUString& rFileName, std::share
const OUString& rOptions, weld::Window* pInteractionParent )
{
// Always create SfxItemSet so ScDocShell can set options.
- std::unique_ptr<SfxItemSet> pSet(new SfxAllItemSet( SfxGetpApp()->GetPool() ));
+ auto pSet = std::make_shared<SfxAllItemSet>( SfxGetpApp()->GetPool() );
if ( !rOptions.isEmpty() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, rOptions ) );
diff --git a/sc/source/ui/inc/docfuncutil.hxx b/sc/source/ui/inc/docfuncutil.hxx
index bfb4275b576d..8d3cec00173b 100644
--- a/sc/source/ui/inc/docfuncutil.hxx
+++ b/sc/source/ui/inc/docfuncutil.hxx
@@ -34,7 +34,7 @@ public:
const std::shared_ptr<ScSimpleUndo::DataSpansType>& pSpans,
bool bMulti, bool bDrawUndo );
- static std::unique_ptr<ScSimpleUndo::DataSpansType> getNonEmptyCellSpans(
+ static std::shared_ptr<ScSimpleUndo::DataSpansType> getNonEmptyCellSpans(
const ScDocument& rDoc, const ScMarkData& rMark, const ScRange& rRange );
};
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 210cf689d2c1..7193f75ceb45 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -327,7 +327,7 @@ public:
static ScTabViewShell* GetActiveViewShell();
- std::unique_ptr<SfxModelessDialogController> CreateRefDialogController(SfxBindings* pB, SfxChildWindow* pCW,
+ std::shared_ptr<SfxModelessDialogController> CreateRefDialogController(SfxBindings* pB, SfxChildWindow* pCW,
const SfxChildWinInfo* pInfo,
weld::Window* pParent, sal_uInt16 nSlotId);
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx
index d5bf831e3b83..6c836bb822be 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.cxx
+++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx
@@ -30,7 +30,6 @@ ScRetypePassDlg::ScRetypePassDlg(weld::Window* pParent)
, maTextNotPassProtected(ScResId(STR_NOT_PASS_PROTECTED))
, maTextHashBad(ScResId(STR_HASH_BAD))
, maTextHashGood(ScResId(STR_HASH_GOOD))
- , mpDocItem(static_cast<ScDocProtection*>(nullptr))
, meDesiredHash(PASSHASH_SHA1)
, mxBtnOk(m_xBuilder->weld_button("ok"))
, mxTextDocStatus(m_xBuilder->weld_label("docStatusLabel"))
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 9ec10e64cbf5..10646daef993 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -476,7 +476,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName
const ScPatternAttr* pOldAttrs = GetSelectionPattern();
auto pOldSet = std::make_shared<SfxItemSet>(pOldAttrs->GetItemSet());
- std::shared_ptr<SvxNumberInfoItem> pNumberInfoItem;
+ std::unique_ptr<SvxNumberInfoItem> pNumberInfoItem;
pOldSet->MergeRange(XATTR_FILLSTYLE, XATTR_FILLCOLOR);
@@ -505,8 +505,8 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName
//Fix border incorrect for RTL fdo#62399
if( pDoc->IsLayoutRTL( GetViewData().GetTabNo() ) )
{
- std::shared_ptr<SvxBoxItem> aNewFrame(aLineOuter->Clone());
- std::shared_ptr<SvxBoxInfoItem> aTempInfo(aLineInner->Clone());
+ std::unique_ptr<SvxBoxItem> aNewFrame(aLineOuter->Clone());
+ std::unique_ptr<SvxBoxInfoItem> aTempInfo(aLineInner->Clone());
if ( aLineInner->IsValid(SvxBoxInfoItemValidFlags::LEFT) )
aNewFrame->SetLine( aLineOuter->GetLeft(), SvxBoxItemLine::RIGHT );
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index b8fb79fcd69e..918437db53cc 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -107,7 +107,7 @@ void ScTabViewShell::SwitchBetweenRefDialogs(SfxModelessDialogController* pDialo
}
}
-std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogController(
+std::shared_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogController(
SfxBindings* pB, SfxChildWindow* pCW,
const SfxChildWinInfo* pInfo,
weld::Window* pParent, sal_uInt16 nSlotId)
@@ -127,7 +127,7 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
return nullptr;
}
- std::unique_ptr<SfxModelessDialogController> xResult;
+ std::shared_ptr<SfxModelessDialogController> xResult;
if(pCW)
pCW->SetHideNotDelete(true);
@@ -137,43 +137,43 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
switch( nSlotId )
{
case SID_CORRELATION_DIALOG:
- xResult.reset(new ScCorrelationDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScCorrelationDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_SAMPLING_DIALOG:
- xResult.reset(new ScSamplingDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScSamplingDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_DESCRIPTIVE_STATISTICS_DIALOG:
- xResult.reset(new ScDescriptiveStatisticsDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScDescriptiveStatisticsDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_ANALYSIS_OF_VARIANCE_DIALOG:
- xResult.reset(new ScAnalysisOfVarianceDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScAnalysisOfVarianceDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_COVARIANCE_DIALOG:
- xResult.reset(new ScCovarianceDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScCovarianceDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_EXPONENTIAL_SMOOTHING_DIALOG:
- xResult.reset(new ScExponentialSmoothingDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScExponentialSmoothingDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_MOVING_AVERAGE_DIALOG:
- xResult.reset(new ScMovingAverageDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScMovingAverageDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_REGRESSION_DIALOG:
- xResult.reset(new ScRegressionDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScRegressionDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_FTEST_DIALOG:
- xResult.reset(new ScFTestDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScFTestDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_TTEST_DIALOG:
- xResult.reset(new ScTTestDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScTTestDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_ZTEST_DIALOG:
- xResult.reset(new ScZTestDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScZTestDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_CHI_SQUARE_TEST_DIALOG:
- xResult.reset(new ScChiSquareTestDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScChiSquareTestDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_FOURIER_ANALYSIS_DIALOG:
- xResult.reset(new ScFourierAnalysisDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScFourierAnalysisDialog>(pB, pCW, pParent, &GetViewData());
break;
case WID_SIMPLE_REF:
{
@@ -181,24 +181,24 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
ScViewData& rViewData = GetViewData();
rViewData.SetRefTabNo( rViewData.GetTabNo() );
- xResult.reset(new ScSimpleRefDlg(pB, pCW, pParent));
+ xResult = std::make_shared<ScSimpleRefDlg>(pB, pCW, pParent);
break;
}
case FID_DEFINE_NAME:
{
if (!mbInSwitch)
{
- xResult.reset(new ScNameDlg(pB, pCW, pParent, &GetViewData(),
+ xResult = std::make_shared<ScNameDlg>(pB, pCW, pParent, &GetViewData(),
ScAddress( GetViewData().GetCurX(),
GetViewData().GetCurY(),
- GetViewData().GetTabNo() ) ));
+ GetViewData().GetTabNo() ) );
}
else
{
- xResult.reset(new ScNameDlg( pB, pCW, pParent, &GetViewData(),
+ xResult = std::make_shared<ScNameDlg>( pB, pCW, pParent, &GetViewData(),
ScAddress( GetViewData().GetCurX(),
GetViewData().GetCurY(),
- GetViewData().GetTabNo() ), &m_RangeMap));
+ GetViewData().GetTabNo() ), &m_RangeMap);
static_cast<ScNameDlg*>(xResult.get())->SetEntry(maName, maScope);
mbInSwitch = false;
}
@@ -210,10 +210,10 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
{
std::map<OUString, ScRangeName*> aRangeMap;
pDoc->GetRangeNameMap(aRangeMap);
- xResult.reset(new ScNameDefDlg(pB, pCW, pParent, &GetViewData(), aRangeMap,
+ xResult = std::make_shared<ScNameDefDlg>(pB, pCW, pParent, &GetViewData(), aRangeMap,
ScAddress(GetViewData().GetCurX(),
GetViewData().GetCurY(),
- GetViewData().GetTabNo()), true));
+ GetViewData().GetTabNo()), true);
}
else
{
@@ -222,15 +222,15 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
{
aRangeMap.insert(std::pair<OUString, ScRangeName*>(itr.first, itr.second.get()));
}
- xResult.reset(new ScNameDefDlg(pB, pCW, pParent, &GetViewData(), aRangeMap,
+ xResult = std::make_shared<ScNameDefDlg>(pB, pCW, pParent, &GetViewData(), aRangeMap,
ScAddress(GetViewData().GetCurX(),
GetViewData().GetCurY(),
- GetViewData().GetTabNo()), false));
+ GetViewData().GetTabNo()), false);
}
break;
}
case SID_RANDOM_NUMBER_GENERATOR_DIALOG:
- xResult.reset(new ScRandomNumberGeneratorDialog(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScRandomNumberGeneratorDialog>(pB, pCW, pParent, &GetViewData());
break;
case SID_DEFINE_DBNAME:
{
@@ -240,14 +240,14 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
MarkDataArea( false );
- xResult.reset(new ScDbNameDlg(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScDbNameDlg>(pB, pCW, pParent, &GetViewData());
break;
}
case SID_OPENDLG_EDIT_PRINTAREA:
- xResult.reset(new ScPrintAreasDlg(pB, pCW, pParent));
+ xResult = std::make_shared<ScPrintAreasDlg>(pB, pCW, pParent);
break;
case SID_DEFINE_COLROWNAMERANGES:
- xResult.reset(new ScColRowNameRangesDlg(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScColRowNameRangesDlg>(pB, pCW, pParent, &GetViewData());
break;
case SID_OPENDLG_SOLVE:
{
@@ -255,7 +255,7 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
ScAddress aCurPos( rViewData.GetCurX(),
rViewData.GetCurY(),
rViewData.GetTabNo());
- xResult.reset(new ScSolverDlg(pB, pCW, pParent, rViewData.GetDocument(), aCurPos));
+ xResult = std::make_shared<ScSolverDlg>(pB, pCW, pParent, rViewData.GetDocument(), aCurPos);
break;
}
case SID_OPENDLG_TABOP:
@@ -265,7 +265,7 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
rViewData.GetCurY(),
rViewData.GetTabNo());
- xResult.reset(new ScTabOpDlg(pB, pCW, pParent, rViewData.GetDocument(), aCurPos));
+ xResult = std::make_shared<ScTabOpDlg>(pB, pCW, pParent, rViewData.GetDocument(), aCurPos);
break;
}
case SID_OPENDLG_CONSOLIDATE:
@@ -302,7 +302,7 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
{
aArgSet.Put( ScConsolidateItem( SCITEM_CONSOLIDATEDATA, pDlgData ) );
}
- xResult.reset(new ScConsolidateDlg(pB, pCW, pParent, aArgSet));
+ xResult = std::make_shared<ScConsolidateDlg>(pB, pCW, pParent, aArgSet);
break;
}
case SID_FILTER:
@@ -328,7 +328,7 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
// mark current sheet (due to RefInput in dialog)
GetViewData().SetRefTabNo( GetViewData().GetTabNo() );
- xResult.reset(new ScFilterDlg(pB, pCW, pParent, aArgSet));
+ xResult = std::make_shared<ScFilterDlg>(pB, pCW, pParent, aArgSet);
break;
}
case SID_SPECIAL_FILTER:
@@ -356,25 +356,25 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
// mark current sheet (due to RefInput in dialog)
GetViewData().SetRefTabNo( GetViewData().GetTabNo() );
- xResult.reset(new ScSpecialFilterDlg(pB, pCW, pParent, aArgSet));
+ xResult = std::make_shared<ScSpecialFilterDlg>(pB, pCW, pParent, aArgSet);
break;
}
case SID_OPENDLG_OPTSOLVER:
{
ScViewData& rViewData = GetViewData();
ScAddress aCurPos( rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo());
- xResult.reset(new ScOptSolverDlg(pB, pCW, pParent, rViewData.GetDocShell(), aCurPos));
+ xResult = std::make_shared<ScOptSolverDlg>(pB, pCW, pParent, rViewData.GetDocShell(), aCurPos);
break;
}
case FID_CHG_SHOW:
{
// dialog checks, what is in the cell
- xResult.reset(new ScHighlightChgDlg(pB, pCW, pParent, &GetViewData()));
+ xResult = std::make_shared<ScHighlightChgDlg>(pB, pCW, pParent, &GetViewData());
break;
}
case SID_MANAGE_XML_SOURCE:
{
- xResult.reset(new ScXMLSourceDlg(pB, pCW, pParent, pDoc));
+ xResult = std::make_shared<ScXMLSourceDlg>(pB, pCW, pParent, pDoc);
break;
}
case SID_OPENDLG_PIVOTTABLE:
@@ -387,7 +387,7 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
ScViewData& rViewData = GetViewData();
rViewData.SetRefTabNo( rViewData.GetTabNo() );
ScDPObject* pObj = pDoc->GetDPAtCursor(rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo());
- xResult.reset(new ScPivotLayoutDialog(pB, pCW, pParent, &rViewData, pDialogDPObject.get(), pObj == nullptr));
+ xResult = std::make_shared<ScPivotLayoutDialog>(pB, pCW, pParent, &rViewData, pDialogDPObject.get(), pObj == nullptr);
}
break;
@@ -395,7 +395,7 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
case SID_OPENDLG_FUNCTION:
{
// dialog checks, what is in the cell
- xResult.reset(new ScFormulaDlg(pB, pCW, pParent, &GetViewData(),ScGlobal::GetStarCalcFunctionMgr()));
+ xResult = std::make_shared<ScFormulaDlg>(pB, pCW, pParent, &GetViewData(),ScGlobal::GetStarCalcFunctionMgr());
break;
}
case WID_CONDFRMT_REF:
@@ -414,7 +414,7 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
ScViewData& rViewData = GetViewData();
rViewData.SetRefTabNo( rViewData.GetTabNo() );
- xResult.reset(new ScCondFormatDlg(pB, pCW, pParent, &rViewData, pDlgItem));
+ xResult = std::make_shared<ScCondFormatDlg>(pB, pCW, pParent, &rViewData, pDlgItem);
// Remove the pool item stored by Conditional Format Manager Dialog.
GetPool().Remove(*pDlgItem);