summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msgdlgutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/msgdlgutils.cpp')
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 17ff931222..2ee4e63c13 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -69,6 +69,8 @@ bool TSAPI IsCustomEvent(int eventType)
// checking if theres's protected text at the point
// emulates EN_LINK WM_NOTIFY to parent to process links
+const CLSID IID_ITextDocument = { 0x8CC497C0, 0xA1DF, 0x11CE, { 0x80, 0x98, 0x00, 0xAA, 0x00, 0x47, 0xBE, 0x5D } };
+
BOOL TSAPI CheckCustomLink(HWND hwndRich, POINT *ptClient, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL bUrlNeeded)
{
long res = 0, cnt = 0;
@@ -347,6 +349,22 @@ UINT TSAPI GetIEViewMode(MCONTACT hContact)
/////////////////////////////////////////////////////////////////////////////////////////
+bool IsStringValidLink(wchar_t *pszText)
+{
+ if (pszText == nullptr)
+ return false;
+
+ if (mir_wstrlen(pszText) < 5 || wcschr(pszText, '"'))
+ return false;
+
+ if (towlower(pszText[0]) == 'w' && towlower(pszText[1]) == 'w' && towlower(pszText[2]) == 'w' && pszText[3] == '.' && iswalnum(pszText[4]))
+ return true;
+
+ return wcsstr(pszText, L"://") != nullptr;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
void TSAPI LoadThemeDefaults(TContainerData *pContainer)
{
memset(&pContainer->m_theme, 0, sizeof(TLogTheme));