diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-02 09:52:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-02 10:16:38 +0000 |
commit | 4ea0390faa22037f1d4f703c0882a027cf2ae643 (patch) | |
tree | cbcc7db6e327ef0efa53d26241fc48f0ff2ee90f /sc/source | |
parent | 708d1c5ab242b545ced598879233fc662d7e6cc0 (diff) |
cppcheck: noExplicitConstructor
Change-Id: I06186e8f0bbc8522f538e8639a68e816093becc2
Diffstat (limited to 'sc/source')
46 files changed, 77 insertions, 77 deletions
diff --git a/sc/source/filter/xml/XMLTableMasterPageExport.hxx b/sc/source/filter/xml/XMLTableMasterPageExport.hxx index 33a42186ab10..099cc40079df 100644 --- a/sc/source/filter/xml/XMLTableMasterPageExport.hxx +++ b/sc/source/filter/xml/XMLTableMasterPageExport.hxx @@ -47,7 +47,7 @@ protected: bool bAutoStyles ) override; public: - XMLTableMasterPageExport( ScXMLExport& rExp ); + explicit XMLTableMasterPageExport( ScXMLExport& rExp ); virtual ~XMLTableMasterPageExport(); }; diff --git a/sc/source/filter/xml/XMLTableShapeResizer.hxx b/sc/source/filter/xml/XMLTableShapeResizer.hxx index aec8c79f7593..bead3395fa08 100644 --- a/sc/source/filter/xml/XMLTableShapeResizer.hxx +++ b/sc/source/filter/xml/XMLTableShapeResizer.hxx @@ -47,7 +47,7 @@ class ScMyOLEFixer const OUString& rName, const OUString& rRangeList); public: - ScMyOLEFixer(ScXMLImport& rImport); + explicit ScMyOLEFixer(ScXMLImport& rImport); ~ScMyOLEFixer(); static bool IsOLE(css::uno::Reference< css::drawing::XShape >& rShape); diff --git a/sc/source/filter/xml/cachedattraccess.hxx b/sc/source/filter/xml/cachedattraccess.hxx index 548be156a0d7..6556617d9080 100644 --- a/sc/source/filter/xml/cachedattraccess.hxx +++ b/sc/source/filter/xml/cachedattraccess.hxx @@ -32,7 +32,7 @@ class ScXMLCachedRowAttrAccess }; public: - ScXMLCachedRowAttrAccess(ScDocument* pDoc); + explicit ScXMLCachedRowAttrAccess(ScDocument* pDoc); bool rowHidden(sal_Int32 nTab, sal_Int32 nRow); bool rowFiltered(sal_Int32 nTab, sal_Int32 nRow); diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx index e11a07f38803..f302f30c3d26 100644 --- a/sc/source/filter/xml/xmlcelli.hxx +++ b/sc/source/filter/xml/xmlcelli.hxx @@ -44,7 +44,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext SfxItemSet maItemSet; ESelection maSelection; - ParaFormat(ScEditEngineDefaulter& rEditEngine); + explicit ParaFormat(ScEditEngineDefaulter& rEditEngine); }; struct Field : boost::noncopyable @@ -52,7 +52,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext SvxFieldData* mpData; ESelection maSelection; - Field(SvxFieldData* pData); + explicit Field(SvxFieldData* pData); ~Field(); }; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index d4a05529df15..87d5c3d314e5 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -307,7 +307,7 @@ Calc_XMLOasisSettingsExporter_get_implementation(css::uno::XComponentContext* co class ScXMLShapeExport : public XMLShapeExport { public: - ScXMLShapeExport(SvXMLExport& rExp) : XMLShapeExport(rExp) {} + explicit ScXMLShapeExport(SvXMLExport& rExp) : XMLShapeExport(rExp) {} virtual ~ScXMLShapeExport(); /** is called before a shape element for the given XShape is exported */ diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx index 5c14bbe49773..e4db602a096b 100644 --- a/sc/source/filter/xml/xmlfilti.hxx +++ b/sc/source/filter/xml/xmlfilti.hxx @@ -44,7 +44,7 @@ class ScXMLFilterContext : public SvXMLImportContext { bool mbOr; int mnCondCount; - ConnStackItem(bool bOr); + explicit ConnStackItem(bool bOr); }; ScQueryParam& mrQueryParam; ScXMLDatabaseRangeContext* pDatabaseRangeContext; diff --git a/sc/source/filter/xml/xmlnexpi.hxx b/sc/source/filter/xml/xmlnexpi.hxx index 5495378eecbd..994a71c6849c 100644 --- a/sc/source/filter/xml/xmlnexpi.hxx +++ b/sc/source/filter/xml/xmlnexpi.hxx @@ -50,7 +50,7 @@ public: class GlobalInserter : public Inserter { public: - GlobalInserter(ScXMLImport& rImport); + explicit GlobalInserter(ScXMLImport& rImport); virtual void insert(ScMyNamedExpression* pExp) override; private: ScXMLImport& mrImport; diff --git a/sc/source/filter/xml/xmlstyle.hxx b/sc/source/filter/xml/xmlstyle.hxx index 7b50eaf3f036..6cff5eff454a 100644 --- a/sc/source/filter/xml/xmlstyle.hxx +++ b/sc/source/filter/xml/xmlstyle.hxx @@ -111,7 +111,7 @@ protected: ::std::vector< XMLPropertyState >& rProperties, css::uno::Reference<css::beans::XPropertySet > rPropSet ) const override; public: - ScXMLCellExportPropertyMapper( + explicit ScXMLCellExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper ); virtual ~ScXMLCellExportPropertyMapper(); virtual void handleElementItem( @@ -140,7 +140,7 @@ protected: ::std::vector< XMLPropertyState >& rProperties, css::uno::Reference<css::beans::XPropertySet > rPropSet ) const override; public: - ScXMLRowExportPropertyMapper( + explicit ScXMLRowExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper ); virtual ~ScXMLRowExportPropertyMapper(); }; @@ -148,7 +148,7 @@ public: class ScXMLColumnExportPropertyMapper : public SvXMLExportPropertyMapper { public: - ScXMLColumnExportPropertyMapper( + explicit ScXMLColumnExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper ); virtual ~ScXMLColumnExportPropertyMapper(); @@ -166,7 +166,7 @@ class ScXMLTableExportPropertyMapper : public SvXMLExportPropertyMapper { protected: public: - ScXMLTableExportPropertyMapper( + explicit ScXMLTableExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper ); virtual ~ScXMLTableExportPropertyMapper(); @@ -203,7 +203,7 @@ class ScXMLAutoStylePoolP : public SvXMLAutoStylePoolP ) const override; public: - ScXMLAutoStylePoolP(ScXMLExport& rScXMLExport); + explicit ScXMLAutoStylePoolP(ScXMLExport& rScXMLExport); virtual ~ScXMLAutoStylePoolP(); }; diff --git a/sc/source/filter/xml/xmlsubti.hxx b/sc/source/filter/xml/xmlsubti.hxx index 5ee58283bbc8..3f9a24929228 100644 --- a/sc/source/filter/xml/xmlsubti.hxx +++ b/sc/source/filter/xml/xmlsubti.hxx @@ -68,7 +68,7 @@ private: void SetTableStyle(const OUString& sStyleName); public: - ScMyTables(ScXMLImport& rImport); + explicit ScMyTables(ScXMLImport& rImport); ~ScMyTables(); void NewSheet(const OUString& sTableName, const OUString& sStyleName, const ScXMLTabProtectionData& rProtectData); diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 4b01f4311f9e..d1279ced0851 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -225,7 +225,7 @@ struct DeselectShape struct SelectShape { uno::Reference < drawing::XShapes > xShapes; - SelectShape(uno::Reference<drawing::XShapes>& xTemp) : xShapes(xTemp) {} + explicit SelectShape(uno::Reference<drawing::XShapes>& xTemp) : xShapes(xTemp) {} void operator() (const ScAccessibleShapeData* pAccShapeData) const { if (pAccShapeData && pAccShapeData->bSelectable) @@ -1378,7 +1378,7 @@ namespace struct ScVisAreaChanged { ScAccessibleDocument* mpAccDoc; - ScVisAreaChanged(ScAccessibleDocument* pAccDoc) : mpAccDoc(pAccDoc) {} + explicit ScVisAreaChanged(ScAccessibleDocument* pAccDoc) : mpAccDoc(pAccDoc) {} void operator() (const ScAccessibleShapeData* pAccShapeData) const { if (pAccShapeData && pAccShapeData->pAccShape.is()) diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 1e88efead19b..d32f3c1416c1 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -207,7 +207,7 @@ void ScNotesChildren::Init(const Rectangle& rVisRect, sal_Int32 nOffset) struct ScParaFound { sal_Int32 mnIndex; - ScParaFound(sal_Int32 nIndex) : mnIndex(nIndex) {} + explicit ScParaFound(sal_Int32 nIndex) : mnIndex(nIndex) {} bool operator() (const ScAccNote& rNote) { bool bResult(false); @@ -264,7 +264,7 @@ struct ScPointFound { Rectangle maPoint; sal_Int32 mnParagraphs; - ScPointFound(const Point& rPoint) : maPoint(rPoint, Size(0, 0)), mnParagraphs(0) {} + explicit ScPointFound(const Point& rPoint) : maPoint(rPoint, Size(0, 0)), mnParagraphs(0) {} bool operator() (const ScAccNote& rNote) { bool bResult(false); @@ -421,7 +421,7 @@ sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData, struct ScChildGone { ScAccessibleDocumentPagePreview* mpAccDoc; - ScChildGone(ScAccessibleDocumentPagePreview* pAccDoc) : mpAccDoc(pAccDoc) {} + explicit ScChildGone(ScAccessibleDocumentPagePreview* pAccDoc) : mpAccDoc(pAccDoc) {} void operator() (const uno::Reference<XAccessible>& xAccessible) const { if (mpAccDoc) @@ -439,7 +439,7 @@ struct ScChildGone struct ScChildNew { ScAccessibleDocumentPagePreview* mpAccDoc; - ScChildNew(ScAccessibleDocumentPagePreview* pAccDoc) : mpAccDoc(pAccDoc) {} + explicit ScChildNew(ScAccessibleDocumentPagePreview* pAccDoc) : mpAccDoc(pAccDoc) {} void operator() (const uno::Reference<XAccessible>& xAccessible) const { if (mpAccDoc) @@ -808,7 +808,7 @@ namespace struct ScVisAreaChanged { const ScIAccessibleViewForwarder* mpViewForwarder; - ScVisAreaChanged(const ScIAccessibleViewForwarder* pViewForwarder) : mpViewForwarder(pViewForwarder) {} + explicit ScVisAreaChanged(const ScIAccessibleViewForwarder* pViewForwarder) : mpViewForwarder(pViewForwarder) {} void operator() (const ScShapeChild& rAccShapeData) const { if (rAccShapeData.mpAccShape.is()) @@ -956,7 +956,7 @@ uno::Reference<XAccessible> ScShapeChildren::GetControl(sal_Int32 nIndex) const struct ScShapePointFound { Point maPoint; - ScShapePointFound(const awt::Point& rPoint) : maPoint(VCLPoint(rPoint)) {} + explicit ScShapePointFound(const awt::Point& rPoint) : maPoint(VCLPoint(rPoint)) {} bool operator() (const ScShapeChild& rShape) { bool bResult(false); diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index ca348a921e56..69cd4378d3b3 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -246,7 +246,7 @@ protected: ScPreviewShell* mpViewShell; mutable ScPreviewTableInfo* mpTableInfo; public: - ScPreviewViewForwarder(ScPreviewShell* pViewShell); + explicit ScPreviewViewForwarder(ScPreviewShell* pViewShell); virtual ~ScPreviewViewForwarder(); virtual bool IsValid() const override; diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 75f73d39fcc4..c4ab71e757e9 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -60,7 +60,7 @@ class ScCondFormatManagerDlg; #define DECL_ABSTDLG_BASE(Class,DialogClass) \ ScopedVclPtr<DialogClass> pDlg; \ public: \ - Class( DialogClass* p) \ + explicit Class( DialogClass* p) \ : pDlg(p) \ {} \ virtual ~Class(); \ @@ -69,7 +69,7 @@ public: \ #define DECL_ABSTDLG2_BASE(Class,DialogClass) \ ScopedVclPtr<DialogClass> pDlg; \ public: \ - Class( DialogClass* p) \ + explicit Class( DialogClass* p) \ : pDlg(p) \ {} \ virtual ~Class(); \ diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index db81464a9850..cb428a2843d7 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -103,7 +103,7 @@ struct ScZoomSliderWnd::ScZoomSliderWnd_Impl bool mbValuesSet; bool mbOmitPaint; - ScZoomSliderWnd_Impl( sal_uInt16 nCurrentZoom ) : + explicit ScZoomSliderWnd_Impl( sal_uInt16 nCurrentZoom ) : mnCurrentZoom( nCurrentZoom ), mnMinZoom( 10 ), mnMaxZoom( 400 ), diff --git a/sc/source/ui/collab/sendfunc.cxx b/sc/source/ui/collab/sendfunc.cxx index 7e18ee8676ec..728a67d68795 100644 --- a/sc/source/ui/collab/sendfunc.cxx +++ b/sc/source/ui/collab/sendfunc.cxx @@ -53,7 +53,7 @@ class ScChangeOpReader { std::vector< OUString > maArgs; public: - ScChangeOpReader( const OUString &rString) + explicit ScChangeOpReader(const OUString &rString) { // will need to handle escaping etc. // Surely someone else wrote this before ! [!?] @@ -174,7 +174,7 @@ class ScChangeOpWriter } public: - ScChangeOpWriter( const char *pName ) + explicit ScChangeOpWriter( const char *pName ) { aMessage.appendAscii( pName ); appendSeparator(); diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index ad921b7e54cc..4ffc12fb2b39 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -47,7 +47,7 @@ struct Func_SetType { sal_Int32 mnType; - inline Func_SetType( sal_Int32 nType ) : mnType( nType ) {} + explicit Func_SetType( sal_Int32 nType ) : mnType( nType ) {} inline void operator()( ScCsvColState& rState ) const { rState.mnType = mnType; } }; @@ -55,7 +55,7 @@ struct Func_SetType struct Func_Select { bool mbSelect; - inline Func_Select( bool bSelect ) : mbSelect( bSelect ) {} + explicit Func_Select( bool bSelect ) : mbSelect( bSelect ) {} inline void operator()( ScCsvColState& rState ) const { rState.Select( mbSelect ); } }; diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 211a52216fad..d80ed97a40a7 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -505,7 +505,7 @@ class FindByName : public ::std::unary_function<std::unique_ptr<ScDBData>, bool> { const OUString& mrName; public: - FindByName(const OUString& rName) : mrName(rName) {} + explicit FindByName(const OUString& rName) : mrName(rName) {} bool operator() (std::unique_ptr<ScDBData> const& p) const { return p->GetName().equals(mrName); diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 5ca9b8f5dfc0..985f1838a8ec 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -32,7 +32,7 @@ class ScDelimiterTable { public: - ScDelimiterTable( const OUString& rDelTab ) + explicit ScDelimiterTable( const OUString& rDelTab ) : theDelTab ( rDelTab ), cSep ( '\t' ), nCount ( comphelper::string::getTokenCount(rDelTab, '\t') ), diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx index ed81680c54f2..549a3ec6e5eb 100644 --- a/sc/source/ui/docshell/autostyl.cxx +++ b/sc/source/ui/docshell/autostyl.cxx @@ -56,7 +56,7 @@ class FindByRange : public ::std::unary_function<ScAutoStyleData, bool> { ScRange maRange; public: - FindByRange(const ScRange& r) : maRange(r) {} + explicit FindByRange(const ScRange& r) : maRange(r) {} bool operator() (const ScAutoStyleData& rData) const { return rData.aRange == maRange; } }; @@ -64,7 +64,7 @@ class FindByTimeout : public ::std::unary_function<ScAutoStyleData, bool> { sal_uLong mnTimeout; public: - FindByTimeout(sal_uLong n) : mnTimeout(n) {} + explicit FindByTimeout(sal_uLong n) : mnTimeout(n) {} bool operator() (const ScAutoStyleData& rData) const { return rData.nTimeout >= mnTimeout; } }; diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 89c6234b13b0..04bbe7eeb287 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -97,7 +97,7 @@ private: class FindSrcFileByName : public unary_function<ScExternalRefManager::SrcFileData, bool> { public: - FindSrcFileByName(const OUString& rMatchName) : + explicit FindSrcFileByName(const OUString& rMatchName) : mrMatchName(rMatchName) { } @@ -219,7 +219,7 @@ class EraseRangeByIterator : unary_function<ScRangeName::iterator, void> { ScRangeName& mrRanges; public: - EraseRangeByIterator(ScRangeName& rRanges) : mrRanges(rRanges) {} + explicit EraseRangeByIterator(ScRangeName& rRanges) : mrRanges(rRanges) {} void operator() (const ScRangeName::iterator& itr) { mrRanges.erase(itr); diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx index fee703f749c7..ba1c132f978b 100644 --- a/sc/source/ui/docshell/macromgr.cxx +++ b/sc/source/ui/docshell/macromgr.cxx @@ -105,7 +105,7 @@ class VBAProjectListener : public ContainerListenerHelper { ScMacroManager* mpMacroMgr; public: - VBAProjectListener( ScMacroManager* pMacroMgr ) : mpMacroMgr( pMacroMgr ) {} + explicit VBAProjectListener( ScMacroManager* pMacroMgr ) : mpMacroMgr( pMacroMgr ) {} // XEventListener virtual void SAL_CALL disposing( const lang::EventObject& /*Source*/ ) throw(RuntimeException, std::exception) override {} diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx index b8f850f8ea7d..c3c54ea560f0 100644 --- a/sc/source/ui/miscdlgs/sharedocdlg.cxx +++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx @@ -38,7 +38,7 @@ class ScShareTable : public SvSimpleTable private: OUString m_sWidestAccessString; public: - ScShareTable(SvSimpleTableContainer& rParent) + explicit ScShareTable(SvSimpleTableContainer& rParent) : SvSimpleTable(rParent) { m_sWidestAccessString = getWidestTime(*ScGlobal::pLocaleData); diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index 40e877e885a3..909e78ca549c 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -159,7 +159,7 @@ class SpanBroadcaster : public sc::ColumnSpanSet::ColumnAction SCCOL mnCurCol; public: - SpanBroadcaster( ScDocument& rDoc ) : mrDoc(rDoc), mnCurTab(-1), mnCurCol(-1) {} + explicit SpanBroadcaster( ScDocument& rDoc ) : mrDoc(rDoc), mnCurTab(-1), mnCurCol(-1) {} virtual void startColumn( ScColumn* pCol ) override { diff --git a/sc/source/ui/unoobj/celllistsource.hxx b/sc/source/ui/unoobj/celllistsource.hxx index f7694235ab8d..538fe7e9edef 100644 --- a/sc/source/ui/unoobj/celllistsource.hxx +++ b/sc/source/ui/unoobj/celllistsource.hxx @@ -67,7 +67,7 @@ namespace calc bool m_bInitialized; /// has XInitialization::initialize been called? public: - OCellListSource( + explicit OCellListSource( const css::uno::Reference< css::sheet::XSpreadsheetDocument >& _rxDocument ); diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 373d1717ffd0..ce6e62ad957f 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -114,7 +114,7 @@ css::uno::Sequence< T > lcl_VectorToSequence( const ::std::vector< T > & rCont ) struct lcl_appendTableNumber : public ::std::unary_function< SCTAB, void > { - lcl_appendTableNumber( OUStringBuffer & rBuffer ) : + explicit lcl_appendTableNumber( OUStringBuffer & rBuffer ) : m_rBuffer( rBuffer ) {} void operator() ( SCTAB nTab ) @@ -885,7 +885,7 @@ private: class Tokens2RangeStringXML : public unary_function<ScTokenRef, void> { public: - Tokens2RangeStringXML(ScDocument* pDoc) : + explicit Tokens2RangeStringXML(ScDocument* pDoc) : mpRangeStr(new OUStringBuffer), mpDoc(pDoc), mcRangeSep(' '), @@ -1368,7 +1368,7 @@ class ShrinkRefTokenToDataRange : std::unary_function<ScTokenRef, void> { ScDocument* mpDoc; public: - ShrinkRefTokenToDataRange(ScDocument* pDoc) : mpDoc(pDoc) {} + explicit ShrinkRefTokenToDataRange(ScDocument* pDoc) : mpDoc(pDoc) {} void operator() (ScTokenRef& rRef) { if (ScRefTokenHelper::isExternalRef(rRef)) diff --git a/sc/source/ui/unoobj/exceldetect.hxx b/sc/source/ui/unoobj/exceldetect.hxx index 22e91ad6d9fb..98baceed7131 100644 --- a/sc/source/ui/unoobj/exceldetect.hxx +++ b/sc/source/ui/unoobj/exceldetect.hxx @@ -22,7 +22,7 @@ namespace com { namespace sun { namespace star { namespace uno { class ScExcelBiffDetect : public cppu::WeakImplHelper<css::document::XExtendedFilterDetection, css::lang::XServiceInfo> { public: - ScExcelBiffDetect( const css::uno::Reference<css::uno::XComponentContext>& xContext ); + explicit ScExcelBiffDetect( const css::uno::Reference<css::uno::XComponentContext>& xContext ); virtual ~ScExcelBiffDetect(); // XServiceInfo diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 0521434d79af..a0fa9df6daf5 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -173,8 +173,8 @@ class ScUnoEditEngine : public ScEditEngineDefaulter sal_uInt16 nFieldIndex; public: - ScUnoEditEngine(ScEditEngineDefaulter* pSource); - virtual ~ScUnoEditEngine(); + explicit ScUnoEditEngine(ScEditEngineDefaulter* pSource); + virtual ~ScUnoEditEngine(); virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rTxtColor, Color*& rFldColor ) override; diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 6526eb30e0a7..84ed978b6295 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -65,8 +65,8 @@ private: static ScDocument* CreateDocument(); // create and initialize doc public: - ScTempDocSource( ScTempDocCache& rDocCache ); - ~ScTempDocSource(); + explicit ScTempDocSource( ScTempDocCache& rDocCache ); + ~ScTempDocSource(); ScDocument* GetDocument(); }; @@ -340,7 +340,7 @@ protected: bool mbArgError; ScDocument* mpDoc; public: - SimpleVisitor( ScDocument* pDoc ) : mbArgError( false ), mpDoc( pDoc ) {} + explicit SimpleVisitor( ScDocument* pDoc ) : mbArgError( false ), mpDoc( pDoc ) {} // could possibly just get away with JUST the following overload // 1) virtual void visitElem( long& nCol, long& nRow, const double& elem ) // 2) virtual void visitElem( long& nCol, long& nRow, const OUString& elem ) diff --git a/sc/source/ui/unoobj/scdetect.hxx b/sc/source/ui/unoobj/scdetect.hxx index 7c1af7015c14..30bcb9563e36 100644 --- a/sc/source/ui/unoobj/scdetect.hxx +++ b/sc/source/ui/unoobj/scdetect.hxx @@ -39,7 +39,7 @@ namespace com { namespace sun { namespace star { class ScFilterDetect : public ::cppu::WeakImplHelper< css::document::XExtendedFilterDetection, css::lang::XServiceInfo > { public: - ScFilterDetect( const css::uno::Reference<css::uno::XComponentContext>& xContext ); + explicit ScFilterDetect( const css::uno::Reference<css::uno::XComponentContext>& xContext ); virtual ~ScFilterDetect(); /* XServiceInfo */ diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index bc3e83dc1510..7cefcd509960 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -83,7 +83,7 @@ class ScVbaObjectForCodeNameProvider : public ::cppu::WeakImplHelper< container: uno::Any maCachedObject; ScDocShell* mpDocShell; public: - ScVbaObjectForCodeNameProvider( ScDocShell* pDocShell ) : mpDocShell( pDocShell ) + explicit ScVbaObjectForCodeNameProvider( ScDocShell* pDocShell ) : mpDocShell( pDocShell ) { uno::Sequence< uno::Any > aArgs(2); // access the application object ( parent for workbook ) @@ -170,7 +170,7 @@ class ScVbaCodeNameProvider : public ::cppu::WeakImplHelper< document::XCodeName { ScDocShell& mrDocShell; public: - ScVbaCodeNameProvider( ScDocShell& rDocShell ) : mrDocShell(rDocShell) {} + explicit ScVbaCodeNameProvider( ScDocShell& rDocShell ) : mrDocShell(rDocShell) {} // XCodeNameQuery OUString SAL_CALL getCodeNameForObject( const uno::Reference< uno::XInterface >& xIf ) throw( uno::RuntimeException, std::exception ) override { diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index dd82b6b9670f..e536e19d3e9e 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -1372,7 +1372,7 @@ private: } public: - ShapeUnoEventAccessImpl( ScShapeObj* pShape ): mpShape( pShape ) + explicit ShapeUnoEventAccessImpl( ScShapeObj* pShape ): mpShape( pShape ) { } diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx index 7f7fac6a7bc5..6f1427677e90 100644 --- a/sc/source/ui/vba/vbaapplication.hxx +++ b/sc/source/ui/vba/vbaapplication.hxx @@ -43,7 +43,7 @@ protected: virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException) override; public: - ScVbaApplication( const css::uno::Reference< css::uno::XComponentContext >& m_xContext ); + explicit ScVbaApplication( const css::uno::Reference< css::uno::XComponentContext >& m_xContext ); virtual ~ScVbaApplication(); /** Returns true, if VBA document events are enabled. */ diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index c29ab845474c..040ad1ed7459 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -45,7 +45,7 @@ class EnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index a001908e2029..eecd6f568079 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -357,7 +357,7 @@ class RangeBorderEnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - RangeBorderEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit RangeBorderEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx index 8623b0487e8f..6eb7d6923b00 100644 --- a/sc/source/ui/vba/vbahyperlinks.cxx +++ b/sc/source/ui/vba/vbahyperlinks.cxx @@ -50,7 +50,7 @@ struct EqualAnchorFunctor uno::Reference< excel::XRange > mxAnchorRange; uno::Reference< msforms::XShape > mxAnchorShape; sal_Int32 mnType; - EqualAnchorFunctor( const uno::Reference< excel::XHyperlink >& rxHlink ) throw (uno::RuntimeException); + explicit EqualAnchorFunctor( const uno::Reference< excel::XHyperlink >& rxHlink ) throw (uno::RuntimeException); bool operator()( const uno::Reference< excel::XHyperlink >& rxHlink ) const throw (uno::RuntimeException); }; diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index 862a10e6aeeb..498957033e10 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -38,7 +38,7 @@ class IndexAccessWrapper : public XIndexAccess_BASE typedef std::vector< uno::Reference< drawing::XControlShape > > OLEObjects; OLEObjects vObjects; public: - IndexAccessWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) + explicit IndexAccessWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) { sal_Int32 nLen = xIndexAccess->getCount(); for ( sal_Int32 index = 0; index < nLen; ++index ) diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index 35c3d4159ea0..fcbeb946c988 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -184,7 +184,7 @@ class RangePageBreaksEnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - RangePageBreaksEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit RangePageBreaksEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbapalette.hxx b/sc/source/ui/vba/vbapalette.hxx index 089f918c31d5..a16b417a1a5b 100644 --- a/sc/source/ui/vba/vbapalette.hxx +++ b/sc/source/ui/vba/vbapalette.hxx @@ -34,8 +34,8 @@ class ScVbaPalette private: SfxObjectShell* m_pShell; public: - ScVbaPalette( SfxObjectShell* pShell = 0 ) : m_pShell( pShell ) {} - ScVbaPalette( const css::uno::Reference< css::frame::XModel >& rxModel ); + explicit ScVbaPalette( SfxObjectShell* pShell = 0 ) : m_pShell( pShell ) {} + explicit ScVbaPalette( const css::uno::Reference< css::frame::XModel >& rxModel ); // if no palette available e.g. because the document doesn't have a // palette defined then a default palette will be returned. css::uno::Reference< css::container::XIndexAccess > getPalette() const; diff --git a/sc/source/ui/vba/vbapropvalue.hxx b/sc/source/ui/vba/vbapropvalue.hxx index cb4e5a11278b..bb772cd8e476 100644 --- a/sc/source/ui/vba/vbapropvalue.hxx +++ b/sc/source/ui/vba/vbapropvalue.hxx @@ -36,7 +36,7 @@ class ScVbaPropValue : public PropValueImpl_BASE { PropListener* m_pListener; public: - ScVbaPropValue( PropListener* pListener ); + explicit ScVbaPropValue( PropListener* pListener ); // Attributes virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 0fce307c647e..a50929c52a88 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -498,7 +498,7 @@ class NumFormatHelper uno::Reference< beans::XPropertySet > mxRangeProps; uno::Reference< util::XNumberFormats > mxFormats; public: - NumFormatHelper( const uno::Reference< table::XCellRange >& xRange ) + explicit NumFormatHelper( const uno::Reference< table::XCellRange >& xRange ) { mxSupplier.set( getModelFromRange( xRange ), uno::UNO_QUERY_THROW ); mxRangeProps.set( xRange, uno::UNO_QUERY_THROW); @@ -709,7 +709,7 @@ class CellValueSetter : public ValueSetter protected: uno::Any maValue; public: - CellValueSetter( const uno::Any& aValue ); + explicit CellValueSetter( const uno::Any& aValue ); virtual bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell ) override; virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) override; @@ -1040,7 +1040,7 @@ class RangeValueProcessor : public RangeProcessor { const uno::Any& m_aVal; public: - RangeValueProcessor( const uno::Any& rVal ):m_aVal( rVal ) {} + explicit RangeValueProcessor( const uno::Any& rVal ):m_aVal( rVal ) {} virtual ~RangeValueProcessor() {} virtual void process( const uno::Reference< excel::XRange >& xRange ) override { @@ -1052,7 +1052,7 @@ class RangeFormulaProcessor : public RangeProcessor { const uno::Any& m_aVal; public: - RangeFormulaProcessor( const uno::Any& rVal ):m_aVal( rVal ) {} + explicit RangeFormulaProcessor( const uno::Any& rVal ):m_aVal( rVal ) {} virtual ~RangeFormulaProcessor() {} virtual void process( const uno::Reference< excel::XRange >& xRange ) override { @@ -1077,7 +1077,7 @@ class AreasVisitor private: uno::Reference< XCollection > m_Areas; public: - AreasVisitor( const uno::Reference< XCollection >& rAreas ):m_Areas( rAreas ){} + explicit AreasVisitor( const uno::Reference< XCollection >& rAreas ):m_Areas( rAreas ){} void visit( RangeProcessor& processor ) { @@ -1098,12 +1098,12 @@ class RangeHelper uno::Reference< table::XCellRange > m_xCellRange; public: - RangeHelper( const uno::Reference< table::XCellRange >& xCellRange ) throw (uno::RuntimeException) : m_xCellRange( xCellRange ) + explicit RangeHelper( const uno::Reference< table::XCellRange >& xCellRange ) throw (uno::RuntimeException) : m_xCellRange( xCellRange ) { if ( !m_xCellRange.is() ) throw uno::RuntimeException(); } - RangeHelper( const uno::Any& rCellRange ) throw (uno::RuntimeException) + explicit RangeHelper( const uno::Any& rCellRange ) throw (uno::RuntimeException) { m_xCellRange.set(rCellRange, uno::UNO_QUERY_THROW); } diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index e9a7d0dc33d1..ede740dd69e0 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -64,7 +64,7 @@ public: m_it = m_components.begin(); } - WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) : m_xContext( xContext ) + explicit WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) : m_xContext( xContext ) { uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_xContext); uno::Reference< container::XEnumeration > mxComponents = xDesktop->getComponents()->createEnumeration(); @@ -114,7 +114,7 @@ class WindowsAccessImpl : public WindowsAccessImpl_BASE Components m_windows; NameIndexHash namesToIndices; public: - WindowsAccessImpl( const uno::Reference< uno::XComponentContext >& xContext ):m_xContext( xContext ) + explicit WindowsAccessImpl( const uno::Reference< uno::XComponentContext >& xContext ):m_xContext( xContext ) { uno::Reference< container::XEnumeration > xEnum = new WindowComponentEnumImpl( m_xContext ); sal_Int32 nIndex=0; diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index 676febee36e7..13ad4ed2173a 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -64,7 +64,7 @@ class WorkSheetsEnumeration : public ::cppu::WeakImplHelper< container::XEnumera SheetMap mSheetMap; SheetMap::iterator mIt; public: - WorkSheetsEnumeration( const SheetMap& sMap ) : mSheetMap( sMap ), mIt( mSheetMap.begin() ) {} + explicit WorkSheetsEnumeration( const SheetMap& sMap ) : mSheetMap( sMap ), mIt( mSheetMap.begin() ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override { return ( mIt != mSheetMap.end() ); @@ -85,7 +85,7 @@ class SheetCollectionHelper : public ::cppu::WeakImplHelper< container::XNameAcc SheetMap mSheetMap; SheetMap::iterator cachePos; public: - SheetCollectionHelper( const SheetMap& sMap ) : mSheetMap( sMap ), cachePos(mSheetMap.begin()) {} + explicit SheetCollectionHelper( const SheetMap& sMap ) : mSheetMap( sMap ), cachePos(mSheetMap.begin()) {} // XElementAccess virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException, std::exception) override { return cppu::UnoType<sheet::XSpreadsheet>::get(); } virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException, std::exception) override { return ( !mSheetMap.empty() ); } diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index cf4b59012ae7..2acb6b22b2af 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -1603,7 +1603,7 @@ struct ScOUStringCollate { CollatorWrapper* mpCollator; - ScOUStringCollate(CollatorWrapper* pColl) : mpCollator(pColl) {} + explicit ScOUStringCollate(CollatorWrapper* pColl) : mpCollator(pColl) {} bool operator()(const OUString& rStr1, const OUString& rStr2) const { diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index 00cdb03dba2e..2100793ffdf8 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -293,7 +293,7 @@ class InsertTabIndex : std::unary_function<ScRange, void> { std::vector<SCTAB>& mrTabs; public: - InsertTabIndex(std::vector<SCTAB>& rTabs) : mrTabs(rTabs) {} + explicit InsertTabIndex(std::vector<SCTAB>& rTabs) : mrTabs(rTabs) {} void operator() (const ScRange& rRange) { mrTabs.push_back(rRange.aStart.Tab()); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 8037a8a11497..ae6503e9aa78 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -687,7 +687,7 @@ class AddSelectedItemString : public std::unary_function<ScQueryEntry::Item, voi { std::unordered_set<OUString, OUStringHash>& mrSet; public: - AddSelectedItemString(std::unordered_set<OUString, OUStringHash>& r) : + explicit AddSelectedItemString(std::unordered_set<OUString, OUStringHash>& r) : mrSet(r) {} void operator() (const ScQueryEntry::Item& rItem) diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index 32c30941e2a5..f973ef3e2352 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -241,7 +241,7 @@ class UnhighlightEntry : std::unary_function<SvTreeListEntry*, void> { SvTreeListBox& mrTree; public: - UnhighlightEntry(SvTreeListBox& rTree) : mrTree(rTree) {} + explicit UnhighlightEntry(SvTreeListBox& rTree) : mrTree(rTree) {} void operator() (SvTreeListEntry* p) { |