summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-07 08:14:34 +0200
committerNoel Grandin <noel@peralex.com>2015-08-07 08:14:34 +0200
commit46791546a8aaef40eafc08e6e71b4b0785324564 (patch)
tree149c1b3d002404366ed7a410af8e82f4b51778c3 /sfx2
parent6343754e310a589cb49e2a1da0cd68472571179d (diff)
cppcheck:noExplicitConstructor
Change-Id: I940714e303b905b756ba077eeda6c41746bd421f
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx8
-rw-r--r--sfx2/source/dialog/filtergrouping.hxx20
-rw-r--r--sfx2/source/dialog/infobar.cxx2
-rw-r--r--sfx2/source/dialog/splitwin.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx2
-rw-r--r--sfx2/source/dialog/taskpane.cxx4
-rw-r--r--sfx2/source/dialog/versdlg.cxx4
-rw-r--r--sfx2/source/doc/Metadatable.cxx4
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx3
-rw-r--r--sfx2/source/doc/docfile.cxx2
-rw-r--r--sfx2/source/doc/docmacromode.cxx2
-rw-r--r--sfx2/source/doc/doctempl.cxx2
-rw-r--r--sfx2/source/doc/doctemplates.cxx38
-rw-r--r--sfx2/source/doc/docundomanager.cxx4
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx4
-rw-r--r--sfx2/source/view/viewimp.hxx2
17 files changed, 52 insertions, 53 deletions
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 236f971c5f69..b0cd3c170467 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -413,7 +413,7 @@ namespace sfx2
{
OUString& _rToBeExtended;
- CheckAppendSingleWildcard( OUString& _rBase ) : _rToBeExtended( _rBase ) { }
+ explicit CheckAppendSingleWildcard( OUString& _rBase ) : _rToBeExtended( _rBase ) { }
void operator() ( const OUString& _rWC )
{
@@ -452,7 +452,7 @@ namespace sfx2
::std::vector< OUString > aWildCards;
public:
- AppendWildcardToDescriptor( const OUString& _rWildCard );
+ explicit AppendWildcardToDescriptor( const OUString& _rWildCard );
// operate on a single class entry
void operator() ( const FilterGroupEntryReferrer::value_type& _rClassReference )
@@ -533,7 +533,7 @@ namespace sfx2
struct FindGroupEntry : public ::std::unary_function< MapGroupEntry2GroupEntry::value_type, sal_Bool >
{
FilterGroupEntryReferrer::mapped_type aLookingFor;
- FindGroupEntry( FilterGroupEntryReferrer::mapped_type _rLookingFor ) : aLookingFor( _rLookingFor ) { }
+ explicit FindGroupEntry( FilterGroupEntryReferrer::mapped_type _rLookingFor ) : aLookingFor( _rLookingFor ) { }
bool operator() ( const MapGroupEntry2GroupEntry::value_type& _rMapEntry )
{
@@ -556,7 +556,7 @@ namespace sfx2
struct CopyNonEmptyFilter : public ::std::unary_function< FilterDescriptor, void >
{
FilterGroup& rTarget;
- CopyNonEmptyFilter( FilterGroup& _rTarget ) :rTarget( _rTarget ) { }
+ explicit CopyNonEmptyFilter( FilterGroup& _rTarget ) :rTarget( _rTarget ) { }
void operator() ( const FilterDescriptor& _rFilter )
{
diff --git a/sfx2/source/dialog/filtergrouping.hxx b/sfx2/source/dialog/filtergrouping.hxx
index 12aab3ac37fb..ea5317302374 100644
--- a/sfx2/source/dialog/filtergrouping.hxx
+++ b/sfx2/source/dialog/filtergrouping.hxx
@@ -31,19 +31,17 @@ namespace sfx2
class TSortedFilterList
{
- private:
+ private:
+ ::std::vector< OUString > m_lFilters;
+ sal_Int32 m_nIterator;
- ::std::vector< OUString > m_lFilters;
- sal_Int32 m_nIterator;
+ public:
+ explicit TSortedFilterList(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration >& xFilterList);
+ const SfxFilter* First();
+ const SfxFilter* Next();
- public:
-
- TSortedFilterList(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration >& xFilterList);
- const SfxFilter* First();
- const SfxFilter* Next();
-
- private:
- const SfxFilter* impl_getFilter(sal_Int32 nIndex);
+ private:
+ const SfxFilter* impl_getFilter(sal_Int32 nIndex);
};
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index e6b63c83cd33..f65946b58d67 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -55,7 +55,7 @@ void lclDetermineLightDarkColor(BColor& rLightColor, BColor& rDarkColor)
class SfxCloseButton : public PushButton
{
public:
- SfxCloseButton(vcl::Window* pParent) : PushButton(pParent, 0)
+ explicit SfxCloseButton(vcl::Window* pParent) : PushButton(pParent, 0)
{}
virtual ~SfxCloseButton() {}
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 3b2ea7890b0b..69ac91b41892 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -97,7 +97,7 @@ friend class SfxSplitWindow;
sal_uInt16 nState;
public:
- SfxEmptySplitWin_Impl( SfxSplitWindow *pParent )
+ explicit SfxEmptySplitWin_Impl( SfxSplitWindow *pParent )
: SplitWindow( pParent->GetParent(), WinBits( WB_BORDER | WB_3DLOOK ) )
, pOwner( pParent )
, bFadeIn( false )
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 3cf586996528..9435f9a0085d 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -117,7 +117,7 @@ struct TabDlg_Impl
bHideResetBtn : 1;
SfxTabDlgData_Impl aData;
- TabDlg_Impl( sal_uInt8 nCnt ) :
+ explicit TabDlg_Impl( sal_uInt8 nCnt ) :
bModified ( false ),
bModal ( true ),
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index e8a17b9cae59..cc9d5cbe00d1 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -283,7 +283,7 @@ namespace sfx2
{
}
- CustomPanelUIElement( const Reference< XUIElement >& i_rUIElement )
+ explicit CustomPanelUIElement( const Reference< XUIElement >& i_rUIElement )
:m_xUIElement( i_rUIElement )
,m_xToolPanel( i_rUIElement->getRealInterface(), UNO_QUERY_THROW )
,m_xPanelWindow( m_xToolPanel->getWindow(), UNO_SET_THROW )
@@ -807,7 +807,7 @@ namespace sfx2
::svt::PToolPanel pPanel;
bool bHidden;
- PanelDescriptor( const ::svt::PToolPanel& i_rPanel )
+ explicit PanelDescriptor( const ::svt::PToolPanel& i_rPanel )
:pPanel( i_rPanel )
,bHidden( false )
{
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index d04ab9546777..3de3cfdfa232 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -69,8 +69,8 @@ class SfxVersionTableDtor: private boost::noncopyable
private:
std::vector< SfxVersionInfo* > aTableList;
public:
- SfxVersionTableDtor( const uno::Sequence < util::RevisionTag >& rInfo );
- SfxVersionTableDtor( const uno::Sequence < document::CmisVersion > & rInfo );
+ explicit SfxVersionTableDtor( const uno::Sequence < util::RevisionTag >& rInfo );
+ explicit SfxVersionTableDtor( const uno::Sequence < document::CmisVersion > & rInfo );
~SfxVersionTableDtor()
{ DelDtor(); }
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 59dfb8a2d2ac..04872a8b1cd4 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -261,7 +261,7 @@ class MetadatableUndo : public Metadatable
/// as determined by the stream of the source in original document
const bool m_isInContent;
public:
- MetadatableUndo(const bool i_isInContent)
+ explicit MetadatableUndo(const bool i_isInContent)
: m_isInContent(i_isInContent) { }
virtual ::sfx2::XmlIdRegistry& GetRegistry() SAL_OVERRIDE
{
@@ -286,7 +286,7 @@ class MetadatableClipboard : public Metadatable
/// as determined by the stream of the source in original document
const bool m_isInContent;
public:
- MetadatableClipboard(const bool i_isInContent)
+ explicit MetadatableClipboard(const bool i_isInContent)
: m_isInContent(i_isInContent) { }
virtual ::sfx2::XmlIdRegistry& GetRegistry() SAL_OVERRIDE
{
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 54b4a905f88a..75254c4275c6 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -363,7 +363,8 @@ class CompatWriterDocPropsImpl : public CompatWriterDocPropsImpl_BASE
protected:
virtual SfxDocumentMetaData* createMe( css::uno::Reference< css::uno::XComponentContext > const & context ) SAL_OVERRIDE { return new CompatWriterDocPropsImpl( context ); };
public:
- CompatWriterDocPropsImpl( css::uno::Reference< css::uno::XComponentContext > const & context) : CompatWriterDocPropsImpl_BASE( context ) {}
+ explicit CompatWriterDocPropsImpl( css::uno::Reference< css::uno::XComponentContext > const & context) : CompatWriterDocPropsImpl_BASE( context ) {}
+
// XCompatWriterDocPropsImpl
virtual OUString SAL_CALL getManager() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return msManager; }
virtual void SAL_CALL setManager( const OUString& _manager ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { msManager = _manager; }
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 49e7a474165d..14092090c966 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -237,7 +237,7 @@ public:
util::DateTime m_aDateTime;
- SfxMedium_Impl( SfxMedium* pAntiImplP );
+ explicit SfxMedium_Impl( SfxMedium* pAntiImplP );
~SfxMedium_Impl();
OUString getFilterMimeType()
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 9381651d7f1a..ea539ce7b661 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -77,7 +77,7 @@ namespace sfx2
bool m_bMacroDisabledMessageShown;
bool m_bDocMacroDisabledMessageShown;
- DocumentMacroMode_Data( IMacroDocumentAccess& rDocumentAccess )
+ explicit DocumentMacroMode_Data( IMacroDocumentAccess& rDocumentAccess )
:m_rDocumentAccess( rDocumentAccess )
,m_bMacroDisabledMessageShown( false )
,m_bDocMacroDisabledMessageShown( false )
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 38ca442ccf9b..b3a1dd0b5c8f 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -246,7 +246,7 @@ class DocTemplLocker_Impl
{
SfxDocTemplate_Impl& m_aDocTempl;
public:
- DocTemplLocker_Impl( SfxDocTemplate_Impl& aDocTempl )
+ explicit DocTemplLocker_Impl( SfxDocTemplate_Impl& aDocTempl )
: m_aDocTempl( aDocTempl )
{
m_aDocTempl.IncrementLock();
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 0e9984acaea1..6b0f3a3e52f0 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -162,7 +162,7 @@ class TplTaskEnvironment : public ::cppu::WeakImplHelper1< ucb::XCommandEnvironm
uno::Reference< ucb::XProgressHandler > m_xProgressHandler;
public:
- TplTaskEnvironment( const uno::Reference< task::XInteractionHandler>& rxInteractionHandler )
+ explicit TplTaskEnvironment( const uno::Reference< task::XInteractionHandler>& rxInteractionHandler )
: m_xInteractionHandler( rxInteractionHandler )
{}
@@ -276,31 +276,31 @@ class SfxDocTplService_Impl
//which implies neither it or its contents can be removed
bool isInternalTemplateDir(const OUString& rURL) const;
public:
- SfxDocTplService_Impl( const uno::Reference< XComponentContext > & xContext );
+ explicit SfxDocTplService_Impl( const uno::Reference< XComponentContext > & xContext );
~SfxDocTplService_Impl();
- bool init() { if ( !mbIsInitialized ) init_Impl(); return mbIsInitialized; }
+ bool init() { if ( !mbIsInitialized ) init_Impl(); return mbIsInitialized; }
Content getContent() const { return maRootContent; }
void setLocale( const lang::Locale & rLocale );
lang::Locale getLocale();
- bool storeTemplate( const OUString& rGroupName,
+ bool storeTemplate( const OUString& rGroupName,
const OUString& rTemplateName,
const uno::Reference< frame::XStorable >& rStorable );
- bool addTemplate( const OUString& rGroupName,
+ bool addTemplate( const OUString& rGroupName,
const OUString& rTemplateName,
const OUString& rSourceURL );
- bool removeTemplate( const OUString& rGroupName,
+ bool removeTemplate( const OUString& rGroupName,
const OUString& rTemplateName );
- bool renameTemplate( const OUString& rGroupName,
+ bool renameTemplate( const OUString& rGroupName,
const OUString& rOldName,
const OUString& rNewName );
- bool addGroup( const OUString& rGroupName );
- bool removeGroup( const OUString& rGroupName );
- bool renameGroup( const OUString& rOldName,
+ bool addGroup( const OUString& rGroupName );
+ bool removeGroup( const OUString& rGroupName );
+ bool renameGroup( const OUString& rOldName,
const OUString& rNewName );
void update( bool bUpdateNow );
@@ -316,8 +316,8 @@ private:
SfxDocTplService_Impl *mpDocTemplates;
public:
- Updater_Impl( SfxDocTplService_Impl* pTemplates );
- virtual ~Updater_Impl();
+ explicit Updater_Impl( SfxDocTplService_Impl* pTemplates );
+ virtual ~Updater_Impl();
virtual void SAL_CALL run() SAL_OVERRIDE;
virtual void SAL_CALL onTerminated() SAL_OVERRIDE;
@@ -338,17 +338,17 @@ class DocTemplates_EntryData_Impl
bool mbUpdateLink : 1;
public:
- DocTemplates_EntryData_Impl( const OUString& rTitle );
+ explicit DocTemplates_EntryData_Impl( const OUString& rTitle );
void setInUse() { mbInUse = true; }
void setHierarchy( bool bInHierarchy ) { mbInHierarchy = bInHierarchy; }
void setUpdateLink( bool bUpdateLink ) { mbUpdateLink = bUpdateLink; }
void setUpdateType( bool bUpdateType ) { mbUpdateType = bUpdateType; }
- bool getInUse() const { return mbInUse; }
- bool getInHierarchy() const { return mbInHierarchy; }
- bool getUpdateLink() const { return mbUpdateLink; }
- bool getUpdateType() const { return mbUpdateType; }
+ bool getInUse() const { return mbInUse; }
+ bool getInHierarchy() const { return mbInHierarchy; }
+ bool getUpdateLink() const { return mbUpdateLink; }
+ bool getUpdateType() const { return mbUpdateType; }
const OUString& getHierarchyURL() const { return maHierarchyURL; }
const OUString& getTargetURL() const { return maTargetURL; }
@@ -372,7 +372,7 @@ class GroupData_Impl
bool mbInHierarchy : 1;
public:
- GroupData_Impl( const OUString& rTitle );
+ explicit GroupData_Impl( const OUString& rTitle );
~GroupData_Impl();
void setInUse() { mbInUse = true; }
@@ -2210,7 +2210,7 @@ class SfxDocTplService: public ::cppu::WeakImplHelper3< css::lang::XLocalizable,
SfxDocTplService_Impl *pImp;
public:
- SfxDocTplService( const css::uno::Reference < uno::XComponentContext >& xContext );
+ explicit SfxDocTplService( const css::uno::Reference < uno::XComponentContext >& xContext );
virtual ~SfxDocTplService();
virtual OUString SAL_CALL getImplementationName()
diff --git a/sfx2/source/doc/docundomanager.cxx b/sfx2/source/doc/docundomanager.cxx
index 3b448f028954..beb770105648 100644
--- a/sfx2/source/doc/docundomanager.cxx
+++ b/sfx2/source/doc/docundomanager.cxx
@@ -79,7 +79,7 @@ namespace sfx2
IUndoManager* pUndoManager;
::framework::UndoManagerHelper aUndoHelper;
- DocumentUndoManager_Impl( DocumentUndoManager& i_antiImpl )
+ explicit DocumentUndoManager_Impl( DocumentUndoManager& i_antiImpl )
:rAntiImpl( i_antiImpl )
,pUndoManager( impl_retrieveUndoManager( i_antiImpl.getBaseModel() ) )
// do this *before* the construction of aUndoHelper (which actually means: put pUndoManager before
@@ -190,7 +190,7 @@ namespace sfx2
,public ::boost::noncopyable
{
public:
- UndoManagerGuard( DocumentUndoManager& i_undoManager )
+ explicit UndoManagerGuard( DocumentUndoManager& i_undoManager )
:m_guard( i_undoManager )
,m_solarMutexFacade()
{
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index 95509a817032..3f432f57d1e7 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -65,7 +65,7 @@ public:
DECL_LINK( OptionsChanged_Impl, void* );
DECL_LINK( SettingsChanged_Impl, VclWindowEvent* );
- SfxImageManager_Impl(SfxModule& rModule);
+ explicit SfxImageManager_Impl(SfxModule& rModule);
~SfxImageManager_Impl();
};
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 42ef70985079..c5101b3297c4 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -321,7 +321,7 @@ void SAL_CALL SfxStatusIndicator::disposing( const lang::EventObject& /*Source*/
class IMPL_SfxBaseController_ListenerHelper : public ::cppu::WeakImplHelper1< frame::XFrameActionListener >
{
public:
- IMPL_SfxBaseController_ListenerHelper( SfxBaseController* pController ) ;
+ explicit IMPL_SfxBaseController_ListenerHelper( SfxBaseController* pController ) ;
virtual ~IMPL_SfxBaseController_ListenerHelper() ;
virtual void SAL_CALL frameAction( const frame::FrameActionEvent& aEvent ) throw (RuntimeException, std::exception) SAL_OVERRIDE ;
virtual void SAL_CALL disposing( const lang::EventObject& aEvent ) throw (RuntimeException, std::exception) SAL_OVERRIDE ;
@@ -335,7 +335,7 @@ private:
class IMPL_SfxBaseController_CloseListenerHelper : public ::cppu::WeakImplHelper1< util::XCloseListener >
{
public:
- IMPL_SfxBaseController_CloseListenerHelper( SfxBaseController* pController ) ;
+ explicit IMPL_SfxBaseController_CloseListenerHelper( SfxBaseController* pController ) ;
virtual ~IMPL_SfxBaseController_CloseListenerHelper() ;
virtual void SAL_CALL queryClosing( const lang::EventObject& aEvent, sal_Bool bDeliverOwnership )
throw (RuntimeException, util::CloseVetoException, std::exception) SAL_OVERRIDE ;
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 95cce303a7e1..49005931d2b1 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -64,7 +64,7 @@ struct SfxViewShell_Impl
mutable SfxInPlaceClientList* mpIPClientList;
- SfxViewShell_Impl(SfxViewShellFlags const nFlags);
+ explicit SfxViewShell_Impl(SfxViewShellFlags const nFlags);
~SfxViewShell_Impl();
SfxInPlaceClientList* GetIPClientList_Impl( bool bCreate = true ) const;