135360
From 2c2bc72ba3c8f2ac31e4d02a095342a3dca9d349 Mon Sep 17 00:00:00 2001
135360
From: Tor Lillqvist <tml@collabora.com>
135360
Date: Wed, 7 Oct 2015 21:25:50 +0300
135360
Subject: [PATCH 190/398] Make this compile for iOS again
135360
135360
Change-Id: I36f88d7e1114096d1e7a7a1d29077c387c21a10a
135360
(cherry picked from commit 3c9da1fbfae9c00a5eb9ddcb106a01b075703fcd)
135360
---
135360
 desktop/source/lib/init.cxx | 19 ++++++++++---------
135360
 1 file changed, 10 insertions(+), 9 deletions(-)
135360
135360
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
135360
index 29e8e0d12faa..836fc00e1042 100644
135360
--- a/desktop/source/lib/init.cxx
135360
+++ b/desktop/source/lib/init.cxx
135360
@@ -774,15 +774,6 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
135360
 
135360
     pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
135360
                     nTilePosX, nTilePosY, nTileWidth, nTileHeight);
135360
-#else
135360
-    SystemGraphicsData aData;
135360
-    aData.rCGContext = reinterpret_cast<CGContextRef>(pBuffer);
135360
-    // the Size argument is irrelevant, I hope
135360
-    ScopedVclPtrInstance<VirtualDevice> pDevice(&aData, Size(1, 1), (sal_uInt16)0);
135360
-
135360
-    pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
135360
-                    nTilePosX, nTilePosY, nTileWidth, nTileHeight);
135360
-#endif
135360
 
135360
     // Overwrite pBuffer's alpha channel with the separate alpha buffer.
135360
     for (int nRow = 0; nRow < nCanvasHeight; ++nRow)
135360
@@ -795,6 +786,16 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
135360
         }
135360
     }
135360
 
135360
+#else
135360
+    SystemGraphicsData aData;
135360
+    aData.rCGContext = reinterpret_cast<CGContextRef>(pBuffer);
135360
+    // the Size argument is irrelevant, I hope
135360
+    ScopedVclPtrInstance<VirtualDevice> pDevice(&aData, Size(1, 1), (sal_uInt16)0);
135360
+
135360
+    pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
135360
+                    nTilePosX, nTilePosY, nTileWidth, nTileHeight);
135360
+#endif
135360
+
135360
     static bool bDebug = getenv("LOK_DEBUG") != 0;
135360
     if (bDebug)
135360
     {
135360
-- 
135360
2.12.0
135360