[Libreoffice-commits] core.git: 59 commits - include/touch ios/MobileLibreOffice ios/shared sw/Executable_tiledrendering.mk sw/inc sw/qa sw/source vcl/coretext vcl/ios

Jan Holesovsky kendy at collabora.com
Fri Nov 15 07:52:54 PST 2013


 include/touch/touch.h                                                                                       |   94 ++
 ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj                                           |  356 ++++++++
 ios/shared/ios_sharedlo/cxx/mlo.mm                                                                          |    4 
 ios/shared/ios_sharedlo/cxx/mlo_uno.h                                                                       |    4 
 ios/shared/ios_sharedlo/cxx/mlo_uno.mm                                                                      |  307 +++----
 ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m                                             |    2 
 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h                              |    7 
 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m                              |  154 +++
 ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.m                             |    2 
 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m                         |   33 
 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h |   14 
 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m |   88 +-
 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m   |    1 
 sw/Executable_tiledrendering.mk                                                                             |    6 
 sw/inc/viewsh.hxx                                                                                           |    9 
 sw/qa/tiledrendering/tiledrendering.cxx                                                                     |   97 +-
 sw/qa/tiledrendering/tiledrendering.ui                                                                      |  397 +++++-----
 sw/source/core/view/viewsh.cxx                                                                              |  135 +++
 sw/source/core/view/vnew.cxx                                                                                |    1 
 vcl/coretext/salgdi2.cxx                                                                                    |    7 
 vcl/ios/iosinst.cxx                                                                                         |   50 -
 21 files changed, 1333 insertions(+), 435 deletions(-)

New commits:
commit b2a94ccdf91c9ea41fbde13ebfb5031ae76bc102
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Nov 15 16:47:20 2013 +0100

    Tiled rendering: Move the common code to the right place - PaintTile().
    
    Change-Id: Id0502c4e0dd48dce8d1a239b5d156ff290314954

diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 57d3b1b..fd314eb 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -252,7 +252,7 @@ public:
         Sets the pOut so that the rRect is always painted over the entire
         pOut, ie. starts in 0,0 and ends in width/height.
     */
-    void PaintTile(OutputDevice *pOut, const Rectangle &rRect);
+    void PaintTile(VirtualDevice &rDevice, int contextWidth, int contextHeight, int tilePosX, int tilePosY, long tileWidth, long tileHeight);
 
     sal_Bool IsPaintInProgress() const { return mbPaintInProgress; }
     bool IsDrawingLayerPaintInProgress() const { return !mPrePostPaintRegions.empty(); }
diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index 65f02db..57b512c 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -121,31 +121,8 @@ IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG )
         // VirtualDevice aDevice(&aData, [color depth]);
         VirtualDevice aDevice;
 
-        MapMode aMapMode(aDevice.GetMapMode());
-        aMapMode.SetMapUnit(MAP_TWIP);
-        aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
-
-        // Scaling. Must convert from pixels to twips. We know
-        // that VirtualDevises use a DPI of 96.
-        Fraction scaleX = Fraction(contextWidth,96) * Fraction(1440L) / Fraction(tileWidth);
-        Fraction scaleY = Fraction(contextHeight,96) * Fraction(1440L) / Fraction(tileHeight);
-        aMapMode.SetScaleX(scaleX);
-        aMapMode.SetScaleY(scaleY);
-
-        aDevice.SetMapMode(aMapMode);
-
-        // resizes the virtual device so to contain the entrie context
-        aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
-
-        // scroll the requested area into view if necessary
-        pViewShell->MakeVisible(SwRect(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
-
-        // draw - works in logic coordinates
-        pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
-
-        // debug
-        // aDevice.SetFillColor(Color(COL_RED));
-        // aDevice.DrawRect(Rectangle(1000, 1000, 2000, 2000));
+        // paint to it
+        pViewShell->PaintTile(aDevice, contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight);
 
         // copy the aDevice content to mpImage
         Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 32db880..eef0286 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1751,21 +1751,39 @@ void SwViewShell::Paint(const Rectangle &rRect)
     }
 }
 
-void SwViewShell::PaintTile(OutputDevice *pOut, const Rectangle &rRect)
+void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contextHeight, int tilePosX, int tilePosY, long tileWidth, long tileHeight)
 {
-    assert(pOut);
-
-    // now we need to setup the SwViewShell's output device
+    // SwViewShell's output device setup
     // TODO clean up SwViewShell's approach to output devices (the many of
     // them - mpBufferedOut, mpOut, mpWin, ..., and get rid of
     // mbTiledRendering)
     OutputDevice *pSaveOut = mpOut;
-
     mbTiledRendering = true;
-    mpOut = pOut;
+    mpOut = &rDevice;
+
+    // setup the output device to draw the tile
+    MapMode aMapMode(rDevice.GetMapMode());
+    aMapMode.SetMapUnit(MAP_TWIP);
+    aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
+
+    // Scaling. Must convert from pixels to twips. We know
+    // that VirtualDevises use a DPI of 96.
+    Fraction scaleX = Fraction(contextWidth, 96) * Fraction(1440L) / Fraction(tileWidth);
+    Fraction scaleY = Fraction(contextHeight, 96) * Fraction(1440L) / Fraction(tileHeight);
+    aMapMode.SetScaleX(scaleX);
+    aMapMode.SetScaleY(scaleY);
+    rDevice.SetMapMode(aMapMode);
 
-    Paint(rRect);
+    // resizes the virtual device so to contain the entrie context
+    rDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
 
+    // scroll the requested area into view if necessary
+    MakeVisible(SwRect(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight))));
+
+    // draw - works in logic coordinates
+    Paint(Rectangle(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight))));
+
+    // SwViewShell's output device tear down
     mpOut = pSaveOut;
     mbTiledRendering = false;
 }
@@ -1803,22 +1821,10 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         // that we get direct rendering; something like:
         //
         VirtualDevice aDevice;
-        MapMode aMapMode(aDevice.GetMapMode());
-        aMapMode.SetMapUnit(MAP_TWIP);
-        aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
-        // Scaling. Must convert from pixels to twips. We know
-        // that VirtualDevises use a DPI of 96.
-        Fraction scaleX = Fraction(contextWidth,96) * Fraction(1440L) / Fraction(tileWidth);
-        Fraction scaleY = Fraction(contextHeight,96) * Fraction(1440L) / Fraction(tileHeight);
-        aMapMode.SetScaleX(scaleX);
-        aMapMode.SetScaleY(scaleY);
-        aDevice.SetMapMode(aMapMode);
-        // resizes the virtual device so to contain the entrie context
-        aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
-        // scroll the requested area into view if necessary
-        pViewShell->MakeVisible(SwRect(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
-        // draw - works in logic coordinates
-        pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
+
+        // paint to it
+        pViewShell->PaintTile(aDevice, contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight);
+
         // copy the aDevice content to mpImage
         Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
         BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess();
commit c9705f000086439b444e448d3c0e84b6dab1a522
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Nov 15 16:18:42 2013 +0100

    Tiled rendering: Make the tiled rendering work together with normal render.
    
    Not an ideal solution, but cleaning up the amount of output devices we have
    around would take me quite some time, and would be not too safe just before
    the feature freeze, so let's live with mbTiledRendering flag for now.
    
    Change-Id: I93616df18c790d8ce1251194b0c8b09442f5a265

diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index d7e4134..57d3b1b 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -159,6 +159,7 @@ class SW_DLLPUBLIC SwViewShell : public Ring
 
     // boolean, indicating that class in in constructor.
     bool mbInConstructor:1;
+    bool mbTiledRendering:1; ///< Set if we are doing the tiled rendering (using PaintTile()).
 
     SdrPaintWindow*         mpTargetPaintWindow;
     OutputDevice*           mpBufferedOut;
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 049bffa..32db880 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -150,7 +150,7 @@ void SwViewShell::DLPrePaint2(const Region& rRegion)
             MakeDrawView();
 
         // Prefer window; if tot available, get mpOut (e.g. printer)
-        mpPrePostOutDev = (GetWin() ? GetWin() : GetOut());
+        mpPrePostOutDev = (GetWin() && !mbTiledRendering)? GetWin(): GetOut();
 
         // #i74769# use SdrPaintWindow now direct
         mpTargetPaintWindow = Imp()->GetDrawView()->BeginDrawLayers(mpPrePostOutDev, rRegion);
@@ -160,9 +160,7 @@ void SwViewShell::DLPrePaint2(const Region& rRegion)
         if(mpTargetPaintWindow->GetPreRenderDevice())
         {
             mpBufferedOut = mpOut;
-#ifndef IOS
             mpOut = &(mpTargetPaintWindow->GetTargetOutputDevice());
-#endif
         }
 
         // remember original paint MapMode for wrapped FlyFrame paints
@@ -192,13 +190,11 @@ void SwViewShell::DLPostPaint2(bool bPaintFormLayer)
     mPrePostPaintRegions.pop(); // clear
     if(0 != mpTargetPaintWindow)
     {
-#ifndef IOS
         // #i74769# restore buffered OutDev
         if(mpTargetPaintWindow->GetPreRenderDevice())
         {
             mpOut = mpBufferedOut;
         }
-#endif
 
         // #i74769# use SdrPaintWindow now direct
         Imp()->GetDrawView()->EndDrawLayers(*mpTargetPaintWindow, bPaintFormLayer);
@@ -1760,13 +1756,18 @@ void SwViewShell::PaintTile(OutputDevice *pOut, const Rectangle &rRect)
     assert(pOut);
 
     // now we need to setup the SwViewShell's output device
-    // TODO clean up SwViewShell's approach to output devices
-    OutputDevice *pSaveOut = GetOut();
-    SetOutDev(this, pOut);
+    // TODO clean up SwViewShell's approach to output devices (the many of
+    // them - mpBufferedOut, mpOut, mpWin, ..., and get rid of
+    // mbTiledRendering)
+    OutputDevice *pSaveOut = mpOut;
+
+    mbTiledRendering = true;
+    mpOut = pOut;
 
     Paint(rRect);
 
-    SetOutDev(this, pSaveOut);
+    mpOut = pSaveOut;
+    mbTiledRendering = false;
 }
 
 #if !HAVE_FEATURE_DESKTOP
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 01e909d..1efee42 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -232,6 +232,7 @@ SwViewShell::SwViewShell( SwViewShell& rShell, Window *pWindow,
     mbShowHeaderSeparator( false ),
     mbShowFooterSeparator( false ),
     mbHeaderFooterEdit( false ),
+    mbTiledRendering(false),
     mpTargetPaintWindow(0), // #i74769#
     mpBufferedOut(0), // #i74769#
     mpDoc( rShell.GetDoc() ),
commit 8b9246b98aac039b8dbc4fb9e78efdb3bc3e9420
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Nov 4 17:33:20 2013 +0200

    Update the code snippet for tile rendering to be like in touch_lo_draw_tile()
    
    Unfortunately the tiledrendering test program doesn't seem to work as expected
    any more, though. (Not before this commit, not after.)
    
    Obviously the common code needs to be factored out. Later.
    
    Change-Id: Ia33d065467eb5a287a06bf337e20b4a9a34ce561

diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index 9d168d8..65f02db 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -105,8 +105,8 @@ IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG )
     int contextHeight = mpContextHeight->GetValue();
     int tilePosX = mpTilePosX->GetValue();
     int tilePosY = mpTilePosY->GetValue();
-    int tileWidth = mpTileWidth->GetValue();
-    int tileHeight = mpTileHeight->GetValue();
+    long tileWidth = mpTileWidth->GetValue();
+    long tileHeight = mpTileHeight->GetValue();
 
     // do the same thing we are doing in touch_lo_draw_tile()
     SwWrtShell *pViewShell = GetActiveWrtShell();
@@ -124,12 +124,24 @@ IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG )
         MapMode aMapMode(aDevice.GetMapMode());
         aMapMode.SetMapUnit(MAP_TWIP);
         aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
+
+        // Scaling. Must convert from pixels to twips. We know
+        // that VirtualDevises use a DPI of 96.
+        Fraction scaleX = Fraction(contextWidth,96) * Fraction(1440L) / Fraction(tileWidth);
+        Fraction scaleY = Fraction(contextHeight,96) * Fraction(1440L) / Fraction(tileHeight);
+        aMapMode.SetScaleX(scaleX);
+        aMapMode.SetScaleY(scaleY);
+
         aDevice.SetMapMode(aMapMode);
 
-        aDevice.SetOutputSizePixel(aDevice.PixelToLogic(Size(contextWidth, contextHeight)));
+        // resizes the virtual device so to contain the entrie context
+        aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
+
+        // scroll the requested area into view if necessary
+        pViewShell->MakeVisible(SwRect(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
 
-        // draw
-        pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)));
+        // draw - works in logic coordinates
+        pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
 
         // debug
         // aDevice.SetFillColor(Color(COL_RED));
commit fd530527fbe14a6e41c3c2d1c8788e98068ff1bb
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Mon Nov 4 16:10:10 2013 +0200

    release BitmapReadAccess after use to fix 1 mb per render mem leak
    
    Change-Id: I4d9a580132eb9a8d618c1165f962b47be4e80695

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index c5ef029..049bffa 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1828,6 +1828,7 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
                              context,
                              contextWidth,
                              contextHeight);
+        aBitmap.ReleaseAccess(readAccess);
     }
     Application::ReleaseSolarMutex();
 }
commit 5b0ff56e125771cb3e19a2823316518c577f7a1b
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Mon Nov 4 16:08:39 2013 +0200

    releasing the CGDataProvider to prevent possible memory leaks
    
    Change-Id: Ib64f457bd9cc185e979b1a3e9f07fdba93da88d7

diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 39208f5..c0f7073 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -412,6 +412,7 @@ touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeigh
     CGRect targetRect = CGRectMake( 0, 0, targetWidth, targetHeight );
     CGContextDrawImage( context, targetRect, sourceImage );
     CGImageRelease(sourceImage);
+    CGDataProviderRelease(provider);
 }
 
 extern "C"
commit 865433b3480fd0c655186f9731d41822a6ddab3f
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Mon Nov 4 16:06:15 2013 +0200

    measuring the time it takes to render a tile
    
    Change-Id: I37db170af0e507c99d571b94ff78a1987944290e

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
index 1b25648..784c0dd 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
@@ -43,6 +43,7 @@
 
 - (void)drawRect:(CGRect)rect
 {
+    NSTimeInterval startTime = CACurrentMediaTime();
     CGContextRef context = UIGraphicsGetCurrentContext();
 
     MLODpxPoint tilePosition =MLODpxPointByDpxes(self.tester.params.tilePosX,self.tester.params.tilePosY);
@@ -62,6 +63,7 @@
                        tilePosition,
                        tileSize);
 
+    NSLog(@"tile rendering took %f seconds",CACurrentMediaTime() - startTime);
     MLODpxSize size = touch_lo_get_content_size();
     NSLog(@"touch_lo_get_content_size: width=%f, height=%f",size.width, size.height);
 }
commit 98adbf2d80cf998f7b3825fa4d685de6f25be352
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Mon Nov 4 13:34:44 2013 +0200

    removed use of envvars in touch_lo_draw_tile
    
    Change-Id: Id9ee6e616fe417023d0ce011263659056e80a5a2

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index d5080dc..c5ef029 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1798,8 +1798,6 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
     Application::AcquireSolarMutex(1);
     if (pViewShell)
     {
-        static bool bUseTileSize = getenv("USETILESIZE") != NULL;
-        static bool bCallSetSwVisArea = bUseTileSize && getenv("CALLSETSWVISAREA") != NULL;
         // TODO create a VirtualDevice based on SystemGraphicsData instead so
         // that we get direct rendering; something like:
         //
@@ -1814,23 +1812,12 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         aMapMode.SetScaleX(scaleX);
         aMapMode.SetScaleY(scaleY);
         aDevice.SetMapMode(aMapMode);
-        if (bCallSetSwVisArea)
-        {
-            SwRect foo = pViewShell->VisArea();
-            SAL_INFO("sw", "old VisArea: " << foo);
-            SetSwVisArea( pViewShell, SwRect(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)) );
-            foo = pViewShell->VisArea();
-            SAL_INFO("sw", "new VisArea: " << foo);
-        }
         // resizes the virtual device so to contain the entrie context
         aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
         // scroll the requested area into view if necessary
         pViewShell->MakeVisible(SwRect(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
         // draw - works in logic coordinates
-        if (bUseTileSize)
-            pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)));
-        else
-            pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
+        pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
         // copy the aDevice content to mpImage
         Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
         BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess();
commit e56b0c0f248ae779a0abd9e1d5aa7f7420a03f64
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Nov 4 12:21:25 2013 +0200

    Adjust parameter defaults to give pleasant result
    
    Change-Id: Ifee900344547ef25b2041d25c13fcbc50428485e

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
index 3ca92f3..6c1aea2 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
@@ -9,12 +9,18 @@
 #import "MLOViewController.h"
 #import "MLOTestingTileSubviewControllerProtocol.h"
 
+// The size of the actual pixel tile
 static const CGFloat CONTEXT_WIDTH_DEFAULT = 450;
 static const CGFloat CONTEXT_HEIGHT_DEFAULT = 450;
-static const CGFloat TILE_POS_X_DEFAULT = 400;
-static const CGFloat TILE_POS_Y_DEFAULT = 420;
-static const CGFloat TILE_WIDTH_DEFAULT = 250;
-static const CGFloat TILE_HEIGHT_DEFAULT = 250;
+
+// In our "decatwips"
+static const CGFloat TILE_POS_X_DEFAULT = 0;
+static const CGFloat TILE_POS_Y_DEFAULT = 0;
+
+// "Tile" size here means the decatwip size of the part of the document
+// rendered into the pixel tile
+static const CGFloat TILE_WIDTH_DEFAULT = 500;
+static const CGFloat TILE_HEIGHT_DEFAULT = 500;
 
 @interface MLOTestingTileParametersViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol>
 @property CGFloat contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight;
commit ad74354c92787cc35eff9aa7d72d447676cb01ac
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Nov 4 12:18:14 2013 +0200

    Do use scaling after all
    
    It is needed because we want to be able to render different zoom
    levels of tiles of course.
    
    But invert the scale from how it was previously. Increasing what is
    here called "tile size" (i.e. the size in document coordinates of the
    rectangle to be rendered) should mean the rendered text gets smaller,
    not larger. Also, use the same units (twips) in numerator and
    denominator.
    
    Change-Id: I461f887461247777af1a9402de112d42c8423293

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 70b0469..d5080dc 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1780,10 +1780,12 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
     MLORip tileRipPosY = tileRipPosition.y;
     MLORip tileRipWidth = rileRipSize.width;
     MLORip tileRipHeight = rileRipSize.height;
+    // tilePosX/Y and tileWidth/Height tell the part of the document,
+    // in twip units, to render
     int tilePosX = tileRipPosX;
     int tilePosY = tileRipPosY;
-    int tileWidth  = tileRipWidth;
-    int tileHeight = tileRipHeight;
+    long tileWidth  = tileRipWidth;
+    long tileHeight = tileRipHeight;
     // Currently we expect that only one document is open, so we are using the
     // current shell.  Should it turn out that we need to have more documents
     // open, we need to add a documentHandle that would hold the right
@@ -1797,7 +1799,6 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
     if (pViewShell)
     {
         static bool bUseTileSize = getenv("USETILESIZE") != NULL;
-        static bool bCallSetScale = bUseTileSize && (getenv("CALLSETSCALE") != NULL);
         static bool bCallSetSwVisArea = bUseTileSize && getenv("CALLSETSWVISAREA") != NULL;
         // TODO create a VirtualDevice based on SystemGraphicsData instead so
         // that we get direct rendering; something like:
@@ -1806,14 +1807,12 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         MapMode aMapMode(aDevice.GetMapMode());
         aMapMode.SetMapUnit(MAP_TWIP);
         aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
-        if (bCallSetScale)
-        {
-            // scaling
-            Fraction scaleX(tileWidth,contextWidth);
-            Fraction scaleY(tileHeight,contextHeight);
-            aMapMode.SetScaleX(scaleX);
-            aMapMode.SetScaleY(scaleY);
-        }
+        // Scaling. Must convert from pixels to twips. We know
+        // that VirtualDevises use a DPI of 96.
+        Fraction scaleX = Fraction(contextWidth,96) * Fraction(1440L) / Fraction(tileWidth);
+        Fraction scaleY = Fraction(contextHeight,96) * Fraction(1440L) / Fraction(tileHeight);
+        aMapMode.SetScaleX(scaleX);
+        aMapMode.SetScaleY(scaleY);
         aDevice.SetMapMode(aMapMode);
         if (bCallSetSwVisArea)
         {
commit 59397c96585d1fb9828808a63ceabc746b42fc63
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Nov 4 10:43:39 2013 +0200

    Call MakeVisible() to "scroll" the requested area into view if necessary
    
    Change-Id: I72673d0529261239600eaf9f480f62c3d3dc85fd

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index c9f9616..70b0469 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1825,6 +1825,8 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         }
         // resizes the virtual device so to contain the entrie context
         aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
+        // scroll the requested area into view if necessary
+        pViewShell->MakeVisible(SwRect(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
         // draw - works in logic coordinates
         if (bUseTileSize)
             pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)));
commit 294c3e7c20d8cc4381cf36c0769cb447217426d6
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Nov 4 01:16:24 2013 +0200

    Make the use of tileWidth/Height in the call to PaintTile() optional
    
    It seems to work better to use contextWidth/Height here, too,
    converted to logical units. The code apparently will never render more
    than what has been passed earlier to SetOutputSizePixel() anyway. Or
    something.
    
    Change-Id: I69ff4f3c9a61391882e5d530140903786bb4a16b

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 7cb914f..c9f9616 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1796,6 +1796,9 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
     Application::AcquireSolarMutex(1);
     if (pViewShell)
     {
+        static bool bUseTileSize = getenv("USETILESIZE") != NULL;
+        static bool bCallSetScale = bUseTileSize && (getenv("CALLSETSCALE") != NULL);
+        static bool bCallSetSwVisArea = bUseTileSize && getenv("CALLSETSWVISAREA") != NULL;
         // TODO create a VirtualDevice based on SystemGraphicsData instead so
         // that we get direct rendering; something like:
         //
@@ -1803,7 +1806,6 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         MapMode aMapMode(aDevice.GetMapMode());
         aMapMode.SetMapUnit(MAP_TWIP);
         aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
-        static bool bCallSetScale = getenv("CALLSETSCALE") != NULL;
         if (bCallSetScale)
         {
             // scaling
@@ -1813,7 +1815,6 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
             aMapMode.SetScaleY(scaleY);
         }
         aDevice.SetMapMode(aMapMode);
-        static bool bCallSetSwVisArea = getenv("CALLSETSWVISAREA") != NULL;
         if (bCallSetSwVisArea)
         {
             SwRect foo = pViewShell->VisArea();
@@ -1825,7 +1826,10 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         // resizes the virtual device so to contain the entrie context
         aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
         // draw - works in logic coordinates
-        pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)));
+        if (bUseTileSize)
+            pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)));
+        else
+            pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
         // copy the aDevice content to mpImage
         Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
         BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess();
commit 19fb3b39984ebe1665e42cc14bd1b0f5c3659c03
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Nov 4 01:00:31 2013 +0200

    Keep tile top-left corner fixed, don't center it
    
    Makes it easier to see what happens when the parameters are tweaked.
    
    Change-Id: Ia69c0de74ccf3fcc8a5095a7cc62c6b4185cf9d6

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
index f8fcadb..1b25648 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
@@ -31,8 +31,8 @@
 }
 
 +(CGRect)resized:(MLOAppRoleTileTester *)tester{
-    return CGRectMake(  (tester.renderer.view.frame.size.width -tester.params.contextWidth)/2.0f,
-                        (tester.renderer.view.frame.size.height -tester.params.contextHeight)/2.0f,
+    return CGRectMake(  10,
+                        10,
                         tester.params.contextWidth,
                         tester.params.contextHeight);
 }
commit 69f4c14fb9a192a3424b917e7a280abb1a00c075
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Nov 3 22:46:38 2013 +0200

    Make the scaling with the "tile/context" ratio optional, too
    
    It just confuses things, for me at least... It's enough to keep the
    scaling from our "decitwips" to twips to pixels in your head.
    
    I am now finally starting to understand what is going on;)
    
    Change-Id: I0dca2722105914de41d1ce017410cb5a05cf32c4

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index a54a123..7cb914f 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1803,11 +1803,15 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         MapMode aMapMode(aDevice.GetMapMode());
         aMapMode.SetMapUnit(MAP_TWIP);
         aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
-        // scaling
-        Fraction scaleX(tileWidth,contextWidth);
-        Fraction scaleY(tileHeight,contextHeight);
-        aMapMode.SetScaleX(scaleX);
-        aMapMode.SetScaleY(scaleY);
+        static bool bCallSetScale = getenv("CALLSETSCALE") != NULL;
+        if (bCallSetScale)
+        {
+            // scaling
+            Fraction scaleX(tileWidth,contextWidth);
+            Fraction scaleY(tileHeight,contextHeight);
+            aMapMode.SetScaleX(scaleX);
+            aMapMode.SetScaleY(scaleY);
+        }
         aDevice.SetMapMode(aMapMode);
         static bool bCallSetSwVisArea = getenv("CALLSETSWVISAREA") != NULL;
         if (bCallSetSwVisArea)
commit df029acfb24e56fbadfcc383f3bb98f949bfbb2a
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Nov 3 22:31:15 2013 +0200

    Use SAL_INFO() instead of commented-out SAL_DEBUG() for now
    
    Less hassle when committing, as even a commented-out SAL_DEBUG()
    triggers the commit hook to complain.
    
    Change-Id: I8cab87f204622624602fde3543630f073a558069

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index eeb1e65..a54a123 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1773,7 +1773,7 @@ void SwViewShell::PaintTile(OutputDevice *pOut, const Rectangle &rRect)
 extern "C"
 void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLODpxPoint tileDpxPosition, MLODpxSize tileDpxSize)
 {
-    // SAL_DEBUG("touch_lo_draw_tile(" << contextWidth << ", " << contextHeight << ", (" << tileDpxPosition.x << "," << tileDpxPosition.y << "), " << tileDpxSize.width << "x" << tileDpxSize.height << ")");
+    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);
     MLORip tileRipPosX = tileRipPosition.x;
@@ -1812,11 +1812,11 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         static bool bCallSetSwVisArea = getenv("CALLSETSWVISAREA") != NULL;
         if (bCallSetSwVisArea)
         {
-            // SwRect foo = pViewShell->VisArea();
-            // SAL_DEBUG("old VisArea: " << foo);
+            SwRect foo = pViewShell->VisArea();
+            SAL_INFO("sw", "old VisArea: " << foo);
             SetSwVisArea( pViewShell, SwRect(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)) );
-            // foo = pViewShell->VisArea();
-            // SAL_DEBUG("new VisArea: " << foo);
+            foo = pViewShell->VisArea();
+            SAL_INFO("sw", "new VisArea: " << foo);
         }
         // resizes the virtual device so to contain the entrie context
         aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
commit 84e0a5a56fcc7812577caa5dfb3ca5bb3b6ed547
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Nov 3 21:41:21 2013 +0200

    It seems that calling SetSwVisArea() has no effect
    
    Make it optional at run-time (for now while testing) with an
    environment variable.
    
    Change-Id: I2ba1673fc51e91d0943148a0bf41351c87f272e5

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 1cee965..eeb1e65 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1773,6 +1773,7 @@ void SwViewShell::PaintTile(OutputDevice *pOut, const Rectangle &rRect)
 extern "C"
 void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLODpxPoint tileDpxPosition, MLODpxSize tileDpxSize)
 {
+    // SAL_DEBUG("touch_lo_draw_tile(" << contextWidth << ", " << contextHeight << ", (" << tileDpxPosition.x << "," << tileDpxPosition.y << "), " << tileDpxSize.width << "x" << tileDpxSize.height << ")");
     MLORipPoint tileRipPosition = MLORipPointByDpxPoint(tileDpxPosition);
     MLORipSize rileRipSize = MLORipSizeByDpxSize(tileDpxSize);
     MLORip tileRipPosX = tileRipPosition.x;
@@ -1808,7 +1809,15 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         aMapMode.SetScaleX(scaleX);
         aMapMode.SetScaleY(scaleY);
         aDevice.SetMapMode(aMapMode);
-        SetSwVisArea( pViewShell, SwRect(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)) );
+        static bool bCallSetSwVisArea = getenv("CALLSETSWVISAREA") != NULL;
+        if (bCallSetSwVisArea)
+        {
+            // SwRect foo = pViewShell->VisArea();
+            // SAL_DEBUG("old VisArea: " << foo);
+            SetSwVisArea( pViewShell, SwRect(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)) );
+            // foo = pViewShell->VisArea();
+            // SAL_DEBUG("new VisArea: " << foo);
+        }
         // resizes the virtual device so to contain the entrie context
         aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
         // draw - works in logic coordinates
commit 781e4edac5d7d2279a4d31d71a8b6b5218fb259c
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Nov 3 20:39:49 2013 +0200

    Tweak default values of tunables and use larger default step size
    
    It is more interesting to get smaller text in the initial tile. Also,
    make the tile fit on the screen of an iPad.
    
    Change-Id: Ibe4e7f055ec2782a4fd96a3ae585d4630449f0ee

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
index 779b84d..f43dfb8 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
@@ -21,7 +21,7 @@
 @property UIStepper * stepStepper;
 @end
 
-static const CGFloat DEFAULT_STEP_VALUE = 1;
+static const CGFloat DEFAULT_STEP_VALUE = 10;
 
 @implementation MLOTestingTileParameter
 
@@ -36,6 +36,10 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
         [self initLabel:label];
         self.dataStepper = [self stepperWithMinValue:-MAXFLOAT];
         self.stepStepper = [self stepperWithMinValue:1];
+        // The step stepper obviously needs a step value of 1,
+        // and an initial value of DEFAULT_STEP_VALUE.
+        self.stepStepper.stepValue = 1;
+        self.stepStepper.value = DEFAULT_STEP_VALUE;
         [self initDataTextField];
         [self initStepTextField];
     }
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
index ffbf903..3ca92f3 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
@@ -9,12 +9,12 @@
 #import "MLOViewController.h"
 #import "MLOTestingTileSubviewControllerProtocol.h"
 
-static const CGFloat CONTEXT_WIDTH_DEFAULT = 600;
-static const CGFloat CONTEXT_HEIGHT_DEFAULT = 600;
-static const CGFloat TILE_POS_X_DEFAULT = 500;
-static const CGFloat TILE_POS_Y_DEFAULT = 620;
-static const CGFloat TILE_WIDTH_DEFAULT = 1000;
-static const CGFloat TILE_HEIGHT_DEFAULT = 1020;
+static const CGFloat CONTEXT_WIDTH_DEFAULT = 450;
+static const CGFloat CONTEXT_HEIGHT_DEFAULT = 450;
+static const CGFloat TILE_POS_X_DEFAULT = 400;
+static const CGFloat TILE_POS_Y_DEFAULT = 420;
+static const CGFloat TILE_WIDTH_DEFAULT = 250;
+static const CGFloat TILE_HEIGHT_DEFAULT = 250;
 
 @interface MLOTestingTileParametersViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol>
 @property CGFloat contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight;
commit df9e43c61d018d373786d09b5baf65b1a7457c08
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Nov 3 17:38:04 2013 +0200

    Reduce NSLog verbiage a bit
    
    Change-Id: I362acb92da88f9e348b33414cdc31cd83bfe1eac

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
index 89267e5..779b84d 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
@@ -181,7 +181,7 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
 -(void)extractMode:(MLOTestingTileParametersMode) mode{
     MLOTestingTileParameterExtractor extractor = [self getExtractor:mode];
     if(extractor!=nil){
-        NSLog(@"%@ extract %@",self,MLOTestingTileParametersModeString(mode));
+        // NSLog(@"%@ extract %@",self,MLOTestingTileParametersModeString(mode));
         extractor([self currentDataValue]);
     }
 }
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
index 52d7b64..681693d 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
@@ -159,7 +159,6 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
 
 }
 -(void)renderTile{
-    NSLog(@"%@ renderTile",self);
     for (MLOTestingTileParameter * param in self.params) {
         [param extractMode:self.mode];
     }
commit 360f741d685835002ca89bcab97d1fa63376bfdd
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Fri Nov 1 16:11:21 2013 +0200

    fix less than 1 step limit
    
    Change-Id: Ic5fd714ff975b6e5afbe7ff78f3fc1da398a658d

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
index a661539..89267e5 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
@@ -34,18 +34,18 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
         self.widthIsNotHeightExtractor = widthIsNotHeightExtractor;
         self.defaultValue = defaultValue;
         [self initLabel:label];
-        self.dataStepper = [self createStepper];
-        self.stepStepper = [self createStepper];
+        self.dataStepper = [self stepperWithMinValue:-MAXFLOAT];
+        self.stepStepper = [self stepperWithMinValue:1];
         [self initDataTextField];
         [self initStepTextField];
     }
     return self;
 }
 
--(UIStepper *) createStepper{
+-(UIStepper *) stepperWithMinValue:(CGFloat) minValue{
     UIStepper * stepper = [UIStepper new];
     stepper.maximumValue = MAXFLOAT;
-    stepper.minimumValue = -MAXFLOAT;
+    stepper.minimumValue = minValue;
     stepper.stepValue = DEFAULT_STEP_VALUE;
     stepper.autorepeat = YES;
     stepper.continuous = NO;
commit 541d9ac222929a4c687dfee259e2dc2e07497c77
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Fri Nov 1 15:55:44 2013 +0200

    changed testing app UI to be more clear what it does
    
    Change-Id: I5307478fc47f0810cae24c72ce509ac6a409bf1b

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
index 8465b5d..041e198 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
@@ -19,4 +19,5 @@ typedef void (^MLOTestingTileParameterExtractor)(CGFloat value);
 -(void)extractMode:(MLOTestingTileParametersMode) mode;
 -(void)setParamFrame:(CGRect)  paramFrame;
 -(void)addToSuperview;
+-(void)enterMode:(MLOTestingTileParametersMode)mode;
 @end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
index 9c0af4f..a661539 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
@@ -185,4 +185,16 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
         extractor([self currentDataValue]);
     }
 }
+-(BOOL)isSupportingMode:(MLOTestingTileParametersMode) mode{
+    return [self getExtractor:mode]!=nil;
+}
+-(void)enterMode:(MLOTestingTileParametersMode)mode{
+    CGFloat alpha = [self isSupportingMode:mode] ? 1.0f: 0.0f;
+    self.label.alpha = alpha;
+    self.data.alpha = alpha;
+    self.dataStepper.alpha = alpha;
+    self.step.alpha =alpha;
+    self.stepStepper.alpha = alpha;
+}
+
 @end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
index 0c18b82..f8fcadb 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
@@ -45,11 +45,22 @@
 {
     CGContextRef context = UIGraphicsGetCurrentContext();
 
+    MLODpxPoint tilePosition =MLODpxPointByDpxes(self.tester.params.tilePosX,self.tester.params.tilePosY);
+    MLODpxSize tileSize = MLODpxSizeByDpxes(self.tester.params.tileWidth,self.tester.params.tileHeight);
+    NSInteger contextWidth = self.tester.params.contextWidth;
+    NSInteger contextHeight = self.tester.params.contextHeight;
+
+    NSLog(@"touch_lo_draw_tile(contextWidth=%d, contextHeight=%d, tilePosition=%@, tileSize=%@",
+          contextWidth,
+          contextHeight,
+          NSStringFromCGPoint(tilePosition),
+          NSStringFromCGSize(tileSize));
+
     touch_lo_draw_tile(context,
-                       self.tester.params.contextWidth,
-                       self.tester.params.contextHeight,
-                       MLODpxPointByDpxes(self.tester.params.tilePosX,self.tester.params.tilePosY),
-                       MLODpxSizeByDpxes(self.tester.params.tileWidth,self.tester.params.tileHeight));
+                       contextWidth,
+                       contextHeight,
+                       tilePosition,
+                       tileSize);
 
     MLODpxSize size = touch_lo_get_content_size();
     NSLog(@"touch_lo_get_content_size: width=%f, height=%f",size.width, size.height);
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
index 4a235e1..52d7b64 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
@@ -26,11 +26,13 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
     self = [self init];
     if(self){
         self.tester = tester;
-        self.mode = WIDTH_IS_HEIGHT;
         [self initParams];
         [self initModeButton];
         [self initRenderButton];
 
+        self.mode = WIDTH_IS_NOT_HEIGHT;
+        [self changeMode];
+
     }
 
     NSLog(@"%@ initWithTester",self);
@@ -96,6 +98,9 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
     }
 
     [self.modeButton setTitle:MLOTestingTileParametersModeString(self.mode) forState:UIControlStateNormal];
+    for(MLOTestingTileParameter * param in self.params){
+        [param enterMode:self.mode];
+    }
 }
 
 
commit 2ccb8de590dc7c6c8b0ec2d0ea02d85050859a82
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Fri Nov 1 15:19:42 2013 +0200

    added linking of width and height
    
    Change-Id: I2282fcfffed5c17eb1798d3198d6f04dc27208e9

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
index df0f70b..8465b5d 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
@@ -8,12 +8,15 @@
 
 #import "MLOObject.h"
 
+typedef enum {WIDTH_IS_HEIGHT,WIDTH_IS_NOT_HEIGHT} MLOTestingTileParametersMode;
+#define MLOTestingTileParametersModeString(enum) [@[@"WIDTH_IS_HEIGHT",@"WIDTH_IS_NOT_HEIGHT"] objectAtIndex:enum]
+
 typedef void (^MLOTestingTileParameterExtractor)(CGFloat value);
 
 @class MLOTestingTileParametersViewController;
 @interface MLOTestingTileParameter : MLOObject
--(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label extractor1:(MLOTestingTileParameterExtractor) extractor extractor2:(MLOTestingTileParameterExtractor) linkedExtractor defaultValue:(NSInteger) defaultValue;
--(void)extract:(BOOL) isExtractor1;
+-(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label widthIsNotHeightExtractor:(MLOTestingTileParameterExtractor) widthIsNotHeightExtractor widthIsHeightExtractor:(MLOTestingTileParameterExtractor) widthIsHeightExtractor defaultValue:(NSInteger) defaultValue;
+-(void)extractMode:(MLOTestingTileParametersMode) mode;
 -(void)setParamFrame:(CGRect)  paramFrame;
 -(void)addToSuperview;
 @end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
index b5fcd8d..9c0af4f 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
@@ -11,8 +11,8 @@
 
 @interface MLOTestingTileParameter ()
 @property MLOTestingTileParametersViewController * params;
- at property (nonatomic,strong) MLOTestingTileParameterExtractor extractor1;
- at property (nonatomic,strong) MLOTestingTileParameterExtractor extractor2;
+ at property (nonatomic,strong) MLOTestingTileParameterExtractor widthIsHeightExtractor;
+ at property (nonatomic,strong) MLOTestingTileParameterExtractor widthIsNotHeightExtractor;
 @property UILabel * label;
 @property UITextField * data;
 @property UITextField * step;
@@ -25,13 +25,13 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
 
 @implementation MLOTestingTileParameter
 
--(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label extractor1:(MLOTestingTileParameterExtractor) extractor1 extractor2:(MLOTestingTileParameterExtractor) extractor2 defaultValue:(NSInteger) defaultValue{
+-(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label widthIsNotHeightExtractor:(MLOTestingTileParameterExtractor) widthIsNotHeightExtractor widthIsHeightExtractor:(MLOTestingTileParameterExtractor) widthIsHeightExtractor defaultValue:(NSInteger) defaultValue{
     NSLog(@"Creating tile testing param %@ with default value %d",label,defaultValue);
     self = [self init];
     if(self){
         self.params = params;
-        self.extractor1 = extractor1;
-        self.extractor2 = extractor2;
+        self.widthIsHeightExtractor = widthIsHeightExtractor;
+        self.widthIsNotHeightExtractor = widthIsNotHeightExtractor;
         self.defaultValue = defaultValue;
         [self initLabel:label];
         self.dataStepper = [self createStepper];
@@ -169,16 +169,20 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
     return [self.data.text floatValue];
 }
 
--(void)extract:(BOOL) isExtractor1{
-
-    NSLog(@"%@ extract %d",self,isExtractor1?1:2);
-
-    CGFloat dataValue = [self currentDataValue];
+-(MLOTestingTileParameterExtractor) getExtractor:(MLOTestingTileParametersMode) mode{
+    switch (mode) {
+        case WIDTH_IS_HEIGHT:
+            return self.widthIsHeightExtractor;
+        case WIDTH_IS_NOT_HEIGHT:
+            return self.widthIsNotHeightExtractor;
+    }
+}
 
-    if(isExtractor1){
-        self.extractor1(dataValue);
-    }else{
-        self.extractor2(dataValue);
+-(void)extractMode:(MLOTestingTileParametersMode) mode{
+    MLOTestingTileParameterExtractor extractor = [self getExtractor:mode];
+    if(extractor!=nil){
+        NSLog(@"%@ extract %@",self,MLOTestingTileParametersModeString(mode));
+        extractor([self currentDataValue]);
     }
 }
 @end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
index c544f2a..4a235e1 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
@@ -17,6 +17,8 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
 @property MLOAppRoleTileTester * tester;
 @property NSArray * params;
 @property UIButton * renderButton;
+ at property UIButton * modeButton;
+ at property MLOTestingTileParametersMode mode;
 @end
 @implementation MLOTestingTileParametersViewController
 
@@ -24,7 +26,9 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
     self = [self init];
     if(self){
         self.tester = tester;
+        self.mode = WIDTH_IS_HEIGHT;
         [self initParams];
+        [self initModeButton];
         [self initRenderButton];
 
     }
@@ -39,30 +43,30 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
 
 -(void)initParams{
     self.params = @[[self createParam:@"contextWidth"
-                           extractor1:^(CGFloat value){self.contextWidth = value;}
-                           extractor2:^(CGFloat value){self.contextWidth = self.contextHeight = value;}
+            widthIsNotHeightExtractor:^(CGFloat value){self.contextWidth = value;}
+               widthIsHeightExtractor:^(CGFloat value){self.contextWidth = self.contextHeight = value;}
                                 value:CONTEXT_WIDTH_DEFAULT],
 
-                    [self createConditionalParam:@"contextHeight"
-                                       extractor:^(CGFloat value){self.contextHeight = value;}
-                                           value:CONTEXT_HEIGHT_DEFAULT],
+                    [self createParam:@"contextHeight"
+            widthIsNotHeightExtractor:^(CGFloat value){self.contextHeight = value;}
+                                value:CONTEXT_HEIGHT_DEFAULT],
 
-                    [self createNormalParam:@"tilePosX"
-                                  extractor:^(CGFloat value){self.tilePosX = value;}
-                                      value:TILE_POS_X_DEFAULT],
+                    [self createParam:@"tilePosX"
+                         anyExtractor:^(CGFloat value){self.tilePosX = value;}
+                                value:TILE_POS_X_DEFAULT],
 
-                    [self createNormalParam:@"tilePosY"
-                                  extractor:^(CGFloat value){self.tilePosY = value;}
-                                      value:TILE_POS_Y_DEFAULT],
+                    [self createParam:@"tilePosY"
+                         anyExtractor:^(CGFloat value){self.tilePosY = value;}
+                                value:TILE_POS_Y_DEFAULT],
 
                     [self createParam:@"tileWidth"
-                           extractor1:^(CGFloat value){self.tileWidth = value;}
-                           extractor2:^(CGFloat value){self.tileWidth = self.tileHeight = value;}
+            widthIsNotHeightExtractor:^(CGFloat value){self.tileWidth = value;}
+               widthIsHeightExtractor:^(CGFloat value){self.tileWidth = self.tileHeight = value;}
                                 value:TILE_WIDTH_DEFAULT],
 
-                    [self createConditionalParam:@"tileHeight"
-                                       extractor:^(CGFloat value){self.tileHeight = value;}
-                                           value:TILE_HEIGHT_DEFAULT]
+                    [self createParam:@"tileHeight"
+            widthIsNotHeightExtractor:^(CGFloat value){self.tileHeight = value;}
+                                value:TILE_HEIGHT_DEFAULT]
                     ];
 }
 
@@ -73,16 +77,39 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
     self.renderButton =button;
 }
 
+-(void)initModeButton{
+    UIButton * button =[UIButton buttonWithType:UIButtonTypeRoundedRect];
+    [button addTarget:self action:@selector(changeMode) forControlEvents:UIControlEventTouchDown];
+    [button setTitle:MLOTestingTileParametersModeString(self.mode) forState:UIControlStateNormal];
+    self.modeButton =button;
+}
+
+-(void)changeMode{
 
--(MLOTestingTileParameter *) createNormalParam:(NSString *)name extractor:(MLOTestingTileParameterExtractor) extractor value:(CGFloat)defaultValue{
-      return [self createParam:name extractor1:extractor extractor2:extractor value:defaultValue];}
+    switch (self.mode) {
+        case WIDTH_IS_HEIGHT:
+            self.mode = WIDTH_IS_NOT_HEIGHT;
+            break;
+        case WIDTH_IS_NOT_HEIGHT:
+            self.mode = WIDTH_IS_HEIGHT;
+            break;
+    }
 
--(MLOTestingTileParameter *) createConditionalParam:(NSString *)name extractor:(MLOTestingTileParameterExtractor) extractor value:(CGFloat)defaultValue{
-    return [self createParam:name extractor1:extractor extractor2:nil value:defaultValue];
+    [self.modeButton setTitle:MLOTestingTileParametersModeString(self.mode) forState:UIControlStateNormal];
 }
 
--(MLOTestingTileParameter *) createParam:(NSString *)name extractor1:(MLOTestingTileParameterExtractor) extractor1 extractor2:(MLOTestingTileParameterExtractor) extractor2 value:(CGFloat)defaultValue{
-    return [[MLOTestingTileParameter alloc] initWithParams:self label:name extractor1:extractor1 extractor2:extractor2 defaultValue:defaultValue];
+
+
+-(MLOTestingTileParameter *) createParam:(NSString *)name anyExtractor:(MLOTestingTileParameterExtractor) anyExtractor value:(CGFloat)defaultValue{
+      return [self createParam:name widthIsNotHeightExtractor:anyExtractor widthIsHeightExtractor:anyExtractor value:defaultValue];
+}
+
+-(MLOTestingTileParameter *) createParam:(NSString *)name widthIsNotHeightExtractor:(MLOTestingTileParameterExtractor) widthIsNotHeightExtractor value:(CGFloat)defaultValue{
+    return [self createParam:name widthIsNotHeightExtractor:widthIsNotHeightExtractor widthIsHeightExtractor:nil value:defaultValue];
+}
+
+-(MLOTestingTileParameter *) createParam:(NSString *)name widthIsNotHeightExtractor:(MLOTestingTileParameterExtractor) extractor1 widthIsHeightExtractor:(MLOTestingTileParameterExtractor) extractor2 value:(CGFloat)defaultValue{
+    return [[MLOTestingTileParameter alloc] initWithParams:self label:name widthIsNotHeightExtractor:extractor1 widthIsHeightExtractor:extractor2 defaultValue:defaultValue];
 }
 
 
@@ -103,9 +130,14 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
                                        paramHeight)];
         originY+=paramHeight;
     }
-    self.renderButton.frame = CGRectMake(0,
+    CGFloat halfWidth = width/2.0f;
+    self.modeButton.frame = CGRectMake(0,
+                                       originY,
+                                       halfWidth,
+                                       RENDER_BUTTON_HEIGHT);
+    self.renderButton.frame = CGRectMake(halfWidth,
                                          originY,
-                                         width,
+                                         halfWidth,
                                          RENDER_BUTTON_HEIGHT);
 
 }
@@ -117,13 +149,14 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
     }
 
     [self.view addSubview:self.renderButton];
+    [self.view addSubview:self.modeButton];
 
 
 }
 -(void)renderTile{
     NSLog(@"%@ renderTile",self);
     for (MLOTestingTileParameter * param in self.params) {
-        [param extract];
+        [param extractMode:self.mode];
     }
     [self.tester.renderer render];
 }
commit f3694fc39f8c16f31bb41a59120d3ac0254b14fa
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Fri Nov 1 14:47:04 2013 +0200

    in progress of linkinh width and height
    
    Change-Id: I2d7f5a7bd41b8d2c4a62d199abb81afc466fc2ce

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
index 2f31281..df0f70b 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
@@ -8,13 +8,12 @@
 
 #import "MLOObject.h"
 
-
 typedef void (^MLOTestingTileParameterExtractor)(CGFloat value);
 
 @class MLOTestingTileParametersViewController;
 @interface MLOTestingTileParameter : MLOObject
--(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label extractor:(MLOTestingTileParameterExtractor) extractor defaultValue:(NSInteger) defaultValue;
--(void)extract;
+-(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label extractor1:(MLOTestingTileParameterExtractor) extractor extractor2:(MLOTestingTileParameterExtractor) linkedExtractor defaultValue:(NSInteger) defaultValue;
+-(void)extract:(BOOL) isExtractor1;
 -(void)setParamFrame:(CGRect)  paramFrame;
 -(void)addToSuperview;
 @end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
index 1107eef..b5fcd8d 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
@@ -11,7 +11,8 @@
 
 @interface MLOTestingTileParameter ()
 @property MLOTestingTileParametersViewController * params;
- at property (nonatomic,strong) MLOTestingTileParameterExtractor extractor;
+ at property (nonatomic,strong) MLOTestingTileParameterExtractor extractor1;
+ at property (nonatomic,strong) MLOTestingTileParameterExtractor extractor2;
 @property UILabel * label;
 @property UITextField * data;
 @property UITextField * step;
@@ -24,12 +25,13 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
 
 @implementation MLOTestingTileParameter
 
--(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label extractor:(MLOTestingTileParameterExtractor) extractor defaultValue:(NSInteger) defaultValue{
+-(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label extractor1:(MLOTestingTileParameterExtractor) extractor1 extractor2:(MLOTestingTileParameterExtractor) extractor2 defaultValue:(NSInteger) defaultValue{
     NSLog(@"Creating tile testing param %@ with default value %d",label,defaultValue);
     self = [self init];
     if(self){
         self.params = params;
-        self.extractor = extractor;
+        self.extractor1 = extractor1;
+        self.extractor2 = extractor2;
         self.defaultValue = defaultValue;
         [self initLabel:label];
         self.dataStepper = [self createStepper];
@@ -167,9 +169,16 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
     return [self.data.text floatValue];
 }
 
--(void)extract{
-    NSLog(@"%@ extract",self);
+-(void)extract:(BOOL) isExtractor1{
 
-    self.extractor([self currentDataValue]);
+    NSLog(@"%@ extract %d",self,isExtractor1?1:2);
+
+    CGFloat dataValue = [self currentDataValue];
+
+    if(isExtractor1){
+        self.extractor1(dataValue);
+    }else{
+        self.extractor2(dataValue);
+    }
 }
 @end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
index 47c6a6e..ffbf903 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
@@ -9,6 +9,13 @@
 #import "MLOViewController.h"
 #import "MLOTestingTileSubviewControllerProtocol.h"
 
+static const CGFloat CONTEXT_WIDTH_DEFAULT = 600;
+static const CGFloat CONTEXT_HEIGHT_DEFAULT = 600;
+static const CGFloat TILE_POS_X_DEFAULT = 500;
+static const CGFloat TILE_POS_Y_DEFAULT = 620;
+static const CGFloat TILE_WIDTH_DEFAULT = 1000;
+static const CGFloat TILE_HEIGHT_DEFAULT = 1020;
+
 @interface MLOTestingTileParametersViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol>
 @property CGFloat contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight;
 -(void)renderTile;
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
index 4feee1e..c544f2a 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
@@ -18,7 +18,6 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
 @property NSArray * params;
 @property UIButton * renderButton;
 @end
-
 @implementation MLOTestingTileParametersViewController
 
 -(id)initWithTester:(MLOAppRoleTileTester *)tester{
@@ -39,12 +38,31 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
 }
 
 -(void)initParams{
-    self.params = @[[self createParam:@"contextWidth"   extractor:^(CGFloat value){self.contextWidth = value;} value:600],
-                    [self createParam:@"contextHeight"  extractor:^(CGFloat value){self.contextHeight = value;} value:600],
-                    [self createParam:@"tilePosX"       extractor:^(CGFloat value){self.tilePosX = value;} value:500],
-                    [self createParam:@"tilePosY"       extractor:^(CGFloat value){self.tilePosY = value;} value:620],
-                    [self createParam:@"tileWidth"      extractor:^(CGFloat value){self.tileWidth = value;} value:1000],
-                    [self createParam:@"tileHeight"     extractor:^(CGFloat value){self.tileHeight = value;} value:1020]
+    self.params = @[[self createParam:@"contextWidth"
+                           extractor1:^(CGFloat value){self.contextWidth = value;}
+                           extractor2:^(CGFloat value){self.contextWidth = self.contextHeight = value;}
+                                value:CONTEXT_WIDTH_DEFAULT],
+
+                    [self createConditionalParam:@"contextHeight"
+                                       extractor:^(CGFloat value){self.contextHeight = value;}
+                                           value:CONTEXT_HEIGHT_DEFAULT],
+
+                    [self createNormalParam:@"tilePosX"
+                                  extractor:^(CGFloat value){self.tilePosX = value;}
+                                      value:TILE_POS_X_DEFAULT],
+
+                    [self createNormalParam:@"tilePosY"
+                                  extractor:^(CGFloat value){self.tilePosY = value;}
+                                      value:TILE_POS_Y_DEFAULT],
+
+                    [self createParam:@"tileWidth"
+                           extractor1:^(CGFloat value){self.tileWidth = value;}
+                           extractor2:^(CGFloat value){self.tileWidth = self.tileHeight = value;}
+                                value:TILE_WIDTH_DEFAULT],
+
+                    [self createConditionalParam:@"tileHeight"
+                                       extractor:^(CGFloat value){self.tileHeight = value;}
+                                           value:TILE_HEIGHT_DEFAULT]
                     ];
 }
 
@@ -56,8 +74,15 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
 }
 
 
--(MLOTestingTileParameter *) createParam:(NSString *)name extractor:(MLOTestingTileParameterExtractor) extractor value:(CGFloat)defaultValue{
-   return [[MLOTestingTileParameter alloc] initWithParams:self label:name extractor:extractor defaultValue:defaultValue];
+-(MLOTestingTileParameter *) createNormalParam:(NSString *)name extractor:(MLOTestingTileParameterExtractor) extractor value:(CGFloat)defaultValue{
+      return [self createParam:name extractor1:extractor extractor2:extractor value:defaultValue];}
+
+-(MLOTestingTileParameter *) createConditionalParam:(NSString *)name extractor:(MLOTestingTileParameterExtractor) extractor value:(CGFloat)defaultValue{
+    return [self createParam:name extractor1:extractor extractor2:nil value:defaultValue];
+}
+
+-(MLOTestingTileParameter *) createParam:(NSString *)name extractor1:(MLOTestingTileParameterExtractor) extractor1 extractor2:(MLOTestingTileParameterExtractor) extractor2 value:(CGFloat)defaultValue{
+    return [[MLOTestingTileParameter alloc] initWithParams:self label:name extractor1:extractor1 extractor2:extractor2 defaultValue:defaultValue];
 }
 
 
commit 251e5534b183a1329ddb5464f12eccc151a65bcc
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Nov 1 14:50:40 2013 +0200

    Saving the graphics state around touch_lo_draw_tile() seems unnecessary
    
    Change-Id: Ic1a6cf64fb05810eccc91d0095c9ced54d3d9fe1

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
index 864244e..0c18b82 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
@@ -45,15 +45,12 @@
 {
     CGContextRef context = UIGraphicsGetCurrentContext();
 
-    CGContextSaveGState(context);
     touch_lo_draw_tile(context,
                        self.tester.params.contextWidth,
                        self.tester.params.contextHeight,
                        MLODpxPointByDpxes(self.tester.params.tilePosX,self.tester.params.tilePosY),
                        MLODpxSizeByDpxes(self.tester.params.tileWidth,self.tester.params.tileHeight));
 
-    CGContextRestoreGState(context);
-
     MLODpxSize size = touch_lo_get_content_size();
     NSLog(@"touch_lo_get_content_size: width=%f, height=%f",size.width, size.height);
 }
commit 3e4102f0fc7f027c54f974b774b672772cbf66ab
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Nov 1 14:38:46 2013 +0200

    No Y flip needed here
    
    Change-Id: I2518a6151050edee8796a77633097fdd11202647

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
index f066116..864244e 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
@@ -46,10 +46,6 @@
     CGContextRef context = UIGraphicsGetCurrentContext();
 
     CGContextSaveGState(context);
-    CGContextTranslateCTM(context, 0, self.tester.params.contextHeight);
-    CGContextScaleCTM(context, 1, -1);
-    CGContextScaleCTM(context, 1, 1);
-
     touch_lo_draw_tile(context,
                        self.tester.params.contextWidth,
                        self.tester.params.contextHeight,
commit 91e4e3338aaaba31e5e6d358d0644d9a1e785c97
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Nov 1 14:23:45 2013 +0200

    Pass tilePosX/Y also to PaintTile()
    
    Change-Id: I85360889bf723fa8b603dfbe7a6f99d99c70c72f

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 2706c67..1cee965 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1812,7 +1812,7 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         // resizes the virtual device so to contain the entrie context
         aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
         // draw - works in logic coordinates
-        pViewShell->PaintTile(&aDevice, Rectangle(Point(0, 0), Size(tileWidth, tileHeight)));
+        pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)));
         // copy the aDevice content to mpImage
         Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
         BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess();
commit 1974d99b60a235f39a868347438b4fc5a17db741
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Fri Nov 1 13:09:28 2013 +0200

    UISteppers now go down as well
    
    Change-Id: I06e1b7fec490ec373a9775915d6dc2c30ce805f1

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
index 22d98fa..1107eef 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
@@ -48,7 +48,7 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
     stepper.autorepeat = YES;
     stepper.continuous = NO;
     [stepper addObserver:self forKeyPath:@"value"
-                          options: NSKeyValueObservingOptionNew
+                          options: NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld
                           context:0];
     return stepper;
 }
@@ -57,8 +57,10 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
 {
 
     if (object == self.dataStepper) {
-         NSNumber * floatNumber = change[NSKeyValueChangeNewKey];
-        CGFloat value = [self currentDataValue] + [floatNumber floatValue];
+        NSNumber * newNumber = change[NSKeyValueChangeNewKey];
+        NSNumber * oldNumber = change[NSKeyValueChangeOldKey];
+
+        CGFloat value = [self currentDataValue] + [newNumber floatValue] - [oldNumber floatValue];
 
         if(value == ((NSInteger) value)){
             self.data.text = [[NSNumber numberWithInteger:(NSInteger) value] stringValue];
commit 427c55bbc1e16f5aaf74dca67c1ea6436f1032a1
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Fri Nov 1 12:51:51 2013 +0200

    removed DPX RIP (0,0) coords shift. played with rendering parameters
    
    Change-Id: Ib2a3b017aa59bc1a8408b42f101fd041270494aa

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index eda5be1..2706c67 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1808,10 +1808,11 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         aMapMode.SetScaleX(scaleX);
         aMapMode.SetScaleY(scaleY);
         aDevice.SetMapMode(aMapMode);
+        SetSwVisArea( pViewShell, SwRect(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)) );
         // resizes the virtual device so to contain the entrie context
         aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
         // draw - works in logic coordinates
-        pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)));
+        pViewShell->PaintTile(&aDevice, Rectangle(Point(0, 0), Size(tileWidth, tileHeight)));
         // copy the aDevice content to mpImage
         Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
         BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess();
@@ -1843,8 +1844,8 @@ MLODpxSize touch_lo_get_content_size()
 extern "C"
 MLORipPoint MLORipPointByDpxPoint(MLODpxPoint mloDpxPoint)
 {
-    MLODpxSize contentSize = touch_lo_get_content_size();
-    MLORip x = MLORipByDpx(mloDpxPoint.x - (contentSize.width/2.0f));
+    //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);
 }
@@ -1852,8 +1853,8 @@ MLORipPoint MLORipPointByDpxPoint(MLODpxPoint mloDpxPoint)
 extern "C"
 MLODpxPoint MLODpxPointByRipPoint(MLORipPoint mloRipPoint)
 {
-    MLODpxSize contentSize = touch_lo_get_content_size();
-    MLODpx x = MLODpxByRip(mloRipPoint.x) + (contentSize.width/2.0f);
+    //MLODpxSize contentSize = touch_lo_get_content_size();
+    MLODpx x = MLODpxByRip(mloRipPoint.x)/* + (contentSize.width/2.0f)*/;
     MLODpx y = MLODpxByRip(mloRipPoint.y);
     return MLODpxPointByDpxes(x,y);
 }
commit 5c6aa9ae862d2483355613b8c2e3e33d61140068
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Fri Nov 1 12:48:31 2013 +0200

    tiledrendering new stepper ui for tor
    
    Change-Id: I3d4586c84adfa9f0416a043230c6227bda98d9dd

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
index f286390..22d98fa 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
@@ -14,9 +14,14 @@
 @property (nonatomic,strong) MLOTestingTileParameterExtractor extractor;
 @property UILabel * label;
 @property UITextField * data;
+ at property UITextField * step;
 @property NSInteger defaultValue;
+ at property UIStepper * dataStepper;
+ at property UIStepper * stepStepper;
 @end
 
+static const CGFloat DEFAULT_STEP_VALUE = 1;
+
 @implementation MLOTestingTileParameter
 
 -(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label extractor:(MLOTestingTileParameterExtractor) extractor defaultValue:(NSInteger) defaultValue{
@@ -26,13 +31,59 @@
         self.params = params;
         self.extractor = extractor;
         self.defaultValue = defaultValue;
-
         [self initLabel:label];
-        [self initTextField];
+        self.dataStepper = [self createStepper];
+        self.stepStepper = [self createStepper];
+        [self initDataTextField];
+        [self initStepTextField];
     }
     return self;
 }
 
+-(UIStepper *) createStepper{
+    UIStepper * stepper = [UIStepper new];
+    stepper.maximumValue = MAXFLOAT;
+    stepper.minimumValue = -MAXFLOAT;
+    stepper.stepValue = DEFAULT_STEP_VALUE;
+    stepper.autorepeat = YES;
+    stepper.continuous = NO;
+    [stepper addObserver:self forKeyPath:@"value"
+                          options: NSKeyValueObservingOptionNew
+                          context:0];
+    return stepper;
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
+{
+
+    if (object == self.dataStepper) {
+         NSNumber * floatNumber = change[NSKeyValueChangeNewKey];
+        CGFloat value = [self currentDataValue] + [floatNumber floatValue];
+
+        if(value == ((NSInteger) value)){
+            self.data.text = [[NSNumber numberWithInteger:(NSInteger) value] stringValue];
+        }else{
+            self.data.text = [[NSNumber numberWithFloat:value] stringValue];
+        }
+        [self.params renderTile];
+    }else if (object == self.stepStepper){
+
+        NSNumber * floatNumber = change[NSKeyValueChangeNewKey];
+        NSInteger value = [floatNumber integerValue];
+        NSNumber * newValue = [NSNumber numberWithInteger:value];
+        self.step.text = [newValue stringValue];
+        self.dataStepper.stepValue = [newValue floatValue];
+    }
+}
+
+
+-(void)initStepTextField{
+
+    self.step =[[UITextField alloc] initWithFrame:CGRECT_ZERO];
+    self.data.textAlignment = NSTextAlignmentLeft;
+    self.step.text = [[NSNumber numberWithInteger:(NSInteger)DEFAULT_STEP_VALUE] stringValue];
+}
+
 -(NSString *)description{
     return [@"MLOTestingTileParameter: " stringByAppendingString:self.label.text];
 }
@@ -40,10 +91,10 @@
 -(void) initLabel:(NSString *) label{
     self.label =[[UILabel alloc] initWithFrame:CGRECT_ZERO];
     self.label.text =  label;
-    self.label.textAlignment = NSTextAlignmentRight;
+    self.label.textAlignment = NSTextAlignmentCenter;
 }
 
--(void) initTextField{
+-(void) initDataTextField{
     self.data = [[UITextField alloc] initWithFrame:CGRECT_ZERO];
     [self.data setKeyboardType:UIKeyboardTypeNumberPad];
     self.data.textAlignment = NSTextAlignmentLeft;
@@ -58,31 +109,65 @@
 -(void)setParamFrame:(CGRect)  paramFrame{
     NSLog(@"%@ setParamFrame",self);
 
-    self.label.frame=CGRectMake(paramFrame.origin.x,
-                                paramFrame.origin.y,
-                                paramFrame.size.width/2.0f,
-                                paramFrame.size.height);
-    self.data.frame =CGRectMake(paramFrame.origin.x + paramFrame.size.width/2.0f,
-                                paramFrame.origin.y,
-                                paramFrame.size.width/2.0f,
-                                paramFrame.size.height);
+    CGFloat x = paramFrame.origin.x;
+    CGFloat y = paramFrame.origin.y;
+    CGFloat w = paramFrame.size.width;
+    CGFloat h = paramFrame.size.height;
+
+    CGFloat labelW = w/3.0f;
+    CGFloat otherW = w/6.0f;
+
+    self.label.frame=CGRectMake(x,
+                                y,
+                                labelW,
+                                h);
+    self.data.frame =CGRectMake(x + labelW,
+                                y,
+                                otherW,
+                                h);
+    self.dataStepper.frame = CGRectMake(x + labelW + otherW,
+                                        y,
+                                        otherW,
+                                        h);
+
+    self.step.frame = CGRectMake(x + labelW + 2*otherW,
+                                 y,
+                                 otherW,
+                                 h);
+    self.stepStepper.frame = CGRectMake(x + labelW + 3*otherW,
+                                        y,
+                                        otherW,
+                                        h);
+
 }
 
 -(void)addToSuperview{
     NSLog(@"%@ addToSuperview",self);
     [self.params.view addSubview:self.label];
     [self.params.view addSubview:self.data];
+    [self.params.view addSubview:self.dataStepper];
+    [self.params.view addSubview:self.step];
+    [self.params.view addSubview:self.stepStepper];
 }
 
--(void)extract{
-    NSLog(@"%@ extract",self);
+-(BOOL)isNumber:(NSString *) string{
+
+    return [[NSNumberFormatter new]numberFromString:string] == nil;
+}
 
-    if([[NSNumberFormatter new]numberFromString:self.data.text] == nil){
+-(CGFloat) currentDataValue{
+    if([self isNumber:self.data.text]){
 
         NSLog(@"%@ got illegal value: %@, reseting to %d",self,self.data.text,self.defaultValue);
 
         [self resetValue];
     }
-    self.extractor([self.data.text floatValue]);
+    return [self.data.text floatValue];
+}
+
+-(void)extract{
+    NSLog(@"%@ extract",self);
+
+    self.extractor([self currentDataValue]);
 }
 @end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
index 57060b7..47c6a6e 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
@@ -11,4 +11,5 @@
 
 @interface MLOTestingTileParametersViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol>
 @property CGFloat contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight;
+-(void)renderTile;
 @end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
index acd00c1..4feee1e 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
@@ -41,10 +41,10 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
 -(void)initParams{
     self.params = @[[self createParam:@"contextWidth"   extractor:^(CGFloat value){self.contextWidth = value;} value:600],
                     [self createParam:@"contextHeight"  extractor:^(CGFloat value){self.contextHeight = value;} value:600],
-                    [self createParam:@"tilePosX"       extractor:^(CGFloat value){self.tilePosX = value;} value:600],
-                    [self createParam:@"tilePosY"       extractor:^(CGFloat value){self.tilePosY = value;} value:600],
+                    [self createParam:@"tilePosX"       extractor:^(CGFloat value){self.tilePosX = value;} value:500],
+                    [self createParam:@"tilePosY"       extractor:^(CGFloat value){self.tilePosY = value;} value:620],
                     [self createParam:@"tileWidth"      extractor:^(CGFloat value){self.tileWidth = value;} value:1000],
-                    [self createParam:@"tileHeight"     extractor:^(CGFloat value){self.tileHeight = value;} value:1000]
+                    [self createParam:@"tileHeight"     extractor:^(CGFloat value){self.tileHeight = value;} value:1020]
                     ];
 }
 
commit e8c7e2b06188cb59261b1bff46b91a88784fa176
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Oct 31 23:37:36 2013 +0200

    Handle also FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA
    
    It seems to be used to draw something related to rulers, which we of
    course don't show at all, but apparently they get initialised anyway.
    So, to avoid a warning, handle this format, too. (As such, I am not
    sure if I handle BGRA the right way, but there is no way to check as
    nothing works properly in this branch at the moment anyway.)
    
    Change-Id: I6a7444872f90a34e1e568769a595443c45aa6722

diff --git a/vcl/coretext/salgdi2.cxx b/vcl/coretext/salgdi2.cxx
index a78c8a3..594670c 100644
--- a/vcl/coretext/salgdi2.cxx
+++ b/vcl/coretext/salgdi2.cxx
@@ -852,6 +852,13 @@ bool SvpSalGraphics::CheckContext()
                                           CGColorSpaceCreateDeviceRGB(),
                                           kCGImageAlphaNoneSkipLast);
         break;
+    case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA:
+        mrContext = CGBitmapContextCreate(pixelBuffer.get(),
+                                          bufferSize.getX(), bufferSize.getY(),
+                                          8, scanlineStride,
+                                          CGColorSpaceCreateDeviceRGB(),
+                                          kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little);
+        break;
     default:
         SAL_WARN( "vcl.ios", "CheckContext: unsupported color format " << basebmp::formatName( m_aDevice->getScanlineFormat() ) );
         warned = true;
commit 5440d47c9cc0ee41ac039809126a6cf215d7ca73
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Oct 31 21:53:18 2013 +0200

    Use actual executable path in the fake argv
    
    Not that I think it is needed for anything useful, but better to be
    correct than to use the leftover "Viewer" name.
    
    Change-Id: I0878d39abf99c9d07807aa6854bfdcf12bc81ab8

diff --git a/ios/shared/ios_sharedlo/cxx/mlo.mm b/ios/shared/ios_sharedlo/cxx/mlo.mm
index dc6fa42..b17067b 100644
--- a/ios/shared/ios_sharedlo/cxx/mlo.mm
+++ b/ios/shared/ios_sharedlo/cxx/mlo.mm
@@ -204,9 +204,7 @@ mlo_initialize(void)
     
         
     const char *argv[] = {
-        
-    //    "-SAL_LOG=+WARN+INFO",
-        [[bundlePath stringByAppendingPathComponent: @"Viewer"] UTF8String],
+        [[[NSBundle mainBundle] executablePath] UTF8String],
         "-env:URE_INTERNAL_LIB_DIR=file:///",
         [uno_types UTF8String],
         [uno_services UTF8String],"--writer"};
commit 2d8a9811920e572de9dfb28b2e0164dfcb768ddb
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Oct 31 20:00:25 2013 +0200

    Add the vcl/coretext source files
    
    Change-Id: Ifa700d0dc9a5545254a4c04284dd3c3ad46f92cb

diff --git a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
index f17529d..2c41463 100644
--- a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
+++ b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
@@ -262,6 +262,9 @@
 		BE82BE4318228BD200A447B5 /* virdev.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = virdev.cxx; path = ../../vcl/source/gdi/virdev.cxx; sourceTree = "<group>"; };
 		BE82BE4418228BD200A447B5 /* wall.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = wall.cxx; path = ../../vcl/source/gdi/wall.cxx; sourceTree = "<group>"; };
 		BE82BE4718228CA600A447B5 /* impbmp.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = impbmp.hxx; path = ../../vcl/inc/impbmp.hxx; sourceTree = "<group>"; };
+		BE82BE4B1822D10F00A447B5 /* ctfonts.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ctfonts.cxx; path = ../../vcl/coretext/ctfonts.cxx; sourceTree = "<group>"; };
+		BE82BE4D1822D10F00A447B5 /* ctlayout.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ctlayout.cxx; path = ../../vcl/coretext/ctlayout.cxx; sourceTree = "<group>"; };
+		BE82BE4E1822D10F00A447B5 /* salgdi2.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salgdi2.cxx; path = ../../vcl/coretext/salgdi2.cxx; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -478,6 +481,7 @@
 		BE82BDB51822617500A447B5 /* vcl */ = {
 			isa = PBXGroup;
 			children = (
+				BE82BE4A1822D0E900A447B5 /* coretext */,
 				BE82BDF11822626C00A447B5 /* gdi */,
 				BE82BDF01822625C00A447B5 /* headless */,
 				BE82BE4618228C6A00A447B5 /* inc */,
@@ -672,6 +676,16 @@
 			name = inc;
 			sourceTree = "<group>";
 		};
+		BE82BE4A1822D0E900A447B5 /* coretext */ = {
+			isa = PBXGroup;
+			children = (
+				BE82BE4B1822D10F00A447B5 /* ctfonts.cxx */,
+				BE82BE4D1822D10F00A447B5 /* ctlayout.cxx */,
+				BE82BE4E1822D10F00A447B5 /* salgdi2.cxx */,
+			);
+			name = coretext;
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
commit 7d92c0db2bc4f3a873407de9f829906bf6861dad
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Oct 31 18:20:47 2013 +0200

    Add more source files for convenience
    
    Change-Id: Ie605c8068a62480e360c13f08eea785d54c57f42

diff --git a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
index 143926e..f17529d 100644
--- a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
+++ b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
@@ -188,6 +188,80 @@
 		BE82BDF71822628500A447B5 /* svpgdi.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svpgdi.cxx; path = ../../vcl/headless/svpgdi.cxx; sourceTree = "<group>"; };
 		BE82BDF81822628500A447B5 /* svpinst.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svpinst.cxx; path = ../../vcl/headless/svpinst.cxx; sourceTree = "<group>"; };
 		BE82BDFB1822628500A447B5 /* svpvd.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svpvd.cxx; path = ../../vcl/headless/svpvd.cxx; sourceTree = "<group>"; };
+		BE82BDFC18228BD200A447B5 /* alpha.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = alpha.cxx; path = ../../vcl/source/gdi/alpha.cxx; sourceTree = "<group>"; };
+		BE82BDFD18228BD200A447B5 /* animate.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = animate.cxx; path = ../../vcl/source/gdi/animate.cxx; sourceTree = "<group>"; };
+		BE82BDFE18228BD200A447B5 /* base14.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = base14.cxx; path = ../../vcl/source/gdi/base14.cxx; sourceTree = "<group>"; };
+		BE82BDFF18228BD200A447B5 /* bitmap.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bitmap.cxx; path = ../../vcl/source/gdi/bitmap.cxx; sourceTree = "<group>"; };
+		BE82BE0018228BD200A447B5 /* bitmap3.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bitmap3.cxx; path = ../../vcl/source/gdi/bitmap3.cxx; sourceTree = "<group>"; };
+		BE82BE0118228BD200A447B5 /* bitmap4.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bitmap4.cxx; path = ../../vcl/source/gdi/bitmap4.cxx; sourceTree = "<group>"; };
+		BE82BE0218228BD200A447B5 /* bitmapex.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bitmapex.cxx; path = ../../vcl/source/gdi/bitmapex.cxx; sourceTree = "<group>"; };
+		BE82BE0318228BD200A447B5 /* bmpacc.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bmpacc.cxx; path = ../../vcl/source/gdi/bmpacc.cxx; sourceTree = "<group>"; };
+		BE82BE0418228BD200A447B5 /* bmpacc2.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bmpacc2.cxx; path = ../../vcl/source/gdi/bmpacc2.cxx; sourceTree = "<group>"; };
+		BE82BE0518228BD200A447B5 /* bmpacc3.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bmpacc3.cxx; path = ../../vcl/source/gdi/bmpacc3.cxx; sourceTree = "<group>"; };
+		BE82BE0618228BD200A447B5 /* bmpfast.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bmpfast.cxx; path = ../../vcl/source/gdi/bmpfast.cxx; sourceTree = "<group>"; };
+		BE82BE0718228BD200A447B5 /* configsettings.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = configsettings.cxx; path = ../../vcl/source/gdi/configsettings.cxx; sourceTree = "<group>"; };
+		BE82BE0818228BD200A447B5 /* cvtgrf.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = cvtgrf.cxx; path = ../../vcl/source/gdi/cvtgrf.cxx; sourceTree = "<group>"; };
+		BE82BE0918228BD200A447B5 /* cvtsvm.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = cvtsvm.cxx; path = ../../vcl/source/gdi/cvtsvm.cxx; sourceTree = "<group>"; };
+		BE82BE0A18228BD200A447B5 /* dibtools.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dibtools.cxx; path = ../../vcl/source/gdi/dibtools.cxx; sourceTree = "<group>"; };
+		BE82BE0B18228BD200A447B5 /* embeddedfontshelper.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = embeddedfontshelper.cxx; path = ../../vcl/source/gdi/embeddedfontshelper.cxx; sourceTree = "<group>"; };
+		BE82BE0C18228BD200A447B5 /* extoutdevdata.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = extoutdevdata.cxx; path = ../../vcl/source/gdi/extoutdevdata.cxx; sourceTree = "<group>"; };
+		BE82BE0D18228BD200A447B5 /* font.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = font.cxx; path = ../../vcl/source/gdi/font.cxx; sourceTree = "<group>"; };
+		BE82BE0E18228BD200A447B5 /* gdimetafiletools.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = gdimetafiletools.cxx; path = ../../vcl/source/gdi/gdimetafiletools.cxx; sourceTree = "<group>"; };
+		BE82BE0F18228BD200A447B5 /* gdimtf.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = gdimtf.cxx; path = ../../vcl/source/gdi/gdimtf.cxx; sourceTree = "<group>"; };
+		BE82BE1018228BD200A447B5 /* gfxlink.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = gfxlink.cxx; path = ../../vcl/source/gdi/gfxlink.cxx; sourceTree = "<group>"; };
+		BE82BE1118228BD200A447B5 /* gradient.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = gradient.cxx; path = ../../vcl/source/gdi/gradient.cxx; sourceTree = "<group>"; };
+		BE82BE1218228BD200A447B5 /* graph.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = graph.cxx; path = ../../vcl/source/gdi/graph.cxx; sourceTree = "<group>"; };
+		BE82BE1318228BD200A447B5 /* graphictools.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = graphictools.cxx; path = ../../vcl/source/gdi/graphictools.cxx; sourceTree = "<group>"; };
+		BE82BE1418228BD200A447B5 /* hatch.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = hatch.cxx; path = ../../vcl/source/gdi/hatch.cxx; sourceTree = "<group>"; };
+		BE82BE1518228BD200A447B5 /* image.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = image.cxx; path = ../../vcl/source/gdi/image.cxx; sourceTree = "<group>"; };
+		BE82BE1618228BD200A447B5 /* imagerepository.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = imagerepository.cxx; path = ../../vcl/source/gdi/imagerepository.cxx; sourceTree = "<group>"; };
+		BE82BE1718228BD200A447B5 /* impanmvw.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = impanmvw.cxx; path = ../../vcl/source/gdi/impanmvw.cxx; sourceTree = "<group>"; };
+		BE82BE1818228BD200A447B5 /* impanmvw.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = impanmvw.hxx; path = ../../vcl/source/gdi/impanmvw.hxx; sourceTree = "<group>"; };
+		BE82BE1918228BD200A447B5 /* impbmp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = impbmp.cxx; path = ../../vcl/source/gdi/impbmp.cxx; sourceTree = "<group>"; };
+		BE82BE1A18228BD200A447B5 /* impgraph.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = impgraph.cxx; path = ../../vcl/source/gdi/impgraph.cxx; sourceTree = "<group>"; };
+		BE82BE1B18228BD200A447B5 /* impimage.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = impimage.cxx; path = ../../vcl/source/gdi/impimage.cxx; sourceTree = "<group>"; };
+		BE82BE1C18228BD200A447B5 /* impimagetree.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = impimagetree.cxx; path = ../../vcl/source/gdi/impimagetree.cxx; sourceTree = "<group>"; };
+		BE82BE1D18228BD200A447B5 /* impvect.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = impvect.cxx; path = ../../vcl/source/gdi/impvect.cxx; sourceTree = "<group>"; };
+		BE82BE1E18228BD200A447B5 /* impvect.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = impvect.hxx; path = ../../vcl/source/gdi/impvect.hxx; sourceTree = "<group>"; };
+		BE82BE1F18228BD200A447B5 /* jobset.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jobset.cxx; path = ../../vcl/source/gdi/jobset.cxx; sourceTree = "<group>"; };
+		BE82BE2018228BD200A447B5 /* lineinfo.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = lineinfo.cxx; path = ../../vcl/source/gdi/lineinfo.cxx; sourceTree = "<group>"; };
+		BE82BE2118228BD200A447B5 /* mapmod.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = mapmod.cxx; path = ../../vcl/source/gdi/mapmod.cxx; sourceTree = "<group>"; };
+		BE82BE2218228BD200A447B5 /* metaact.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = metaact.cxx; path = ../../vcl/source/gdi/metaact.cxx; sourceTree = "<group>"; };
+		BE82BE2318228BD200A447B5 /* metric.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = metric.cxx; path = ../../vcl/source/gdi/metric.cxx; sourceTree = "<group>"; };
+		BE82BE2418228BD200A447B5 /* octree.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = octree.cxx; path = ../../vcl/source/gdi/octree.cxx; sourceTree = "<group>"; };
+		BE82BE2518228BD200A447B5 /* oldprintadaptor.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = oldprintadaptor.cxx; path = ../../vcl/source/gdi/oldprintadaptor.cxx; sourceTree = "<group>"; };
+		BE82BE2618228BD200A447B5 /* outdev.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = outdev.cxx; path = ../../vcl/source/gdi/outdev.cxx; sourceTree = "<group>"; };
+		BE82BE2718228BD200A447B5 /* outdev2.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = outdev2.cxx; path = ../../vcl/source/gdi/outdev2.cxx; sourceTree = "<group>"; };
+		BE82BE2818228BD200A447B5 /* outdev3.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = outdev3.cxx; path = ../../vcl/source/gdi/outdev3.cxx; sourceTree = "<group>"; };
+		BE82BE2918228BD200A447B5 /* outdev4.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = outdev4.cxx; path = ../../vcl/source/gdi/outdev4.cxx; sourceTree = "<group>"; };
+		BE82BE2A18228BD200A447B5 /* outdev5.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = outdev5.cxx; path = ../../vcl/source/gdi/outdev5.cxx; sourceTree = "<group>"; };
+		BE82BE2B18228BD200A447B5 /* outdev6.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = outdev6.cxx; path = ../../vcl/source/gdi/outdev6.cxx; sourceTree = "<group>"; };
+		BE82BE2C18228BD200A447B5 /* outdevnative.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = outdevnative.cxx; path = ../../vcl/source/gdi/outdevnative.cxx; sourceTree = "<group>"; };
+		BE82BE2D18228BD200A447B5 /* outmap.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = outmap.cxx; path = ../../vcl/source/gdi/outmap.cxx; sourceTree = "<group>"; };
+		BE82BE2E18228BD200A447B5 /* pdfextoutdevdata.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = pdfextoutdevdata.cxx; path = ../../vcl/source/gdi/pdfextoutdevdata.cxx; sourceTree = "<group>"; };
+		BE82BE2F18228BD200A447B5 /* pdffontcache.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = pdffontcache.cxx; path = ../../vcl/source/gdi/pdffontcache.cxx; sourceTree = "<group>"; };

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list