Skip to content

Commit

Permalink
some debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
unxed committed Mar 16, 2024
1 parent 316451e commit d2551e7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions WinPort/src/Backend/WX/wxClipboardBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ void *wxClipboardBackend::OnClipboardGetData(UINT format)

wxTextDataObject data;
if (wxTheClipboard->GetData( data )) {
fprintf(stderr, "OnClipboardGetData(%u) - found wx-compatible text format\n", format);
wx_str = data.GetText();
dataFound = true;
}
Expand All @@ -266,15 +267,17 @@ void *wxClipboardBackend::OnClipboardGetData(UINT format)
if (!dataFound && wxTheClipboard->GetData(customDataTextUtf8)) {
const void* data = customDataTextUtf8.GetData();
size_t dataSize = customDataTextUtf8.GetSize();
if (dataSize > 0)
{
if (dataSize > 0) {
fprintf(stderr, "OnClipboardGetData(%u) - found MIME-compatible text format\n", format);
wx_str = wxString(static_cast<const char*>(data), dataSize);
dataFound = true;
}
}

if (!dataFound)
if (!dataFound) {
fprintf(stderr, "OnClipboardGetData(%u) - no supported text format found\n", format);
return nullptr;
}

if (format == CF_UNICODETEXT) {
const auto &wc = wx_str.wc_str();
Expand Down

0 comments on commit d2551e7

Please sign in to comment.