summaryrefslogtreecommitdiff
path: root/embedserv/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-07-03 14:03:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-07-03 14:03:45 +0200
commita81c6eb5ffc055ce6e299eb6606095538a858d27 (patch)
tree0fd409231dd85c6d8cad6f9f9212a2864d9c8648 /embedserv/source
parent663376dee3b8c0ea0f6f8079e14a512b060ecb24 (diff)
loplugin:oncevar (clang-cl): embedserv
Change-Id: Icc9d01b46975505c54a6395edfbeb15cf25c8700
Diffstat (limited to 'embedserv/source')
-rw-r--r--embedserv/source/embed/docholder.cxx3
-rw-r--r--embedserv/source/embed/ed_ioleobject.cxx4
2 files changed, 2 insertions, 5 deletions
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx
index d11f662ddc3f..14e95f26d45b 100644
--- a/embedserv/source/embed/docholder.cxx
+++ b/embedserv/source/embed/docholder.cxx
@@ -501,12 +501,11 @@ void DocumentHolder::UIDeactivate()
void CopyToOLEMenu(HMENU hOrig,WORD origPos,HMENU hDest,WORD destPos)
{
HMENU subMenu(nullptr);
- UINT uTemp = MF_BYPOSITION | MF_POPUP;
char buffer[256];
subMenu = GetSubMenu(hOrig,origPos);
GetMenuString(hOrig,origPos,buffer,256,MF_BYPOSITION);
- InsertMenu(hDest,destPos,uTemp,
+ InsertMenu(hDest,destPos,MF_BYPOSITION | MF_POPUP,
reinterpret_cast<UINT_PTR>(subMenu),LPCTSTR(buffer));
MENUITEMINFOW mi;
diff --git a/embedserv/source/embed/ed_ioleobject.cxx b/embedserv/source/embed/ed_ioleobject.cxx
index e71d528d44ca..56ba1ecf5d4c 100644
--- a/embedserv/source/embed/ed_ioleobject.cxx
+++ b/embedserv/source/embed/ed_ioleobject.cxx
@@ -89,8 +89,6 @@ STDMETHODIMP EmbedDocument_Impl::Close( DWORD dwSaveOption )
HRESULT EmbedDocument_Impl::OLENotifyClosing()
{
- HRESULT hr = S_OK;
-
AdviseSinkHashMap aAHM(m_aAdviseHashMap);
for ( AdviseSinkHashMapIterator iAdvise = aAHM.begin();
@@ -100,7 +98,7 @@ HRESULT EmbedDocument_Impl::OLENotifyClosing()
iAdvise->second->OnClose();
}
- return hr;
+ return S_OK;
}