diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-14 16:57:04 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-16 14:19:20 +0000 |
commit | 1f9b6013e507ee4acb9374cee909f59139d52978 (patch) | |
tree | 014cc1248815b7722cea3e20af0c09d58fe37f46 /dtrans/source/generic | |
parent | 5eab3e5eec67ad97f39f792852e88003fea89d1c (diff) |
clang-cl loplugin: dtrans
Change-Id: I1d55f3e7ecbde486f318d5175b1570f0caa33255
Reviewed-on: https://gerrit.libreoffice.org/29870
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dtrans/source/generic')
-rw-r--r-- | dtrans/source/generic/clipboardmanager.cxx | 8 | ||||
-rw-r--r-- | dtrans/source/generic/clipboardmanager.hxx | 20 | ||||
-rw-r--r-- | dtrans/source/generic/dtrans.cxx | 6 | ||||
-rw-r--r-- | dtrans/source/generic/generic_clipboard.cxx | 4 | ||||
-rw-r--r-- | dtrans/source/generic/generic_clipboard.hxx | 24 |
5 files changed, 31 insertions, 31 deletions
diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx index 9c1fa0bf0b56..727724e347aa 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.cxx @@ -147,7 +147,7 @@ void SAL_CALL ClipboardManager::dispose() ClearableMutexGuard aGuard( rBHelper.rMutex ); if (!rBHelper.bDisposed && !rBHelper.bInDispose) { - rBHelper.bInDispose = sal_True; + rBHelper.bInDispose = true; aGuard.clear(); // give everyone a chance to save his clipboard instance @@ -182,8 +182,8 @@ void SAL_CALL ClipboardManager::dispose() } } - rBHelper.bDisposed = sal_True; - rBHelper.bInDispose = sal_False; + rBHelper.bDisposed = true; + rBHelper.bInDispose = false; } } @@ -199,7 +199,7 @@ void SAL_CALL ClipboardManager::disposing( const EventObject& event ) Reference< XInterface > SAL_CALL ClipboardManager_createInstance( const Reference< XMultiServiceFactory > & /*xMultiServiceFactory*/) { - return Reference < XInterface >( ( OWeakObject * ) new ClipboardManager()); + return Reference < XInterface >(static_cast<OWeakObject *>(new ClipboardManager())); } Sequence< OUString > SAL_CALL ClipboardManager_getSupportedServiceNames() diff --git a/dtrans/source/generic/clipboardmanager.hxx b/dtrans/source/generic/clipboardmanager.hxx index b52dae2b545a..80b179712eda 100644 --- a/dtrans/source/generic/clipboardmanager.hxx +++ b/dtrans/source/generic/clipboardmanager.hxx @@ -45,7 +45,7 @@ namespace dtrans const OUString m_aDefaultName; - virtual ~ClipboardManager(); + virtual ~ClipboardManager() override; protected: using WeakComponentImplHelperBase::disposing; public: @@ -57,27 +57,27 @@ namespace dtrans */ virtual OUString SAL_CALL getImplementationName( ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; /* * XComponent */ virtual void SAL_CALL dispose() - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; /* * XEventListener */ virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; /* * XClipboardManager @@ -85,18 +85,18 @@ namespace dtrans virtual css::uno::Reference< css::datatransfer::clipboard::XClipboard > SAL_CALL getClipboard( const OUString& aName ) throw(css::container::NoSuchElementException, - css::uno::RuntimeException); + css::uno::RuntimeException) override; virtual void SAL_CALL addClipboard( const css::uno::Reference< css::datatransfer::clipboard::XClipboard >& xClipboard ) throw(css::lang::IllegalArgumentException, css::container::ElementExistException, - css::uno::RuntimeException); + css::uno::RuntimeException) override; virtual void SAL_CALL removeClipboard( const OUString& aName ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; virtual css::uno::Sequence< OUString > SAL_CALL listClipboardNames( ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; }; diff --git a/dtrans/source/generic/dtrans.cxx b/dtrans/source/generic/dtrans.cxx index fd7c0a3ae0ed..22be8aca3c22 100644 --- a/dtrans/source/generic/dtrans.cxx +++ b/dtrans/source/generic/dtrans.cxx @@ -35,7 +35,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL dtrans_component_getFactory( void * /*pRegistryKey*/ ) { - void * pRet = 0; + void * pRet = nullptr; if (pServiceManager) { @@ -44,7 +44,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL dtrans_component_getFactory( if (rtl_str_compare( pImplName, CLIPBOARDMANAGER_IMPLEMENTATION_NAME ) == 0) { xFactory = createOneInstanceFactory( - reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + static_cast< XMultiServiceFactory * >( pServiceManager ), OUString::createFromAscii( pImplName ), ClipboardManager_createInstance, ClipboardManager_getSupportedServiceNames() ); @@ -52,7 +52,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL dtrans_component_getFactory( else if (rtl_str_compare( pImplName, GENERIC_CLIPBOARD_IMPLEMENTATION_NAME ) == 0) { xFactory = createSingleFactory( - reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + static_cast< XMultiServiceFactory * >( pServiceManager ), OUString::createFromAscii( pImplName ), GenericClipboard_createInstance, GenericClipboard_getSupportedServiceNames() ); diff --git a/dtrans/source/generic/generic_clipboard.cxx b/dtrans/source/generic/generic_clipboard.cxx index 13061dc3cf09..de175f24617d 100644 --- a/dtrans/source/generic/generic_clipboard.cxx +++ b/dtrans/source/generic/generic_clipboard.cxx @@ -33,7 +33,7 @@ using ::dtrans::GenericClipboard; GenericClipboard::GenericClipboard() : WeakComponentImplHelper< XClipboardEx, XClipboardNotifier, XServiceInfo, XInitialization > (m_aMutex), - m_bInitialized(sal_False) + m_bInitialized(false) { } @@ -156,7 +156,7 @@ Sequence< OUString > SAL_CALL GenericClipboard_getSupportedServiceNames() Reference< XInterface > SAL_CALL GenericClipboard_createInstance( const Reference< XMultiServiceFactory > & /*xMultiServiceFactory*/) { - return Reference < XInterface >( ( OWeakObject * ) new GenericClipboard()); + return Reference < XInterface >(static_cast<OWeakObject *>(new GenericClipboard())); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/generic/generic_clipboard.hxx b/dtrans/source/generic/generic_clipboard.hxx index 41d7cdc6f640..c336cabef1e7 100644 --- a/dtrans/source/generic/generic_clipboard.hxx +++ b/dtrans/source/generic/generic_clipboard.hxx @@ -46,8 +46,8 @@ namespace dtrans css::uno::Reference< css::datatransfer::XTransferable > m_aContents; css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner > m_aOwner; - sal_Bool m_bInitialized; - virtual ~GenericClipboard(); + bool m_bInitialized; + virtual ~GenericClipboard() override; public: @@ -58,42 +58,42 @@ namespace dtrans */ virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) - throw(css::uno::Exception, css::uno::RuntimeException); + throw(css::uno::Exception, css::uno::RuntimeException) override; /* * XServiceInfo */ virtual OUString SAL_CALL getImplementationName( ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; /* * XClipboard */ virtual css::uno::Reference< css::datatransfer::XTransferable > SAL_CALL getContents() - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; virtual void SAL_CALL setContents( const css::uno::Reference< css::datatransfer::XTransferable >& xTrans, const css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; virtual OUString SAL_CALL getName() - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; /* * XClipboardEx */ virtual sal_Int8 SAL_CALL getRenderingCapabilities() - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; /* * XClipboardNotifier @@ -101,11 +101,11 @@ namespace dtrans virtual void SAL_CALL addClipboardListener( const css::uno::Reference< css::datatransfer::clipboard::XClipboardListener >& listener ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; virtual void SAL_CALL removeClipboardListener( const css::uno::Reference< css::datatransfer::clipboard::XClipboardListener >& listener ) - throw(css::uno::RuntimeException); + throw(css::uno::RuntimeException) override; }; |