mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-22 22:04:00 -06:00
GridCtrl: WhenPasting (called before paste)
git-svn-id: svn://ultimatepp.org/upp/trunk@15959 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
51bc11ed7f
commit
87b78019a2
3 changed files with 9 additions and 4 deletions
|
|
@ -93,7 +93,6 @@ void TopWindow::Close()
|
|||
DefaultBreak();
|
||||
return;
|
||||
}
|
||||
backup.Clear();
|
||||
if(IsOpen()) IgnoreMouseUp();
|
||||
Ctrl::Close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -781,7 +781,7 @@ void GridCtrl::Paste(int mode)
|
|||
{
|
||||
if(!clipboard)
|
||||
return;
|
||||
|
||||
|
||||
GridClipboard gc = GetClipboard();
|
||||
|
||||
bool is_gc = !gc.data.IsEmpty();
|
||||
|
|
@ -802,8 +802,12 @@ void GridCtrl::Paste(int mode)
|
|||
|
||||
Vector<String> lines;
|
||||
|
||||
String s = FromUnicode(ReadClipboardUnicodeText());
|
||||
|
||||
WhenPasting(s);
|
||||
|
||||
if(is_tc && !is_gc)
|
||||
lines = Upp::Split(FromUnicode(ReadClipboardUnicodeText()), '\n');
|
||||
lines = Upp::Split(s, '\n');
|
||||
|
||||
if(mode == 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1853,7 +1853,9 @@ class GridCtrl : public Ctrl
|
|||
Event<Value&> ProcessSummaryValue;
|
||||
|
||||
Event<int, int, Value&> WhenPasteCell;
|
||||
Event<> WhenPaste;
|
||||
|
||||
Event<String&> WhenPasting;
|
||||
Event<> WhenPaste;
|
||||
};
|
||||
|
||||
class GridText : Ctrl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue