diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-19 18:13:27 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-19 18:00:53 +0000 |
commit | af7cbebd8eed82b81e00e6c2e0dc6c2c467ad8e2 (patch) | |
tree | 2172475e22afce046cb1e9b1fb6528574bc16cf4 /libreofficekit/qa | |
parent | 69e9c082f07206a1a589c49f679f92c2162e830d (diff) |
LOK: return used format in Document::getTextSelection()
This allows requesting text/html, with falling back to plain text if
necessary.
Change-Id: Ie6d4e0e173311ba018553043b6a869abf193bf6f
Reviewed-on: https://gerrit.libreoffice.org/16377
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'libreofficekit/qa')
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx index 9496ba5ea180..7d4960d520d9 100644 --- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx @@ -130,12 +130,14 @@ static void doCopy(GtkWidget* /*pButton*/, gpointer /*pItem*/) { LOKDocView* pLOKDocView = LOK_DOC_VIEW(pDocView); LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(pLOKDocView); - char* pSelection = pDocument->pClass->getTextSelection(pDocument, "text/plain;charset=utf-8"); + char* pUsedFormat = 0; + char* pSelection = pDocument->pClass->getTextSelection(pDocument, "text/plain;charset=utf-8", &pUsedFormat); GtkClipboard* pClipboard = gtk_clipboard_get_for_display(gtk_widget_get_display(pDocView), GDK_SELECTION_CLIPBOARD); gtk_clipboard_set_text(pClipboard, pSelection, -1); free(pSelection); + free(pUsedFormat); } /// Get the visible area of the scrolled window |