desktop/inc/app.hxx | 3 - desktop/source/app/app.cxx | 41 +-------------- sc/source/core/tool/interpr4.cxx | 2 sc/source/core/tool/queryparam.cxx | 2 sc/source/core/tool/rangelst.cxx | 6 +- sc/source/core/tool/rangenam.cxx | 2 sc/source/core/tool/scmatrix.cxx | 2 sc/source/filter/excel/xistyle.cxx | 2 sc/source/filter/excel/xltoolbar.hxx | 2 sc/source/filter/html/htmlpars.cxx | 2 sc/source/filter/oox/formulabuffer.cxx | 2 sc/source/filter/oox/revisionfragment.cxx | 2 sc/source/filter/oox/workbookfragment.cxx | 2 sc/source/filter/orcus/interface.cxx | 2 sc/source/filter/orcus/xmlcontext.cxx | 4 - sc/source/filter/xcl97/XclExpChangeTrack.cxx | 2 sc/source/filter/xcl97/xcl97rec.cxx | 4 - sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx | 2 sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx | 6 +- sc/source/filter/xml/XMLCodeNameProvider.hxx | 2 sc/source/filter/xml/XMLExportDDELinks.hxx | 2 sc/source/filter/xml/XMLExportDataPilot.hxx | 2 sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 2 sc/source/filter/xml/XMLExportDatabaseRanges.hxx | 2 sc/source/filter/xml/XMLExportIterator.hxx | 4 - sc/source/filter/xml/XMLExportSharedData.hxx | 2 sc/source/filter/xml/XMLStylesExportHelper.hxx | 2 sc/source/filter/xml/XMLStylesImportHelper.hxx | 4 - sd/inc/Outliner.hxx | 1 sd/source/ui/dlg/SpellDialogChildWindow.cxx | 44 +++++++++++------ sd/source/ui/inc/SpellDialogChildWindow.hxx | 6 ++ vcl/qa/afl-eventtesting/eventtesting.impress.crash-4 |binary 32 files changed, 76 insertions(+), 87 deletions(-)
New commits: commit a4ebfb2b74c6db274ae8b7ed0579a6edf47597fe Author: Caolán McNamara <[email protected]> Date: Mon Nov 2 16:08:25 2015 +0000 afl-eventtesting: crash close impress with spelling dialog active Change-Id: I1085b655a9a589f2e92edfdacfea6621d2f67d9c diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 931854d..ec54eab 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -180,6 +180,7 @@ public: int GetIgnoreCurrentPageChangesLevel() const { return mnIgnoreCurrentPageChangesLevel; }; void IncreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel++; }; void DecreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel--; }; + SdDrawDocument* GetDoc() const { return mpDrawDocument; } private: class Implementation; diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx index dbf9c9d..b59696c 100644 --- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx +++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx @@ -48,11 +48,7 @@ SpellDialogChildWindow::SpellDialogChildWindow ( SpellDialogChildWindow::~SpellDialogChildWindow() { - if (mpSdOutliner != NULL) - mpSdOutliner->EndSpelling(); - - if (mbOwnOutliner) - delete mpSdOutliner; + EndSpellingAndClearOutliner(); } SfxChildWinInfo SpellDialogChildWindow::GetInfo() const @@ -103,6 +99,29 @@ void SpellDialogChildWindow::LoseFocus() { } +void SpellDialogChildWindow::EndSpellingAndClearOutliner() +{ + if (!mpSdOutliner) + return; + EndListening(*mpSdOutliner->GetDoc()); + mpSdOutliner->EndSpelling(); + if (mbOwnOutliner) + delete mpSdOutliner; + mpSdOutliner = NULL; + mbOwnOutliner = false; +} + +void SpellDialogChildWindow::Notify(SfxBroadcaster&, const SfxHint& rHint) +{ + if (const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint)) + { + if (HINT_MODELCLEARED == pSdrHint->GetKind()) + { + EndSpellingAndClearOutliner(); + } + } +} + void SpellDialogChildWindow::ProvideOutliner() { ViewShellBase* pViewShellBase = dynamic_cast<ViewShellBase*>( SfxViewShell::Current() ); @@ -116,10 +135,7 @@ void SpellDialogChildWindow::ProvideOutliner() if(( dynamic_cast< const DrawViewShell *>( pViewShell ) != nullptr && ! mbOwnOutliner) || (dynamic_cast< const OutlineViewShell *>( pViewShell ) != nullptr && mbOwnOutliner)) { - mpSdOutliner->EndSpelling(); - if (mbOwnOutliner) - delete mpSdOutliner; - mpSdOutliner = NULL; + EndSpellingAndClearOutliner(); } // Now create/get an outliner if none is present. @@ -130,16 +146,18 @@ void SpellDialogChildWindow::ProvideOutliner() // We need an outliner for the spell check so we have // to create one. mbOwnOutliner = true; - mpSdOutliner = new Outliner ( - pViewShell->GetDoc(), - OUTLINERMODE_TEXTOBJECT); + SdDrawDocument *pDoc = pViewShell->GetDoc(); + mpSdOutliner = new Outliner(pDoc, OUTLINERMODE_TEXTOBJECT); + StartListening(*pDoc); } else if( dynamic_cast< const OutlineViewShell *>( pViewShell ) != nullptr) { // An outline view is already visible. The SdOutliner // will use it instead of creating its own. mbOwnOutliner = false; - mpSdOutliner = pViewShell->GetDoc()->GetOutliner(); + SdDrawDocument *pDoc = pViewShell->GetDoc(); + mpSdOutliner = pDoc->GetOutliner(); + StartListening(*pDoc); } // Initialize spelling. diff --git a/sd/source/ui/inc/SpellDialogChildWindow.hxx b/sd/source/ui/inc/SpellDialogChildWindow.hxx index dbfe0be..3d6f654 100644 --- a/sd/source/ui/inc/SpellDialogChildWindow.hxx +++ b/sd/source/ui/inc/SpellDialogChildWindow.hxx @@ -32,6 +32,7 @@ class Outliner; */ class SpellDialogChildWindow : public svx::SpellDialogChildWindow + , public SfxListener { public: SpellDialogChildWindow ( @@ -46,6 +47,9 @@ public: */ void InvalidateSpellDialog(); + // SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; + SFX_DECL_CHILDWINDOW_WITHID(SpellDialogChildWindow); protected: @@ -79,6 +83,8 @@ private: construction/obtaining of a new one. */ void ProvideOutliner(); + + void EndSpellingAndClearOutliner(); }; } // end of namespace ::sd diff --git a/vcl/qa/afl-eventtesting/eventtesting.impress.crash-4 b/vcl/qa/afl-eventtesting/eventtesting.impress.crash-4 new file mode 100644 index 0000000..3b0f9bc Binary files /dev/null and b/vcl/qa/afl-eventtesting/eventtesting.impress.crash-4 differ commit 9bf204f9aa2caefac13a1a680a669ba74b3731cf Author: Caolán McNamara <[email protected]> Date: Mon Nov 2 16:09:12 2015 +0000 afl-eventtesting: can simplify this now we use QueryExit Change-Id: Iddb96f51ed2fd2d7861e9448a7aa221d998ad2a5 diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index 5c6de5b..d07d285 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -160,8 +160,7 @@ class Desktop : public Application /** for ui-testing provide a mechanism to pseudo-restart by closing the open frames and reopen the frame that appeared post initial startup */ - static void CloseFrameAndReopen(css::uno::Reference<css::frame::XDesktop2> xDesktop); - static void DoExecute(css::uno::Reference<css::frame::XDesktop2> xDesktop); + static void DoExecute(); /// does initializations which are necessary for the first run of the office static void DoFirstRunInitializations(); diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index a6b1e63..036caaa 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1277,45 +1277,10 @@ static ExecuteGlobals* pExecGlobals = NULL; #define PERSIST_MAX 100 unsigned int persist_cnt; -//This closes the current frame and reopens the initial frame, useful for -//pseudo-restarting, i.e. attempt to effectively reset to the initial state of -//the application post start-up for ui-testing -void Desktop::CloseFrameAndReopen(Reference<XDesktop2> xDesktop) -{ - css::uno::Reference<css::container::XIndexAccess> xTaskContainer( - xDesktop->getFrames(), css::uno::UNO_QUERY_THROW); - sal_Int32 c = xTaskContainer->getCount(); - for (sal_Int32 i = 0; i < c; ++i) - { - css::uno::Reference< css::frame::XFrame > xFrame; - xTaskContainer->getByIndex(i) >>= xFrame; - if (!xFrame.is()) - continue; - Reference<css::frame::XDispatchProvider> xProvider(xFrame, css::uno::UNO_QUERY); - - css::uno::Reference<css::frame::XController > xController = xFrame->getController(); - css::uno::Reference<css::frame::XModel> xModel = xController->getModel(); - css::uno::Reference< css::util::XModifiable > xModifiable(xModel, css::uno::UNO_QUERY); - xModifiable->setModified(false); - - css::util::URL aCommand; - aCommand.Complete = ".uno:CloseDoc"; - - css::uno::Reference<css::uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); - Reference< css::util::XURLTransformer > xParser = css::util::URLTransformer::create(xContext); - xParser->parseStrict(aCommand); - - css::uno::Reference< css::frame::XDispatch > xDispatch = xProvider->queryDispatch(aCommand, OUString(), 0); - xDispatch->dispatch(aCommand, css::uno::Sequence< css::beans::PropertyValue >()); - } - - OpenDefault(); -} - //This just calls Execute() for all normal uses of LibreOffice, but for //ui-testing if AFL_PERSISTENT is set then on exit it will pseudo-restart (up //to PERSIST_MAX times) -void Desktop::DoExecute(Reference<XDesktop2> xDesktop) +void Desktop::DoExecute() { try_again: { @@ -1327,7 +1292,7 @@ try_again: program is executed directly; and take note of PERSIST_MAX. */ if (getenv("AFL_PERSISTENT") && persist_cnt++ < PERSIST_MAX) { - CloseFrameAndReopen(xDesktop); + OpenDefault(); #if defined UNX raise(SIGSTOP); #endif @@ -1651,7 +1616,7 @@ int Desktop::Main() // if this run of the office is triggered by restart, some additional actions should be done DoRestartActionsIfNecessary( !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsNoQuickstart() ); - DoExecute(xDesktop); + DoExecute(); } } catch(const css::document::CorruptedFilterConfigurationException& exFilterCfg) commit 5d0ef0015dee175802b468c6a946b967d17eef33 Author: Caolán McNamara <[email protected]> Date: Mon Nov 2 16:08:41 2015 +0000 cppcheck: noExplicitConstructor Change-Id: Ia5aba89f02ee4d99dd573599a3888731efb131b9 diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index dc0e00f..6bd1da9 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3229,7 +3229,7 @@ class FindByPointer : ::std::unary_function<ScInterpreterTableOpParams, bool> { const ScInterpreterTableOpParams* mpTableOp; public: - FindByPointer(const ScInterpreterTableOpParams* p) : mpTableOp(p) {} + explicit FindByPointer(const ScInterpreterTableOpParams* p) : mpTableOp(p) {} bool operator() (const ScInterpreterTableOpParams& val) const { return &val == mpTableOp; diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index 099b55d..59001c9 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -33,7 +33,7 @@ class FindByField : public std::unary_function<ScQueryEntry, bool> { SCCOLROW mnField; public: - FindByField(SCCOLROW nField) : mnField(nField) {} + explicit FindByField(SCCOLROW nField) : mnField(nField) {} bool operator() (const ScQueryEntry& rEntry) const { return rEntry.bDoQuery && rEntry.nField == mnField; diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 8942f87..ac68550 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -41,7 +41,7 @@ template<typename T> class FindEnclosingRange : public ::std::unary_function<ScRange*, bool> { public: - FindEnclosingRange(const T& rTest) : mrTest(rTest) {} + explicit FindEnclosingRange(const T& rTest) : mrTest(rTest) {} FindEnclosingRange(const FindEnclosingRange& r) : mrTest(r.mrTest) {} bool operator() (const ScRange* pRange) const { @@ -69,7 +69,7 @@ template<typename T> class FindIntersectingRange : public ::std::unary_function<ScRange*, bool> { public: - FindIntersectingRange(const T& rTest) : mrTest(rTest) {} + explicit FindIntersectingRange(const T& rTest) : mrTest(rTest) {} FindIntersectingRange(const FindIntersectingRange& r) : mrTest(r.mrTest) {} bool operator() (const ScRange* pRange) const { @@ -82,7 +82,7 @@ private: class AppendToList : public ::std::unary_function<const ScRange*, void> { public: - AppendToList(vector<ScRange*>& rRanges) : mrRanges(rRanges) {} + explicit AppendToList(vector<ScRange*>& rRanges) : mrRanges(rRanges) {} AppendToList(const AppendToList& r) : mrRanges(r.mrRanges) {} void operator() (const ScRange* p) { diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index 2e16a4c..faf482d 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -666,7 +666,7 @@ class MatchByRange : public unary_function<ScRangeData, bool> { const ScRange& mrRange; public: - MatchByRange(const ScRange& rRange) : mrRange(rRange) {} + explicit MatchByRange(const ScRange& rRange) : mrRange(rRange) {} bool operator() ( boost::ptr_container_detail::ref_pair<OUString, const ScRangeData* const> const& r) const { return r.second->IsRangeAtBlock(mrRange); diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index b3f5f84..16dd4ee 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -1166,7 +1166,7 @@ class CountElements : std::unary_function<MatrixImplType::element_block_node_typ size_t mnCount; bool mbCountString; public: - CountElements(bool bCountString) : mnCount(0), mbCountString(bCountString) {} + explicit CountElements(bool bCountString) : mnCount(0), mbCountString(bCountString) {} size_t getCount() const { return mnCount; } diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 8ffc79e..c95245e 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -74,7 +74,7 @@ typedef ::std::vector< ColorData > ColorDataVec; class PaletteIndex : public XIndexAccess_BASE { public: - PaletteIndex( const ColorDataVec& rColorDataTable ) : maColorData( rColorDataTable ) {} + explicit PaletteIndex( const ColorDataVec& rColorDataTable ) : maColorData( rColorDataTable ) {} // Methods XIndexAccess virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException, std::exception) override diff --git a/sc/source/filter/excel/xltoolbar.hxx b/sc/source/filter/excel/xltoolbar.hxx index bd04117..03dface 100644 --- a/sc/source/filter/excel/xltoolbar.hxx +++ b/sc/source/filter/excel/xltoolbar.hxx @@ -54,7 +54,7 @@ class ScCTB : public TBBase sal_uInt32 ectbid; std::vector< ScTBC > rTBC; public: - ScCTB(sal_uInt16); + explicit ScCTB(sal_uInt16); virtual ~ScCTB(){} #if OSL_DEBUG_LEVEL > 1 virtual void Print( FILE* ) override; diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 220ca50..b7b01db 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -3112,7 +3112,7 @@ class CSSHandler ScHTMLStyles& mrStyles; public: - CSSHandler(ScHTMLStyles& rStyles) : mrStyles(rStyles) {} + explicit CSSHandler(ScHTMLStyles& rStyles) : mrStyles(rStyles) {} static void at_rule_name(const char* /*p*/, size_t /*n*/) { diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx index b1bd174..58507f8 100644 --- a/sc/source/filter/oox/formulabuffer.cxx +++ b/sc/source/filter/oox/formulabuffer.cxx @@ -59,7 +59,7 @@ public: Item() : mnRow(-1), mpCell(NULL) {} }; - CachedTokenArray( ScDocument& rDoc ) : + explicit CachedTokenArray( ScDocument& rDoc ) : maCxt(&rDoc, formula::FormulaGrammar::GRAM_OOXML) {} ~CachedTokenArray() diff --git a/sc/source/filter/oox/revisionfragment.cxx b/sc/source/filter/oox/revisionfragment.cxx index 1a00c6f..08d2579 100644 --- a/sc/source/filter/oox/revisionfragment.cxx +++ b/sc/source/filter/oox/revisionfragment.cxx @@ -325,7 +325,7 @@ struct RevisionLogFragment::Impl bool mbEndOfList; - Impl( ScChangeTrack& rChangeTrack ) : + explicit Impl( ScChangeTrack& rChangeTrack ) : mrChangeTrack(rChangeTrack), mnRevIndex(-1), mnSheetIndex(-1), diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index abd63b07..fbddd74 100644 --- a/sc/source/filter/oox/workbookfragment.cxx +++ b/sc/source/filter/oox/workbookfragment.cxx @@ -262,7 +262,7 @@ class ProgressBarTimer : Timer double mfPosition; ISegmentProgressBarRef mxWrapped; public: - ProgressWrapper(const ISegmentProgressBarRef &xRef) + explicit ProgressWrapper(const ISegmentProgressBarRef &xRef) : mfPosition(0.0) , mxWrapped(xRef) { diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index 25d1475..be14ec8 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -82,7 +82,7 @@ class FindSheetByIndex : std::unary_function<ScOrcusSheet, bool> { SCTAB mnTab; public: - FindSheetByIndex(SCTAB nTab) : mnTab(nTab) {} + explicit FindSheetByIndex(SCTAB nTab) : mnTab(nTab) {} bool operator() (const ScOrcusSheet& rSheet) const { return rSheet.getIndex() == mnTab; diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx index 0ee24a8..284d7cc 100644 --- a/sc/source/filter/orcus/xmlcontext.cxx +++ b/sc/source/filter/orcus/xmlcontext.cxx @@ -129,7 +129,7 @@ class TreeUpdateSwitch { SvTreeListBox& mrTreeCtrl; public: - TreeUpdateSwitch(SvTreeListBox& rTreeCtrl) : mrTreeCtrl(rTreeCtrl) + explicit TreeUpdateSwitch(SvTreeListBox& rTreeCtrl) : mrTreeCtrl(rTreeCtrl) { mrTreeCtrl.SetUpdateMode(false); } @@ -144,7 +144,7 @@ class InsertFieldPath : std::unary_function<OString, void> { orcus::orcus_xml& mrFilter; public: - InsertFieldPath(orcus::orcus_xml& rFilter) : mrFilter(rFilter) {} + explicit InsertFieldPath(orcus::orcus_xml& rFilter) : mrFilter(rFilter) {} void operator() (const OString& rPath) { mrFilter.append_field_link(rPath.getStr()); diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index 2c4bb45..6ba163c 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -1398,7 +1398,7 @@ class EndXmlElement : public ExcXmlRecord { sal_Int32 mnElement; public: - EndXmlElement( sal_Int32 nElement ) : mnElement( nElement) {} + explicit EndXmlElement( sal_Int32 nElement ) : mnElement( nElement) {} virtual void SaveXml( XclExpXmlStream& rStrm ) override; }; diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 51c7243..31acde1 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -1131,8 +1131,8 @@ bool transformURL(const OUString& rOldURL, OUString& rNewURL, ScDocument* pDoc) class ScURLTransformer : public oox::drawingml::URLTransformer { public: - ScURLTransformer(ScDocument& rDoc): - mrDoc(rDoc) + explicit ScURLTransformer(ScDocument& rDoc) + : mrDoc(rDoc) { } diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx index 75c9075..e0f172f 100644 --- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx +++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx @@ -78,7 +78,7 @@ class ScChangeTrackingExportHelper void CollectActionAutoStyles(ScChangeAction* pAction); void WorkWithChangeAction(ScChangeAction* pAction); public: - ScChangeTrackingExportHelper(ScXMLExport& rExport); + explicit ScChangeTrackingExportHelper(ScXMLExport& rExport); ~ScChangeTrackingExportHelper(); void CollectAutoStyles(); diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx index 95cd28a..bab373b 100644 --- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx +++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx @@ -124,13 +124,13 @@ struct ScMyBaseAction ScChangeActionType nActionType; ScChangeActionState nActionState; - ScMyBaseAction(const ScChangeActionType nActionType); + explicit ScMyBaseAction(const ScChangeActionType nActionType); virtual ~ScMyBaseAction(); }; struct ScMyInsAction : public ScMyBaseAction { - ScMyInsAction(const ScChangeActionType nActionType); + explicit ScMyInsAction(const ScChangeActionType nActionType); virtual ~ScMyInsAction(); }; @@ -141,7 +141,7 @@ struct ScMyDelAction : public ScMyBaseAction ScMyMoveCutOffs aMoveCutOffs; sal_Int32 nD; - ScMyDelAction(const ScChangeActionType nActionType); + explicit ScMyDelAction(const ScChangeActionType nActionType); virtual ~ScMyDelAction(); }; diff --git a/sc/source/filter/xml/XMLCodeNameProvider.hxx b/sc/source/filter/xml/XMLCodeNameProvider.hxx index 3cd6459..b135ac7 100644 --- a/sc/source/filter/xml/XMLCodeNameProvider.hxx +++ b/sc/source/filter/xml/XMLCodeNameProvider.hxx @@ -35,7 +35,7 @@ class XMLCodeNameProvider : public ::cppu::WeakImplHelper< css::container::XName OUString& rCodeName ); public: - XMLCodeNameProvider( ScDocument* pDoc ); + explicit XMLCodeNameProvider(ScDocument* pDoc); virtual ~XMLCodeNameProvider(); virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) diff --git a/sc/source/filter/xml/XMLExportDDELinks.hxx b/sc/source/filter/xml/XMLExportDDELinks.hxx index cf1cb40..2360ef5 100644 --- a/sc/source/filter/xml/XMLExportDDELinks.hxx +++ b/sc/source/filter/xml/XMLExportDDELinks.hxx @@ -32,7 +32,7 @@ class ScXMLExportDDELinks void WriteCell(const ScMatrixValue& aVal, sal_Int32 nRepeat); void WriteTable(const sal_Int32 nPos); public: - ScXMLExportDDELinks(ScXMLExport& rExport); + explicit ScXMLExportDDELinks(ScXMLExport& rExport); ~ScXMLExportDDELinks(); void WriteDDELinks(css::uno::Reference < css::sheet::XSpreadsheetDocument >& xSpreadDoc); }; diff --git a/sc/source/filter/xml/XMLExportDataPilot.hxx b/sc/source/filter/xml/XMLExportDataPilot.hxx index ab93df6..bf3bf3a 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.hxx +++ b/sc/source/filter/xml/XMLExportDataPilot.hxx @@ -63,7 +63,7 @@ class ScXMLExportDataPilot void WriteGrandTotal(::xmloff::token::XMLTokenEnum eOrient, bool bVisible, const OUString* pGrandTotal); public: - ScXMLExportDataPilot(ScXMLExport& rExport); + explicit ScXMLExportDataPilot(ScXMLExport& rExport); ~ScXMLExportDataPilot(); void WriteDataPilots(const css::uno::Reference <css::sheet::XSpreadsheetDocument>& xSpreaDoc); }; diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx index ab82d5f..a543657 100644 --- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx +++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx @@ -427,7 +427,7 @@ private: { ScXMLExport& mrExport; public: - WriteSetItem(ScXMLExport& r) : mrExport(r) {} + explicit WriteSetItem(ScXMLExport& r) : mrExport(r) {} void operator() (const ScQueryEntry::Item& rItem) const { mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, rItem.maString.getString()); diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.hxx b/sc/source/filter/xml/XMLExportDatabaseRanges.hxx index ba6fd5b6..134bbe3 100644 --- a/sc/source/filter/xml/XMLExportDatabaseRanges.hxx +++ b/sc/source/filter/xml/XMLExportDatabaseRanges.hxx @@ -31,7 +31,7 @@ class ScXMLExportDatabaseRanges ScDocument* pDoc; public: - ScXMLExportDatabaseRanges(ScXMLExport& rExport); + explicit ScXMLExportDatabaseRanges(ScXMLExport& rExport); ~ScXMLExportDatabaseRanges(); ScMyEmptyDatabaseRangesContainer GetEmptyDatabaseRanges(); void WriteDatabaseRanges(); diff --git a/sc/source/filter/xml/XMLExportIterator.hxx b/sc/source/filter/xml/XMLExportIterator.hxx index 31a232a..1036136 100644 --- a/sc/source/filter/xml/XMLExportIterator.hxx +++ b/sc/source/filter/xml/XMLExportIterator.hxx @@ -187,7 +187,7 @@ public: struct ScMyCellRangeAddress : css::table::CellRangeAddress { - ScMyCellRangeAddress(const css::table::CellRangeAddress& rRange); + explicit ScMyCellRangeAddress(const css::table::CellRangeAddress& rRange); bool operator<(const ScMyCellRangeAddress& rCellRangeAddress ) const; }; @@ -341,7 +341,7 @@ class ScMyNotEmptyCellsIterator : boost::noncopyable void HasAnnotation( ScMyCell& aCell ); public: - ScMyNotEmptyCellsIterator(ScXMLExport& rExport); + explicit ScMyNotEmptyCellsIterator(ScXMLExport& rExport); ~ScMyNotEmptyCellsIterator(); void Clear(); diff --git a/sc/source/filter/xml/XMLExportSharedData.hxx b/sc/source/filter/xml/XMLExportSharedData.hxx index 02dd667..645d224 100644 --- a/sc/source/filter/xml/XMLExportSharedData.hxx +++ b/sc/source/filter/xml/XMLExportSharedData.hxx @@ -54,7 +54,7 @@ class ScMySharedData ScMyNoteShapesContainer* pNoteShapes; sal_Int32 nTableCount; public: - ScMySharedData(const sal_Int32 nTableCount); + explicit ScMySharedData(const sal_Int32 nTableCount); ~ScMySharedData(); void SetLastColumn(const sal_Int32 nTable, const sal_Int32 nCol); diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx index 1242087..86825c3 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx @@ -152,7 +152,7 @@ class ScRowFormatRanges public: ScRowFormatRanges(); - ScRowFormatRanges(const ScRowFormatRanges* pRanges); + explicit ScRowFormatRanges(const ScRowFormatRanges* pRanges); ~ScRowFormatRanges(); void SetColDefaults(const ScMyDefaultStyleList* pDefaults) { pColDefaults = pDefaults; } diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx index 8d70165..2ad497b 100644 --- a/sc/source/filter/xml/XMLStylesImportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx @@ -37,7 +37,7 @@ struct ScMyStyleNumberFormat sal_Int32 nNumberFormat; ScMyStyleNumberFormat() : nNumberFormat(-1) {} - ScMyStyleNumberFormat(const OUString& rStyleName) : + explicit ScMyStyleNumberFormat(const OUString& rStyleName) : sStyleName(rStyleName), nNumberFormat(-1) {} ScMyStyleNumberFormat(const OUString& rStyleName, const sal_Int32 nFormat) : sStyleName(rStyleName), nNumberFormat(nFormat) {} @@ -153,7 +153,7 @@ class ScMyStylesImportHelper (!pSecond && pFirst && pFirst->isEmpty())); } public: - ScMyStylesImportHelper(ScXMLImport& rImport); + explicit ScMyStylesImportHelper(ScXMLImport& rImport); ~ScMyStylesImportHelper(); void AddColumnStyle(const OUString& rStyleName, const sal_Int32 nColumn, const sal_Int32 nRepeat); void SetRowStyle(const OUString& rStyleName);
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
