namespace frontend {
-static QMimeData const * read_clipboard()
+static QMimeData const * read_clipboard()
{
LYXERR(Debug::CLIPBOARD, "Getting Clipboard");
QMimeData const * source =
}
-QByteArray CacheMimeData::data(QString const & mimeType) const
+QByteArray CacheMimeData::data(QString const & mimeType) const
{
return read_clipboard()->data(mimeType);
}
image.save(toqstr(filename.absFileName()), "JPEG");
else
LATTEST(false);
-
+
return filename;
}
-
+
// get mime for type
QString mime;
switch (type) {
case WmfGraphicsType: mime = wmfMimeType(); break;
default: LASSERT(false, return FileName());
}
-
+
// get data
if (!cache_.hasFormat(mime))
return FileName();
<< filename.absFileName() << " for writing");
return FileName();
}
-
+
// write the (LinkBack) PDF data
f.write(ar);
if (type == LinkBackGraphicsType) {
case LyXTextType:
return cache_.hasFormat(lyxMimeType());
case PlainTextType:
- return cache_.hasText();
+ return cache_.hasText();
case HtmlTextType:
return cache_.hasHtml();
case LaTeXTextType:
#else
return false;
#endif // Q_OS_MAC
-
+
// get mime data
QStringList const & formats = cache_.formats();
LYXERR(Debug::CLIPBOARD, "We found " << formats.size() << " formats");
case PdfGraphicsType: mime = pdfMimeType(); break;
default: LASSERT(false, return false);
}
-
+
return cache_.hasFormat(mime);
}
bool GuiClipboard::hasInternal() const
{
// Windows and Mac OS X does not have the concept of ownership;
- // the clipboard is a fully global resource so all applications
+ // the clipboard is a fully global resource so all applications
// are notified of changes. However, on Windows ownership is
// emulated by Qt through the OleIsCurrentClipboard() API, while
// on Mac OS X we deal with this issue by ourself.
class QMacPasteboardMimeGraphics;
/**
- * \class CacheMimeData
- *
- * This class is used in order to query the clipboard only once on
+ * \class CacheMimeData
+ *
+ * This class is used in order to query the clipboard only once on
* startup and once each time the contents of the clipboard changes.
*/
class CacheMimeData : public QMimeData
/// the cached mime data used to describe the information
/// that can be stored in the clipboard
CacheMimeData cache_;
- /// checksum for internal clipboard data (used on Mac)
+ /// checksum for internal clipboard data (used on Mac)
boost::uint32_t checksum;
};