diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-10-15 01:57:12 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-17 09:53:42 +0200 |
commit | d51db77c8d87f210785a8a8c6dd875f7bacddb3c (patch) | |
tree | fd1ab208d49e85371fc9bb321539ce137bdaf719 /embedserv | |
parent | c8eaadb5d70f42723517bb028f363e37726be256 (diff) |
Remove some memset calls
Replace them with default initialization or calloc
Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1
Reviewed-on: https://gerrit.libreoffice.org/80805
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'embedserv')
-rw-r--r-- | embedserv/source/embed/docholder.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 1f1f619cd302..96659ca754fb 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -509,8 +509,7 @@ static void CopyToOLEMenu(HMENU hOrig,WORD origPos,HMENU hDest,WORD destPos) InsertMenuW(hDest,destPos,MF_BYPOSITION | MF_POPUP, reinterpret_cast<UINT_PTR>(subMenu),buffer); - MENUITEMINFOW mi; - memset(&mi,0,sizeof(mi)); + MENUITEMINFOW mi = {}; mi.cbSize = sizeof(mi); mi.fMask = MIIM_DATA; if(GetMenuItemInfoW(hOrig,origPos,TRUE,&mi)) @@ -1140,8 +1139,7 @@ HRESULT DocumentHolder::GetExtent( SIZEL *pSize ) HRESULT DocumentHolder::SetContRects(LPCRECT aRect) { if(m_xContainerWindow.is()) { - RECT wi; - memset(&wi,0,sizeof(wi)); + RECT wi = {}; if(m_pIOleIPFrame) { m_pIOleIPFrame->GetBorder(&wi); m_xContainerWindow->setPosSize( @@ -1216,8 +1214,7 @@ css::uno::Reference< css::awt::XWindow> SAL_CALL DocumentHolder::getContainerWin lang::SystemDependent::SYSTEM_WIN32), uno::UNO_QUERY); - RECT wi; - memset(&wi,0,sizeof(wi)); + RECT wi = {}; if(xWin.is() && m_pIOleIPFrame->GetBorder(&wi) == NOERROR) { xWin->setVisible(true); xWin->setPosSize( |