aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llclipboard.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-09-09 11:38:26 -0500
committerJacek Antonelli2009-09-09 11:59:42 -0500
commitced5a5f6a0e7d294f9e477409387674fcecc532c (patch)
treee7500de0806009c2955bef6af7103ac60ae1e8e0 /linden/indra/llui/llclipboard.cpp
parentMerge branch 'objectbackup' into next (diff)
parentCommented out permissions button (todo: backport this if there's time) (diff)
downloadmeta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.zip
meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.tar.gz
meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.tar.bz2
meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.tar.xz
Merge remote branch 'mccabe/1.2.0-next' into next
Moved "Backup" pie menu item to fit "Go Here" in top-left slot. Conflicts: linden/indra/newview/llviewermenu.cpp linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
Diffstat (limited to 'linden/indra/llui/llclipboard.cpp')
-rw-r--r--linden/indra/llui/llclipboard.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/linden/indra/llui/llclipboard.cpp b/linden/indra/llui/llclipboard.cpp
index d5255e7..f33f3fa 100644
--- a/linden/indra/llui/llclipboard.cpp
+++ b/linden/indra/llui/llclipboard.cpp
@@ -92,3 +92,44 @@ BOOL LLClipboard::canPasteString() const
92{ 92{
93 return LLView::getWindow()->isClipboardTextAvailable(); 93 return LLView::getWindow()->isClipboardTextAvailable();
94} 94}
95
96
97void LLClipboard::copyFromPrimarySubstring(const LLWString &src, S32 pos, S32 len, const LLUUID& source_id )
98{
99 mSourceID = source_id;
100 mString = src.substr(pos, len);
101 LLView::getWindow()->copyTextToPrimary( mString );
102}
103
104
105const LLWString& LLClipboard::getPastePrimaryWString( LLUUID* source_id )
106{
107 if( mSourceID.notNull() )
108 {
109 LLWString temp_string;
110 LLView::getWindow()->pasteTextFromPrimary(temp_string);
111
112 if( temp_string != mString )
113 {
114 mSourceID.setNull();
115 mString = temp_string;
116 }
117 }
118 else
119 {
120 LLView::getWindow()->pasteTextFromPrimary(mString);
121 }
122
123 if( source_id )
124 {
125 *source_id = mSourceID;
126 }
127
128 return mString;
129}
130
131
132BOOL LLClipboard::canPastePrimaryString() const
133{
134 return LLView::getWindow()->isPrimaryTextAvailable();
135}