summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-01-06 12:17:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-01-07 09:11:53 +0000
commit5ee8e22a26f522302d6b8e2bb8ce7a1815b61af7 (patch)
tree53cdfc515bc1a7f22b12180280fcb205ec6abead /dtrans
parent66b8b09d0aa97e4009d2019a9d93b74cd1e11a09 (diff)
cppcheck: noExplicitConstructor
Change-Id: I94db78ca12e0f3389f00ea5c557f0b64d452f613 Reviewed-on: https://gerrit.libreoffice.org/21150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/win32/dnd/idroptarget.hxx2
-rw-r--r--dtrans/source/win32/dnd/source.hxx2
-rw-r--r--dtrans/source/win32/dnd/target.hxx2
-rw-r--r--dtrans/source/win32/dnd/targetdragcontext.hxx2
-rw-r--r--dtrans/source/win32/dnd/targetdropcontext.hxx2
-rw-r--r--dtrans/source/win32/dtobj/APNDataObject.hxx4
-rw-r--r--dtrans/source/win32/dtobj/DTransHelper.hxx6
-rw-r--r--dtrans/source/win32/dtobj/DataFmtTransl.hxx2
-rw-r--r--dtrans/source/win32/dtobj/Fetc.hxx2
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx8
-rw-r--r--dtrans/source/win32/ftransl/ftransl.hxx2
-rw-r--r--dtrans/source/win32/workbench/XTDo.hxx2
-rw-r--r--dtrans/test/win32/dnd/atlwindow.hxx2
-rw-r--r--dtrans/test/win32/dnd/targetlistener.hxx2
-rw-r--r--dtrans/test/win32/dnd/transferable.hxx2
15 files changed, 22 insertions, 20 deletions
diff --git a/dtrans/source/win32/dnd/idroptarget.hxx b/dtrans/source/win32/dnd/idroptarget.hxx
index 19f797443ac0..c7843a3de951 100644
--- a/dtrans/source/win32/dnd/idroptarget.hxx
+++ b/dtrans/source/win32/dnd/idroptarget.hxx
@@ -31,7 +31,7 @@ class IDropTargetImpl: public IDropTarget
IDropTargetImpl( const IDropTargetImpl& );
IDropTargetImpl& operator=( const IDropTargetImpl& );
public:
- IDropTargetImpl( DropTarget& pTarget);
+ explicit IDropTargetImpl(DropTarget& rTarget);
// IDropTarget
virtual HRESULT STDMETHODCALLTYPE QueryInterface(
diff --git a/dtrans/source/win32/dnd/source.hxx b/dtrans/source/win32/dnd/source.hxx
index 02fa41d77e73..146df441afd3 100644
--- a/dtrans/source/win32/dnd/source.hxx
+++ b/dtrans/source/win32/dnd/source.hxx
@@ -86,7 +86,7 @@ public:
sal_Int8 m_sourceActions;
public:
- DragSource(const Reference<XComponentContext>& rxContext);
+ explicit DragSource(const Reference<XComponentContext>& rxContext);
virtual ~DragSource();
// XInitialization
diff --git a/dtrans/source/win32/dnd/target.hxx b/dtrans/source/win32/dnd/target.hxx
index 5011dfa74242..065e6d52b48c 100644
--- a/dtrans/source/win32/dnd/target.hxx
+++ b/dtrans/source/win32/dnd/target.hxx
@@ -111,7 +111,7 @@ private:
DropTarget &operator= (DropTarget&);
public:
- DropTarget(const Reference<XComponentContext>& rxContext);
+ explicit DropTarget(const Reference<XComponentContext>& rxContext);
virtual ~DropTarget();
// Overrides WeakComponentImplHelper::disposing which is called by
diff --git a/dtrans/source/win32/dnd/targetdragcontext.hxx b/dtrans/source/win32/dnd/targetdragcontext.hxx
index a271d61abbe5..ed329c0bcf80 100644
--- a/dtrans/source/win32/dnd/targetdragcontext.hxx
+++ b/dtrans/source/win32/dnd/targetdragcontext.hxx
@@ -41,7 +41,7 @@ class TargetDragContext: public WeakImplHelper<XDropTargetDragContext>
TargetDragContext( const TargetDragContext&);
TargetDragContext &operator= ( const TargetDragContext&);
public:
- TargetDragContext( DropTarget* pTarget);
+ explicit TargetDragContext(DropTarget* pTarget);
~TargetDragContext();
virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation )
diff --git a/dtrans/source/win32/dnd/targetdropcontext.hxx b/dtrans/source/win32/dnd/targetdropcontext.hxx
index 488137b62643..a7ae0e629075 100644
--- a/dtrans/source/win32/dnd/targetdropcontext.hxx
+++ b/dtrans/source/win32/dnd/targetdropcontext.hxx
@@ -40,7 +40,7 @@ class TargetDropContext: public WeakImplHelper<XDropTargetDropContext>
TargetDropContext( const TargetDropContext&);
TargetDropContext &operator= ( const TargetDropContext&);
public:
- TargetDropContext( DropTarget* pTarget);
+ explicit TargetDropContext(DropTarget* pTarget);
~TargetDropContext();
// XDropTargetDragContext
diff --git a/dtrans/source/win32/dtobj/APNDataObject.hxx b/dtrans/source/win32/dtobj/APNDataObject.hxx
index 9522aae05129..86dd355bfb7e 100644
--- a/dtrans/source/win32/dtobj/APNDataObject.hxx
+++ b/dtrans/source/win32/dtobj/APNDataObject.hxx
@@ -32,8 +32,8 @@
class CAPNDataObject : public IDataObject
{
public:
- CAPNDataObject( IDataObjectPtr rIDataObject );
- virtual ~CAPNDataObject( );
+ explicit CAPNDataObject(IDataObjectPtr rIDataObject);
+ virtual ~CAPNDataObject();
//IUnknown interface methods
diff --git a/dtrans/source/win32/dtobj/DTransHelper.hxx b/dtrans/source/win32/dtobj/DTransHelper.hxx
index 7754ec302c20..ce0e3b4fcf50 100644
--- a/dtrans/source/win32/dtobj/DTransHelper.hxx
+++ b/dtrans/source/win32/dtobj/DTransHelper.hxx
@@ -43,7 +43,7 @@ public:
{
public:
HRESULT m_hr;
- CStgTransferException( HRESULT hr ) : m_hr( hr ) {};
+ explicit CStgTransferException( HRESULT hr ) : m_hr( hr ) {};
};
public:
@@ -95,7 +95,7 @@ public:
// ctor
- CRawHGlobalPtr( HGLOBAL hGlob ) :
+ explicit CRawHGlobalPtr( HGLOBAL hGlob ) :
m_hGlob( hGlob ),
m_bIsLocked( FALSE ),
m_pGlobMem( NULL )
@@ -104,7 +104,7 @@ public:
// ctor
- CRawHGlobalPtr( const CStgTransferHelper& theHGlobalHelper ) :
+ explicit CRawHGlobalPtr( const CStgTransferHelper& theHGlobalHelper ) :
m_hGlob( theHGlobalHelper.getHGlobal( ) ),
m_bIsLocked( FALSE ),
m_pGlobMem( NULL )
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.hxx b/dtrans/source/win32/dtobj/DataFmtTransl.hxx
index f3a00cd698a2..716d96e7268d 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.hxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.hxx
@@ -41,7 +41,7 @@ class CFormatEtc;
class CDataFormatTranslator
{
public:
- CDataFormatTranslator( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit CDataFormatTranslator( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
CFormatEtc getFormatEtcFromDataFlavor( const css::datatransfer::DataFlavor& aDataFlavor ) const;
css::datatransfer::DataFlavor getDataFlavorFromFormatEtc(
diff --git a/dtrans/source/win32/dtobj/Fetc.hxx b/dtrans/source/win32/dtobj/Fetc.hxx
index 4f86c691bc94..86edb83e8b9d 100644
--- a/dtrans/source/win32/dtobj/Fetc.hxx
+++ b/dtrans/source/win32/dtobj/Fetc.hxx
@@ -42,7 +42,7 @@ class CFormatEtc
{
public:
CFormatEtc( );
- CFormatEtc( const FORMATETC& aFormatEtc );
+ explicit CFormatEtc( const FORMATETC& aFormatEtc );
CFormatEtc( CLIPFORMAT cf, DWORD tymed = TYMED_HGLOBAL, DVTARGETDEVICE* ptd = NULL, DWORD dwAspect = DVASPECT_CONTENT, LONG lindex = -1 );
CFormatEtc( const CFormatEtc& theOther );
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index 3c8a93731945..7f3a46cf0a72 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -58,7 +58,7 @@ class CInvalidFormatEtcException
{
public:
HRESULT m_hr;
- CInvalidFormatEtcException( HRESULT hr ) : m_hr( hr ) {};
+ explicit CInvalidFormatEtcException( HRESULT hr ) : m_hr( hr ) {};
};
// ctor
@@ -137,7 +137,8 @@ STDMETHODIMP CXTDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium
{
HRESULT hr = DV_E_FORMATETC;
- if ( m_FormatRegistrar.isSynthesizeableFormat( *pFormatetc ) )
+ CFormatEtc aFormatetc(*pFormatetc);
+ if (m_FormatRegistrar.isSynthesizeableFormat(aFormatetc))
hr = renderSynthesizedFormatAndSetupStgMedium( *pFormatetc, *pmedium );
return hr;
@@ -479,7 +480,8 @@ STDMETHODIMP CXTDataObject::QueryGetData( LPFORMATETC pFormatetc )
InitializeFormatEtcContainer( );
- return m_FormatEtcContainer.hasFormatEtc( *pFormatetc ) ? S_OK : S_FALSE;
+ CFormatEtc aFormatetc(*pFormatetc);
+ return m_FormatEtcContainer.hasFormatEtc(aFormatetc) ? S_OK : S_FALSE;
}
// IDataObject->GetDataHere
diff --git a/dtrans/source/win32/ftransl/ftransl.hxx b/dtrans/source/win32/ftransl/ftransl.hxx
index 8863ffc99c6b..936377d07578 100644
--- a/dtrans/source/win32/ftransl/ftransl.hxx
+++ b/dtrans/source/win32/ftransl/ftransl.hxx
@@ -47,7 +47,7 @@ class CDataFormatTranslator : public
{
public:
- CDataFormatTranslator( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit CDataFormatTranslator( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
// XDataFormatTranslator
diff --git a/dtrans/source/win32/workbench/XTDo.hxx b/dtrans/source/win32/workbench/XTDo.hxx
index 336ba193567a..61b1499a1de1 100644
--- a/dtrans/source/win32/workbench/XTDo.hxx
+++ b/dtrans/source/win32/workbench/XTDo.hxx
@@ -88,7 +88,7 @@ private:
class CEnumFormatEtc : public IEnumFORMATETC
{
public:
- CEnumFormatEtc( LPUNKNOWN pUnkDataObj );
+ explicit CEnumFormatEtc( LPUNKNOWN pUnkDataObj );
// IUnknown
STDMETHODIMP QueryInterface( REFIID iid, LPVOID* ppvObject );
diff --git a/dtrans/test/win32/dnd/atlwindow.hxx b/dtrans/test/win32/dnd/atlwindow.hxx
index 0dbb0f5d879c..692b8befdc7a 100644
--- a/dtrans/test/win32/dnd/atlwindow.hxx
+++ b/dtrans/test/win32/dnd/atlwindow.hxx
@@ -52,7 +52,7 @@ class AWindow: public CWindowImpl<AWindow, CWindow,
CDTransObjFactory m_aDataConverter;
public:
- AWindow(LPCTSTR strName)
+ explicit AWindow(LPCTSTR strName)
{
RECT rcPos= {0,0,200,200};
Create(0, rcPos, strName);
diff --git a/dtrans/test/win32/dnd/targetlistener.hxx b/dtrans/test/win32/dnd/targetlistener.hxx
index 5064dc7b2efd..153dc64eead5 100644
--- a/dtrans/test/win32/dnd/targetlistener.hxx
+++ b/dtrans/test/win32/dnd/targetlistener.hxx
@@ -44,7 +44,7 @@ class DropTargetListener: public WeakImplHelper<XDropTargetListener>
// this is a window where dropped data are shown as text (only text)
HWND m_hEdit;
public:
- DropTargetListener( HWND hEdit);
+ explicit DropTargetListener(HWND hEdit);
~DropTargetListener();
virtual void SAL_CALL disposing( const EventObject& Source )
diff --git a/dtrans/test/win32/dnd/transferable.hxx b/dtrans/test/win32/dnd/transferable.hxx
index 428c9f7fa98b..1afafea498e0 100644
--- a/dtrans/test/win32/dnd/transferable.hxx
+++ b/dtrans/test/win32/dnd/transferable.hxx
@@ -70,7 +70,7 @@ class CTransferable : public WeakImplHelper< XClipboardOwner, XTransferable >
{
public:
CTransferable( ){};
- CTransferable( wchar_t* dataString);
+ explicit CTransferable( wchar_t* dataString);
// XTransferable