summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-11-13 09:56:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-11-13 10:17:26 +0000
commit8325fcb56d014c12f35808ae6ad17f68b7a1cdd2 (patch)
tree295fe60b2a4926f1f76e734a59bd08d6601ec386 /sc
parent5a616ca96c41b1e3d6dc2bca370f0797dfef7511 (diff)
cppcheck: noExplicitConstructor
Change-Id: Ife26f55c28c4631aec4ba4105225bfca72da8bff
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/helper/qahelper.hxx2
-rw-r--r--sc/qa/unit/helper/shared_test_impl.hxx2
-rw-r--r--sc/qa/unit/helper/sorthelper.hxx2
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx2
-rw-r--r--sc/qa/unit/ucalc.cxx4
-rw-r--r--sc/source/core/data/cellvalues.cxx2
-rw-r--r--sc/source/core/data/colorscale.cxx2
-rw-r--r--sc/source/core/data/column4.cxx14
-rw-r--r--sc/source/core/data/columnspanset.cxx2
-rw-r--r--sc/source/core/data/documen6.cxx2
-rw-r--r--sc/source/core/data/documen7.cxx2
-rw-r--r--sc/source/core/data/document.cxx4
-rw-r--r--sc/source/core/data/document10.cxx2
-rw-r--r--sc/source/core/data/documentimport.cxx2
-rw-r--r--sc/source/core/data/documentstreamaccess.cxx2
-rw-r--r--sc/source/core/data/dpcache.cxx8
-rw-r--r--sc/workben/test.cxx2
17 files changed, 28 insertions, 28 deletions
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 2a33b6562819..1dd1b9c40a43 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -218,7 +218,7 @@ protected:
public:
static const FileFormat* getFileFormats() { return aFileFormats; }
- ScBootstrapFixture( const OUString& rsBaseString );
+ explicit ScBootstrapFixture( const OUString& rsBaseString );
virtual ~ScBootstrapFixture();
void createFileURL(const OUString& aFileBase, const OUString& aFileExtension, OUString& rFilePath);
diff --git a/sc/qa/unit/helper/shared_test_impl.hxx b/sc/qa/unit/helper/shared_test_impl.hxx
index 7a92c4ec0a36..0c274816c20c 100644
--- a/sc/qa/unit/helper/shared_test_impl.hxx
+++ b/sc/qa/unit/helper/shared_test_impl.hxx
@@ -17,7 +17,7 @@
struct FindCondFormatByEnclosingRange
{
- FindCondFormatByEnclosingRange(const ScRange& rRange):
+ explicit FindCondFormatByEnclosingRange(const ScRange& rRange):
mrRange(rRange) {}
bool operator()(const std::unique_ptr<ScConditionalFormat>& pFormat)
diff --git a/sc/qa/unit/helper/sorthelper.hxx b/sc/qa/unit/helper/sorthelper.hxx
index 2e8110727648..d094e0b16113 100644
--- a/sc/qa/unit/helper/sorthelper.hxx
+++ b/sc/qa/unit/helper/sorthelper.hxx
@@ -20,7 +20,7 @@
class SortTypeSetter {
bool mbSortRefUpdate;
public:
- SortTypeSetter(bool bSortRefUpdate)
+ explicit SortTypeSetter(bool bSortRefUpdate)
{
mbSortRefUpdate = changeTo(bSortRefUpdate);
}
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index cdb0aedf1dc7..f3abf7de5e7b 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -1738,7 +1738,7 @@ class FindDimByName : std::unary_function<const ScDPSaveDimension*, bool>
{
OUString maName;
public:
- FindDimByName(const OUString& rName) : maName(rName) {}
+ explicit FindDimByName(const OUString& rName) : maName(rName) {}
bool operator() (const ScDPSaveDimension* p) const
{
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index f5871f7aa339..4700c6c4a39d 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -116,7 +116,7 @@ class MeasureTimeSwitch
double& mrDiff;
TimeValue maTimeBefore;
public:
- MeasureTimeSwitch(double& rDiff) : mrDiff(rDiff)
+ explicit MeasureTimeSwitch(double& rDiff) : mrDiff(rDiff)
{
mrDiff = 9999.0;
osl_getSystemTime(&maTimeBefore);
@@ -3489,7 +3489,7 @@ void Test::testCopyPasteSkipEmpty()
{
ScDocument* mpDoc;
- TestRange( ScDocument* pDoc ) : mpDoc(pDoc) {}
+ explicit TestRange( ScDocument* pDoc ) : mpDoc(pDoc) {}
bool checkRange( const ScAddress& rPos, const Check* p, const Check* pEnd )
{
diff --git a/sc/source/core/data/cellvalues.cxx b/sc/source/core/data/cellvalues.cxx
index ca319ee6e4ce..5056be872d03 100644
--- a/sc/source/core/data/cellvalues.cxx
+++ b/sc/source/core/data/cellvalues.cxx
@@ -275,7 +275,7 @@ struct TableValues::Impl
ScRange maRange;
TablesType m_Tables;
- Impl( const ScRange& rRange ) : maRange(rRange)
+ explicit Impl( const ScRange& rRange ) : maRange(rRange)
{
size_t nTabs = rRange.aEnd.Tab() - rRange.aStart.Tab() + 1;
size_t nCols = rRange.aEnd.Col() - rRange.aStart.Col() + 1;
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 50cecc21e43a..2fc9a6443069 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -31,7 +31,7 @@ private:
void startListening(ScTokenArray* pTokens, const ScAddress& rPos);
public:
- ScFormulaListener(ScFormulaCell* pCell);
+ explicit ScFormulaListener(ScFormulaCell* pCell);
virtual ~ScFormulaListener();
void Notify( const SfxHint& rHint ) override;
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index dc42d74762ac..6134eefb77c7 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -403,7 +403,7 @@ class StartListeningHandler
sc::StartListeningContext& mrCxt;
public:
- StartListeningHandler( sc::StartListeningContext& rCxt ) :
+ explicit StartListeningHandler( sc::StartListeningContext& rCxt ) :
mrCxt(rCxt) {}
void operator() (size_t /*nRow*/, ScFormulaCell* pCell)
@@ -417,7 +417,7 @@ class EndListeningHandler
sc::EndListeningContext& mrCxt;
public:
- EndListeningHandler( sc::EndListeningContext& rCxt ) :
+ explicit EndListeningHandler( sc::EndListeningContext& rCxt ) :
mrCxt(rCxt) {}
void operator() (size_t /*nRow*/, ScFormulaCell* pCell)
@@ -931,7 +931,7 @@ private:
}
public:
- ScriptTypeUpdater( ScColumn& rCol ) :
+ explicit ScriptTypeUpdater( ScColumn& rCol ) :
mrCol(rCol),
mrTextAttrs(rCol.GetCellAttrStore()),
miPosAttr(mrTextAttrs.begin()),
@@ -1053,7 +1053,7 @@ class RelativeRefBoundChecker
ScRange maBoundRange;
public:
- RelativeRefBoundChecker( const ScRange& rBoundRange ) :
+ explicit RelativeRefBoundChecker( const ScRange& rBoundRange ) :
maBoundRange(rBoundRange) {}
void operator() ( size_t /*nRow*/, ScFormulaCell* pCell )
@@ -1100,7 +1100,7 @@ class ListenerCollector
{
std::vector<SvtListener*>& mrListeners;
public:
- ListenerCollector( std::vector<SvtListener*>& rListener ) :
+ explicit ListenerCollector( std::vector<SvtListener*>& rListener ) :
mrListeners(rListener) {}
void operator() ( size_t /*nRow*/, SvtBroadcaster* p )
@@ -1114,7 +1114,7 @@ class FormulaCellCollector
{
std::vector<ScFormulaCell*>& mrCells;
public:
- FormulaCellCollector( std::vector<ScFormulaCell*>& rCells ) : mrCells(rCells) {}
+ explicit FormulaCellCollector( std::vector<ScFormulaCell*>& rCells ) : mrCells(rCells) {}
void operator() ( size_t /*nRow*/, ScFormulaCell* p )
{
@@ -1273,7 +1273,7 @@ class EndListeningFormulaCellsHandler
SCROW mnEndRow;
public:
- EndListeningFormulaCellsHandler( sc::EndListeningContext& rEndCxt ) :
+ explicit EndListeningFormulaCellsHandler( sc::EndListeningContext& rEndCxt ) :
mrEndCxt(rEndCxt), mnStartRow(-1), mnEndRow(-1) {}
void operator() ( const sc::CellStoreType::value_type& node, size_t nOffset, size_t nDataSize )
diff --git a/sc/source/core/data/columnspanset.cxx b/sc/source/core/data/columnspanset.cxx
index 6c19bd952c87..d5d44030461b 100644
--- a/sc/source/core/data/columnspanset.cxx
+++ b/sc/source/core/data/columnspanset.cxx
@@ -276,7 +276,7 @@ class Scanner
{
SingleColumnSpanSet::ColumnSpansType& mrRanges;
public:
- Scanner(SingleColumnSpanSet::ColumnSpansType& rRanges) : mrRanges(rRanges) {}
+ explicit Scanner(SingleColumnSpanSet::ColumnSpansType& rRanges) : mrRanges(rRanges) {}
void operator() (const sc::CellStoreType::value_type& node, size_t nOffset, size_t nDataSize)
{
diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx
index e8a80ff9b6ca..e7713e16495c 100644
--- a/sc/source/core/data/documen6.cxx
+++ b/sc/source/core/data/documen6.cxx
@@ -158,7 +158,7 @@ class ScriptTypeAggregator : public sc::ColumnSpanSet::Action
SvtScriptType mnScriptType;
public:
- ScriptTypeAggregator(ScDocument& rDoc) : mrDoc(rDoc), mnScriptType(SvtScriptType::NONE) {}
+ explicit ScriptTypeAggregator(ScDocument& rDoc) : mrDoc(rDoc), mnScriptType(SvtScriptType::NONE) {}
virtual void startColumn(SCTAB nTab, SCCOL nCol) override
{
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index b4c136793ebf..447a688bcae6 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -175,7 +175,7 @@ class RefMovedNotifier : std::unary_function<SvtListener*, void>
{
const sc::RefMovedHint& mrHint;
public:
- RefMovedNotifier( const sc::RefMovedHint& rHint ) : mrHint(rHint) {}
+ explicit RefMovedNotifier( const sc::RefMovedHint& rHint ) : mrHint(rHint) {}
void operator() ( SvtListener* p )
{
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index ba750bc17c57..5225443475b2 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -143,7 +143,7 @@ struct ScDefaultAttr
const ScPatternAttr* pAttr;
SCROW nFirst;
SCSIZE nCount;
- ScDefaultAttr(const ScPatternAttr* pPatAttr) : pAttr(pPatAttr), nFirst(0), nCount(0) {}
+ explicit ScDefaultAttr(const ScPatternAttr* pPatAttr) : pAttr(pPatAttr), nFirst(0), nCount(0) {}
};
struct ScLessDefaultAttr
@@ -2649,7 +2649,7 @@ class BroadcastAction : public sc::ColumnSpanSet::ColumnAction
ScColumn* mpCol;
public:
- BroadcastAction( ScDocument& rDoc ) : mrDoc(rDoc), mpCol(nullptr) {}
+ explicit BroadcastAction( ScDocument& rDoc ) : mrDoc(rDoc), mpCol(nullptr) {}
virtual void startColumn( ScColumn* pCol ) override
{
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index c09b7c4283ba..d3303edcd61c 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -395,7 +395,7 @@ class StartNeededListenersHandler : std::unary_function<ScTable*, void>
{
std::shared_ptr<sc::StartListeningContext> mpCxt;
public:
- StartNeededListenersHandler( ScDocument& rDoc ) : mpCxt(new sc::StartListeningContext(rDoc)) {}
+ explicit StartNeededListenersHandler( ScDocument& rDoc ) : mpCxt(new sc::StartListeningContext(rDoc)) {}
void operator() (ScTable* p)
{
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index 792e13239541..2af6fdb9780e 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -52,7 +52,7 @@ struct ScDocumentImportImpl
SvtScriptType mnDefaultScriptNumeric;
std::vector<TabAttr> maTabAttrs;
- ScDocumentImportImpl(ScDocument& rDoc) :
+ explicit ScDocumentImportImpl(ScDocument& rDoc) :
mrDoc(rDoc),
maListenCxt(rDoc),
maBlockPosSet(rDoc),
diff --git a/sc/source/core/data/documentstreamaccess.cxx b/sc/source/core/data/documentstreamaccess.cxx
index 1eacfc978be1..cca6861d7d2a 100644
--- a/sc/source/core/data/documentstreamaccess.cxx
+++ b/sc/source/core/data/documentstreamaccess.cxx
@@ -22,7 +22,7 @@ struct DocumentStreamAccessImpl
ScDocument& mrDoc;
ColumnBlockPositionSet maBlockPosSet;
- DocumentStreamAccessImpl( ScDocument& rDoc ) :
+ explicit DocumentStreamAccessImpl( ScDocument& rDoc ) :
mrDoc(rDoc),
maBlockPosSet(rDoc)
{}
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 01e33268fe9b..da4d08f05948 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -93,7 +93,7 @@ namespace {
class MacroInterpretIncrementer
{
public:
- MacroInterpretIncrementer(ScDocument* pDoc) :
+ explicit MacroInterpretIncrementer(ScDocument* pDoc) :
mpDoc(pDoc)
{
mpDoc->IncMacroInterpretLevel();
@@ -211,7 +211,7 @@ class PushBackValue : std::unary_function<Bucket, void>
{
ScDPCache::ScDPItemDataVec& mrItems;
public:
- PushBackValue(ScDPCache::ScDPItemDataVec& _items) : mrItems(_items) {}
+ explicit PushBackValue(ScDPCache::ScDPItemDataVec& _items) : mrItems(_items) {}
void operator() (const Bucket& v)
{
mrItems.push_back(v.maValue);
@@ -222,7 +222,7 @@ class PushBackOrderIndex : std::unary_function<Bucket, void>
{
ScDPCache::IndexArrayType& mrData;
public:
- PushBackOrderIndex(ScDPCache::IndexArrayType& _items) : mrData(_items) {}
+ explicit PushBackOrderIndex(ScDPCache::IndexArrayType& _items) : mrData(_items) {}
void operator() (const Bucket& v)
{
mrData.push_back(v.mnOrderIndex);
@@ -701,7 +701,7 @@ class InsertLabel : public std::unary_function<OUString, void>
{
LabelSet& mrNames;
public:
- InsertLabel(LabelSet& rNames) : mrNames(rNames) {}
+ explicit InsertLabel(LabelSet& rNames) : mrNames(rNames) {}
void operator() (const OUString& r)
{
mrNames.insert(r);
diff --git a/sc/workben/test.cxx b/sc/workben/test.cxx
index a3ebd5966e9b..a97442b182de 100644
--- a/sc/workben/test.cxx
+++ b/sc/workben/test.cxx
@@ -89,7 +89,7 @@ private:
FixedText* pFixedText;
public:
- expliciti ScTestListener(FixedText* pF);
+ explicit ScTestListener(FixedText* pF);
virtual ~ScTestListener();
SMART_UNO_DECLARATION( ScTestListener, UsrObject );