summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/qa/unit/helper/xpath.cxx6
-rw-r--r--sc/qa/unit/helper/xpath.hxx2
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx2
-rw-r--r--sc/source/core/data/dpfilteredcache.cxx3
-rw-r--r--sc/source/core/data/dpobject.cxx2
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx502
-rw-r--r--sc/source/core/tool/interpr4.cxx2
-rw-r--r--sc/source/filter/excel/xeescher.cxx2
-rw-r--r--sc/source/filter/excel/xichart.cxx6
-rw-r--r--sc/source/filter/inc/xeescher.hxx2
-rw-r--r--sc/source/filter/xml/xmlbodyi.cxx2
-rw-r--r--sc/source/filter/xml/xmlnexpi.cxx4
-rw-r--r--sc/source/filter/xml/xmlnexpi.hxx2
-rw-r--r--sc/source/filter/xml/xmltabi.cxx2
-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
25 files changed, 344 insertions, 345 deletions
diff --git a/sc/qa/unit/helper/xpath.cxx b/sc/qa/unit/helper/xpath.cxx
index 49a3dda04cc8..99095798939d 100644
--- a/sc/qa/unit/helper/xpath.cxx
+++ b/sc/qa/unit/helper/xpath.cxx
@@ -26,19 +26,19 @@ xmlDocPtr XPathHelper::parseExport2(ScBootstrapFixture & rFixture, ScDocShell& r
return parseExport(pTempFile, xSFactory, rFile);
}
-std::shared_ptr<SvStream> XPathHelper::parseExportStream(std::shared_ptr<utl::TempFile> const & pTempFile, uno::Reference<lang::XMultiServiceFactory> const & xSFactory, const OUString& rFile)
+std::unique_ptr<SvStream> XPathHelper::parseExportStream(std::shared_ptr<utl::TempFile> const & pTempFile, uno::Reference<lang::XMultiServiceFactory> const & xSFactory, const OUString& rFile)
{
// Read the XML stream we're interested in.
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(xSFactory), pTempFile->GetURL());
uno::Reference<io::XInputStream> xInputStream(xNameAccess->getByName(rFile), uno::UNO_QUERY);
CPPUNIT_ASSERT(xInputStream.is());
- std::shared_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
+ std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
return pStream;
}
xmlDocPtr XPathHelper::parseExport(std::shared_ptr<utl::TempFile> const & pTempFile, uno::Reference<lang::XMultiServiceFactory> const & xSFactory, const OUString& rFile)
{
- std::shared_ptr<SvStream> pStream = parseExportStream(pTempFile, xSFactory, rFile);
+ std::unique_ptr<SvStream> pStream = parseExportStream(pTempFile, xSFactory, rFile);
return XmlTestTools::parseXmlStream(pStream.get());
}
diff --git a/sc/qa/unit/helper/xpath.hxx b/sc/qa/unit/helper/xpath.hxx
index 16d0fec07f25..d46e2e85da80 100644
--- a/sc/qa/unit/helper/xpath.hxx
+++ b/sc/qa/unit/helper/xpath.hxx
@@ -46,7 +46,7 @@ namespace XPathHelper
/**
* Tries to parse the specified file in the temp file zip container as a binary file.
*/
- SCQAHELPER_DLLPUBLIC std::shared_ptr<SvStream> parseExportStream(std::shared_ptr<utl::TempFile> const & pTempFile,
+ SCQAHELPER_DLLPUBLIC std::unique_ptr<SvStream> parseExportStream(std::shared_ptr<utl::TempFile> const & pTempFile,
uno::Reference<lang::XMultiServiceFactory> const & xSFactory, const OUString& rFile);
/**
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 9ebe6e00ba39..9493ede62556 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3136,7 +3136,7 @@ void ScExportTest::testCustomXml()
assertXPath(pRelsDoc, "/r:Relationships/r:Relationship", 1);
assertXPath(pRelsDoc, "/r:Relationships/r:Relationship[@Id='rId1']", "Target", "itemProps1.xml");
- std::shared_ptr<SvStream> pStream = XPathHelper::parseExportStream(pXPathFile, m_xSFactory, "ddp/ddpfile.xen");
+ std::unique_ptr<SvStream> pStream = XPathHelper::parseExportStream(pXPathFile, m_xSFactory, "ddp/ddpfile.xen");
CPPUNIT_ASSERT(pStream);
xShell->DoClose();
diff --git a/sc/source/core/data/dpfilteredcache.cxx b/sc/source/core/data/dpfilteredcache.cxx
index a95144ee5f9a..16e11c183b83 100644
--- a/sc/source/core/data/dpfilteredcache.cxx
+++ b/sc/source/core/data/dpfilteredcache.cxx
@@ -71,8 +71,7 @@ size_t ScDPFilteredCache::GroupFilter::getMatchItemCount() const
}
ScDPFilteredCache::Criterion::Criterion() :
- mnFieldIndex(-1),
- mpFilter(static_cast<FilterBase*>(nullptr))
+ mnFieldIndex(-1)
{
}
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index f23a040325fc..1821f825b59b 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -308,7 +308,6 @@ bool ScDPServiceDesc::operator== ( const ScDPServiceDesc& rOther ) const
ScDPObject::ScDPObject( ScDocument* pD ) :
pDoc( pD ),
- mpTableData(static_cast<ScDPTableData*>(nullptr)),
nHeaderRows( 0 ),
mbHeaderLayout(false),
bAllowMove(false),
@@ -322,7 +321,6 @@ ScDPObject::ScDPObject(const ScDPObject& r) :
aTableName( r.aTableName ),
aTableTag( r.aTableTag ),
aOutRange( r.aOutRange ),
- mpTableData(static_cast<ScDPTableData*>(nullptr)),
maInteropGrabBag(r.maInteropGrabBag),
nHeaderRows( r.nHeaderRows ),
mbHeaderLayout( r.mbHeaderLayout ),
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 0feb156aa5ea..d8e5ded30a7b 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -1294,7 +1294,7 @@ public:
SymbolTable() : mCurId(0) { }
template <class T>
const DynamicKernelArgument* DeclRefArg(const ScCalcConfig& config, const FormulaTreeNodeRef&,
- SlidingFunctionBase* pCodeGen, int nResultSize);
+ std::shared_ptr<SlidingFunctionBase> pCodeGen, int nResultSize);
/// Used to generate sliding window helpers
void DumpSlidingWindowFunctions( std::stringstream& ss )
{
@@ -2358,7 +2358,7 @@ public:
DynamicKernelSoPArguments( const ScCalcConfig& config,
const std::string& s, const FormulaTreeNodeRef& ft,
- SlidingFunctionBase* pCodeGen, int nResultSize );
+ std::shared_ptr<SlidingFunctionBase> pCodeGen, int nResultSize );
/// Create buffer and pass the buffer to a given kernel
virtual size_t Marshal( cl_kernel k, int argno, int nVectorWidth, cl_program pProgram ) override
@@ -2647,14 +2647,14 @@ private:
}
static DynamicKernelArgumentRef SoPHelper( const ScCalcConfig& config,
- const std::string& ts, const FormulaTreeNodeRef& ft, SlidingFunctionBase* pCodeGen,
+ const std::string& ts, const FormulaTreeNodeRef& ft, std::shared_ptr<SlidingFunctionBase> pCodeGen,
int nResultSize )
{
- return std::make_shared<DynamicKernelSoPArguments>(config, ts, ft, pCodeGen, nResultSize);
+ return std::make_shared<DynamicKernelSoPArguments>(config, ts, ft, std::move(pCodeGen), nResultSize);
}
template<class Base>
-static DynamicKernelArgument* VectorRefFactory( const ScCalcConfig& config, const std::string& s,
+static std::shared_ptr<DynamicKernelArgument> VectorRefFactory( const ScCalcConfig& config, const std::string& s,
const FormulaTreeNodeRef& ft,
std::shared_ptr<SlidingFunctionBase>& pCodeGen,
int index )
@@ -2665,8 +2665,8 @@ static DynamicKernelArgument* VectorRefFactory( const ScCalcConfig& config, cons
{
// coverity[identical_branches] - only identical if Base happens to be VectorRef
if (index == 0) // the first argument of OpSumIfs cannot be strings anyway
- return new DynamicKernelSlidingArgument<VectorRef>(config, s, ft, pCodeGen, index);
- return new DynamicKernelSlidingArgument<Base>(config, s, ft, pCodeGen, index);
+ return std::make_shared<DynamicKernelSlidingArgument<VectorRef>>(config, s, ft, pCodeGen, index);
+ return std::make_shared<DynamicKernelSlidingArgument<Base>>(config, s, ft, pCodeGen, index);
}
// AVERAGE is not supported yet
//Average has been supported by reduction kernel
@@ -2677,17 +2677,17 @@ static DynamicKernelArgument* VectorRefFactory( const ScCalcConfig& config, cons
// MUL is not supported yet
else if (dynamic_cast<OpMul*>(pCodeGen.get()))
{
- return new DynamicKernelSlidingArgument<Base>(config, s, ft, pCodeGen, index);
+ return std::make_shared<DynamicKernelSlidingArgument<Base>>(config, s, ft, pCodeGen, index);
}
// Sub is not a reduction per se
else if (dynamic_cast<OpSub*>(pCodeGen.get()))
{
- return new DynamicKernelSlidingArgument<Base>(config, s, ft, pCodeGen, index);
+ return std::make_shared<DynamicKernelSlidingArgument<Base>>(config, s, ft, pCodeGen, index);
}
// Only child class of Reduction is supported
else if (!dynamic_cast<Reduction*>(pCodeGen.get()))
{
- return new DynamicKernelSlidingArgument<Base>(config, s, ft, pCodeGen, index);
+ return std::make_shared<DynamicKernelSlidingArgument<Base>>(config, s, ft, pCodeGen, index);
}
const formula::DoubleVectorRefToken* pDVR =
@@ -2695,16 +2695,16 @@ static DynamicKernelArgument* VectorRefFactory( const ScCalcConfig& config, cons
ft->GetFormulaToken());
// Window being too small to justify a parallel reduction
if (pDVR->GetRefRowSize() < REDUCE_THRESHOLD)
- return new DynamicKernelSlidingArgument<Base>(config, s, ft, pCodeGen, index);
+ return std::make_shared<DynamicKernelSlidingArgument<Base>>(config, s, ft, pCodeGen, index);
if (pDVR->IsStartFixed() == pDVR->IsEndFixed())
- return new ParallelReductionVectorRef<Base>(config, s, ft, pCodeGen, index);
+ return std::make_shared<ParallelReductionVectorRef<Base>>(config, s, ft, pCodeGen, index);
else // Other cases are not supported as well
- return new DynamicKernelSlidingArgument<Base>(config, s, ft, pCodeGen, index);
+ return std::make_shared<DynamicKernelSlidingArgument<Base>>(config, s, ft, pCodeGen, index);
}
DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
- const std::string& s, const FormulaTreeNodeRef& ft, SlidingFunctionBase* pCodeGen, int nResultSize ) :
- DynamicKernelArgument(config, s, ft), mpCodeGen(pCodeGen), mpClmem2(nullptr)
+ const std::string& s, const FormulaTreeNodeRef& ft, std::shared_ptr<SlidingFunctionBase> pCodeGen, int nResultSize ) :
+ DynamicKernelArgument(config, s, ft), mpCodeGen(std::move(pCodeGen)), mpClmem2(nullptr)
{
size_t nChildren = ft->Children.size();
@@ -2786,8 +2786,8 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
// they are to be treated as zero
SAL_INFO("sc.opencl", "Numbers (no strings or strings treated as zero)");
mvSubArguments.push_back(
- DynamicKernelArgumentRef(VectorRefFactory<VectorRef>(mCalcConfig,
- ts, ft->Children[i], mpCodeGen, j)));
+ VectorRefFactory<VectorRef>(mCalcConfig,
+ ts, ft->Children[i], mpCodeGen, j));
}
else if (pDVR->GetArrays()[j].mpNumericArray == nullptr &&
pCodeGen->takeNumeric() &&
@@ -2798,8 +2798,8 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
// strings, but they are to be treated as zero
SAL_INFO("sc.opencl", "Only strings even if want numbers but should be treated as zero");
mvSubArguments.push_back(
- DynamicKernelArgumentRef(VectorRefFactory<VectorRef>(mCalcConfig,
- ts, ft->Children[i], mpCodeGen, j)));
+ VectorRefFactory<VectorRef>(mCalcConfig,
+ ts, ft->Children[i], mpCodeGen, j));
}
else if (pDVR->GetArrays()[j].mpStringArray &&
pCodeGen->takeString())
@@ -2807,9 +2807,9 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
// There are strings, and the function takes strings.
SAL_INFO("sc.opencl", "Strings only");
mvSubArguments.push_back(
- DynamicKernelArgumentRef(VectorRefFactory
+ VectorRefFactory
<DynamicKernelStringArgument>(mCalcConfig,
- ts, ft->Children[i], mpCodeGen, j)));
+ ts, ft->Children[i], mpCodeGen, j));
}
else if (AllStringsAreNull(pDVR->GetArrays()[j].mpStringArray, pDVR->GetArrayLength()) &&
pDVR->GetArrays()[j].mpNumericArray == nullptr)
@@ -2818,8 +2818,8 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
// array of NANs
SAL_INFO("sc.opencl", "Only empty cells");
mvSubArguments.push_back(
- DynamicKernelArgumentRef(VectorRefFactory<VectorRef>(mCalcConfig,
- ts, ft->Children[i], mpCodeGen, j)));
+ VectorRefFactory<VectorRef>(mCalcConfig,
+ ts, ft->Children[i], mpCodeGen, j));
}
else
{
@@ -2924,475 +2924,475 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
}
break;
case ocDiv:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpDiv(nResultSize), nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpDiv>(nResultSize), nResultSize));
break;
case ocMul:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpMul(nResultSize), nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpMul>(nResultSize), nResultSize));
break;
case ocSub:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpSub(nResultSize), nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpSub>(nResultSize), nResultSize));
break;
case ocAdd:
case ocSum:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpSum(nResultSize), nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpSum>(nResultSize), nResultSize));
break;
case ocAverage:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpAverage(nResultSize), nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpAverage>(nResultSize), nResultSize));
break;
case ocMin:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpMin(nResultSize), nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpMin>(nResultSize), nResultSize));
break;
case ocMax:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpMax(nResultSize), nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpMax>(nResultSize), nResultSize));
break;
case ocCount:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCount(nResultSize), nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpCount>(nResultSize), nResultSize));
break;
case ocSumProduct:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpSumProduct, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpSumProduct>(), nResultSize));
break;
case ocIRR:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpIRR, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpIRR>(), nResultSize));
break;
case ocMIRR:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpMIRR, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpMIRR>(), nResultSize));
break;
case ocPMT:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpPMT, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpPMT>(), nResultSize));
break;
case ocRate:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpIntrate, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpIntrate>(), nResultSize));
break;
case ocRRI:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpRRI, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpRRI>(), nResultSize));
break;
case ocPpmt:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpPPMT, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpPPMT>(), nResultSize));
break;
case ocFisher:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpFisher, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpFisher>(), nResultSize));
break;
case ocFisherInv:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpFisherInv, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpFisherInv>(), nResultSize));
break;
case ocGamma:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpGamma, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpGamma>(), nResultSize));
break;
case ocSLN:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpSLN, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpSLN>(), nResultSize));
break;
case ocGammaLn:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpGammaLn, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpGammaLn>(), nResultSize));
break;
case ocGauss:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpGauss, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpGauss>(), nResultSize));
break;
/*case ocGeoMean:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpGeoMean));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpGeoMean));
break;*/
case ocHarMean:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpHarMean, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpHarMean>(), nResultSize));
break;
case ocLessEqual:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpLessEqual, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpLessEqual>(), nResultSize));
break;
case ocLess:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpLess, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpLess>(), nResultSize));
break;
case ocEqual:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpEqual, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpEqual>(), nResultSize));
break;
case ocGreater:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpGreater, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpGreater>(), nResultSize));
break;
case ocSYD:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpSYD, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpSYD>(), nResultSize));
break;
case ocCorrel:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCorrel, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpCorrel>(), nResultSize));
break;
case ocCos:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCos, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpCos>(), nResultSize));
break;
case ocNegBinomVert :
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpNegbinomdist, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpNegbinomdist>(), nResultSize));
break;
case ocPearson:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpPearson, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpPearson>(), nResultSize));
break;
case ocRSQ:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpRsq, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpRsq>(), nResultSize));
break;
case ocCosecant:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCsc, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpCsc>(), nResultSize));
break;
case ocISPMT:
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpISPMT, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpISPMT>(), nResultSize));
break;
case ocPDuration:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpPDuration, nResultSize));
+ ft->Children[i], std::make_shared<OpPDuration>(), nResultSize));
break;
case ocSinHyp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSinh, nResultSize));
+ ft->Children[i], std::make_shared<OpSinh>(), nResultSize));
break;
case ocAbs:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpAbs, nResultSize));
+ ft->Children[i], std::make_shared<OpAbs>(), nResultSize));
break;
case ocPV:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpPV, nResultSize));
+ ft->Children[i], std::make_shared<OpPV>(), nResultSize));
break;
case ocSin:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSin, nResultSize));
+ ft->Children[i], std::make_shared<OpSin>(), nResultSize));
break;
case ocTan:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpTan, nResultSize));
+ ft->Children[i], std::make_shared<OpTan>(), nResultSize));
break;
case ocTanHyp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpTanH, nResultSize));
+ ft->Children[i], std::make_shared<OpTanH>(), nResultSize));
break;
case ocStandard:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpStandard, nResultSize));
+ ft->Children[i], std::make_shared<OpStandard>(), nResultSize));
break;
case ocWeibull:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpWeibull, nResultSize));
+ ft->Children[i], std::make_shared<OpWeibull>(), nResultSize));
break;
/*case ocMedian:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i],new OpMedian));
+ ft->Children[i],std::make_shared<OpMedian));
break;*/
case ocDDB:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDDB, nResultSize));
+ ft->Children[i], std::make_shared<OpDDB>(), nResultSize));
break;
case ocFV:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpFV, nResultSize));
+ ft->Children[i], std::make_shared<OpFV>(), nResultSize));
break;
case ocSumIfs:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSumIfs, nResultSize));
+ ft->Children[i], std::make_shared<OpSumIfs>(), nResultSize));
break;
/*case ocVBD:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i],new OpVDB));
+ ft->Children[i],std::make_shared<OpVDB));
break;*/
case ocKurt:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpKurt, nResultSize));
+ ft->Children[i], std::make_shared<OpKurt>(), nResultSize));
break;
/*case ocNper:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpNper));
+ ft->Children[i], std::make_shared<OpNper));
break;*/
case ocNormDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpNormdist, nResultSize));
+ ft->Children[i], std::make_shared<OpNormdist>(), nResultSize));
break;
case ocArcCos:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpArcCos, nResultSize));
+ ft->Children[i], std::make_shared<OpArcCos>(), nResultSize));
break;
case ocSqrt:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSqrt, nResultSize));
+ ft->Children[i], std::make_shared<OpSqrt>(), nResultSize));
break;
case ocArcCosHyp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpArcCosHyp, nResultSize));
+ ft->Children[i], std::make_shared<OpArcCosHyp>(), nResultSize));
break;
case ocNPV:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpNPV, nResultSize));
+ ft->Children[i], std::make_shared<OpNPV>(), nResultSize));
break;
case ocStdNormDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpNormsdist, nResultSize));
+ ft->Children[i], std::make_shared<OpNormsdist>(), nResultSize));
break;
case ocNormInv:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpNorminv, nResultSize));
+ ft->Children[i], std::make_shared<OpNorminv>(), nResultSize));
break;
case ocSNormInv:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpNormsinv, nResultSize));
+ ft->Children[i], std::make_shared<OpNormsinv>(), nResultSize));
break;
case ocPermut:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpPermut, nResultSize));
+ ft->Children[i], std::make_shared<OpPermut>(), nResultSize));
break;
case ocPermutationA:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpPermutationA, nResultSize));
+ ft->Children[i], std::make_shared<OpPermutationA>(), nResultSize));
break;
case ocPhi:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpPhi, nResultSize));
+ ft->Children[i], std::make_shared<OpPhi>(), nResultSize));
break;
case ocIpmt:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpIPMT, nResultSize));
+ ft->Children[i], std::make_shared<OpIPMT>(), nResultSize));
break;
case ocConfidence:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpConfidence, nResultSize));
+ ft->Children[i], std::make_shared<OpConfidence>(), nResultSize));
break;
case ocIntercept:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpIntercept, nResultSize));
+ ft->Children[i], std::make_shared<OpIntercept>(), nResultSize));
break;
case ocDB:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpDB, nResultSize));
+ std::make_shared<OpDB>(), nResultSize));
break;
case ocLogInv:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpLogInv, nResultSize));
+ ft->Children[i], std::make_shared<OpLogInv>(), nResultSize));
break;
case ocArcCot:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpArcCot, nResultSize));
+ ft->Children[i], std::make_shared<OpArcCot>(), nResultSize));
break;
case ocCosHyp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCosh, nResultSize));
+ ft->Children[i], std::make_shared<OpCosh>(), nResultSize));
break;
case ocCritBinom:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCritBinom, nResultSize));
+ ft->Children[i], std::make_shared<OpCritBinom>(), nResultSize));
break;
case ocArcCotHyp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpArcCotHyp, nResultSize));
+ ft->Children[i], std::make_shared<OpArcCotHyp>(), nResultSize));
break;
case ocArcSin:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpArcSin, nResultSize));
+ ft->Children[i], std::make_shared<OpArcSin>(), nResultSize));
break;
case ocArcSinHyp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpArcSinHyp, nResultSize));
+ ft->Children[i], std::make_shared<OpArcSinHyp>(), nResultSize));
break;
case ocArcTan:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpArcTan, nResultSize));
+ ft->Children[i], std::make_shared<OpArcTan>(), nResultSize));
break;
case ocArcTanHyp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpArcTanH, nResultSize));
+ ft->Children[i], std::make_shared<OpArcTanH>(), nResultSize));
break;
case ocBitAnd:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpBitAnd, nResultSize));
+ ft->Children[i], std::make_shared<OpBitAnd>(), nResultSize));
break;
case ocForecast:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpForecast, nResultSize));
+ ft->Children[i], std::make_shared<OpForecast>(), nResultSize));
break;
case ocLogNormDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpLogNormDist, nResultSize));
+ ft->Children[i], std::make_shared<OpLogNormDist>(), nResultSize));
break;
/*case ocGammaDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpGammaDist));
+ ft->Children[i], std::make_shared<OpGammaDist));
break;*/
case ocLn:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpLn, nResultSize));
+ ft->Children[i], std::make_shared<OpLn>(), nResultSize));
break;
case ocRound:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpRound, nResultSize));
+ ft->Children[i], std::make_shared<OpRound>(), nResultSize));
break;
case ocCot:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCot, nResultSize));
+ ft->Children[i], std::make_shared<OpCot>(), nResultSize));
break;
case ocCotHyp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCoth, nResultSize));
+ ft->Children[i], std::make_shared<OpCoth>(), nResultSize));
break;
case ocFDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpFdist, nResultSize));
+ ft->Children[i], std::make_shared<OpFdist>(), nResultSize));
break;
case ocVar:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpVar, nResultSize));
+ ft->Children[i], std::make_shared<OpVar>(), nResultSize));
break;
/*case ocChiDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i],new OpChiDist));
+ ft->Children[i],std::make_shared<OpChiDist));
break;*/
case ocPow:
case ocPower:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpPower, nResultSize));
+ ft->Children[i], std::make_shared<OpPower>(), nResultSize));
break;
case ocOdd:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpOdd, nResultSize));
+ ft->Children[i], std::make_shared<OpOdd>(), nResultSize));
break;
/*case ocChiSqDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i],new OpChiSqDist));
+ ft->Children[i],std::make_shared<OpChiSqDist));
break;
case ocChiSqInv:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i],new OpChiSqInv));
+ ft->Children[i],std::make_shared<OpChiSqInv));
break;
case ocGammaInv:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpGammaInv));
+ ft->Children[i], std::make_shared<OpGammaInv));
break;*/
case ocFloor:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpFloor, nResultSize));
+ ft->Children[i], std::make_shared<OpFloor>(), nResultSize));
break;
/*case ocFInv:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpFInv));
+ ft->Children[i], std::make_shared<OpFInv));
break;*/
case ocFTest:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpFTest, nResultSize));
+ ft->Children[i], std::make_shared<OpFTest>(), nResultSize));
break;
case ocB:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpB, nResultSize));
+ ft->Children[i], std::make_shared<OpB>(), nResultSize));
break;
case ocBetaDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpBetaDist, nResultSize));
+ ft->Children[i], std::make_shared<OpBetaDist>(), nResultSize));
break;
case ocCosecantHyp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCscH, nResultSize));
+ ft->Children[i], std::make_shared<OpCscH>(), nResultSize));
break;
case ocExp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpExp, nResultSize));
+ ft->Children[i], std::make_shared<OpExp>(), nResultSize));
break;
case ocLog10:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpLog10, nResultSize));
+ ft->Children[i], std::make_shared<OpLog10>(), nResultSize));
break;
case ocExpDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpExponDist, nResultSize));
+ ft->Children[i], std::make_shared<OpExponDist>(), nResultSize));
break;
case ocAverageIfs:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpAverageIfs, nResultSize));
+ ft->Children[i], std::make_shared<OpAverageIfs>(), nResultSize));
break;
case ocCountIfs:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCountIfs, nResultSize));
+ ft->Children[i], std::make_shared<OpCountIfs>(), nResultSize));
break;
case ocCombinA:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCombinA, nResultSize));
+ ft->Children[i], std::make_shared<OpCombinA>(), nResultSize));
break;
case ocEven:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpEven, nResultSize));
+ ft->Children[i], std::make_shared<OpEven>(), nResultSize));
break;
case ocLog:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpLog, nResultSize));
+ ft->Children[i], std::make_shared<OpLog>(), nResultSize));
break;
case ocMod:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpMod, nResultSize));
+ ft->Children[i], std::make_shared<OpMod>(), nResultSize));
break;
case ocTrunc:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpTrunc, nResultSize));
+ ft->Children[i], std::make_shared<OpTrunc>(), nResultSize));
break;
case ocSkew:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSkew, nResultSize));
+ ft->Children[i], std::make_shared<OpSkew>(), nResultSize));
break;
case ocArcTan2:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpArcTan2, nResultSize));
+ ft->Children[i], std::make_shared<OpArcTan2>(), nResultSize));
break;
case ocBitOr:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpBitOr, nResultSize));
+ ft->Children[i], std::make_shared<OpBitOr>(), nResultSize));
break;
case ocBitLshift:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpBitLshift, nResultSize));
+ ft->Children[i], std::make_shared<OpBitLshift>(), nResultSize));
break;
case ocBitRshift:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpBitRshift, nResultSize));
+ ft->Children[i], std::make_shared<OpBitRshift>(), nResultSize));
break;
case ocBitXor:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpBitXor, nResultSize));
+ ft->Children[i], std::make_shared<OpBitXor>(), nResultSize));
break;
/*case ocChiInv:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i],new OpChiInv));
+ ft->Children[i],std::make_shared<OpChiInv));
break;*/
case ocPoissonDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpPoisson, nResultSize));
+ ft->Children[i], std::make_shared<OpPoisson>(), nResultSize));
break;
case ocSumSQ:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSumSQ, nResultSize));
+ ft->Children[i], std::make_shared<OpSumSQ>(), nResultSize));
break;
case ocSkewp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSkewp, nResultSize));
+ ft->Children[i], std::make_shared<OpSkewp>(), nResultSize));
break;
case ocBinomDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpBinomdist, nResultSize));
+ ft->Children[i], std::make_shared<OpBinomdist>(), nResultSize));
break;
case ocVarP:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpVarP, nResultSize));
+ ft->Children[i], std::make_shared<OpVarP>(), nResultSize));
break;
case ocCeil:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCeil, nResultSize));
+ ft->Children[i], std::make_shared<OpCeil>(), nResultSize));
break;
case ocCombin:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCombin, nResultSize));
+ ft->Children[i], std::make_shared<OpCombin>(), nResultSize));
break;
case ocDevSq:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDevSq, nResultSize));
+ ft->Children[i], std::make_shared<OpDevSq>(), nResultSize));
break;
case ocStDev:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpStDev, nResultSize));
+ ft->Children[i], std::make_shared<OpStDev>(), nResultSize));
break;
case ocSlope:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSlope, nResultSize));
+ ft->Children[i], std::make_shared<OpSlope>(), nResultSize));
break;
case ocSTEYX:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSTEYX, nResultSize));
+ ft->Children[i], std::make_shared<OpSTEYX>(), nResultSize));
break;
case ocZTest:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpZTest, nResultSize));
+ ft->Children[i], std::make_shared<OpZTest>(), nResultSize));
break;
case ocPi:
mvSubArguments.push_back(
@@ -3406,406 +3406,406 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
break;
case ocProduct:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpProduct, nResultSize));
+ ft->Children[i], std::make_shared<OpProduct>(), nResultSize));
break;
/*case ocHypGeomDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i],new OpHypGeomDist));
+ ft->Children[i],std::make_shared<OpHypGeomDist));
break;*/
case ocSumX2MY2:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSumX2MY2, nResultSize));
+ ft->Children[i], std::make_shared<OpSumX2MY2>(), nResultSize));
break;
case ocSumX2DY2:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSumX2PY2, nResultSize));
+ ft->Children[i], std::make_shared<OpSumX2PY2>(), nResultSize));
break;
/*case ocBetaInv:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i],new OpBetainv));
+ ft->Children[i],std::make_shared<OpBetainv));
break;*/
case ocTTest:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpTTest, nResultSize));
+ ft->Children[i], std::make_shared<OpTTest>(), nResultSize));
break;
case ocTDist:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpTDist, nResultSize));
+ ft->Children[i], std::make_shared<OpTDist>(), nResultSize));
break;
/*case ocTInv:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpTInv));
+ ft->Children[i], std::make_shared<OpTInv));
break;*/
case ocSumXMY2:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSumXMY2, nResultSize));
+ ft->Children[i], std::make_shared<OpSumXMY2>(), nResultSize));
break;
case ocStDevP:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpStDevP, nResultSize));
+ ft->Children[i], std::make_shared<OpStDevP>(), nResultSize));
break;
case ocCovar:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCovar, nResultSize));
+ ft->Children[i], std::make_shared<OpCovar>(), nResultSize));
break;
case ocAnd:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpAnd, nResultSize));
+ ft->Children[i], std::make_shared<OpAnd>(), nResultSize));
break;
case ocVLookup:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpVLookup, nResultSize));
+ ft->Children[i], std::make_shared<OpVLookup>(), nResultSize));
break;
case ocOr:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpOr, nResultSize));
+ ft->Children[i], std::make_shared<OpOr>(), nResultSize));
break;
case ocNot:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpNot, nResultSize));
+ ft->Children[i], std::make_shared<OpNot>(), nResultSize));
break;
case ocXor:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpXor, nResultSize));
+ ft->Children[i], std::make_shared<OpXor>(), nResultSize));
break;
case ocDBMax:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDmax, nResultSize));
+ ft->Children[i], std::make_shared<OpDmax>(), nResultSize));
break;
case ocDBMin:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDmin, nResultSize));
+ ft->Children[i], std::make_shared<OpDmin>(), nResultSize));
break;
case ocDBProduct:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDproduct, nResultSize));
+ ft->Children[i], std::make_shared<OpDproduct>(), nResultSize));
break;
case ocDBAverage:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDaverage, nResultSize));
+ ft->Children[i], std::make_shared<OpDaverage>(), nResultSize));
break;
case ocDBStdDev:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDstdev, nResultSize));
+ ft->Children[i], std::make_shared<OpDstdev>(), nResultSize));
break;
case ocDBStdDevP:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDstdevp, nResultSize));
+ ft->Children[i], std::make_shared<OpDstdevp>(), nResultSize));
break;
case ocDBSum:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDsum, nResultSize));
+ ft->Children[i], std::make_shared<OpDsum>(), nResultSize));
break;
case ocDBVar:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDvar, nResultSize));
+ ft->Children[i], std::make_shared<OpDvar>(), nResultSize));
break;
case ocDBVarP:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDvarp, nResultSize));
+ ft->Children[i], std::make_shared<OpDvarp>(), nResultSize));
break;
case ocAverageIf:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpAverageIf, nResultSize));
+ ft->Children[i], std::make_shared<OpAverageIf>(), nResultSize));
break;
case ocDBCount:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDcount, nResultSize));
+ ft->Children[i], std::make_shared<OpDcount>(), nResultSize));
break;
case ocDBCount2:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDcount2, nResultSize));
+ ft->Children[i], std::make_shared<OpDcount2>(), nResultSize));
break;
case ocDeg:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpDeg, nResultSize));
+ ft->Children[i], std::make_shared<OpDeg>(), nResultSize));
break;
case ocRoundUp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpRoundUp, nResultSize));
+ ft->Children[i], std::make_shared<OpRoundUp>(), nResultSize));
break;
case ocRoundDown:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpRoundDown, nResultSize));
+ ft->Children[i], std::make_shared<OpRoundDown>(), nResultSize));
break;
case ocInt:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpInt, nResultSize));
+ ft->Children[i], std::make_shared<OpInt>(), nResultSize));
break;
case ocRad:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpRadians, nResultSize));
+ ft->Children[i], std::make_shared<OpRadians>(), nResultSize));
break;
case ocCountIf:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCountIf, nResultSize));
+ ft->Children[i], std::make_shared<OpCountIf>(), nResultSize));
break;
case ocIsEven:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpIsEven, nResultSize));
+ ft->Children[i], std::make_shared<OpIsEven>(), nResultSize));
break;
case ocIsOdd:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpIsOdd, nResultSize));
+ ft->Children[i], std::make_shared<OpIsOdd>(), nResultSize));
break;
case ocFact:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpFact, nResultSize));
+ ft->Children[i], std::make_shared<OpFact>(), nResultSize));
break;
case ocMinA:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpMinA, nResultSize));
+ ft->Children[i], std::make_shared<OpMinA>(), nResultSize));
break;
case ocCount2:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpCountA, nResultSize));
+ ft->Children[i], std::make_shared<OpCountA>(), nResultSize));
break;
case ocMaxA:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpMaxA, nResultSize));
+ ft->Children[i], std::make_shared<OpMaxA>(), nResultSize));
break;
case ocAverageA:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpAverageA, nResultSize));
+ ft->Children[i], std::make_shared<OpAverageA>(), nResultSize));
break;
case ocVarA:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpVarA, nResultSize));
+ ft->Children[i], std::make_shared<OpVarA>(), nResultSize));
break;
case ocVarPA:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpVarPA, nResultSize));
+ ft->Children[i], std::make_shared<OpVarPA>(), nResultSize));
break;
case ocStDevA:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpStDevA, nResultSize));
+ ft->Children[i], std::make_shared<OpStDevA>(), nResultSize));
break;
case ocStDevPA:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpStDevPA, nResultSize));
+ ft->Children[i], std::make_shared<OpStDevPA>(), nResultSize));
break;
case ocSecant:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSec, nResultSize));
+ ft->Children[i], std::make_shared<OpSec>(), nResultSize));
break;
case ocSecantHyp:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSecH, nResultSize));
+ ft->Children[i], std::make_shared<OpSecH>(), nResultSize));
break;
case ocSumIf:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpSumIf, nResultSize));
+ ft->Children[i], std::make_shared<OpSumIf>(), nResultSize));
break;
case ocNegSub:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpNegSub, nResultSize));
+ ft->Children[i], std::make_shared<OpNegSub>(), nResultSize));
break;
case ocAveDev:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpAveDev, nResultSize));
+ ft->Children[i], std::make_shared<OpAveDev>(), nResultSize));
break;
case ocIf:
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpIf, nResultSize));
+ ft->Children[i], std::make_shared<OpIf>(), nResultSize));
break;
case ocExternal:
if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getEffect")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpEffective, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpEffective>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getCumipmt")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCumipmt, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpCumipmt>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getNominal")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpNominal, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpNominal>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getCumprinc")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCumprinc, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpCumprinc>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getXnpv")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpXNPV, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpXNPV>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getPricemat")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpPriceMat, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpPriceMat>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getReceived")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpReceived, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpReceived>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getTbilleq")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpTbilleq, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpTbilleq>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getTbillprice")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpTbillprice, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpTbillprice>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getTbillyield")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpTbillyield, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpTbillyield>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getFvschedule")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpFvschedule, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpFvschedule>(), nResultSize));
}
/*else if ( pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getYield")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpYield));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpYield));
}*/
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getYielddisc")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpYielddisc, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpYielddisc>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getYieldmat")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpYieldmat, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpYieldmat>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getAccrintm")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpAccrintm, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpAccrintm>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getCoupdaybs")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCoupdaybs, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpCoupdaybs>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getDollarde")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpDollarde, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpDollarde>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getDollarfr")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpDollarfr, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpDollarfr>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getCoupdays")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCoupdays, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpCoupdays>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getCoupdaysnc")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCoupdaysnc, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpCoupdaysnc>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getDisc")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpDISC, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpDISC>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getIntrate")
{
- mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpINTRATE, nResultSize));
+ mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpINTRATE>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getPrice")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpPrice, nResultSize));
+ ft->Children[i], std::make_shared<OpPrice>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getCoupnum")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpCoupnum, nResultSize));
+ std::make_shared<OpCoupnum>(), nResultSize));
}
/*else if pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getDuration"))
{
mvSubArguments.push_back(
- SoPHelper(mCalcConfig, ts, ft->Children[i], new OpDuration_ADD));
+ SoPHelper(mCalcConfig, ts, ft->Children[i], std::make_shared<OpDuration_ADD));
}*/
/*else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getAmordegrc")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpAmordegrc, nResultSize));
+ std::make_shared<OpAmordegrc, nResultSize));
}*/
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getAmorlinc")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpAmorlinc, nResultSize));
+ std::make_shared<OpAmorlinc>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getMduration")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpMDuration, nResultSize));
+ std::make_shared<OpMDuration>(), nResultSize));
}
/*else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getXirr")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpXirr, nResultSize));
+ std::make_shared<OpXirr, nResultSize));
}*/
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getOddlprice")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpOddlprice, nResultSize));
+ ft->Children[i], std::make_shared<OpOddlprice>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getOddlyield")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpOddlyield, nResultSize));
+ std::make_shared<OpOddlyield>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getPricedisc")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts,
- ft->Children[i], new OpPriceDisc, nResultSize));
+ ft->Children[i], std::make_shared<OpPriceDisc>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getCouppcd")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpCouppcd, nResultSize));
+ std::make_shared<OpCouppcd>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getCoupncd")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpCoupncd, nResultSize));
+ std::make_shared<OpCoupncd>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getAccrint")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpAccrint, nResultSize));
+ std::make_shared<OpAccrint>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getSqrtpi")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpSqrtPi, nResultSize));
+ std::make_shared<OpSqrtPi>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getConvert")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpConvert, nResultSize));
+ std::make_shared<OpConvert>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getIseven")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpIsEven, nResultSize));
+ std::make_shared<OpIsEven>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getIsodd")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpIsOdd, nResultSize));
+ std::make_shared<OpIsOdd>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getMround")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpMROUND, nResultSize));
+ std::make_shared<OpMROUND>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getQuotient")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpQuotient, nResultSize));
+ std::make_shared<OpQuotient>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getSeriessum")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpSeriesSum, nResultSize));
+ std::make_shared<OpSeriesSum>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getBesselj")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpBesselj, nResultSize));
+ std::make_shared<OpBesselj>(), nResultSize));
}
else if (pChild->GetExternal() == "com.sun.star.sheet.addin.Analysis.getGestep")
{
mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i],
- new OpGestep, nResultSize));
+ std::make_shared<OpGestep>(), nResultSize));
}
else
throw UnhandledToken(OUString("unhandled external " + pChild->GetExternal()).toUtf8().getStr(), __FILE__, __LINE__);
@@ -3827,7 +3827,7 @@ public:
DynamicKernel( const ScCalcConfig& config, const FormulaTreeNodeRef& r, int nResultSize );
virtual ~DynamicKernel() override;
- static std::unique_ptr<DynamicKernel> create( const ScCalcConfig& config, const ScTokenArray& rCode, int nResultSize );
+ static std::shared_ptr<DynamicKernel> create( const ScCalcConfig& config, const ScTokenArray& rCode, int nResultSize );
/// OpenCL code generation
void CodeGen();
@@ -3891,7 +3891,7 @@ DynamicKernel::~DynamicKernel()
void DynamicKernel::CodeGen()
{
// Traverse the tree of expression and declare symbols used
- const DynamicKernelArgument* DK = mSyms.DeclRefArg<DynamicKernelSoPArguments>(mCalcConfig, mpRoot, new OpNop(mnResultSize), mnResultSize);
+ const DynamicKernelArgument* DK = mSyms.DeclRefArg<DynamicKernelSoPArguments>(mCalcConfig, mpRoot, std::make_shared<OpNop>(mnResultSize), mnResultSize);
std::stringstream decl;
if (openclwrapper::gpuEnv.mnKhrFp64Flag)
@@ -4116,7 +4116,7 @@ void DynamicKernel::Launch( size_t nr )
template <typename T>
const DynamicKernelArgument* SymbolTable::DeclRefArg(const ScCalcConfig& config,
const FormulaTreeNodeRef& t,
- SlidingFunctionBase* pCodeGen, int nResultSize)
+ std::shared_ptr<SlidingFunctionBase> pCodeGen, int nResultSize)
{
FormulaToken* ref = t->GetFormulaToken();
ArgumentMap::iterator it = mSymbols.find(ref);
@@ -4125,7 +4125,7 @@ const DynamicKernelArgument* SymbolTable::DeclRefArg(const ScCalcConfig& config,
// Allocate new symbols
std::stringstream ss;
ss << "tmp" << mCurId++;
- DynamicKernelArgumentRef new_arg = std::make_shared<T>(config, ss.str(), t, pCodeGen, nResultSize);
+ DynamicKernelArgumentRef new_arg = std::make_shared<T>(config, ss.str(), t, std::move(pCodeGen), nResultSize);
mSymbols[ref] = new_arg;
mParams.push_back(new_arg);
return new_arg.get();
@@ -4146,7 +4146,7 @@ ScMatrixRef FormulaGroupInterpreterOpenCL::inverseMatrix( const ScMatrix& )
return nullptr;
}
-std::unique_ptr<DynamicKernel> DynamicKernel::create( const ScCalcConfig& rConfig, const ScTokenArray& rCode, int nResultSize )
+std::shared_ptr<DynamicKernel> DynamicKernel::create( const ScCalcConfig& rConfig, const ScTokenArray& rCode, int nResultSize )
{
// Constructing "AST"
FormulaTokenIterator aCode(rCode);
@@ -4188,7 +4188,7 @@ std::unique_ptr<DynamicKernel> DynamicKernel::create( const ScCalcConfig& rConfi
FormulaTreeNodeRef Root = std::make_shared<FormulaTreeNode>(nullptr);
Root->Children.push_back(aHashMap[aTokenVector.back()]);
- std::unique_ptr<DynamicKernel> pDynamicKernel(new DynamicKernel(rConfig, Root, nResultSize));
+ auto pDynamicKernel = std::make_shared<DynamicKernel>(rConfig, Root, nResultSize);
// OpenCL source code generation and kernel compilation
try
@@ -4326,7 +4326,7 @@ public:
return mpKernel != nullptr;
}
- void setManagedKernel( std::unique_ptr<DynamicKernel> pKernel )
+ void setManagedKernel( std::shared_ptr<DynamicKernel> pKernel )
{
mpKernelStore = std::move(pKernel);
mpKernel = mpKernelStore.get();
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 7a6f03026121..347377ed0a90 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1592,7 +1592,7 @@ bool ScInterpreter::ConvertMatrixParameters()
xNew = (*aMapIter).second;
else
{
- std::unique_ptr<ScJumpMatrix> pJumpMat( new ScJumpMatrix( pCur->GetOpCode(), nJumpCols, nJumpRows));
+ auto pJumpMat = std::make_shared<ScJumpMatrix>( pCur->GetOpCode(), nJumpCols, nJumpRows);
pJumpMat->SetAllJumps( 1.0, nStart, nNext, nStop);
// pop parameters and store in ScJumpMatrix, push in JumpMatrix()
ScTokenVec aParams(nParams);
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 2882cbaece72..b4a41c8a06b1 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1560,7 +1560,7 @@ void XclExpObjectManager::InitStream( bool bTempFile )
}
if( !mxDffStrm.get() )
- mxDffStrm = std::make_shared<SvMemoryStream>();
+ mxDffStrm = std::make_unique<SvMemoryStream>();
mxDffStrm->SetEndian( SvStreamEndian::LITTLE );
}
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 2dbc8802b627..38a1f84d173b 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -1371,7 +1371,11 @@ XclImpChTextRef XclImpChAttachedLabel::CreateDataLabel( const XclImpChText* pPar
const sal_uInt16 EXC_CHATTLABEL_SHOWANYPERCENT = EXC_CHATTLABEL_SHOWPERCENT | EXC_CHATTLABEL_SHOWCATEGPERC;
const sal_uInt16 EXC_CHATTLABEL_SHOWANYCATEG = EXC_CHATTLABEL_SHOWCATEG | EXC_CHATTLABEL_SHOWCATEGPERC;
- XclImpChTextRef xLabel( pParent ? new XclImpChText( *pParent ) : new XclImpChText( GetChRoot() ) );
+ XclImpChTextRef xLabel;
+ if ( pParent )
+ xLabel = std::make_shared<XclImpChText>( *pParent );
+ else
+ xLabel = std::make_shared<XclImpChText>( GetChRoot() );
xLabel->UpdateDataLabel(
::get_flag( mnFlags, EXC_CHATTLABEL_SHOWANYCATEG ),
::get_flag( mnFlags, EXC_CHATTLABEL_SHOWANYVALUE ),
diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx
index b1b61a5feab1..3d5e43a50d69 100644
--- a/sc/source/filter/inc/xeescher.hxx
+++ b/sc/source/filter/inc/xeescher.hxx
@@ -420,7 +420,7 @@ private:
private:
std::shared_ptr< ::utl::TempFile > mxTempFile;
- std::shared_ptr< SvStream > mxDffStrm;
+ std::unique_ptr< SvStream > mxDffStrm;
std::shared_ptr< XclEscherEx > mxEscherEx;
rtl::Reference< XclExpObjList > mxObjList;
};
diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx
index b1c687d0befa..81bf3e95124f 100644
--- a/sc/source/filter/xml/xmlbodyi.cxx
+++ b/sc/source/filter/xml/xmlbodyi.cxx
@@ -165,7 +165,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
case XML_ELEMENT( TABLE, XML_NAMED_EXPRESSIONS ):
pContext = new ScXMLNamedExpressionsContext (
GetScImport(),
- new ScXMLNamedExpressionsContext::GlobalInserter(GetScImport()) );
+ std::make_shared<ScXMLNamedExpressionsContext::GlobalInserter>(GetScImport()) );
break;
case XML_ELEMENT( TABLE, XML_DATABASE_RANGES ):
pContext = new ScXMLDatabaseRangesContext ( GetScImport() );
diff --git a/sc/source/filter/xml/xmlnexpi.cxx b/sc/source/filter/xml/xmlnexpi.cxx
index d4a37757aa06..91f705b84625 100644
--- a/sc/source/filter/xml/xmlnexpi.cxx
+++ b/sc/source/filter/xml/xmlnexpi.cxx
@@ -44,9 +44,9 @@ void ScXMLNamedExpressionsContext::SheetLocalInserter::insert(ScMyNamedExpressio
ScXMLNamedExpressionsContext::ScXMLNamedExpressionsContext(
ScXMLImport& rImport,
- Inserter* pInserter ) :
+ std::shared_ptr<Inserter> pInserter ) :
ScXMLImportContext( rImport ),
- mpInserter(pInserter)
+ mpInserter(std::move(pInserter))
{
rImport.LockSolarMutex();
}
diff --git a/sc/source/filter/xml/xmlnexpi.hxx b/sc/source/filter/xml/xmlnexpi.hxx
index 7dc5f138e24f..c0d00826a7a0 100644
--- a/sc/source/filter/xml/xmlnexpi.hxx
+++ b/sc/source/filter/xml/xmlnexpi.hxx
@@ -69,7 +69,7 @@ public:
ScXMLNamedExpressionsContext(
ScXMLImport& rImport,
- Inserter* pInserter );
+ std::shared_ptr<Inserter> pInserter );
virtual ~ScXMLNamedExpressionsContext() override;
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index fe7e0ad392e1..25600dbfc62b 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -279,7 +279,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
SCTAB nTab = GetScImport().GetTables().GetCurrentSheet();
pContext = new ScXMLNamedExpressionsContext(
GetScImport(),
- new ScXMLNamedExpressionsContext::SheetLocalInserter(GetScImport(), nTab));
+ std::make_shared<ScXMLNamedExpressionsContext::SheetLocalInserter>(GetScImport(), nTab));
}
break;
case XML_ELEMENT( TABLE, XML_TABLE_COLUMN_GROUP ):
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);