Blame SOURCES/0026-libreofficekit-fix-RHEL5-build-of-tilebuffer.patch

135360
From 0fb343d2b27c75fa77b5a740c7e7cf53c2ecbe1e Mon Sep 17 00:00:00 2001
135360
From: Miklos Vajna <vmiklos@collabora.co.uk>
135360
Date: Mon, 8 Jun 2015 08:02:37 +0200
135360
Subject: [PATCH 026/398] libreofficekit: fix RHEL5 build of tilebuffer
135360
135360
Change-Id: I27da86c774f0450c844e742563c4a8de3f23ad34
135360
(cherry picked from commit a0ce0dd519ec298bf7df0111dca1e1c6fdc3a1ee)
135360
---
135360
 libreofficekit/source/gtk/lokdocview.cxx | 2 ++
135360
 libreofficekit/source/gtk/tilebuffer.cxx | 4 ++++
135360
 2 files changed, 6 insertions(+)
135360
135360
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
135360
index 9b09ef6452bb..a5cf7aaac741 100644
135360
--- a/libreofficekit/source/gtk/lokdocview.cxx
135360
+++ b/libreofficekit/source/gtk/lokdocview.cxx
135360
@@ -1335,6 +1335,7 @@ SAL_DLLPUBLIC_EXPORT void lok_doc_view_post_key(GtkWidget* /*pWidget*/, GdkEvent
135360
 
135360
 SAL_DLLPUBLIC_EXPORT void lok_doc_view_get_visarea(LOKDocView* pThis, GdkRectangle* pArea)
135360
 {
135360
+#if GTK_CHECK_VERSION(2,14,0) // we need gtk_adjustment_get_page_size()
135360
     float zoom = pThis->m_pImpl->m_fZoom;
135360
     GtkAdjustment* pHAdjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(pThis));
135360
     pArea->x = pixelToTwip(gtk_adjustment_get_value(pHAdjustment),zoom);
135360
@@ -1342,6 +1343,7 @@ SAL_DLLPUBLIC_EXPORT void lok_doc_view_get_visarea(LOKDocView* pThis, GdkRectang
135360
     GtkAdjustment* pVAdjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(pThis));
135360
     pArea->y = pixelToTwip(gtk_adjustment_get_value(pVAdjustment), zoom);
135360
     pArea->height = pixelToTwip(gtk_adjustment_get_page_size(pVAdjustment), zoom);
135360
+#endif
135360
 }
135360
 
135360
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
135360
diff --git a/libreofficekit/source/gtk/tilebuffer.cxx b/libreofficekit/source/gtk/tilebuffer.cxx
135360
index 338038078ab3..0c798232326b 100644
135360
--- a/libreofficekit/source/gtk/tilebuffer.cxx
135360
+++ b/libreofficekit/source/gtk/tilebuffer.cxx
135360
@@ -9,6 +9,10 @@
135360
 
135360
 #include "tilebuffer.hxx"
135360
 
135360
+#if !GLIB_CHECK_VERSION(2,40,0)
135360
+#define g_info(...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, __VA_ARGS__)
135360
+#endif
135360
+
135360
 /* ------------------
135360
    Utility functions
135360
    ------------------
135360
-- 
135360
2.12.0
135360