#include "FileDialog.h"
+#include "support/FileName.h"
#include "GuiClipboard.h"
#include "qt_helpers.h"
if (hasGraphicsContents(Clipboard::JpegGraphicsType))
types.push_back(Clipboard::JpegGraphicsType);
- LASSERT(!types.empty(), /**/);
+ LASSERT(!types.empty(), return FileName());
// select prefered type if AnyGraphicsType was passed
if (type == Clipboard::AnyGraphicsType)
else if (type == JpegGraphicsType)
image.save(toqstr(filename.absFileName()), "JPEG");
else
- LASSERT(false, /**/);
+ LATTEST(false);
return filename;
}
case LinkBackGraphicsType: mime = pdfMimeType(); break;
case EmfGraphicsType: mime = emfMimeType(); break;
case WmfGraphicsType: mime = wmfMimeType(); break;
- default: LASSERT(false, /**/);
+ default: LASSERT(false, return FileName());
}
// get data
ds << pdfLen; // big endian by default
#else
// only non-Mac this should never happen
- LASSERT(false, /**/);
+ LATTEST(false);
#endif // Q_WS_MACX
}
}
+void GuiClipboard::put(string const & text) const
+{
+ qApp->clipboard()->setText(toqstr(text));
+}
+
+
void GuiClipboard::put(string const & lyx, docstring const & html, docstring const & text)
{
LYXERR(Debug::ACTION, "GuiClipboard::put(`" << lyx << "' `"
case EmfGraphicsType: mime = emfMimeType(); break;
case WmfGraphicsType: mime = wmfMimeType(); break;
case PdfGraphicsType: mime = pdfMimeType(); break;
- default: LASSERT(false, /**/);
+ default: LASSERT(false, return false);
}
return cache_.hasFormat(mime);