diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-13 09:56:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-13 10:17:26 +0000 |
commit | 8325fcb56d014c12f35808ae6ad17f68b7a1cdd2 (patch) | |
tree | 295fe60b2a4926f1f76e734a59bd08d6601ec386 | |
parent | 5a616ca96c41b1e3d6dc2bca370f0797dfef7511 (diff) |
cppcheck: noExplicitConstructor
Change-Id: Ife26f55c28c4631aec4ba4105225bfca72da8bff
25 files changed, 45 insertions, 45 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index cafab24a10b2..e32a6f9abe82 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -45,12 +45,12 @@ namespace { class FormulaCompilerRecursionGuard { -private: - short& rRecursion; -public: - FormulaCompilerRecursionGuard( short& rRec ) - : rRecursion( rRec ) { ++rRecursion; } - ~FormulaCompilerRecursionGuard() { --rRecursion; } + private: + short& rRecursion; + public: + explicit FormulaCompilerRecursionGuard( short& rRec ) + : rRecursion( rRec ) { ++rRecursion; } + ~FormulaCompilerRecursionGuard() { --rRecursion; } }; short lcl_GetRetFormat( OpCode eOpCode ) diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx index cb8642cbe78e..c2a66906179e 100644 --- a/formula/source/ui/dlg/structpg.hxx +++ b/formula/source/ui/dlg/structpg.hxx @@ -88,7 +88,7 @@ protected: public: - StructPage( vcl::Window* pParent); + explicit StructPage(vcl::Window* pParent); virtual ~StructPage(); virtual void dispose() override; diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index 7b29a84c667b..59bd74f44073 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -99,7 +99,7 @@ class exclude : public std::unary_function<OString, bool> { public: - exclude(const string_container_t& exclude_list) + explicit exclude(const string_container_t& exclude_list) { string_container_t::const_iterator iter = exclude_list.begin(); string_container_t::const_iterator iter_end = exclude_list.end(); diff --git a/sal/workben/measure_oustrings.cxx b/sal/workben/measure_oustrings.cxx index 0a4eb45b09f2..eeca8ccf2906 100644 --- a/sal/workben/measure_oustrings.cxx +++ b/sal/workben/measure_oustrings.cxx @@ -54,7 +54,7 @@ private: const char *m_pMessage; sal_uInt32 m_nStartTime, m_nEndTime; public: - TimerMeasure(const char *pMessage) + explicit TimerMeasure(const char *pMessage) : m_pMessage(pMessage) { m_nStartTime = osl_getGlobalTimer(); 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 ); diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 1f8a3db02147..3c1fc4618625 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -306,8 +306,8 @@ EventInfoHash& getEventTransInfo() class ScriptEventHelper { public: - ScriptEventHelper( const Reference< XInterface >& xControl ); - ScriptEventHelper( const OUString& sCntrlServiceName ); + explicit ScriptEventHelper( const Reference< XInterface >& xControl ); + explicit ScriptEventHelper( const OUString& sCntrlServiceName ); ~ScriptEventHelper(); Sequence< ScriptEventDescriptor > createEvents( const OUString& sCodeName ); Sequence< OUString > getEventListeners(); @@ -570,7 +570,7 @@ class EventListener : public EventListener_BASE { public: - EventListener( const Reference< XComponentContext >& rxContext ); + explicit EventListener( const Reference< XComponentContext >& rxContext ); // XEventListener virtual void SAL_CALL disposing(const lang::EventObject& Source) throw( RuntimeException, std::exception ) override; using cppu::OPropertySetHelper::disposing; diff --git a/sfx2/uiconfig/ui/templatedlg.ui b/sfx2/uiconfig/ui/templatedlg.ui index 6ed0172f0d02..836c88408d69 100644 --- a/sfx2/uiconfig/ui/templatedlg.ui +++ b/sfx2/uiconfig/ui/templatedlg.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.19.0 --> <interface> <requires lib="gtk+" version="3.6"/> <requires lib="LibreOffice" version="1.0"/> diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 8ec8c3749829..720b48b1e80e 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -121,7 +121,7 @@ namespace SvtFileView_Impl* m_pTimeoutHandler; public: - CallbackTimer( SvtFileView_Impl* _pHandler ) : m_pTimeoutHandler( _pHandler ) { } + explicit CallbackTimer( SvtFileView_Impl* _pHandler ) : m_pTimeoutHandler( _pHandler ) { } protected: virtual void SAL_CALL onShot() override; @@ -221,7 +221,7 @@ private: void Init(); // reads the translation file and fills the (internal) list public: - NameTranslationList( const INetURLObject& rBaseURL ); + explicit NameTranslationList( const INetURLObject& rBaseURL ); // rBaseURL: path to folder for which the translation of the entries // should be done @@ -293,7 +293,7 @@ class NameTranslator_Impl : public ::svt::IContentTitleTranslation private: NameTranslationList* mpActFolder; public: - NameTranslator_Impl( const INetURLObject& rActualFolder ); + explicit NameTranslator_Impl( const INetURLObject& rActualFolder ); virtual ~NameTranslator_Impl(); // IContentTitleTranslation diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index de4c2155828e..70b30c19907b 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -108,7 +108,7 @@ private: ImplFontListFontInfo* mpFirst; FontListFontNameType mnType; - ImplFontListNameInfo(const OUString& rSearchName) + explicit ImplFontListNameInfo(const OUString& rSearchName) : maSearchName(rSearchName) , mpFirst(nullptr) , mnType(FontListFontNameType::NONE) |