[Libreoffice-commits] core.git: dtrans/source editeng/source embeddedobj/source embedserv/source sc/source sfx2/source slideshow/source sot/source vcl/unx
Caolán McNamara
caolanm at redhat.com
Sun Sep 13 14:43:00 PDT 2015
dtrans/source/cnttype/mcnttype.hxx | 2 -
editeng/source/outliner/outlobj.cxx | 2 -
embeddedobj/source/commonembedding/xfactory.hxx | 4 +-
embeddedobj/source/general/docholder.cxx | 19 ++++------
embeddedobj/source/general/intercept.cxx | 2 -
embedserv/source/embed/intercept.cxx | 2 -
sc/source/ui/unoobj/docuno.cxx | 3 -
sfx2/source/dialog/backingcomp.cxx | 2 -
sfx2/source/dialog/backingwindow.hxx | 2 -
slideshow/source/engine/animationnodes/animationcolornode.cxx | 2 -
sot/source/base/object.cxx | 8 ++--
sot/source/sdstor/storage.cxx | 16 ++++----
sot/source/sdstor/ucbstorage.cxx | 2 -
vcl/unx/gtk3/app/gtk3gtkinst.cxx | 4 +-
14 files changed, 33 insertions(+), 37 deletions(-)
New commits:
commit 35fd0cf311d0ab6e647ef8a244f350d8a690e734
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 13 21:13:25 2015 +0100
cppcheck: noExplicitConstructor
Change-Id: I39194062ba68c4cb1ccc9b93c629f005ccd02497
diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx
index d0d31a3..e527c8e 100644
--- a/dtrans/source/cnttype/mcnttype.hxx
+++ b/dtrans/source/cnttype/mcnttype.hxx
@@ -32,7 +32,7 @@ class CMimeContentType : public
cppu::WeakImplHelper< css::datatransfer::XMimeContentType >
{
public:
- CMimeContentType( const OUString& aCntType );
+ explicit CMimeContentType(const OUString& rCntType);
// XMimeContentType
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index 02094ae..cb40988 100644
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
@@ -107,7 +107,7 @@ struct OutlinerParaObject::Impl
Impl( const EditTextObject& rTextObj, const ParagraphDataVector& rParaData, bool bIsEditDoc ) :
mxData(new OutlinerParaObjData(rTextObj.Clone(), rParaData, bIsEditDoc)) {}
- Impl( const EditTextObject& rTextObj ) :
+ explicit Impl(const EditTextObject& rTextObj) :
mxData(new OutlinerParaObjData(rTextObj.Clone(), ParagraphDataVector(), true)) {}
Impl( const Impl& r ) : mxData(r.mxData) {}
diff --git a/embeddedobj/source/commonembedding/xfactory.hxx b/embeddedobj/source/commonembedding/xfactory.hxx
index cef1817..81f1506 100644
--- a/embeddedobj/source/commonembedding/xfactory.hxx
+++ b/embeddedobj/source/commonembedding/xfactory.hxx
@@ -37,7 +37,7 @@ class OOoEmbeddedObjectFactory : public ::cppu::WeakImplHelper<
::comphelper::MimeConfigurationHelper m_aConfigHelper;
public:
- OOoEmbeddedObjectFactory(
+ explicit OOoEmbeddedObjectFactory(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext )
: m_xContext( rxContext )
, m_aConfigHelper( rxContext )
@@ -84,7 +84,7 @@ class OOoSpecialEmbeddedObjectFactory : public ::cppu::WeakImplHelper<
::comphelper::MimeConfigurationHelper m_aConfigHelper;
public:
- OOoSpecialEmbeddedObjectFactory(
+ explicit OOoSpecialEmbeddedObjectFactory(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext )
: m_xContext( rxContext )
, m_aConfigHelper( rxContext )
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index f8437c2..0212200 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -78,26 +78,23 @@
using namespace ::com::sun::star;
-
-
-class IntCounterGuard {
- sal_Int32& m_nFlag;
+class IntCounterGuard
+{
+ sal_Int32& m_rFlag;
public:
- IntCounterGuard( sal_Int32& nFlag )
- : m_nFlag( nFlag )
+ explicit IntCounterGuard(sal_Int32& rFlag)
+ : m_rFlag(rFlag)
{
- m_nFlag++;
+ ++m_rFlag;
}
~IntCounterGuard()
{
- if ( m_nFlag )
- m_nFlag--;
+ if (m_rFlag)
+ --m_rFlag;
}
};
-
-
static void InsertMenu_Impl( const uno::Reference< container::XIndexContainer >& xTargetMenu,
sal_Int32 nTargetIndex,
const uno::Reference< container::XIndexAccess >& xSourceMenu,
diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx
index 079d912..732cac6 100644
--- a/embeddedobj/source/general/intercept.cxx
+++ b/embeddedobj/source/general/intercept.cxx
@@ -34,7 +34,7 @@ class StatusChangeListenerContainer
: public cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
{
public:
- StatusChangeListenerContainer( ::osl::Mutex& aMutex )
+ explicit StatusChangeListenerContainer(osl::Mutex& aMutex)
: cppu::OMultiTypeInterfaceContainerHelperVar<OUString>(aMutex)
{
}
diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx
index 20dcfd1..d540fa4 100644
--- a/embedserv/source/embed/intercept.cxx
+++ b/embedserv/source/embed/intercept.cxx
@@ -36,7 +36,7 @@ class StatusChangeListenerContainer
: public cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
{
public:
- StatusChangeListenerContainer( ::osl::Mutex& aMutex )
+ explicit StatusChangeListenerContainer(osl::Mutex& aMutex)
: cppu::OMultiTypeInterfaceContainerHelperVar<OUString>(aMutex)
{
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 693301d..128b408 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -714,14 +714,13 @@ OString ScModelObj::getTextSelection(const char* pMimeType, OString& rUsedMimeTy
ScEditShell* pShell;
ScDrawShell* pDrawShell;
- ScDrawTextObjectBar* pTextShell;
TransferableDataHelper aDataHelper;
ScViewData* pViewData = ScDocShell::GetViewData();
uno::Reference<datatransfer::XTransferable> xTransferable;
if (( pShell = PTR_CAST( ScEditShell, pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) )))
xTransferable = pShell->GetEditView()->GetTransferable();
- else if (( pTextShell = PTR_CAST( ScDrawTextObjectBar, pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) )))
+ else if ((PTR_CAST( ScDrawTextObjectBar, pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) )))
{
ScDrawView* pView = pViewData->GetScDrawView();
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index ca86394..5ce6b62 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -98,7 +98,7 @@ private:
public:
- BackingComp( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ explicit BackingComp(const css::uno::Reference< css::uno::XComponentContext >& xContext);
virtual ~BackingComp( );
// XInterface
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index ad63152..6a42bec 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -116,7 +116,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer
void initializeLocalView();
public:
- BackingWindow(vcl::Window* pParent);
+ explicit BackingWindow(vcl::Window* pParent);
virtual ~BackingWindow();
virtual void dispose() SAL_OVERRIDE;
diff --git a/slideshow/source/engine/animationnodes/animationcolornode.cxx b/slideshow/source/engine/animationnodes/animationcolornode.cxx
index 1a61035..78ac12e 100644
--- a/slideshow/source/engine/animationnodes/animationcolornode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcolornode.cxx
@@ -41,7 +41,7 @@ namespace {
class HSLWrapper : public HSLColorAnimation
{
public:
- HSLWrapper( const ColorAnimationSharedPtr& rAnimation )
+ explicit HSLWrapper( const ColorAnimationSharedPtr& rAnimation )
: mpAnimation( rAnimation )
{
ENSURE_OR_THROW(
diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx
index 88e457e..7c1054c 100644
--- a/sot/source/base/object.cxx
+++ b/sot/source/base/object.cxx
@@ -24,12 +24,12 @@
class SotObjectFactory : public SotFactory
{
public:
- SotObjectFactory( const SvGlobalName & rName )
- : SotFactory( rName )
- {}
+ explicit SotObjectFactory(const SvGlobalName& rName)
+ : SotFactory( rName )
+ {
+ }
};
-
SotFactory * SotObject::ClassFactory()
{
SotFactory **ppFactory = GetFactoryAdress();
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 9a23f5f..d22db40 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -44,12 +44,12 @@ using namespace ::com::sun::star;
class SotStorageStreamFactory : public SotFactory
{
public:
- SotStorageStreamFactory( const SvGlobalName & rName )
- : SotFactory( rName )
- {}
+ explicit SotStorageStreamFactory(const SvGlobalName& rName)
+ : SotFactory(rName)
+ {
+ }
};
-
SotFactory * SotStorageStream::ClassFactory()
{
SotFactory **ppFactory = GetFactoryAdress();
@@ -293,12 +293,12 @@ bool SotStorageStream::SetProperty( const OUString& rName, const ::com::sun::sta
class SotStorageFactory : public SotFactory
{
public:
- SotStorageFactory( const SvGlobalName & rName )
- : SotFactory( rName )
- {}
+ explicit SotStorageFactory(const SvGlobalName & rName)
+ : SotFactory(rName)
+ {
+ }
};
-
SotFactory * SotStorage::ClassFactory()
{
SotFactory **ppFactory = GetFactoryAdress();
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 77ac2495..d6321fd 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -90,7 +90,7 @@ protected:
SvStream* m_pSvStream;
public:
- FileStreamWrapper_Impl( const OUString& rName );
+ explicit FileStreamWrapper_Impl(const OUString& rName);
virtual ~FileStreamWrapper_Impl();
virtual void SAL_CALL seek( sal_Int64 _nLocation ) throw ( IllegalArgumentException, IOException, RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/vcl/unx/gtk3/app/gtk3gtkinst.cxx b/vcl/unx/gtk3/app/gtk3gtkinst.cxx
index 9d5438d..be105ed 100644
--- a/vcl/unx/gtk3/app/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/app/gtk3gtkinst.cxx
@@ -101,7 +101,7 @@ private:
std::map<OUString, GdkAtom> m_aMimeTypeToAtom;
public:
- GtkTransferable(GdkAtom nSelection)
+ explicit GtkTransferable(GdkAtom nSelection)
: m_nSelection(nSelection)
{
}
@@ -289,7 +289,7 @@ class VclGtkClipboard :
public:
- VclGtkClipboard(GdkAtom nSelection);
+ explicit VclGtkClipboard(GdkAtom nSelection);
virtual ~VclGtkClipboard();
/*
More information about the Libreoffice-commits
mailing list