diff options
-rw-r--r-- | sc/source/core/data/dpdimsave.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpgroup.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/data/dpsave.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dptabres.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/funcdesc.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table1.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/opencl/formulagroupcl.cxx | 29 | ||||
-rw-r--r-- | sc/source/core/opencl/opbase.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/chartlis.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/dbdata.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/tool/detfunc.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/grouparealistener.cxx | 4 |
15 files changed, 47 insertions, 46 deletions
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx index cfd0c7e0712a..48d49e5a6625 100644 --- a/sc/source/core/data/dpdimsave.cxx +++ b/sc/source/core/data/dpdimsave.cxx @@ -662,7 +662,7 @@ class AddGroupDimToCache : std::unary_function<ScDPSaveGroupDimension, void> { ScDPCache& mrCache; public: - AddGroupDimToCache(ScDPCache& rCache) : mrCache(rCache) {} + explicit AddGroupDimToCache(ScDPCache& rCache) : mrCache(rCache) {} void operator() (const ScDPSaveGroupDimension& rDim) { rDim.AddToCache(mrCache); diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx index 17f739e1f1db..0969665df4e0 100644 --- a/sc/source/core/data/dpgroup.cxx +++ b/sc/source/core/data/dpgroup.cxx @@ -645,7 +645,7 @@ class FindCaseInsensitive : std::unary_function<ScDPItemData, bool> { ScDPItemData maValue; public: - FindCaseInsensitive(const ScDPItemData& rVal) : maValue(rVal) {} + explicit FindCaseInsensitive(const ScDPItemData& rVal) : maValue(rVal) {} bool operator() (const ScDPItemData& rItem) const { diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index e3fd4da905ed..e95697193328 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -589,7 +589,7 @@ class FindIntersectingTable : std::unary_function<ScDPObject, bool> { ScRange maRange; public: - FindIntersectingTable(const ScRange& rRange) : maRange(rRange) {} + explicit FindIntersectingTable(const ScRange& rRange) : maRange(rRange) {} bool operator() (const ScDPObject& rObj) const { @@ -670,7 +670,7 @@ class AccumulateOutputRanges : std::unary_function<ScDPObject, void> ScRangeList maRanges; SCTAB mnTab; public: - AccumulateOutputRanges(SCTAB nTab) : mnTab(nTab) {} + explicit AccumulateOutputRanges(SCTAB nTab) : mnTab(nTab) {} AccumulateOutputRanges(const AccumulateOutputRanges& r) : maRanges(r.maRanges), mnTab(r.mnTab) {} void operator() (const ScDPObject& rObj) @@ -1332,7 +1332,7 @@ class FindByName : std::unary_function<const ScDPSaveDimension*, bool> { OUString maName; // must be all uppercase. public: - FindByName(const OUString& rName) : maName(rName) {} + explicit FindByName(const OUString& rName) : maName(rName) {} bool operator() (const ScDPSaveDimension* pDim) const { // Layout name takes precedence. @@ -1356,7 +1356,7 @@ class LessByDimOrder : std::binary_function<sheet::DataPilotFieldFilter, sheet:: const ScDPSaveData::DimOrderType& mrDimOrder; public: - LessByDimOrder(const ScDPSaveData::DimOrderType& rDimOrder) : mrDimOrder(rDimOrder) {} + explicit LessByDimOrder(const ScDPSaveData::DimOrderType& rDimOrder) : mrDimOrder(rDimOrder) {} bool operator() (const sheet::DataPilotFieldFilter& r1, const sheet::DataPilotFieldFilter& r2) const { @@ -2528,7 +2528,7 @@ class FindByOriginalDim : public std::unary_function<ScPivotField, bool> { long mnDim; public: - FindByOriginalDim(long nDim) : mnDim(nDim) {} + explicit FindByOriginalDim(long nDim) : mnDim(nDim) {} bool operator() (const ScPivotField& r) const { return mnDim == r.getOriginalDim(); @@ -3304,7 +3304,7 @@ class MatchByTable : public unary_function<ScDPObject, bool> { SCTAB mnTab; public: - MatchByTable(SCTAB nTab) : mnTab(nTab) {} + explicit MatchByTable(SCTAB nTab) : mnTab(nTab) {} bool operator() (const ScDPObject& rObj) const { diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index d3a6217b53e5..ab3a1cc6734d 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -896,7 +896,7 @@ class DimOrderInserter : std::unary_function<const ScDPSaveDimension*, void> { ScDPSaveData::DimOrderType& mrNames; public: - DimOrderInserter(ScDPSaveData::DimOrderType& rNames) : mrNames(rNames) {} + explicit DimOrderInserter(ScDPSaveData::DimOrderType& rNames) : mrNames(rNames) {} void operator() (const ScDPSaveDimension* pDim) { diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 28667b54d920..f152954657f2 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -103,7 +103,7 @@ class FilterStack { std::vector<ScDPResultFilter>& mrFilters; public: - FilterStack(std::vector<ScDPResultFilter>& rFilters) : mrFilters(rFilters) {} + explicit FilterStack(std::vector<ScDPResultFilter>& rFilters) : mrFilters(rFilters) {} void pushDimName(const OUString& rName, bool bDataLayout) { diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index 6a4ac4773533..8ad449b6d255 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -51,7 +51,7 @@ class ScResourcePublisher : public Resource private: void FreeResource() { Resource::FreeResource(); } public: - ScResourcePublisher( const ScResId& rId ) : Resource( rId ) {} + explicit ScResourcePublisher( const ScResId& rId ) : Resource( rId ) {} ~ScResourcePublisher() { FreeResource(); } bool IsAvailableRes( const ResId& rId ) const { return Resource::IsAvailableRes( rId ); } diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index f7097f14f2f7..655954e21bb7 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -130,7 +130,7 @@ struct OptimalHeightsFuncObjBase struct SetRowHeightOnlyFunc : public OptimalHeightsFuncObjBase { ScTable* mpTab; - SetRowHeightOnlyFunc(ScTable* pTab) : + explicit SetRowHeightOnlyFunc(ScTable* pTab) : mpTab(pTab) {} @@ -1862,7 +1862,7 @@ class SetTableIndex : public ::std::unary_function<ScRange, void> { SCTAB mnTab; public: - SetTableIndex(SCTAB nTab) : mnTab(nTab) {} + explicit SetTableIndex(SCTAB nTab) : mnTab(nTab) {} void operator() (ScRange& rRange) const { diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 861ac3de522b..2d5c581253ef 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -245,7 +245,7 @@ public: bool mbHidden:1; bool mbFiltered:1; - Row( size_t nColSize ) : maCells(nColSize, Cell()), mbHidden(false), mbFiltered(false) {} + explicit Row( size_t nColSize ) : maCells(nColSize, Cell()), mbHidden(false), mbFiltered(false) {} }; typedef std::vector<Row*> RowsType; @@ -557,7 +557,7 @@ struct SortedColumn : boost::noncopyable PatRangeType maPatterns; PatRangeType::const_iterator miPatternPos; - SortedColumn( size_t nTopEmptyRows ) : + explicit SortedColumn( size_t nTopEmptyRows ) : maCells(nTopEmptyRows), maCellTextAttrs(nTopEmptyRows), maBroadcasters(nTopEmptyRows), @@ -697,7 +697,7 @@ class FormulaGroupPosCollector : std::unary_function<SvtListener*, void> sc::RefQueryFormulaGroup& mrQuery; public: - FormulaGroupPosCollector( sc::RefQueryFormulaGroup& rQuery ) : mrQuery(rQuery) {} + explicit FormulaGroupPosCollector( sc::RefQueryFormulaGroup& rQuery ) : mrQuery(rQuery) {} void operator() ( SvtListener* p ) { @@ -845,7 +845,7 @@ class FormulaCellCollectAction : public sc::ColumnSpanSet::ColumnAction ScColumn* mpCol; public: - FormulaCellCollectAction( std::vector<ScFormulaCell*>& rCells ) : + explicit FormulaCellCollectAction( std::vector<ScFormulaCell*>& rCells ) : mrCells(rCells), mpCol(NULL) {} virtual void startColumn( ScColumn* pCol ) override @@ -873,7 +873,7 @@ class ListenerStartAction : public sc::ColumnSpanSet::ColumnAction sc::EndListeningContext maEndCxt; public: - ListenerStartAction( ScDocument& rDoc ) : + explicit ListenerStartAction( ScDocument& rDoc ) : mpCol(0), mpPosSet(new sc::ColumnBlockPositionSet(rDoc)), maStartCxt(rDoc, mpPosSet), @@ -2830,7 +2830,7 @@ class PrepareQueryItem : public std::unary_function<ScQueryEntry::Item, void> { const ScDocument& mrDoc; public: - PrepareQueryItem(const ScDocument& rDoc) : mrDoc(rDoc) {} + explicit PrepareQueryItem(const ScDocument& rDoc) : mrDoc(rDoc) {} void operator() (ScQueryEntry::Item& rItem) { diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 7d69521dda9b..558a8e3d4e5e 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -1683,7 +1683,7 @@ class Reduction : public SlidingFunctionBase { int mnResultSize; public: - Reduction( int nResultSize ) : mnResultSize(nResultSize) {} + explicit Reduction(int nResultSize) : mnResultSize(nResultSize) {} typedef DynamicKernelSlidingArgument<VectorRef> NumericRange; typedef DynamicKernelSlidingArgument<DynamicKernelStringArgument> StringRange; @@ -2037,7 +2037,7 @@ public: class OpNop : public Reduction { public: - OpNop( int nResultSize ) : Reduction(nResultSize) {} + explicit OpNop(int nResultSize) : Reduction(nResultSize) {} virtual std::string GetBottom() override { return "0"; } virtual std::string Gen2( const std::string& lhs, const std::string& ) const override @@ -2050,7 +2050,7 @@ public: class OpCount : public Reduction { public: - OpCount( int nResultSize ) : Reduction(nResultSize) {} + explicit OpCount(int nResultSize) : Reduction(nResultSize) {} virtual std::string GetBottom() override { return "0"; } virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const override @@ -2117,7 +2117,7 @@ public: class OpSum : public Reduction { public: - OpSum( int nResultSize ) : Reduction(nResultSize) {} + explicit OpSum(int nResultSize) : Reduction(nResultSize) {} virtual std::string GetBottom() override { return "0"; } virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const override @@ -2132,7 +2132,7 @@ public: class OpAverage : public Reduction { public: - OpAverage( int nResultSize ) : Reduction(nResultSize) {} + explicit OpAverage(int nResultSize) : Reduction(nResultSize) {} virtual std::string GetBottom() override { return "0"; } virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const override @@ -2148,7 +2148,7 @@ public: class OpSub : public Reduction { public: - OpSub( int nResultSize ) : Reduction(nResultSize) {} + explicit OpSub(int nResultSize) : Reduction(nResultSize) {} virtual std::string GetBottom() override { return "0"; } virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const override @@ -2161,7 +2161,7 @@ public: class OpMul : public Reduction { public: - OpMul( int nResultSize ) : Reduction(nResultSize) {} + explicit OpMul(int nResultSize) : Reduction(nResultSize) {} virtual std::string GetBottom() override { return "1"; } virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const override @@ -2176,7 +2176,7 @@ public: class OpDiv : public Reduction { public: - OpDiv( int nResultSize ) : Reduction(nResultSize) {} + explicit OpDiv(int nResultSize) : Reduction(nResultSize) {} virtual std::string GetBottom() override { return "1.0"; } virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const override @@ -2211,7 +2211,7 @@ public: class OpMin : public Reduction { public: - OpMin( int nResultSize ) : Reduction(nResultSize) {} + explicit OpMin(int nResultSize) : Reduction(nResultSize) {} virtual std::string GetBottom() override { return "NAN"; } virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const override @@ -2225,7 +2225,7 @@ public: class OpMax : public Reduction { public: - OpMax( int nResultSize ) : Reduction(nResultSize) {} + explicit OpMax(int nResultSize) : Reduction(nResultSize) {} virtual std::string GetBottom() override { return "NAN"; } virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const override @@ -2249,8 +2249,8 @@ public: namespace { struct SumIfsArgs { - SumIfsArgs( cl_mem x ) : mCLMem(x), mConst(0.0) { } - SumIfsArgs( double x ) : mCLMem(NULL), mConst(x) { } + explicit SumIfsArgs(cl_mem x) : mCLMem(x), mConst(0.0) { } + explicit SumIfsArgs(double x) : mCLMem(NULL), mConst(x) { } cl_mem mCLMem; double mConst; }; @@ -4173,8 +4173,9 @@ class CLInterpreterContext SCROW mnGroupLength; public: - CLInterpreterContext( SCROW nGroupLength ) : - mpKernel(NULL), mnGroupLength(nGroupLength) {} + explicit CLInterpreterContext(SCROW nGroupLength) + : mpKernel(NULL) + , mnGroupLength(nGroupLength) {} bool isValid() const { diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx index d308b107ac51..f467bb79cad5 100644 --- a/sc/source/core/opencl/opbase.hxx +++ b/sc/source/core/opencl/opbase.hxx @@ -67,7 +67,7 @@ typedef std::shared_ptr<FormulaTreeNode> FormulaTreeNodeRef; class FormulaTreeNode { public: - FormulaTreeNode( const formula::FormulaToken* ft ) : mpCurrentFormula(ft) + explicit FormulaTreeNode( const formula::FormulaToken* ft ) : mpCurrentFormula(ft) { Children.reserve(8); } diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index 398fd78ffb61..5173a0f862bc 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -503,7 +503,7 @@ class InsertChartListener : public std::unary_function<ScChartListener*, void> { ScChartListenerCollection::ListenersType& mrListeners; public: - InsertChartListener(ScChartListenerCollection::ListenersType& rListeners) : + explicit InsertChartListener(ScChartListenerCollection::ListenersType& rListeners) : mrListeners(rListeners) {} void operator() (ScChartListener* p) diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 2cb0b89e4ff3..9c64cee3305c 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -705,7 +705,7 @@ static bool lcl_getLastTabName( OUString& rTabName2, const OUString& rTabName1, struct Convention_A1 : public ScCompiler::Convention { - Convention_A1( FormulaGrammar::AddressConvention eConv ) : ScCompiler::Convention( eConv ) { } + explicit Convention_A1( FormulaGrammar::AddressConvention eConv ) : ScCompiler::Convention( eConv ) { } static void MakeColStr( OUStringBuffer& rBuffer, SCCOL nCol ); static void MakeRowStr( OUStringBuffer& rBuffer, SCROW nRow ); @@ -751,7 +751,7 @@ void Convention_A1::MakeRowStr( OUStringBuffer& rBuffer, SCROW nRow ) struct ConventionOOO_A1 : public Convention_A1 { ConventionOOO_A1() : Convention_A1 (FormulaGrammar::CONV_OOO) { } - ConventionOOO_A1( FormulaGrammar::AddressConvention eConv ) : Convention_A1 (eConv) { } + explicit ConventionOOO_A1( FormulaGrammar::AddressConvention eConv ) : Convention_A1 (eConv) { } static void MakeTabStr( OUStringBuffer &rBuf, const std::vector<OUString>& rTabNames, SCTAB nTab ) { @@ -1230,7 +1230,7 @@ struct ConventionXL struct ConventionXL_A1 : public Convention_A1, public ConventionXL { ConventionXL_A1() : Convention_A1( FormulaGrammar::CONV_XL_A1 ) { } - ConventionXL_A1( FormulaGrammar::AddressConvention eConv ) : Convention_A1( eConv ) { } + explicit ConventionXL_A1( FormulaGrammar::AddressConvention eConv ) : Convention_A1( eConv ) { } static void makeSingleCellStr( OUStringBuffer& rBuf, const ScSingleRefData& rRef, const ScAddress& rAbs ) { diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index 23570886bd26..2552d4064b6c 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -920,7 +920,7 @@ class FindByTable : public unary_function<std::unique_ptr<ScDBData>, bool> { SCTAB mnTab; public: - FindByTable(SCTAB nTab) : mnTab(nTab) {} + explicit FindByTable(SCTAB nTab) : mnTab(nTab) {} bool operator() (std::unique_ptr<ScDBData> const& p) const { @@ -992,7 +992,7 @@ class FindByRange : public unary_function<std::unique_ptr<ScDBData>, bool> { const ScRange& mrRange; public: - FindByRange(const ScRange& rRange) : mrRange(rRange) {} + explicit FindByRange(const ScRange& rRange) : mrRange(rRange) {} bool operator() (std::unique_ptr<ScDBData> const& p) { @@ -1005,7 +1005,7 @@ class FindByIndex : public unary_function<std::unique_ptr<ScDBData>, bool> { sal_uInt16 mnIndex; public: - FindByIndex(sal_uInt16 nIndex) : mnIndex(nIndex) {} + explicit FindByIndex(sal_uInt16 nIndex) : mnIndex(nIndex) {} bool operator() (std::unique_ptr<ScDBData> const& p) const { return p->GetIndex() == mnIndex; @@ -1016,7 +1016,7 @@ class FindByUpperName : public unary_function<std::unique_ptr<ScDBData>, bool> { const OUString& mrName; public: - FindByUpperName(const OUString& rName) : mrName(rName) {} + explicit FindByUpperName(const OUString& rName) : mrName(rName) {} bool operator() (std::unique_ptr<ScDBData> const& p) const { return p->GetUpperName() == mrName; @@ -1027,7 +1027,7 @@ class FindByPointer : public unary_function<std::unique_ptr<ScDBData>, bool> { const ScDBData* mpDBData; public: - FindByPointer(const ScDBData* pDBData) : mpDBData(pDBData) {} + explicit FindByPointer(const ScDBData* pDBData) : mpDBData(pDBData) {} bool operator() (std::unique_ptr<ScDBData> const& p) const { return p.get() == mpDBData; diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 710161a158b9..f8ed50842a21 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -96,7 +96,7 @@ private: sal_uInt16 nMaxLevel; public: - ScDetectiveData( SdrModel* pModel ); + explicit ScDetectiveData( SdrModel* pModel ); SfxItemSet& GetBoxSet() { return aBoxSet; } SfxItemSet& GetArrowSet() { return aArrowSet; } diff --git a/sc/source/core/tool/grouparealistener.cxx b/sc/source/core/tool/grouparealistener.cxx index 02c048acc9e2..d0a89a8a0f54 100644 --- a/sc/source/core/tool/grouparealistener.cxx +++ b/sc/source/core/tool/grouparealistener.cxx @@ -26,7 +26,7 @@ class Notifier : std::unary_function<ScFormulaCell*, void> { const SfxHint& mrHint; public: - Notifier( const SfxHint& rHint ) : mrHint(rHint) {} + explicit Notifier( const SfxHint& rHint ) : mrHint(rHint) {} void operator() ( ScFormulaCell* pCell ) { @@ -41,7 +41,7 @@ class CollectCellAction : public sc::ColumnSpanSet::ColumnAction std::vector<ScFormulaCell*> maCells; public: - CollectCellAction( const FormulaGroupAreaListener& rAreaListener ) : + explicit CollectCellAction( const FormulaGroupAreaListener& rAreaListener ) : mrAreaListener(rAreaListener) {} virtual void startColumn( ScColumn* pCol ) override |