From 4b1fe58efea33f631851e4b715d72814775f3363 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 6 Mar 2017 16:49:28 +0300 Subject: method CSrmmWindow::GetIEViewSelection is used once, therefore inlined --- plugins/Scriver/src/msgdialog.cpp | 21 ++++++++------------- plugins/Scriver/src/msgs.h | 1 - 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 55609342cd..4e066201e7 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -27,15 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define ENTERCLICKTIME 1000 //max time in ms during which a double-tap on enter will cause a send -wchar_t* CSrmmWindow::GetIEViewSelection() -{ - IEVIEWEVENT evt = { sizeof(evt) }; - evt.hwnd = m_hwndIeview; - evt.hContact = m_hContact; - evt.iType = IEE_GET_SELECTION; - return mir_wstrdup((wchar_t*)CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&evt)); -} - static wchar_t* GetQuotedTextW(wchar_t *text) { size_t i, j, l = mir_wstrlen(text); @@ -1623,10 +1614,14 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) st.codepage = 1200; wchar_t *buffer = NULL; - if (m_hwndIeview != NULL) - buffer = GetIEViewSelection(); - else - buffer = GetRichEditSelection(m_log.GetHwnd()); + if (m_hwndIeview != NULL) { + IEVIEWEVENT evt = { sizeof(evt) }; + evt.hwnd = m_hwndIeview; + evt.hContact = m_hContact; + evt.iType = IEE_GET_SELECTION; + buffer = mir_wstrdup((wchar_t*)CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&evt)); + } + else buffer = GetRichEditSelection(m_log.GetHwnd()); if (buffer != NULL) { wchar_t *quotedBuffer = GetQuotedTextW(buffer); diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 276959c0e8..64f4d6b05d 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -130,7 +130,6 @@ class CSrmmWindow : public CScriverWindow InfobarWindowData *m_pInfobarData; void GetContactUniqueId(char *buf, int maxlen); - wchar_t* GetIEViewSelection(); HICON GetTabIcon(); void GetTitlebarIcon(struct TitleBarData *tbd); void MessageDialogResize(int w, int h); -- cgit v1.2.3