summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-02-15 11:47:16 -0500
committerGitHub <noreply@github.com>2024-02-15 11:47:16 -0500
commitde72b1d573897c24e307f63b071fd5f02ce851c1 (patch)
tree270b33a014a7b138f4ab35b2176038309ed4f0f7 /indra/llui
parent9b1796df73f2d4fa19517f390258f798c10bff1e (diff)
parentd583fb8badd8060c0f74bcb6e99bb6e7d08a67d0 (diff)
Merge pull request #798 from secondlife/helpcmd
Add help() function to Lua "builtins."
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lltexteditor.cpp3
-rw-r--r--indra/llui/lltexteditor.h14
2 files changed, 14 insertions, 3 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 3d2a426913..ccd04f83e7 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1504,7 +1504,8 @@ void LLTextEditor::cleanStringForPaste(LLWString & clean_string)
}
-void LLTextEditor::pasteTextWithLinebreaks(LLWString & clean_string)
+template <>
+void LLTextEditor::pasteTextWithLinebreaks<LLWString>(const LLWString & clean_string)
{
std::basic_string<llwchar>::size_type start = 0;
std::basic_string<llwchar>::size_type pos = clean_string.find('\n',start);
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index ec2b9a4b7d..01b5ce5fbd 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -34,6 +34,7 @@
#include "llstyle.h"
#include "lleditmenuhandler.h"
#include "llviewborder.h" // for params
+#include "llstring.h"
#include "lltextbase.h"
#include "lltextvalidate.h"
@@ -294,10 +295,19 @@ private:
//
// Methods
//
- void pasteHelper(bool is_primary);
+ void pasteHelper(bool is_primary);
void cleanStringForPaste(LLWString & clean_string);
- void pasteTextWithLinebreaks(LLWString & clean_string);
+public:
+ template <typename STRINGTYPE>
+ void pasteTextWithLinebreaks(const STRINGTYPE& clean_string)
+ {
+ pasteTextWithLinebreaks<LLWString>(ll_convert(clean_string));
+ }
+ template <>
+ void pasteTextWithLinebreaks<LLWString>(const LLWString & clean_string);
+
+private:
void onKeyStroke();
// Concrete TextCmd sub-classes used by the LLTextEditor base class