summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/smileyroutines.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-09-25 14:22:41 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-09-25 14:22:41 +0300
commit5017c16a40fec1dfb507a2cdc09bc588c324661e (patch)
tree4a7628a6f437147f01d75ad94df272bbe6f27d43 /plugins/SmileyAdd/src/smileyroutines.cpp
parent45c5789dd34e1cba557c29483d4f897f4f7b2de0 (diff)
SmileyAdd: emoji smile pack to be used in parallel to any other smile pack
Diffstat (limited to 'plugins/SmileyAdd/src/smileyroutines.cpp')
-rw-r--r--plugins/SmileyAdd/src/smileyroutines.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/SmileyAdd/src/smileyroutines.cpp b/plugins/SmileyAdd/src/smileyroutines.cpp
index b3b5137712..8e4445796f 100644
--- a/plugins/SmileyAdd/src/smileyroutines.cpp
+++ b/plugins/SmileyAdd/src/smileyroutines.cpp
@@ -30,7 +30,12 @@ bool g_HiddenTextSupported = true;
const GUID IID_ITextDocument =
{ 0x8CC497C0, 0xA1DF, 0x11CE, { 0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D } };
-void LookupAllSmileys(SmileyPackType *smileyPack, SmileyPackCType *smileyCPack, const wchar_t *lpstrText, SmileysQueueType &smllist, const bool firstOnly)
+static void LookupAllSmileysWorker(
+ SmileyPackType *smileyPack,
+ SmileyPackCType *smileyCPack,
+ const wchar_t *lpstrText,
+ SmileysQueueType &smllist,
+ const bool firstOnly)
{
if (lpstrText == nullptr || *lpstrText == 0) return;
@@ -144,6 +149,13 @@ void LookupAllSmileys(SmileyPackType *smileyPack, SmileyPackCType *smileyCPack,
delete[] smileys;
}
+void LookupAllSmileys(SmileyPackType *smileyPack, SmileyPackCType *smileyCPack, const wchar_t *lpstrText, SmileysQueueType &smllist, const bool firstOnly)
+{
+ LookupAllSmileysWorker(smileyPack, smileyCPack, lpstrText, smllist, firstOnly);
+
+ if (g_pEmoji && smileyPack != g_pEmoji)
+ LookupAllSmileys(g_pEmoji, smileyCPack, lpstrText, smllist, firstOnly);
+}
void FindSmileyInText(SmileyPackType *smp, const wchar_t *str, unsigned &first, unsigned &size, SmileyType **sml)
{