[Libreoffice-commits] core.git: 2 commits - ios/MobileLibreOffice ios/shared

Ptyl Dragon ptyl at cloudon.com
Thu Oct 17 08:03:08 PDT 2013


 ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj                                            |   70 ++++
 ios/shared/ios_sharedlo.xcodeproj/project.pbxproj                                                            |  124 +++++++
 ios/shared/ios_sharedlo/objective_c/MLOManager.h                                                             |    6 
 ios/shared/ios_sharedlo/objective_c/MLOManager.m                                                             |   17 -
 ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m                                              |    2 
 ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureLimiter.m                                             |    2 
 ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m                                            |   10 
 ios/shared/ios_sharedlo/objective_c/render/MLORenderBuffer.m                                                 |   77 ++--
 ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.h                                                |    2 
 ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.m                                                |   65 ++--
 ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h                                                        |    5 
 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m                                 |  157 ++--------
 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Friend.h                          |   18 +
 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Impl.h                            |   18 -
 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Private.h                         |   22 +
 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.m                               |    2 
 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.h                                   |   16 +
 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.m                                   |   13 
 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.h                                |   14 
 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.m                                |   35 ++
 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.h                                  |   13 
 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.m                                  |  107 ++++++
 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleProtocol.h                               |   21 +
 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.h                             |   13 
 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.m                             |   70 ++++
 ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.m                              |    2 
 ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.m                                |    2 
 ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.m                          |    2 
 ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.m                  |    2 
 ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.m                  |    2 
 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  |   31 +
 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.h    |   14 
 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m    |   32 ++
 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewControllerProtocol.h |   16 +
 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.h     |   15 
 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.m     |   14 
 ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.m                                     |    2 
 ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.m                      |    2 
 39 files changed, 810 insertions(+), 239 deletions(-)

New commits:
commit 76a9ae801bcc252947da991e9bf6dc3ebfde5ebf
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Thu Oct 17 17:01:35 2013 +0200

    added for infrastructure for ios tile testing app
    
    Change-Id: Ie8ac64769c01c5e967a56844a69747ef4d4f20af

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Friend.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Friend.h
new file mode 100644
index 0000000..fbb5af8
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Friend.h
@@ -0,0 +1,18 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOMainViewController.h"
+
+static const CGFloat TOP_BAR_HEIGHT =40.0f;
+
+ at class MLOGestureEngine,MLORenderManager;
+ at interface MLOMainViewController ()
+ at property MLOGestureEngine * gestureEngine;
+ at property MLORenderManager * renderManager;
+-(void) toggleExpand;
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Private.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Private.h
new file mode 100644
index 0000000..dceb410
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Private.h
@@ -0,0 +1,22 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOMainViewController_Friend.h"
+
+ at class MLOAppRoleBase,MLOToolbarButton,MLOTopbarViewController,MLOToolbarViewController;
+ at interface MLOMainViewController ()
+ at property BOOL focused;
+ at property CGFloat topBarHeight;
+ at property UIView * flasher;
+ at property MLOTopbarViewController * topbar;
+ at property MLOToolbarViewController * toolbar;
+ at property MLOAppRoleBase * role;
+
+-(void)resize;
+-(void)resetSubviews;
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.h
new file mode 100644
index 0000000..7475f48
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.h
@@ -0,0 +1,16 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOViewController.h"
+#import "MLOAppRoleProtocol.h"
+ at class MLOMainViewController,MLOAppRoleBase;
+ at interface MLOAppRoleBase : MLOViewController<MLOAppRoleProtocol>
+
+ at property MLOMainViewController * mainViewController;
+
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.m
new file mode 100644
index 0000000..e46c46e
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.m
@@ -0,0 +1,13 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOAppRoleBase.h"
+
+ at implementation MLOAppRoleBase
+
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.h
new file mode 100644
index 0000000..2fed97f
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.h
@@ -0,0 +1,14 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOObject.h"
+
+ at class MLOAppRoleBase,MLOMainViewController;
+ at interface MLOAppRoleFactory : MLOObject
++(MLOAppRoleBase *) getInstanceWithMainViewController:(MLOMainViewController *) mainViewController;
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.m
new file mode 100644
index 0000000..3594ecf
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.m
@@ -0,0 +1,35 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOAppRoleFactory.h"
+#import "MLOAppRoleLoApp.h"
+#import "MLOAppRoleTileTester.h"
+#import "MLOMainViewController.h"
+
+ at implementation MLOAppRoleFactory
+
++(MLOAppRoleBase *) getInstanceWithMainViewController:(MLOMainViewController *) mainViewController{
+    MLOAppRoleBase * role;
+
+    switch (APP_ROLE) {
+        case LO_APP:
+        {
+            role = [MLOAppRoleLoApp new];
+            break;
+        }
+        case TILE_TESTER:
+        {
+            role=  [MLOAppRoleTileTester new];
+            break;
+        }
+    }
+    role.mainViewController = mainViewController;
+    return role;
+}
+
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.h
new file mode 100644
index 0000000..99d6d13
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.h
@@ -0,0 +1,13 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOAppRoleBase.h"
+
+ at interface MLOAppRoleLoApp : MLOAppRoleBase
+
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.m
new file mode 100644
index 0000000..12a1910
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.m
@@ -0,0 +1,107 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOAppRoleLoApp.h"
+#import "MLOMainViewController_Private.h"
+#import "MLORenderManager.h"
+#import "MLOGestureEngine.h"
+#import "MLOToolbarViewController.h"
+#import "MLOSelectionViewController.h"
+#import "MLOScrollerViewController.h"
+#import "MLOTopbarViewController.h"
+#import "MLOKeyboardManager.h"
+
+static const NSTimeInterval ROTATE_FLASH_DURATION=0.5f;
+
+ at implementation MLOAppRoleLoApp
+
+-(void)initSubviews{
+    MLOMainViewController * main = [self mainViewController];
+    main.scroller = [[MLOScrollerViewController alloc] initWithMainViewController:main];
+    main.selection = [[MLOSelectionViewController alloc] initWithMainViewController: main];
+    main.toolbar = [[MLOToolbarViewController alloc] initWithMainViewController:main];
+    main.keyboard = [[MLOKeyboardManager alloc]initWithMainViewController:main];
+    main.flasher =[[UIView alloc] initWithFrame:CGRECT_ZERO];
+    main.flasher.alpha = 0.0f;
+    main.flasher.backgroundColor = [UIColor whiteColor];
+    main.gestureEngine = nil;
+}
+
+-(void)setWidth:(CGFloat) width height:(CGFloat) height{
+
+    [[self mainViewController].renderManager setWidth:width  height:height];
+}
+
+-(void)addSubviews{
+
+    MLOMainViewController * main = [self mainViewController];
+    main.renderManager = [MLORenderManager getInstance];
+
+    [main resize];
+
+    [main.canvas addSubview: main.renderManager.view];
+
+    main.gestureEngine = [[MLOGestureEngine alloc] initWithMainViewController:main];
+    [main.toolbar addToMainViewController];
+    [main.scroller addToMainViewController];
+    [main.selection addToMainViewController];
+    [main.keyboard addToMainViewController];
+}
+
+-(void)rotate{
+
+    MLOMainViewController * main = self.mainViewController;
+    
+    NSLog(@"MLO rotate");
+
+    main.renderManager.view.alpha= 0.0f;
+
+    [main resize];
+
+    [main.gestureEngine onRotate];
+
+    [main.topbar onRotate];
+
+    [main.scroller reset];
+
+    [main.scroller showLibreOffice];
+
+    [main.selection onRotate];
+
+    [main.toolbar onRotate];
+
+    [UIView animateWithDuration:ROTATE_FLASH_DURATION animations:^(void){
+        main.renderManager.view.alpha=1.0f;
+    }];
+}
+
+
+-(void)showLibreOffice{
+
+    [self.mainViewController.toolbar showLibreOffice];
+}
+
+-(void)hideLibreOffice{
+    MLOMainViewController * main = self.mainViewController;
+    
+    [main.toolbar hideLibreOffice];
+    [main resetSubviews];
+    [main.gestureEngine hideLibreOffice];
+    [main.scroller hideLibreOffice];
+    [main.selection reset];
+    [main.keyboard hide];
+}
+
+-(void)initWindow:(UIWindow *) window{
+    MLOMainViewController * main = self.mainViewController;
+    [main.renderManager setWidth:main.view.frame.size.width height:main.view.frame.size.height];
+
+    [main.gestureEngine showLibreOffice:window];
+}
+
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleProtocol.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleProtocol.h
new file mode 100644
index 0000000..d44435e
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleProtocol.h
@@ -0,0 +1,21 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import <Foundation/Foundation.h>
+
+ at protocol MLOAppRoleProtocol <NSObject>
+
+ at optional
+-(void)initSubviews;
+-(void)setWidth:(CGFloat) width height:(CGFloat) height;
+-(void)addSubviews;
+-(void)rotate;
+-(void)initWindow:(UIWindow *) window;
+-(void)showLibreOffice;
+-(void)hideLibreOffice;
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.h
new file mode 100644
index 0000000..1d0a498
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.h
@@ -0,0 +1,13 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOAppRoleBase.h"
+
+ at interface MLOAppRoleTileTester : MLOAppRoleBase
+
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.m
new file mode 100644
index 0000000..0486331
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.m
@@ -0,0 +1,70 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOAppRoleTileTester.h"
+#import "MLOMainViewController_Private.h"
+#import "MLOTopbarViewController.h"
+#import "MLOTestingTileRendererViewController.h"
+#import "MLOTestingTileParametersViewController.h"
+
+ at interface MLOAppRoleTileTester ()
+ at property MLOTestingTileRendererViewController * renderer;
+ at property MLOTestingTileParametersViewController * params;
+ at end
+
+ at implementation MLOAppRoleTileTester
+
+-(void)initSubviews{
+    
+    self.renderer = [[MLOTestingTileRendererViewController alloc] initWithTester:self];
+    self.params = [[MLOTestingTileParametersViewController alloc] initWithTester:self];
+    
+}
+
+
+-(void)setWidth:(CGFloat) width height:(CGFloat) height{
+    if(width > height){
+        CGFloat halfWidth = width/2.0f;
+        self.renderer.view.frame =CGRectMake(0, 0, halfWidth, height);
+        self.params.view.frame =CGRectMake(halfWidth,0, halfWidth, height);
+    }else{
+        CGFloat halfHeight = height/2.0f;
+        self.renderer.view.frame =CGRectMake(0, 0, width, halfHeight);
+        self.params.view.frame =CGRectMake(width,halfHeight, width, halfHeight);
+    }
+    [self.renderer resize];
+    [self.params resize];
+}
+-(void)addSubviews{
+
+    [self.renderer addToMainViewController];
+    [self.params addToMainViewController];
+
+    [self.mainViewController resize];
+}
+
+-(void)rotate{
+
+    MLOMainViewController * main = [self mainViewController];
+    
+    [main resize];
+
+    [main.topbar onRotate];
+}
+
+
+-(void)showLibreOffice{
+
+}
+-(void)hideLibreOffice{
+}
+
+-(void)initWindow:(UIWindow *) window{
+
+}
+ at 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
new file mode 100644
index 0000000..c5f536a
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
@@ -0,0 +1,14 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOViewController.h"
+#import "MLOTestingTileSubviewControllerProtocol.h"
+
+ at interface MLOTestingTileParametersViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol>
+
+ at 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
new file mode 100644
index 0000000..4c3626a
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
@@ -0,0 +1,31 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOTestingTileParametersViewController.h"
+
+ at interface MLOTestingTileParametersViewController ()
+ at property MLOAppRoleTileTester * tester;
+ at end
+
+ at implementation MLOTestingTileParametersViewController
+
+-(id)initWithTester:(MLOAppRoleTileTester *)tester{
+    self = [self init];
+    if(self){
+        self.tester = tester;
+
+    }
+    return self;
+}
+-(void)resize{
+
+}
+-(void)addToMainViewController{
+
+}
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.h
new file mode 100644
index 0000000..e2e0215
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.h
@@ -0,0 +1,14 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOViewController.h"
+#import "MLOTestingTileSubviewControllerProtocol.h"
+
+ at interface MLOTestingTileRendererViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol>
+
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m
new file mode 100644
index 0000000..daeb811
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m
@@ -0,0 +1,32 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import "MLOTestingTileRendererViewController.h"
+#import "MLOAppRoleTileTester.h"
+
+ at interface MLOTestingTileRendererViewController ()
+ at property MLOAppRoleTileTester * tester;
+ at end
+
+ at implementation MLOTestingTileRendererViewController
+
+-(id)initWithTester:(MLOAppRoleTileTester *)tester{
+    self = [self init];
+    if(self){
+        self.tester = tester;
+
+    }
+    return self;
+}
+-(void)resize{
+    
+}
+-(void)addToMainViewController{
+
+}
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewControllerProtocol.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewControllerProtocol.h
new file mode 100644
index 0000000..b8bc3f3
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewControllerProtocol.h
@@ -0,0 +1,16 @@
+// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import <Foundation/Foundation.h>
+
+ at class MLOAppRoleTileTester;
+ at protocol MLOTestingTileSubviewControllerProtocol <NSObject>
+-(id)initWithTester:(MLOAppRoleTileTester *)tester;
+-(void)addToMainViewController;
+-(void)resize;
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.h
new file mode 100644
index 0000000..6631fcb
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.h
@@ -0,0 +1,15 @@
+//
+//  MLOTestingTileSubviewViewController.h
+//  ios_sharedlo
+//
+//  Created by ptyl on 10/17/13.
+//  Copyright (c) 2013 LibreOffice.org. All rights reserved.
+//
+
+#import "MLOViewController.h"
+
+ at class MLOAppRoleTileTester;
+ at interface MLOTestingTileSubviewViewController : MLOViewController
+ at property MLOAppRoleTileTester * tester;
+
+ at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.m
new file mode 100644
index 0000000..070bfed
--- /dev/null
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.m
@@ -0,0 +1,14 @@
+//
+//  MLOTestingTileSubviewViewController.m
+//  ios_sharedlo
+//
+//  Created by ptyl on 10/17/13.
+//  Copyright (c) 2013 LibreOffice.org. All rights reserved.
+//
+
+#import "MLOTestingTileSubviewViewController.h"
+
+ at implementation MLOTestingTileSubviewViewController
+
+
+ at end
commit ae549ad1e66283b641e27c3a3743b468b9ff1c43
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Thu Oct 17 17:00:02 2013 +0200

    infrastructure for ios tile testing app
    
    Change-Id: I1a3d10b7fb61b19664b383d29c6e607c01b90a71

diff --git a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
index 2001342..c1277b5 100644
--- a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
+++ b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
@@ -1526,7 +1526,7 @@
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"DEBUG=1",
-					"$(inherited)",
+					"MLO_APP_ROLE=LO_APP",
 				);
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -1567,6 +1567,7 @@
 				GCC_C_LANGUAGE_STANDARD = gnu99;
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_INPUT_FILETYPE = automatic;
+				GCC_PREPROCESSOR_DEFINITIONS = "MLO_APP_ROLE=LO_APP";
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
@@ -1629,6 +1630,71 @@
 			};
 			name = Release;
 		};
+		88A1330F181023A40091F25E /* Debug_tile_tester */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 688EAAE8180D3130003741B3 /* lo.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = armv7;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				CLANG_X86_VECTOR_INSTRUCTIONS = default;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_INPUT_FILETYPE = automatic;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"MLO_APP_ROLE=TILE_TESTER",
+					"DEBUG=1",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					../shared/ios_sharedlo/objective_c,
+					../shared/ios_sharedlo/objective_c/utils,
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 6.1;
+				LIBRARY_SEARCH_PATHS = "";
+				LLVM_LTO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_LDFLAGS = "";
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALID_ARCHS = armv7;
+			};
+			name = Debug_tile_tester;
+		};
+		88A13310181023A40091F25E /* Debug_tile_tester */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "MobileLibreOffice/MobileLibreOffice-Prefix.pch";
+				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+				HEADER_SEARCH_PATHS = "$(inherited)";
+				INFOPLIST_FILE = "MobileLibreOffice/MobileLibreOffice-Info.plist";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					lib_link,
+				);
+				LLVM_LTO = NO;
+				OTHER_LDFLAGS = "-ObjC";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug_tile_tester;
+		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -1636,6 +1702,7 @@
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				689EBB0B18069FB8002F1CD7 /* Debug */,
+				88A1330F181023A40091F25E /* Debug_tile_tester */,
 				689EBB0C18069FB8002F1CD7 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
@@ -1645,6 +1712,7 @@
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				689EBB0E18069FB8002F1CD7 /* Debug */,
+				88A13310181023A40091F25E /* Debug_tile_tester */,
 				689EBB0F18069FB8002F1CD7 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
diff --git a/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj b/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj
index 9c5d25a..c2f093f 100644
--- a/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj
+++ b/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj
@@ -45,6 +45,12 @@
 		689EBBA31806D22D002F1CD7 /* MLOToolbarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 689EBB851806D22D002F1CD7 /* MLOToolbarViewController.m */; };
 		68FDBE2E18053A140064DD74 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68FDBE2D18053A140064DD74 /* Foundation.framework */; };
 		68FDBE3518053A140064DD74 /* ios_sharedlo.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FDBE3418053A140064DD74 /* ios_sharedlo.m */; };
+		889B7929180FF928005A3149 /* MLOAppRoleLoApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 889B7928180FF928005A3149 /* MLOAppRoleLoApp.m */; };
+		889B792C180FF967005A3149 /* MLOAppRoleTileTester.m in Sources */ = {isa = PBXBuildFile; fileRef = 889B792B180FF967005A3149 /* MLOAppRoleTileTester.m */; };
+		889B7930180FFBA5005A3149 /* MLOAppRoleBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 889B792F180FFBA5005A3149 /* MLOAppRoleBase.m */; };
+		88A132FC181020320091F25E /* MLOTestingTileRendererViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A132FB181020320091F25E /* MLOTestingTileRendererViewController.m */; };
+		88A132FF1810204E0091F25E /* MLOTestingTileParametersViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A132FE1810204E0091F25E /* MLOTestingTileParametersViewController.m */; };
+		88A1330B1810213F0091F25E /* MLOAppRoleFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A1330A1810213E0091F25E /* MLOAppRoleFactory.m */; };
 		88A2ED23180D4D7C009F39C0 /* MLOKeyboardManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A2ED22180D4D7C009F39C0 /* MLOKeyboardManager.m */; };
 /* End PBXBuildFile section */
 
@@ -110,7 +116,7 @@
 		689EBB621806D22C002F1CD7 /* NSObject+MLOUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+MLOUtils.m"; sourceTree = "<group>"; };
 		689EBB641806D22C002F1CD7 /* MLOMainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOMainViewController.h; sourceTree = "<group>"; };
 		689EBB651806D22C002F1CD7 /* MLOMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLOMainViewController.m; sourceTree = "<group>"; };
-		689EBB661806D22C002F1CD7 /* MLOMainViewController_Impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOMainViewController_Impl.h; sourceTree = "<group>"; };
+		689EBB661806D22C002F1CD7 /* MLOMainViewController_Friend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOMainViewController_Friend.h; sourceTree = "<group>"; };
 		689EBB681806D22C002F1CD7 /* MLOTopbarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOTopbarViewController.h; sourceTree = "<group>"; };
 		689EBB691806D22C002F1CD7 /* MLOTopbarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLOTopbarViewController.m; sourceTree = "<group>"; };
 		689EBB6B1806D22C002F1CD7 /* MLOScrollerData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOScrollerData.h; sourceTree = "<group>"; };
@@ -143,6 +149,21 @@
 		68FDBE3118053A140064DD74 /* ios_sharedlo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ios_sharedlo-Prefix.pch"; sourceTree = "<group>"; };
 		68FDBE3218053A140064DD74 /* ios_sharedlo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ios_sharedlo.h; path = ../ios_sharedlo.h; sourceTree = "<group>"; };
 		68FDBE3418053A140064DD74 /* ios_sharedlo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ios_sharedlo.m; path = ../ios_sharedlo.m; sourceTree = "<group>"; };
+		889B7927180FF928005A3149 /* MLOAppRoleLoApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOAppRoleLoApp.h; path = role/MLOAppRoleLoApp.h; sourceTree = "<group>"; };
+		889B7928180FF928005A3149 /* MLOAppRoleLoApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOAppRoleLoApp.m; path = role/MLOAppRoleLoApp.m; sourceTree = "<group>"; };
+		889B792A180FF967005A3149 /* MLOAppRoleTileTester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOAppRoleTileTester.h; path = role/MLOAppRoleTileTester.h; sourceTree = "<group>"; };
+		889B792B180FF967005A3149 /* MLOAppRoleTileTester.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOAppRoleTileTester.m; path = role/MLOAppRoleTileTester.m; sourceTree = "<group>"; };
+		889B792D180FF9E2005A3149 /* MLOMainViewController_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MLOMainViewController_Private.h; sourceTree = "<group>"; };
+		889B792E180FFBA5005A3149 /* MLOAppRoleBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOAppRoleBase.h; path = role/MLOAppRoleBase.h; sourceTree = "<group>"; };
+		889B792F180FFBA5005A3149 /* MLOAppRoleBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOAppRoleBase.m; path = role/MLOAppRoleBase.m; sourceTree = "<group>"; };
+		889B793618101709005A3149 /* MLOAppRoleProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MLOAppRoleProtocol.h; path = role/MLOAppRoleProtocol.h; sourceTree = "<group>"; };
+		88A132FA181020320091F25E /* MLOTestingTileRendererViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOTestingTileRendererViewController.h; path = testing_tiles/MLOTestingTileRendererViewController.h; sourceTree = "<group>"; };
+		88A132FB181020320091F25E /* MLOTestingTileRendererViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOTestingTileRendererViewController.m; path = testing_tiles/MLOTestingTileRendererViewController.m; sourceTree = "<group>"; };
+		88A132FD1810204E0091F25E /* MLOTestingTileParametersViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOTestingTileParametersViewController.h; path = testing_tiles/MLOTestingTileParametersViewController.h; sourceTree = "<group>"; };
+		88A132FE1810204E0091F25E /* MLOTestingTileParametersViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOTestingTileParametersViewController.m; path = testing_tiles/MLOTestingTileParametersViewController.m; sourceTree = "<group>"; };
+		88A13300181020E40091F25E /* MLOTestingTileSubviewControllerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MLOTestingTileSubviewControllerProtocol.h; path = testing_tiles/MLOTestingTileSubviewControllerProtocol.h; sourceTree = "<group>"; };
+		88A133091810213E0091F25E /* MLOAppRoleFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOAppRoleFactory.h; path = role/MLOAppRoleFactory.h; sourceTree = "<group>"; };
+		88A1330A1810213E0091F25E /* MLOAppRoleFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOAppRoleFactory.m; path = role/MLOAppRoleFactory.m; sourceTree = "<group>"; };
 		88A2ED21180D4D7C009F39C0 /* MLOKeyboardManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOKeyboardManager.h; sourceTree = "<group>"; };
 		88A2ED22180D4D7C009F39C0 /* MLOKeyboardManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLOKeyboardManager.m; sourceTree = "<group>"; };
 		88E94760180D4E9800771808 /* MLOToolbarViewController_Impl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MLOToolbarViewController_Impl.h; sourceTree = "<group>"; };
@@ -257,9 +278,12 @@
 		689EBB631806D22C002F1CD7 /* view_controllers */ = {
 			isa = PBXGroup;
 			children = (
+				889B7926180FF8DF005A3149 /* role */,
+				889EBEC0180F04A300A34A68 /* testing_tiles */,
 				689EBB641806D22C002F1CD7 /* MLOMainViewController.h */,
+				689EBB661806D22C002F1CD7 /* MLOMainViewController_Friend.h */,
+				889B792D180FF9E2005A3149 /* MLOMainViewController_Private.h */,
 				689EBB651806D22C002F1CD7 /* MLOMainViewController.m */,
-				689EBB661806D22C002F1CD7 /* MLOMainViewController_Impl.h */,
 				689EBB681806D22C002F1CD7 /* MLOTopbarViewController.h */,
 				689EBB691806D22C002F1CD7 /* MLOTopbarViewController.m */,
 				689EBB6A1806D22C002F1CD7 /* scroller */,
@@ -360,6 +384,34 @@
 			name = "Supporting Files";
 			sourceTree = "<group>";
 		};
+		889B7926180FF8DF005A3149 /* role */ = {
+			isa = PBXGroup;
+			children = (
+				889B7927180FF928005A3149 /* MLOAppRoleLoApp.h */,
+				889B7928180FF928005A3149 /* MLOAppRoleLoApp.m */,
+				889B792A180FF967005A3149 /* MLOAppRoleTileTester.h */,
+				889B792B180FF967005A3149 /* MLOAppRoleTileTester.m */,
+				889B792E180FFBA5005A3149 /* MLOAppRoleBase.h */,
+				889B792F180FFBA5005A3149 /* MLOAppRoleBase.m */,
+				88A133091810213E0091F25E /* MLOAppRoleFactory.h */,
+				88A1330A1810213E0091F25E /* MLOAppRoleFactory.m */,
+				889B793618101709005A3149 /* MLOAppRoleProtocol.h */,
+			);
+			name = role;
+			sourceTree = "<group>";
+		};
+		889EBEC0180F04A300A34A68 /* testing_tiles */ = {
+			isa = PBXGroup;
+			children = (
+				88A132FA181020320091F25E /* MLOTestingTileRendererViewController.h */,
+				88A132FB181020320091F25E /* MLOTestingTileRendererViewController.m */,
+				88A132FD1810204E0091F25E /* MLOTestingTileParametersViewController.h */,
+				88A132FE1810204E0091F25E /* MLOTestingTileParametersViewController.m */,
+				88A13300181020E40091F25E /* MLOTestingTileSubviewControllerProtocol.h */,
+			);
+			name = testing_tiles;
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -446,6 +498,12 @@
 				689EBBA21806D22D002F1CD7 /* MLOToolbarButton.m in Sources */,
 				689EBBA31806D22D002F1CD7 /* MLOToolbarViewController.m in Sources */,
 				88A2ED23180D4D7C009F39C0 /* MLOKeyboardManager.m in Sources */,
+				889B7929180FF928005A3149 /* MLOAppRoleLoApp.m in Sources */,
+				889B792C180FF967005A3149 /* MLOAppRoleTileTester.m in Sources */,
+				889B7930180FFBA5005A3149 /* MLOAppRoleBase.m in Sources */,
+				88A132FC181020320091F25E /* MLOTestingTileRendererViewController.m in Sources */,
+				88A132FF1810204E0091F25E /* MLOTestingTileParametersViewController.m in Sources */,
+				88A1330B1810213F0091F25E /* MLOAppRoleFactory.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -470,8 +528,8 @@
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PREPROCESSOR_DEFINITIONS = (
+					"MLO_APP_ROLE=LO_APP",
 					"DEBUG=1",
-					"$(inherited)",
 				);
 				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -508,6 +566,7 @@
 				COPY_PHASE_STRIP = YES;
 				GCC_C_LANGUAGE_STANDARD = gnu99;
 				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_PREPROCESSOR_DEFINITIONS = "MLO_APP_ROLE=LO_APP";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -560,6 +619,63 @@
 			};
 			name = Release;
 		};
+		88A1331218102A8F0091F25E /* Debug_tile_tester */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 689EBADD1806975D002F1CD7 /* lo.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = armv7;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"MLO_APP_ROLE=TILE_TESTER",
+					"DEBUG=1",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(LO_BUILDDIR)/config_host",
+					"$(LO_SRCDIR)/include",
+					"$(LO_WORKDIR)/UnoApiHeadersTarget/udkapi/comprehensive",
+					"$(LO_WORKDIR)/UnoApiHeadersTarget/offapi/comprehensive",
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 6.1;
+				LD_NO_PIE = NO;
+				LINK_WITH_STANDARD_LIBRARIES = NO;
+				LLVM_LTO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+			};
+			name = Debug_tile_tester;
+		};
+		88A1331318102A8F0091F25E /* Debug_tile_tester */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				DSTROOT = /tmp/ios_sharedlo.dst;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ios_sharedlo/ios_sharedlo-Prefix.pch";
+				LD_NO_PIE = NO;
+				LINK_WITH_STANDARD_LIBRARIES = NO;
+				OTHER_LDFLAGS = "-ObjC";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				VALID_ARCHS = armv7;
+			};
+			name = Debug_tile_tester;
+		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -567,6 +683,7 @@
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				68FDBE3618053A140064DD74 /* Debug */,
+				88A1331218102A8F0091F25E /* Debug_tile_tester */,
 				68FDBE3718053A140064DD74 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
@@ -576,6 +693,7 @@
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				68FDBE3918053A140064DD74 /* Debug */,
+				88A1331318102A8F0091F25E /* Debug_tile_tester */,
 				68FDBE3A18053A140064DD74 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
diff --git a/ios/shared/ios_sharedlo/objective_c/MLOManager.h b/ios/shared/ios_sharedlo/objective_c/MLOManager.h
index 04df677..fbdc96f 100644
--- a/ios/shared/ios_sharedlo/objective_c/MLOManager.h
+++ b/ios/shared/ios_sharedlo/objective_c/MLOManager.h
@@ -10,12 +10,11 @@
 #import "MLOInvoker.h"
 
 @class MLOMainViewController;
- at interface MLOManager : UIResponder <UIApplicationDelegate,UITextViewDelegate>
- at property (strong,nonatomic) MLOMainViewController * mainViewController;
+ at interface MLOManager : UIResponder <UIApplicationDelegate>
+ at property MLOMainViewController * mainViewController;
 
 +(MLOManager *) getInstance;
 
--(BOOL) textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
 -(void)openInLibreOfficeFilePath:(NSString *) filePath fileNameWithExtension:(NSString *) fileName superView:(UIView *) superview window:(UIWindow *) window invoker:(NSObject<MLOInvoker> *) invoker;
 -(void)openInLibreOfficeFilePath:(NSString *) filePath superView:(UIView *) superview window:(UIWindow *) window invoker:(NSObject<MLOInvoker> *) invoker;
 -(void) hideLibreOffice;
@@ -23,5 +22,4 @@
 -(NSString *)extension;
 -(CGRect)bounds;
 -(void)start;
-
 @end
diff --git a/ios/shared/ios_sharedlo/objective_c/MLOManager.m b/ios/shared/ios_sharedlo/objective_c/MLOManager.m
index a422731..e9d4b5f 100644
--- a/ios/shared/ios_sharedlo/objective_c/MLOManager.m
+++ b/ios/shared/ios_sharedlo/objective_c/MLOManager.m
@@ -136,23 +136,6 @@ static const NSTimeInterval FADE_IN_DURATION = 0.3;
     }
 }
 
-
-- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
-{
-    NSLog(@"textView: %@ shouldChangeTextInRange:[%u,%u] replacementText:%@", textView, range.location, range.length, text);
-    
-    int length =[text length];
-    
-    for (NSUInteger i = 0; i < length; i++){
-        
-        touch_lo_keyboard_input([text characterAtIndex: i]);
-    }
-    if(length>0){
-        [self.mainViewController onTextEdit];
-    }
-    
-    return NO;
-}
 -(void) hideLibreOffice{
     
     [self.invoker willHideLibreOffice];
diff --git a/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m b/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m
index ea81427..85ed9cf 100644
--- a/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m
+++ b/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m
@@ -7,7 +7,7 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #import "MLOAnimation.h"
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLORenderManager_Impl.h"
 #import "MLOSelectionViewController.h"
 #import "MLOScrollerViewController.h"
diff --git a/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureLimiter.m b/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureLimiter.m
index 9b94ad7..d72c5ff 100644
--- a/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureLimiter.m
+++ b/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureLimiter.m
@@ -8,7 +8,7 @@
 
 #import "MLOGestureLimiter.h"
 #import "MLOGestureEngine_Impl.h"
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLOScrollerData.h"
 #import "MLOScrollerViewController.h"
 #import "MLORenderManager_Impl.h"
diff --git a/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m b/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m
index c9c0b7a..bbc81d7 100644
--- a/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m
+++ b/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m
@@ -7,7 +7,7 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #import "MLOKeyboardManager.h"
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLOManager.h"
 #import "MLOGestureEngine_Impl.h"
 #include <touch/touch.h>
@@ -64,10 +64,16 @@
 -(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
 {
     NSLog(@"textView: %@ shouldChangeTextInRange:[%u,%u] replacementText:%@", textView, range.location, range.length, text);
+
+    NSInteger length = [text length];
     
-    for (NSUInteger i = 0; i < [text length]; i++){
+    for (NSUInteger i = 0; i < length; i++){
         touch_lo_keyboard_input([text characterAtIndex: i]);
     }
+
+    if(length>0){
+        [self.mainViewController onTextEdit];
+    }
     return NO;
 }
 
diff --git a/ios/shared/ios_sharedlo/objective_c/render/MLORenderBuffer.m b/ios/shared/ios_sharedlo/objective_c/render/MLORenderBuffer.m
index a06f91d..f598220 100644
--- a/ios/shared/ios_sharedlo/objective_c/render/MLORenderBuffer.m
+++ b/ios/shared/ios_sharedlo/objective_c/render/MLORenderBuffer.m
@@ -53,45 +53,46 @@ static CGFloat averageFps,maxFps;
 
 - (void)drawRect:(CGRect)rect
 {
+    if(ENABLE_LO_DESKTOP){
+        CGContextRef context = UIGraphicsGetCurrentContext();
+       
+        //rect = self.frame;
+        LOG_RECT(rect, @"drawRect");
+        
+        CGContextSaveGState(context);
+        CGContextSetFillColorWithColor(context,[UIColor whiteColor].CGColor);
+        CGContextTranslateCTM(context, 0, _manager.bufferFrame.size.height);
+        CGContextScaleCTM(context, 1, -1);
+        CGContextScaleCTM(context, 1, 1);
+        NSDate *startDate = [NSDate date];
+        
+        [_manager loRenderWillBegin];
+        
+        touch_lo_render_windows(context, rect.origin.y, rect.origin.y, rect.size.width, rect.size.height);
 
-    CGContextRef context = UIGraphicsGetCurrentContext();
-   
-    //rect = self.frame;
-    LOG_RECT(rect, @"drawRect");
-    
-    CGContextSaveGState(context);
-    CGContextSetFillColorWithColor(context,[UIColor whiteColor].CGColor);
-    CGContextTranslateCTM(context, 0, _manager.bufferFrame.size.height);
-    CGContextScaleCTM(context, 1, -1);
-    CGContextScaleCTM(context, 1, 1);
-    NSDate *startDate = [NSDate date];
-    
-    [_manager loRenderWillBegin];
-    
-    touch_lo_render_windows(context, rect.origin.y, rect.origin.y, rect.size.width, rect.size.height);
-
-    CGContextRestoreGState(context);
-    
-    CGFloat duration =  [[NSDate date] timeIntervalSinceDate: startDate];
-    
-    maxFps = max(maxFps,1.0f/duration);
-    
-    static float totalTime = 0,counter = 0;
-    
-    totalTime +=duration;
-    counter++;
-    
-    CGFloat averageTime = totalTime / counter;
-    if(averageTime >MIN_AVERAGE_RENDER_TIME_THRESHOLD){
-        averageFps = 1.0f/ averageTime;
-    }
-    
-    if(LOG_DRAW_RECT){
-        NSLog(@"drawRect: lo_render_windows: time=%f sec, average=%f sec, fps=%f",
-              duration, averageTime, averageFps);
-    }
-    if(_manager.currentGesture != PINCH){
-        [_manager swapPreviousBuffer:_previous withNextBuffer:self];
+        CGContextRestoreGState(context);
+        
+        CGFloat duration =  [[NSDate date] timeIntervalSinceDate: startDate];
+        
+        maxFps = max(maxFps,1.0f/duration);
+        
+        static float totalTime = 0,counter = 0;
+        
+        totalTime +=duration;
+        counter++;
+        
+        CGFloat averageTime = totalTime / counter;
+        if(averageTime >MIN_AVERAGE_RENDER_TIME_THRESHOLD){
+            averageFps = 1.0f/ averageTime;
+        }
+        
+        if(LOG_DRAW_RECT){
+            NSLog(@"drawRect: lo_render_windows: time=%f sec, average=%f sec, fps=%f",
+                  duration, averageTime, averageFps);
+        }
+        if(_manager.currentGesture != PINCH){
+            [_manager swapPreviousBuffer:_previous withNextBuffer:self];
+        }
     }
 }
 
diff --git a/ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.h b/ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.h
index 75eb67e..8683001 100644
--- a/ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.h
+++ b/ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.h
@@ -22,7 +22,7 @@ static const BOOL ENABLE_PINCH_RENDERING_VIA_IOS = YES;
 -(void) panDeltaX:(CGFloat) deltaX deltaY:(CGFloat) deltaY;
 -(void) pinchDeltaX:(CGFloat)deltaX deltaY:(CGFloat)deltaY scale:(CGFloat)scale;
 -(void) endGestures;
--(void)setWidth:(NSInteger) width height:(NSInteger) height;
+-(void) setWidth:(NSInteger) width height:(NSInteger) height;
 -(void) renderInContext:(CGContextRef) context;
 -(CGPoint) getShiftFromCanvasCenter;
 -(void)renderNow;
diff --git a/ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.m b/ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.m
index 9c428b2..8deca8c 100644
--- a/ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.m
+++ b/ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.m
@@ -249,42 +249,45 @@ typedef enum {X,Y,Z} MLOGestureDirection;
 }
 
 -(void) renderWithRect:(CGRect) rect{
+
+    if(ENABLE_LO_DESKTOP){
     
-    switch(self.currentGesture){
-        case PAN:
-            {
-                NSTimeInterval now = CACurrentMediaTime();
-                
-                NSTimeInterval delta =  LO_RENDER_BACKOFF_MIN +
-                                        LO_RENDER_BACK_OFF_MAX_DELTA * [self currentZoomRatio];
-                
-                NSTimeInterval releaseTime = now + delta;
-                
-                NSTimeInterval currentReleaseTime = self.renderBlockReleaseTime;
-                
-                NSInteger currentFrameId = self.frameIdCounter++;
-                
-                if(now > currentReleaseTime){
-               
-                    [self pereodicRender:rect releaseTime:releaseTime];
-               
-                }else{
+        switch(self.currentGesture){
+            case PAN:
+                {
+                    NSTimeInterval now = CACurrentMediaTime();
+                    
+                    NSTimeInterval delta =  LO_RENDER_BACKOFF_MIN +
+                                            LO_RENDER_BACK_OFF_MAX_DELTA * [self currentZoomRatio];
                     
-                    [self performBlock:^{
+                    NSTimeInterval releaseTime = now + delta;
+                    
+                    NSTimeInterval currentReleaseTime = self.renderBlockReleaseTime;
+                    
+                    NSInteger currentFrameId = self.frameIdCounter++;
+                    
+                    if(now > currentReleaseTime){
+                   
+                        [self pereodicRender:rect releaseTime:releaseTime];
+                   
+                    }else{
                         
-                        if((self.renderBlockReleaseTime == currentReleaseTime)
-                           && (currentFrameId==0)){
-                           
-                            [self pereodicRender:rect releaseTime:releaseTime];
-                        }
-                    }afterDelay:delta];
+                        [self performBlock:^{
+                            
+                            if((self.renderBlockReleaseTime == currentReleaseTime)
+                               && (currentFrameId==0)){
+                               
+                                [self pereodicRender:rect releaseTime:releaseTime];
+                            }
+                        }afterDelay:delta];
+                    }
                 }
-            }
+                break;
+            case PINCH:
+            case NO_GESTURE:
+                [[self getNextBuffer] setNeedsDisplayInRect:rect];
             break;
-        case PINCH:
-        case NO_GESTURE:
-            [[self getNextBuffer] setNeedsDisplayInRect:rect];
-        break;
+        }
     }
  }
 
diff --git a/ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h b/ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h
index fb14eab..2d6fadb 100644
--- a/ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h
+++ b/ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h
@@ -9,6 +9,11 @@
 #ifndef __Mobile_LibreOffice_MLOCommon_h__
 #define __Mobile_LibreOffice_MLOCommon_h__
 
+typedef enum { LO_APP, TILE_TESTER} MLOAppRole;
+#define MLOAppRoleString(enum) [@[@"LO_APP",@"RENDER_TILE_TESTER"] objectAtIndex:enum]
+static const MLOAppRole APP_ROLE = MLO_APP_ROLE;
+static const BOOL ENABLE_LO_DESKTOP = APP_ROLE == LO_APP;
+
 static const BOOL
     LOG_DRAW_RECT = NO,
     LOG_GET_VIEW_DATA = YES,
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m
index cb29994..cb34bc6 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m
@@ -16,24 +16,15 @@
 #import "MLORenderManager.h"
 #import "NSObject+MLOUtils.h"
 #import "MLOTopbarViewController.h"
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Private.h"
 #import "MLOKeyboardManager.h"
+#import "MLOAppRoleFactory.h"
+#import "MLOAppRoleBase.h"
 #import "mlo_uno.h"
 
- at interface MLOMainViewController ()
-
- at property BOOL focused;
- at property CGFloat topBarHeight;
- at property UIView * flasher;
- at property MLOTopbarViewController * topbar;
- at property MLOToolbarViewController * toolbar;
-
- at end
-
 static const CGFloat
     FLASH_DURATION= 0.2f,
-    EXPAND_DURATION=0.5f,
-    ROTATE_FLASH_DURATION=0.5f;
+    EXPAND_DURATION=0.5f;
 
 @implementation MLOMainViewController
 
@@ -47,19 +38,19 @@ static const CGFloat
 
 -(void)showLibreOffice:(UIWindow *) window{
 
-    _topBarHeight = TOP_BAR_HEIGHT;
+    self.topBarHeight = TOP_BAR_HEIGHT;
+    
     [[UIApplication sharedApplication]setStatusBarHidden:YES];
     
     self.view.bounds = self.view.frame = [self getFullFrameForRect:self.view.frame];
-    
-    [_renderManager setWidth:self.view.frame.size.width height:self.view.frame.size.height];
-    
-    [_gestureEngine showLibreOffice:window];
 
+    [self.role initWindow:window];
+    
     [self onStart];
     
-    [_topbar showLibreOffice];
-    [_toolbar showLibreOffice];
+    [self.topbar showLibreOffice];
+
+    [self.role showLibreOffice];
 
 }
 
@@ -72,21 +63,12 @@ static const CGFloat
     if(self.focused){
         
         self.focused = NO;
+
         [self.topbar hideLibreOffice];
-        [self.toolbar hideLibreOffice];
-    
-        [self resetSubviews];
-    
+
         [[UIApplication sharedApplication]setStatusBarHidden:NO];
-            
-        [self.gestureEngine hideLibreOffice];
-    
-        [self.scroller hideLibreOffice];
-    
-        [self.selection reset];
-        
-        [self.keyboard hide];
-        
+
+        [self.role hideLibreOffice];
         [self.view removeFromSuperview];
         
         [[MLOManager getInstance] hideLibreOffice];
@@ -94,14 +76,12 @@ static const CGFloat
 }
 
 -(void)initCanvas{
-    
     self.view.frame = self.view.bounds =[self getFullFrameForRect:[[MLOManager getInstance] bounds]];
-    
-    self.canvas = [[UIView alloc]
-                   initWithFrame:CGRectMake(0,
-                                            TOP_BAR_HEIGHT,
-                                            self.view.frame.size.width,
-                                            self.view.frame.size.height - TOP_BAR_HEIGHT)];
+    CGRect canvasRect = CGRectMake(0,
+                                   TOP_BAR_HEIGHT,
+                                   self.view.frame.size.width,
+                                   self.view.frame.size.height - TOP_BAR_HEIGHT);
+    self.canvas = [[UIView alloc] initWithFrame:canvasRect];
     self.canvas.clipsToBounds = YES;
     self.canvas.backgroundColor = [UIColor whiteColor];
 }
@@ -109,43 +89,33 @@ static const CGFloat
 - (id) init{
     self = [super init];
     if(self){
-    
-        [self initCanvas];
-        
-        self.scroller = [[MLOScrollerViewController alloc] initWithMainViewController:self];
         
-        self.selection = [[MLOSelectionViewController alloc] initWithMainViewController: self];
+        self.role = [MLOAppRoleFactory getInstanceWithMainViewController:self];
         
-        self.toolbar = [[MLOToolbarViewController alloc] initWithMainViewController:self];
+        [self initCanvas];
+
+        [self.role initSubviews];
 
         self.topbar = [[MLOTopbarViewController alloc] initWithMainViewController:self];
         
-        self.flasher =[[UIView alloc] initWithFrame:CGRECT_ZERO];
-        
-        self.keyboard = [[MLOKeyboardManager alloc]initWithMainViewController:self];
-        
-        _flasher.alpha = 0.0f;
-        _flasher.backgroundColor = [UIColor whiteColor];
-
-        self.gestureEngine = nil;
         [self addSubviews];
         
         [self onStart];
     
-        _focused =NO;
-        _topBarHeight = TOP_BAR_HEIGHT;
+        self.focused = NO;
+        self.topBarHeight = TOP_BAR_HEIGHT;
     }
     return self;
 }
 
 -(void) flash{
-    _flasher.frame =self.view.frame;
-    _flasher.alpha = 1.0f;
+    self.flasher.frame =self.view.frame;
+    self.flasher.alpha = 1.0f;
     [self.view addSubview:_flasher];
     [UIView animateWithDuration:FLASH_DURATION animations:^{
-        _flasher.alpha=0.0f;
+        self.flasher.alpha=0.0f;
     } completion:^(BOOL finished) {
-        [_flasher removeFromSuperview];
+        [self.flasher removeFromSuperview];
     }];
 }
 
@@ -155,91 +125,50 @@ static const CGFloat
     
     [UIView animateWithDuration:EXPAND_DURATION animations:^(void){
     
-        _canvas.frame = CGRectMake(0, targetHeight, mainFrame.size.width, mainFrame.size.height - targetHeight);
-        _renderManager.view.alpha= 0.0f;
+        self.canvas.frame = CGRectMake(0, targetHeight, mainFrame.size.width, mainFrame.size.height - targetHeight);
+        self.renderManager.view.alpha= 0.0f;
 
         
     } completion:^(BOOL completed){
     
-        _topBarHeight = targetHeight;
+        self.topBarHeight = targetHeight;
         [self rotate];
-        [_toolbar expandDidToggle];
+        [self.toolbar expandDidToggle];
     }];
 }
 
 -(void)resize{
     CGRect mainViewRect = [self getFullFrameForRect:self.view.bounds];
-    
     LOG_RECT(mainViewRect, @"MLO Resize: main view");
     
     self.view.bounds = self.view.frame = mainViewRect;
     
     CGFloat width = self.view.frame.size.width;
-    CGFloat height = self.view.frame.size.height - _topBarHeight;
+    CGFloat height = self.view.frame.size.height - self.topBarHeight;
     
     CGRect canvasRect =CGRectMake(0, _topBarHeight, width, height);
-   
-    _canvas.frame =  canvasRect;
-    
-    [_renderManager setWidth:width  height:height];
+    self.canvas.frame =  canvasRect;
+    [self.role setWidth:width height:height];
     
     LOG_RECT(canvasRect, @"MLO Resize: canvas");
-
-    
 }
 
 -(void) addSubviews{
     
-    [_topbar addToMainViewController];
-    
-    [self.view addSubview:_canvas];
-    
+    [self.topbar addToMainViewController];
+    [self.view addSubview:self.canvas];
     self.view.backgroundColor = [UIColor whiteColor];
-    self.renderManager = [MLORenderManager getInstance];
-    
-    [self resize];
-    
-    [self.canvas addSubview: _renderManager.view];
-    
-    self.gestureEngine = [[MLOGestureEngine alloc] initWithMainViewController:self];
-    [_toolbar addToMainViewController];
-    [_scroller addToMainViewController];
-    [_selection addToMainViewController];
-    [_keyboard addToMainViewController];
+    [self.role addSubviews];
 }
 
 -(void)rotate{
-    if(_focused){
-        
-        NSLog(@"MLO rotate");
-        
-        _renderManager.view.alpha= 0.0f;
-        
-        [self resize];
-        
-        [_gestureEngine onRotate];
-        
-        [_topbar onRotate];
-        
-        [_scroller reset];
-        
-        [_scroller showLibreOffice];
-        
-        [_selection onRotate];
-        
-        [_toolbar onRotate];
-        
-        
-        [UIView animateWithDuration:ROTATE_FLASH_DURATION animations:^(void){
-            _renderManager.view.alpha=1.0f;
-        }];
-        
+    if(self.focused){
+        [self.role rotate];
     }
 }
 
-
-
 -(void)resetSubviews{
+
     [_gestureEngine reset];
     [_scroller reset];
     [_selection reset];
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Impl.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Impl.h
deleted file mode 100644
index fbb5af8..0000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Impl.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-//
-// This file is part of the LibreOffice project.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#import "MLOMainViewController.h"
-
-static const CGFloat TOP_BAR_HEIGHT =40.0f;
-
- at class MLOGestureEngine,MLORenderManager;
- at interface MLOMainViewController ()
- at property MLOGestureEngine * gestureEngine;
- at property MLORenderManager * renderManager;
--(void) toggleExpand;
- at end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.m
index 0f5fe22..03e8ec9 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.m
@@ -7,7 +7,7 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #import "MLOTopbarViewController.h"
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLOMainViewController.h"
 #import "MLOButton.h"
 #import "MLOResourceImage.h"
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.m
index 28ca635..45a4168 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.m
@@ -7,7 +7,7 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #import "MLOScrollerData.h"
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLOGestureEngine_Impl.h"
 #import "MLOScrollerGridViewController.h"
 #import "MLOScrollerTooltip.h"
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.m
index 3b7fbba..18c39f6 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.m
@@ -6,7 +6,7 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLOMagnifier.h"
 #import "MLOResourceImage.h"
 #import "MLORenderManager.h"
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.m
index 30e60f8..5618667 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.m
@@ -7,7 +7,7 @@
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #import "MLOSelectionHandle.h"
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLOSelectionViewController_Impl.h"
 #import "MLOGestureEngine_Impl.h"
 #import "MLOResourceImage.h"
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.m
index 84b2be0..8e676c8 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.m
@@ -6,7 +6,7 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLOSelectionViewController_Impl.h"
 #import "MLOContextualMenuFocus.h"
 #import "MLOSelectionHandle.h"
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.m
index 506e586..9ac21f8 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.m
@@ -8,7 +8,7 @@
 
 #import "MLOThesaurusViewController.h"
 #import "MLOSelectionViewController_Impl.h"
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLOGestureEngine_Impl.h"
 
 static const CGFloat THESAURUS_PADDING = 100.0f;
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.m
index 37d7887..a825e72 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.m
@@ -9,7 +9,7 @@
 #import "MLOFinder.h"
 #import "MLOToolbarButton.h"
 #import "MLOButton.h"
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLOGestureEngine_Impl.h"
 #import "MLORenderManager.h"
 #import "MLOSubView.h"
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.m
index 65b17b1..4d8e7cc 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.m
@@ -11,7 +11,7 @@
 #import "MLOToolbarButton.h"
 #import "MLOFinder.h"
 #import "MLOToolbarViewController_Impl.h"
-#import "MLOMainViewController_Impl.h"
+#import "MLOMainViewController_Friend.h"
 #import "MLOResourceImage.h"
 #import "MLOTopbarViewController.h"
 #import "MLOKeyboardManager.h"


More information about the Libreoffice-commits mailing list