CtrlCore: PasteClip GetFormat, refactored Get (now equals to Get(GetFormat()), documented

git-svn-id: svn://ultimatepp.org/upp/trunk@3882 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-09-18 09:12:31 +00:00
commit 68a128a4d9
6 changed files with 189 additions and 17 deletions

View file

@ -60,19 +60,12 @@ bool PasteClip::Accept()
bool PasteClip::Accept(const char *_fmt)
{
Vector<String> f = Split(_fmt, ';');
for(int i = 0; i < f.GetCount(); i++) {
if(IsAccepted() && fmt == f[i])
return paste;
for(int i = 0; i < f.GetCount(); i++)
if(IsAvailable(f[i])) {
accepted = true;
if(paste) {
fmt = f[i];
data = Get(f[i]);
return true;
}
break;
fmt = f[i];
return paste;
}
}
return false;
}