diff options
author | Philipp Hofer <philipp.hofer@protonmail.com> | 2020-11-12 12:55:42 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-13 15:15:46 +0100 |
commit | 5035f265cd6e19ef3589db55ca0b780944812365 (patch) | |
tree | ef7b5b423363bb26e4b54c00bc5d7a43d42095e4 /embedserv | |
parent | eedafe6e5c1c1f598170e6349c29ed19437d1f8c (diff) |
tdf#123936 Formatting files in module embedserv with clang-format
Change-Id: I475628cbec4c22a4b5ec535991d4f68154e3919e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105665
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'embedserv')
-rw-r--r-- | embedserv/source/embed/ed_iinplace.cxx | 30 | ||||
-rw-r--r-- | embedserv/source/embed/esdll.cxx | 7 | ||||
-rw-r--r-- | embedserv/source/embed/guid.hxx | 6 | ||||
-rw-r--r-- | embedserv/source/inc/embservconst.h | 6 | ||||
-rw-r--r-- | embedserv/source/inprocserv/advisesink.hxx | 29 |
5 files changed, 35 insertions, 43 deletions
diff --git a/embedserv/source/embed/ed_iinplace.cxx b/embedserv/source/embed/ed_iinplace.cxx index 0c6e869e633c..eb33bf5ac4d0 100644 --- a/embedserv/source/embed/ed_iinplace.cxx +++ b/embedserv/source/embed/ed_iinplace.cxx @@ -20,30 +20,26 @@ #include <embeddoc.hxx> #include <osl/diagnose.h> - -COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::GetWindow(HWND *hWnd) +COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::GetWindow(HWND* hWnd) { - OSL_ENSURE(m_pDocHolder,"no document for inplace activation"); + OSL_ENSURE(m_pDocHolder, "no document for inplace activation"); *hWnd = m_pDocHolder->GetTopMostWinHandle(); - if(*hWnd != nullptr) + if (*hWnd != nullptr) return NOERROR; else return ERROR; } -COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::ContextSensitiveHelp(BOOL) -{ - return NOERROR; -} +COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::ContextSensitiveHelp(BOOL) { return NOERROR; } COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::InPlaceDeactivate() { // no locking is used since the OLE must use the same thread always - if ( m_bIsInVerbHandling ) + if (m_bIsInVerbHandling) return E_UNEXPECTED; - BooleanGuard_Impl aGuard( m_bIsInVerbHandling ); + BooleanGuard_Impl aGuard(m_bIsInVerbHandling); m_pDocHolder->InPlaceDeactivate(); @@ -57,11 +53,10 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::InPlaceDeactivate() COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::UIDeactivate() { // no locking is used since the OLE must use the same thread always - if ( m_bIsInVerbHandling ) + if (m_bIsInVerbHandling) return E_UNEXPECTED; - BooleanGuard_Impl aGuard( m_bIsInVerbHandling ); - + BooleanGuard_Impl aGuard(m_bIsInVerbHandling); m_pDocHolder->UIDeactivate(); @@ -74,14 +69,11 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::UIDeactivate() COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::SetObjectRects(LPCRECT aRect, LPCRECT aClip) { - OSL_ENSURE(m_pDocHolder,"no document for inplace activation"); + OSL_ENSURE(m_pDocHolder, "no document for inplace activation"); - return m_pDocHolder->SetObjectRects(aRect,aClip); + return m_pDocHolder->SetObjectRects(aRect, aClip); } -COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::ReactivateAndUndo() -{ - return E_NOTIMPL; -} +COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::ReactivateAndUndo() { return E_NOTIMPL; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embedserv/source/embed/esdll.cxx b/embedserv/source/embed/esdll.cxx index bfffe73bb3f6..59a749078d37 100644 --- a/embedserv/source/embed/esdll.cxx +++ b/embedserv/source/embed/esdll.cxx @@ -37,15 +37,12 @@ END_OBJECT_MAP() // DLL Entry Point - #include <syswinwrapper.hxx> #include <docholder.hxx> - HINSTANCE DocumentHolder::m_hInstance; -extern "C" -BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) { DocumentHolder::m_hInstance = hInstance; if (!winwrap::HatchWindowRegister(hInstance)) @@ -60,7 +57,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) { _Module.Term(); } - return TRUE; // ok + return TRUE; // ok } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embedserv/source/embed/guid.hxx b/embedserv/source/embed/guid.hxx index eca39c2880c8..2cbf28b5b93a 100644 --- a/embedserv/source/embed/guid.hxx +++ b/embedserv/source/embed/guid.hxx @@ -28,11 +28,11 @@ #include <common.h> -OUString getFilterNameFromGUID_Impl( GUID const * ); +OUString getFilterNameFromGUID_Impl(GUID const*); -std::u16string_view getServiceNameFromGUID_Impl( GUID const * ); +std::u16string_view getServiceNameFromGUID_Impl(GUID const*); -wchar_t const * getStorageTypeFromGUID_Impl( GUID const * guid ); +wchar_t const* getStorageTypeFromGUID_Impl(GUID const* guid); #endif diff --git a/embedserv/source/inc/embservconst.h b/embedserv/source/inc/embservconst.h index aca7c8e49728..0b48df3d2c2d 100644 --- a/embedserv/source/inc/embservconst.h +++ b/embedserv/source/inc/embservconst.h @@ -35,8 +35,10 @@ extern "C" const GUID DECLSPEC_SELECTANY OID_CalcOASISServer = { SO3_SC_OLE_EMBE extern "C" const GUID DECLSPEC_SELECTANY OID_DrawingServer = { SO3_SDRAW_OLE_EMBED_CLASSID_60 }; extern "C" const GUID DECLSPEC_SELECTANY OID_DrawingOASISServer = { SO3_SDRAW_OLE_EMBED_CLASSID_8 }; -extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationServer = { SO3_SIMPRESS_OLE_EMBED_CLASSID_60 }; -extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationOASISServer = { SO3_SIMPRESS_OLE_EMBED_CLASSID_8 }; +extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationServer + = { SO3_SIMPRESS_OLE_EMBED_CLASSID_60 }; +extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationOASISServer + = { SO3_SIMPRESS_OLE_EMBED_CLASSID_8 }; extern "C" const GUID DECLSPEC_SELECTANY OID_MathServer = { SO3_SM_OLE_EMBED_CLASSID_60 }; extern "C" const GUID DECLSPEC_SELECTANY OID_MathOASISServer = { SO3_SM_OLE_EMBED_CLASSID_8 }; diff --git a/embedserv/source/inprocserv/advisesink.hxx b/embedserv/source/inprocserv/advisesink.hxx index e1bc55a4c0a6..1a89e38b4c3b 100644 --- a/embedserv/source/inprocserv/advisesink.hxx +++ b/embedserv/source/inprocserv/advisesink.hxx @@ -25,20 +25,20 @@ #include <memory> #if !defined WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN #endif #include <windows.h> #include <objidl.h> #include "smartpointer.hxx" -namespace inprocserv { - +namespace inprocserv +{ class OleWrapperAdviseSink : public IAdviseSink { protected: ULONG m_nRefCount; - ComSmart< IAdviseSink > m_pListener; + ComSmart<IAdviseSink> m_pListener; DWORD m_nListenerID; std::unique_ptr<FORMATETC> m_pFormatEtc; @@ -57,17 +57,18 @@ public: OleWrapperAdviseSink(); // an AdviseSink for IOleObject interface - explicit OleWrapperAdviseSink( const ComSmart< IAdviseSink >& pListener ); + explicit OleWrapperAdviseSink(const ComSmart<IAdviseSink>& pListener); // an AdviseSink for IDataObject interface - OleWrapperAdviseSink( const ComSmart< IAdviseSink >& pListener, FORMATETC* pFormatEtc, DWORD nDataRegFlag ); + OleWrapperAdviseSink(const ComSmart<IAdviseSink>& pListener, FORMATETC* pFormatEtc, + DWORD nDataRegFlag); // an AdviseSink for IViewObject interface - OleWrapperAdviseSink( const ComSmart< IAdviseSink >& pListener, DWORD nAspect, DWORD nViewRegFlag ); + OleWrapperAdviseSink(const ComSmart<IAdviseSink>& pListener, DWORD nAspect, DWORD nViewRegFlag); virtual ~OleWrapperAdviseSink(); - void SetRegID( DWORD nRegID ) { m_nRegID = nRegID; } + void SetRegID(DWORD nRegID) { m_nRegID = nRegID; } DWORD GetRegID() { return m_nRegID; } bool IsOleAdvise() { return m_bObjectAdvise; } @@ -76,7 +77,7 @@ public: FORMATETC* GetFormatEtc() { return m_pFormatEtc.get(); } DWORD GetAspect() { return m_nAspect; } - ComSmart< IAdviseSink >& GetOrigAdvise() { return m_pListener; } + ComSmart<IAdviseSink>& GetOrigAdvise() { return m_pListener; } void DisconnectOrigAdvise() { m_pListener = nullptr; } void SetClosed() { m_bClosed = TRUE; } @@ -87,11 +88,11 @@ public: STDMETHODIMP_(ULONG) AddRef() override; STDMETHODIMP_(ULONG) Release() override; - STDMETHODIMP_(void) OnDataChange(FORMATETC *, STGMEDIUM *) override; - STDMETHODIMP_(void) OnViewChange(DWORD, LONG) override; - STDMETHODIMP_(void) OnRename(IMoniker *) override; - STDMETHODIMP_(void) OnSave() override; - STDMETHODIMP_(void) OnClose() override; + STDMETHODIMP_(void) OnDataChange(FORMATETC*, STGMEDIUM*) override; + STDMETHODIMP_(void) OnViewChange(DWORD, LONG) override; + STDMETHODIMP_(void) OnRename(IMoniker*) override; + STDMETHODIMP_(void) OnSave() override; + STDMETHODIMP_(void) OnClose() override; }; }; // namespace advisesink |