|
|
135360 |
From 143ffe8df3ee844c4022a8b4d6e3053a8d558f11 Mon Sep 17 00:00:00 2001
|
|
|
135360 |
From: Mihai Varga <mihai.varga@collabora.com>
|
|
|
135360 |
Date: Tue, 21 Jul 2015 18:49:21 +0300
|
|
|
135360 |
Subject: [PATCH 071/398] gtktiledviewer: method for resetting all tiles
|
|
|
135360 |
|
|
|
135360 |
[ Miklos Vajna: The point of the change is that without this, part switching in
|
|
|
135360 |
Calc does not work, as Calc does not invalidate everything after a part switch
|
|
|
135360 |
(unlike Impress), and we suppose the right fix for this is to let the clients
|
|
|
135360 |
throw away the tiles, rather than letting Calc send out invalidations, too. ]
|
|
|
135360 |
|
|
|
135360 |
Change-Id: Id368b955c54efb87ecf3d59278ddb5cdbb2e7856
|
|
|
135360 |
Reviewed-on: https://gerrit.libreoffice.org/17267
|
|
|
135360 |
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
|
135360 |
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
|
135360 |
(cherry picked from commit ed9d6ef1e647b574f58ba870d71a4291d958c0ad)
|
|
|
135360 |
---
|
|
|
135360 |
include/LibreOfficeKit/LibreOfficeKitGtk.h | 3 +++
|
|
|
135360 |
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 1 +
|
|
|
135360 |
libreofficekit/source/gtk/lokdocview.cxx | 8 ++++++++
|
|
|
135360 |
3 files changed, 12 insertions(+)
|
|
|
135360 |
|
|
|
135360 |
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
|
|
|
135360 |
index 962f9d9265bb..b98a85646e0e 100644
|
|
|
135360 |
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
|
|
|
135360 |
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
|
|
|
135360 |
@@ -63,6 +63,9 @@ char* lok_doc_view_get_part_name (LOKDocView*
|
|
|
135360 |
int nPart);
|
|
|
135360 |
void lok_doc_view_set_partmode (LOKDocView* pDocView,
|
|
|
135360 |
int nPartMode);
|
|
|
135360 |
+
|
|
|
135360 |
+void lok_doc_view_reset_view (LOKDocView* pDocView);
|
|
|
135360 |
+
|
|
|
135360 |
/// Sets if the viewer is actually an editor or not.
|
|
|
135360 |
void lok_doc_view_set_edit (LOKDocView* pDocView,
|
|
|
135360 |
gboolean bEdit);
|
|
|
135360 |
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
|
|
|
135360 |
index d40cceb291ed..8c43e9d68092 100644
|
|
|
135360 |
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
|
|
|
135360 |
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
|
|
|
135360 |
@@ -356,6 +356,7 @@ static void changePart( GtkWidget* pSelector, gpointer /* pItem */ )
|
|
|
135360 |
if (g_bPartSelectorBroadcast && pDocView)
|
|
|
135360 |
{
|
|
|
135360 |
lok_doc_view_set_part( LOK_DOC_VIEW(pDocView), nPart );
|
|
|
135360 |
+ lok_doc_view_reset_view( LOK_DOC_VIEW(pDocView) );
|
|
|
135360 |
}
|
|
|
135360 |
}
|
|
|
135360 |
|
|
|
135360 |
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
|
|
|
135360 |
index 5de795a1a961..27d597ae57e3 100644
|
|
|
135360 |
--- a/libreofficekit/source/gtk/lokdocview.cxx
|
|
|
135360 |
+++ b/libreofficekit/source/gtk/lokdocview.cxx
|
|
|
135360 |
@@ -1529,6 +1529,14 @@ lok_doc_view_set_partmode(LOKDocView* pDocView,
|
|
|
135360 |
priv->m_pDocument->pClass->setPartMode( priv->m_pDocument, nPartMode );
|
|
|
135360 |
}
|
|
|
135360 |
|
|
|
135360 |
+SAL_DLLPUBLIC_EXPORT void
|
|
|
135360 |
+lok_doc_view_reset_view(LOKDocView* pDocView)
|
|
|
135360 |
+{
|
|
|
135360 |
+ LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
|
|
|
135360 |
+ priv->m_aTileBuffer.resetAllTiles();
|
|
|
135360 |
+ gtk_widget_queue_draw(GTK_WIDGET(pDocView));
|
|
|
135360 |
+}
|
|
|
135360 |
+
|
|
|
135360 |
/**
|
|
|
135360 |
* lok_doc_view_set_edit:
|
|
|
135360 |
* @pDocView: The #LOKDocView instance
|
|
|
135360 |
--
|
|
|
135360 |
2.12.0
|
|
|
135360 |
|