diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-11-05 18:40:52 +0530 |
---|---|---|
committer | pranavk <pranavk@collabora.co.uk> | 2017-11-09 04:14:38 +0100 |
commit | 25822ff930edd13442442a47714755a99fbb9992 (patch) | |
tree | 8aaef28ba7aca657bf2e681dcf15c312617ed179 /libreofficekit/qa | |
parent | 446a37ece35dbe4c442f0679dd1cb4df79ed87a7 (diff) |
lokdialog: Move getting dialog information in separate LOK call
Using outparameters to get the dialog information with the paintDialog
call was quite confusing.
Change-Id: Ief331b251dc66e66084b827ce5b025ba6c9ce7d2
Reviewed-on: https://gerrit.libreoffice.org/44473
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'libreofficekit/qa')
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx b/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx index 1614c157ae7c..001242ec6f52 100644 --- a/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx @@ -102,14 +102,16 @@ gtv_lok_dialog_draw(GtkWidget* pDialogDrawingArea, cairo_t* pCairo, gpointer) unsigned char* pBuffer = cairo_image_surface_get_data(pSurface); LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(LOK_DOC_VIEW(priv->lokdocview)); char* pDialogTitle = nullptr; - pDocument->pClass->paintDialog(pDocument, priv->dialogid, aRect.x, aRect.y, pBuffer, &pDialogTitle, &nWidth, &nHeight); + pDocument->pClass->paintDialog(pDocument, priv->dialogid, pBuffer, aRect.x, aRect.y, nWidth, nHeight); + int outWidth = 0, outHeight = 0; + pDocument->pClass->getDialogInfo(pDocument, priv->dialogid, &pDialogTitle, &outWidth, &outHeight); if (pDialogTitle) { gtk_window_set_title(GTK_WINDOW(pDialog), pDialogTitle); free(pDialogTitle); } - gtk_widget_set_size_request(GTK_WIDGET(pDialogDrawingArea), nWidth, nHeight); + gtk_widget_set_size_request(GTK_WIDGET(pDialogDrawingArea), outWidth, outHeight); cairo_surface_flush(pSurface); cairo_surface_mark_dirty(pSurface); |