summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-11-17 14:34:39 +0200
committerTor Lillqvist <tml@collabora.com>2013-11-17 14:34:42 +0200
commit8b60382f524e1e8b19d5e17d3b7b901ec65526cd (patch)
tree189901734c31fab8b12b7cddb31b08f82ba24f45 /sw
parentf3a59f58900cbf9827260b8db57c9be8d92b5aa7 (diff)
Make the tiled rendering code compile for Android again
I just ifdeffed out iOS-specific code, no actual Android-specific code added. And if at some stage we have need and resources to really make the tiled rendering stuff saner and cross-platform, a lot will change of course. Change-Id: If45d98f301413e26372c611f8ffecf229061174d
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/view/viewsh.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index eef028661d80..143ac40e3e49 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -17,12 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifdef IOS
-
#include <touch/touch.h>
-#endif
-
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <sfx2/viewfrm.hxx>
#include <sfx2/progress.hxx>
@@ -1792,6 +1788,7 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
extern "C"
void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLODpxPoint tileDpxPosition, MLODpxSize tileDpxSize)
{
+#ifdef IOS
SAL_INFO("sw", "touch_lo_draw_tile(" << contextWidth << ", " << contextHeight << ", (" << tileDpxPosition.x << "," << tileDpxPosition.y << "), " << tileDpxSize.width << "x" << tileDpxSize.height << ")");
MLORipPoint tileRipPosition = MLORipPointByDpxPoint(tileDpxPosition);
MLORipSize rileRipSize = MLORipSizeByDpxSize(tileDpxSize);
@@ -1838,10 +1835,18 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
aBitmap.ReleaseAccess(readAccess);
}
Application::ReleaseSolarMutex();
+#else
+ (void) context;
+ (void) contextWidth;
+ (void) contextHeight;
+ (void) tileDpxPosition;
+ (void) tileDpxSize;
+#endif
}
extern "C"
MLODpxSize touch_lo_get_content_size()
{
+#ifdef IOS
SwWrtShell *pViewShell = GetActiveWrtShell();
if (pViewShell)
{
@@ -1852,15 +1857,23 @@ MLODpxSize touch_lo_get_content_size()
((MLORip)documentSize.Height()) + HEIGHT_ADDITION);
}
return MLODpxSizeByDpxes(0,0);
+#else
+ return MLODpxSize();
+#endif
}
extern "C"
MLORipPoint MLORipPointByDpxPoint(MLODpxPoint mloDpxPoint)
{
+#ifdef IOS
//MLODpxSize contentSize = touch_lo_get_content_size();
MLORip x = MLORipByDpx(mloDpxPoint.x /*- (contentSize.width/2.0f)*/);
MLORip y = MLORipByDpx(mloDpxPoint.y);
return MLORipPointByRips(x,y);
+#else
+ (void) mloDpxPoint;
+ return MLORipPoint();
+#endif
}
extern "C"