mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 10:08:41 +00:00
Sending wrong length when putting data on the clipboards,
double byte chars need twice the space. Wrongly assummed nsString.Length() return bytes instead of length in chars doubel or single.
This commit is contained in:
parent
ee474fa908
commit
022dd79bc6
@ -1779,7 +1779,9 @@ PresShell::DoCopy()
|
||||
trans->SetConverter(xifConverter);
|
||||
|
||||
// Now add the XIF data to the transferable
|
||||
trans->SetTransferData(&flavor, buffer.ToNewUnicode(), buffer.Length());
|
||||
// the transferable wants the number bytes for the data and since it is double byte
|
||||
// we multiply by 2
|
||||
trans->SetTransferData(&flavor, buffer.ToNewUnicode(), buffer.Length()*2);
|
||||
//trans->SetTransferData(&flavor, buffer.ToNewCString(), buffer.Length());
|
||||
|
||||
// put the transferable on the clipboard
|
||||
|
@ -1779,7 +1779,9 @@ PresShell::DoCopy()
|
||||
trans->SetConverter(xifConverter);
|
||||
|
||||
// Now add the XIF data to the transferable
|
||||
trans->SetTransferData(&flavor, buffer.ToNewUnicode(), buffer.Length());
|
||||
// the transferable wants the number bytes for the data and since it is double byte
|
||||
// we multiply by 2
|
||||
trans->SetTransferData(&flavor, buffer.ToNewUnicode(), buffer.Length()*2);
|
||||
//trans->SetTransferData(&flavor, buffer.ToNewCString(), buffer.Length());
|
||||
|
||||
// put the transferable on the clipboard
|
||||
|
Loading…
x
Reference in New Issue
Block a user