diff options
author | Adam Moss <moss@lindenlab.com> | 2009-04-16 23:45:35 +0000 |
---|---|---|
committer | Adam Moss <moss@lindenlab.com> | 2009-04-16 23:45:35 +0000 |
commit | b01c75cb423f07a3d3354f8bd62f265f80062b3b (patch) | |
tree | dec1b220c24a60cc220d1cb07fd3545610644f0a /indra/llui/llclipboard.cpp | |
parent | 868250bdd74f348557102c0d8408d9bec30331f6 (diff) |
svn merge -r117314:117337
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/mv13a-merge-1
QAR-1343 maint-viewer-13a+libcurlexploitfix-3-3 combo merge
Diffstat (limited to 'indra/llui/llclipboard.cpp')
-rw-r--r-- | indra/llui/llclipboard.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp index 8a7a214048..2cb8197a67 100644 --- a/indra/llui/llclipboard.cpp +++ b/indra/llui/llclipboard.cpp @@ -93,3 +93,44 @@ BOOL LLClipboard::canPasteString() const { return LLView::getWindow()->isClipboardTextAvailable(); } + + +void LLClipboard::copyFromPrimarySubstring(const LLWString &src, S32 pos, S32 len, const LLUUID& source_id ) +{ + mSourceID = source_id; + mString = src.substr(pos, len); + LLView::getWindow()->copyTextToPrimary( mString ); +} + + +const LLWString& LLClipboard::getPastePrimaryWString( LLUUID* source_id ) +{ + if( mSourceID.notNull() ) + { + LLWString temp_string; + LLView::getWindow()->pasteTextFromPrimary(temp_string); + + if( temp_string != mString ) + { + mSourceID.setNull(); + mString = temp_string; + } + } + else + { + LLView::getWindow()->pasteTextFromPrimary(mString); + } + + if( source_id ) + { + *source_id = mSourceID; + } + + return mString; +} + + +BOOL LLClipboard::canPastePrimaryString() const +{ + return LLView::getWindow()->isPrimaryTextAvailable(); +} |