diff options
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 49 | ||||
-rw-r--r-- | indra/llwindow/llwindowwin32.h | 2 |
2 files changed, 3 insertions, 48 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 697b8f2175..a589bf29f9 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1626,7 +1626,7 @@ void LLWindowWin32::setCursor(ECursorType cursor) } } -ECursorType LLWindowWin32::getCursor() +ECursorType LLWindowWin32::getCursor() const { return mCurrentCursor; } @@ -2279,7 +2279,7 @@ BOOL LLWindowWin32::convertCoords(LLCoordGL from, LLCoordScreen *to) BOOL LLWindowWin32::isClipboardTextAvailable() { - return IsClipboardFormatAvailable(CF_UNICODETEXT) || IsClipboardFormatAvailable( CF_TEXT ); + return IsClipboardFormatAvailable(CF_UNICODETEXT); } @@ -2306,27 +2306,6 @@ BOOL LLWindowWin32::pasteTextFromClipboard(LLWString &dst) CloseClipboard(); } } - else if (IsClipboardFormatAvailable(CF_TEXT)) - { - // This must be an OLD OS. We don't do non-ASCII for old OSes - if (OpenClipboard(mWindowHandle)) - { - HGLOBAL h_data = GetClipboardData(CF_TEXT); - if (h_data) - { - char* str = (char*) GlobalLock(h_data); - if (str) - { - // Strip non-ASCII characters - dst = utf8str_to_wstring(mbcsstring_makeASCII(str)); - LLWString::removeCRLF(dst); - GlobalUnlock(h_data); - success = TRUE; - } - } - CloseClipboard(); - } - } return success; } @@ -2363,30 +2342,6 @@ BOOL LLWindowWin32::copyTextToClipboard(const LLWString& wstr) } } - // Also provide a copy as raw ASCII text. - LLWString ascii_string(wstr); - LLWString::_makeASCII(ascii_string); - LLWString::addCRLF(ascii_string); - std::string out_s = wstring_to_utf8str(ascii_string); - const size_t size = (out_s.length() + 1) * sizeof(char); - - // Memory is allocated and then ownership of it is transfered to the system. - HGLOBAL hglobal_copy = GlobalAlloc(GMEM_MOVEABLE, size); - if (hglobal_copy) - { - char* copy = (char*) GlobalLock(hglobal_copy); - if( copy ) - { - memcpy(copy, out_s.c_str(), size); /* Flawfinder: ignore */ - GlobalUnlock(hglobal_copy); - - if (SetClipboardData(CF_TEXT, hglobal_copy)) - { - success = TRUE; - } - } - } - CloseClipboard(); } diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index c4391ef41f..487c1f09e7 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -45,7 +45,7 @@ public: /*virtual*/ void hideCursorUntilMouseMove(); /*virtual*/ BOOL isCursorHidden(); /*virtual*/ void setCursor(ECursorType cursor); - /*virtual*/ ECursorType getCursor(); + /*virtual*/ ECursorType getCursor() const; /*virtual*/ void captureMouse(); /*virtual*/ void releaseMouse(); /*virtual*/ void setMouseClipping( BOOL b ); |