From 8b60382f524e1e8b19d5e17d3b7b901ec65526cd Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 17 Nov 2013 14:34:39 +0200 Subject: 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 --- sw/source/core/view/viewsh.cxx | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'sw') 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 -#endif - #include #include #include @@ -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" -- cgit