summaryrefslogtreecommitdiff
path: root/ios/shared/ios_sharedlo
diff options
context:
space:
mode:
Diffstat (limited to 'ios/shared/ios_sharedlo')
-rw-r--r--ios/shared/ios_sharedlo/objective_c/MLOManager.h6
-rw-r--r--ios/shared/ios_sharedlo/objective_c/MLOManager.m17
-rw-r--r--ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m2
-rw-r--r--ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureLimiter.m2
-rw-r--r--ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m10
-rw-r--r--ios/shared/ios_sharedlo/objective_c/render/MLORenderBuffer.m77
-rw-r--r--ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.h2
-rw-r--r--ios/shared/ios_sharedlo/objective_c/render/MLORenderManager.m65
-rw-r--r--ios/shared/ios_sharedlo/objective_c/utils/MLOCommon.h5
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m157
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Impl.h18
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.m2
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.m2
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.m2
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.m2
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.m2
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.m2
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.m2
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.m2
19 files changed, 142 insertions, 235 deletions
diff --git a/ios/shared/ios_sharedlo/objective_c/MLOManager.h b/ios/shared/ios_sharedlo/objective_c/MLOManager.h
index 04df67703883..fbdc96ff4b63 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;
-@interface MLOManager : UIResponder <UIApplicationDelegate,UITextViewDelegate>
-@property (strong,nonatomic) MLOMainViewController * mainViewController;
+@interface MLOManager : UIResponder <UIApplicationDelegate>
+@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 a422731ee559..e9d4b5ffb812 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 ea81427688b3..85ed9cf2943b 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 9b94ad7feca3..d72c5ff765a6 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 c9c0b7a5d385..bbc81d7fba1a 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 a06f91d8fecb..f598220a73ab 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 75eb67ef6838..86830016111a 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 9c428b27146c..8deca8cbfdb8 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 fb14eabc1a5e..2d6fadba3b8b 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 cb29994a7a09..cb34bc61e138 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"
-@interface MLOMainViewController ()
-
-@property BOOL focused;
-@property CGFloat topBarHeight;
-@property UIView * flasher;
-@property MLOTopbarViewController * topbar;
-@property MLOToolbarViewController * toolbar;
-
-@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 fbb5af8bd501..000000000000
--- 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;
-
-@class MLOGestureEngine,MLORenderManager;
-@interface MLOMainViewController ()
-@property MLOGestureEngine * gestureEngine;
-@property MLORenderManager * renderManager;
--(void) toggleExpand;
-@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 0f5fe220a6df..03e8ec92d022 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 28ca6357514f..45a4168fb692 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 3b7fbba593eb..18c39f6b9f8a 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 30e60f84f870..56186676c456 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 84b2be0aba56..8e676c84da7d 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 506e58654ddf..9ac21f8186dd 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 37d7887cbc64..a825e72b9e6c 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 65b17b19057e..4d8e7cca44eb 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"