[Libreoffice-commits] core.git: include/LibreOfficeKit libreofficekit/qa libreofficekit/source

Mihai Varga mihai.varga at collabora.com
Wed Jul 22 00:43:38 PDT 2015


 include/LibreOfficeKit/LibreOfficeKitGtk.h          |    3 +++
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |    1 +
 libreofficekit/source/gtk/lokdocview.cxx            |    8 ++++++++
 3 files changed, 12 insertions(+)

New commits:
commit ed9d6ef1e647b574f58ba870d71a4291d958c0ad
Author: Mihai Varga <mihai.varga at collabora.com>
Date:   Tue Jul 21 18:49:21 2015 +0300

    gtktiledviewer: method for resetting all tiles
    
    [ Miklos Vajna: The point of the change is that without this, part switching in
    Calc does not work, as Calc does not invalidate everything after a part switch
    (unlike Impress), and we suppose the right fix for this is to let the clients
    throw away the tiles, rather than letting Calc send out invalidations, too. ]
    
    Change-Id: Id368b955c54efb87ecf3d59278ddb5cdbb2e7856
    Reviewed-on: https://gerrit.libreoffice.org/17267
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
index 962f9d9..b98a856 100644
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
@@ -63,6 +63,9 @@ char*                          lok_doc_view_get_part_name          (LOKDocView*
                                                                     int nPart);
 void                           lok_doc_view_set_partmode           (LOKDocView* pDocView,
                                                                     int nPartMode);
+
+void                           lok_doc_view_reset_view             (LOKDocView* pDocView);
+
 /// Sets if the viewer is actually an editor or not.
 void                           lok_doc_view_set_edit               (LOKDocView* pDocView,
                                                                     gboolean bEdit);
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index ec70a88..6c0de39 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -357,6 +357,7 @@ static void changePart( GtkWidget* pSelector, gpointer /* pItem */ )
     if (g_bPartSelectorBroadcast && pDocView)
     {
         lok_doc_view_set_part( LOK_DOC_VIEW(pDocView), nPart );
+        lok_doc_view_reset_view( LOK_DOC_VIEW(pDocView) );
     }
 }
 
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index bf12ca0..3823e94 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1529,6 +1529,14 @@ lok_doc_view_set_partmode(LOKDocView* pDocView,
     priv->m_pDocument->pClass->setPartMode( priv->m_pDocument, nPartMode );
 }
 
+SAL_DLLPUBLIC_EXPORT void
+lok_doc_view_reset_view(LOKDocView* pDocView)
+{
+    LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
+    priv->m_aTileBuffer.resetAllTiles();
+    gtk_widget_queue_draw(GTK_WIDGET(pDocView));
+}
+
 /**
  * lok_doc_view_set_edit:
  * @pDocView: The #LOKDocView instance


More information about the Libreoffice-commits mailing list