summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-08 08:02:37 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-09 10:44:23 +0200
commita0ce0dd519ec298bf7df0111dca1e1c6fdc3a1ee (patch)
tree3973cd49b54053567a32a87b66d0a2b3d30be8b5 /libreofficekit
parent0e947f33130c55881035e39dcb1c5e64c33297e9 (diff)
libreofficekit: fix RHEL5 build of tilebuffer
Change-Id: I27da86c774f0450c844e742563c4a8de3f23ad34
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx2
-rw-r--r--libreofficekit/source/gtk/tilebuffer.cxx4
2 files changed, 6 insertions, 0 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index b6c529f41a03..166fecb74b84 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1335,6 +1335,7 @@ SAL_DLLPUBLIC_EXPORT void lok_doc_view_post_key(GtkWidget* /*pWidget*/, GdkEvent
SAL_DLLPUBLIC_EXPORT void lok_doc_view_get_visarea(LOKDocView* pThis, GdkRectangle* pArea)
{
+#if GTK_CHECK_VERSION(2,14,0) // we need gtk_adjustment_get_page_size()
float zoom = pThis->m_pImpl->m_fZoom;
GtkAdjustment* pHAdjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(pThis));
pArea->x = pixelToTwip(gtk_adjustment_get_value(pHAdjustment),zoom);
@@ -1342,6 +1343,7 @@ SAL_DLLPUBLIC_EXPORT void lok_doc_view_get_visarea(LOKDocView* pThis, GdkRectang
GtkAdjustment* pVAdjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(pThis));
pArea->y = pixelToTwip(gtk_adjustment_get_value(pVAdjustment), zoom);
pArea->height = pixelToTwip(gtk_adjustment_get_page_size(pVAdjustment), zoom);
+#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/libreofficekit/source/gtk/tilebuffer.cxx b/libreofficekit/source/gtk/tilebuffer.cxx
index 338038078ab3..0c798232326b 100644
--- a/libreofficekit/source/gtk/tilebuffer.cxx
+++ b/libreofficekit/source/gtk/tilebuffer.cxx
@@ -9,6 +9,10 @@
#include "tilebuffer.hxx"
+#if !GLIB_CHECK_VERSION(2,40,0)
+#define g_info(...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, __VA_ARGS__)
+#endif
+
/* ------------------
Utility functions
------------------