diff options
20 files changed, 34 insertions, 32 deletions
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx index 7d1c1fad6dc4..ebec49ea9d00 100644 --- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx +++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx @@ -578,7 +578,7 @@ struct RaiseInfo unsigned char * _code; sal_uInt64 _codeBase; - RaiseInfo( typelib_TypeDescription * pTD ) throw (); + explicit RaiseInfo(typelib_TypeDescription * pTD) throw (); ~RaiseInfo() throw (); }; diff --git a/bridges/test/performance/testperformance.cxx b/bridges/test/performance/testperformance.cxx index 3aec05d9992b..aa48e85ab216 100644 --- a/bridges/test/performance/testperformance.cxx +++ b/bridges/test/performance/testperformance.cxx @@ -72,15 +72,15 @@ static inline sal_uInt32 getSystemTicks() class MyTimer { public: - MyTimer( const OString &descString ) : - nStart( getSystemTicks() ), - m_descString( descString ) - { - } + explicit MyTimer(const OString &descString) + : nStart(getSystemTicks()) + , m_descString(descString) + { + } ~MyTimer( ) - { - printf( "%f s : %s\n", (getSystemTicks() -nStart) / 1000., m_descString.getStr() ); - } + { + printf( "%f s : %s\n", (getSystemTicks() -nStart) / 1000., m_descString.getStr() ); + } private: sal_uInt32 nStart; OString m_descString; diff --git a/bridges/test/testcomp.cxx b/bridges/test/testcomp.cxx index 78918ecdf952..fb33907b7614 100644 --- a/bridges/test/testcomp.cxx +++ b/bridges/test/testcomp.cxx @@ -112,7 +112,7 @@ public: ServiceImpl() : _nRef( 0 ) {} - ServiceImpl( const Reference< XMultiServiceFactory > & /* xMgr */) + explicit ServiceImpl( const Reference< XMultiServiceFactory > & /* xMgr */) : _nRef( 0 ) {} diff --git a/bridges/test/testcomp.h b/bridges/test/testcomp.h index 75bd05e81e4f..5f6fdd062a97 100644 --- a/bridges/test/testcomp.h +++ b/bridges/test/testcomp.h @@ -124,7 +124,7 @@ class OInstanceProvider : { public: OInstanceProvider( ){} - OInstanceProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & r ) : + explicit OInstanceProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & r ) : m_rSMgr( r ) {} ~OInstanceProvider(){ printf( "instance provider dies\n" );} diff --git a/canvas/source/directx/dx_textlayout_drawhelper.hxx b/canvas/source/directx/dx_textlayout_drawhelper.hxx index 41f293fca823..4bb82ec7c716 100644 --- a/canvas/source/directx/dx_textlayout_drawhelper.hxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.hxx @@ -43,7 +43,7 @@ namespace dxcanvas class TextLayoutDrawHelper { public: - TextLayoutDrawHelper( + explicit TextLayoutDrawHelper( const css::uno::Reference< css::rendering::XGraphicDevice >& xGraphicDevice); ~TextLayoutDrawHelper(); 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 |