summaryrefslogtreecommitdiff
path: root/ios/shared/ios_sharedlo/objective_c/view_controllers
diff options
context:
space:
mode:
Diffstat (limited to 'ios/shared/ios_sharedlo/objective_c/view_controllers')
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.h28
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m186
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Friend.h18
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Private.h22
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h23
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m204
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.h17
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.m93
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.h16
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.m13
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.h14
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.m37
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.h13
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.m112
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleProtocol.h21
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.h15
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.m78
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.h33
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.m209
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerGridViewController.h19
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerGridViewController.m136
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerTooltip.h16
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerTooltip.m78
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerViewController.h26
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerViewController.m157
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOContextualMenuFocus.h17
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOContextualMenuFocus.m61
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.h20
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.m94
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.h22
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.m168
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.h22
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.m231
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController_Impl.h17
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.h15
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.m48
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.h14
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m71
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h28
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m167
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.h14
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m56
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewControllerProtocol.h16
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.h18
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.m17
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.h18
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.m281
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarButton.h31
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarButton.m157
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.h21
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.m137
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController_Impl.h13
52 files changed, 0 insertions, 3358 deletions
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.h
deleted file mode 100644
index bd30ba7181d9..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-@class MLORenderManager,MLOSelectionViewController,MLOScrollerViewController,MLOKeyboardManager;
-@interface MLOMainViewController : MLOViewController<UITextViewDelegate>
-
-@property MLOSelectionViewController * selection;
-@property MLOScrollerViewController * scroller;
-@property MLOKeyboardManager * keyboard;
-@property UIView * canvas;
-
--(void) rotate;
--(void) showLibreOffice:(UIWindow *) window;
--(void) onTextEdit;
--(void) hideLibreOffice;
--(BOOL) isTappable;
--(void) flash;
--(CGFloat) getZoom;
-@end
-
-// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m
deleted file mode 100644
index 518a66e12505..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m
+++ /dev/null
@@ -1,186 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOToolbarViewController.h"
-#import "MLOSelectionViewController.h"
-#import "MLOGestureEngine.h"
-#import "MLOScrollerViewController.h"
-#import "MLOManager.h"
-#import "MLOGestureLimiter.h"
-#import "MLOGestureEngine_Impl.h"
-#import "MLORenderManager.h"
-#import "NSObject+MLOUtils.h"
-#import "MLOTopbarViewController.h"
-#import "MLOMainViewController_Private.h"
-#import "MLOKeyboardManager.h"
-#import "MLOAppRoleFactory.h"
-#import "MLOAppRoleBase.h"
-#import "mlo_uno.h"
-
-static const CGFloat
- FLASH_DURATION= 0.2f,
- EXPAND_DURATION=0.5f;
-
-@implementation MLOMainViewController
-
--(void)onTextEdit{
- [_scroller contentHasChanged];
-}
-
--(BOOL)isTappable{
- return [_toolbar isTappable];
-}
-
--(void)showLibreOffice:(UIWindow *) window{
-
- self.topBarHeight = TOP_BAR_HEIGHT;
-
- [[UIApplication sharedApplication]setStatusBarHidden:YES];
-
- self.view.bounds = self.view.frame = [self getFullFrameForRect:self.view.frame];
-
- [self.role initWindow:window];
-
- [self onStart];
-
- [self.topbar showLibreOffice];
-
- [self.role showLibreOffice];
-
-}
-
--(void)onStart{
- self.focused = YES;
- [self rotate];
-}
-
--(void) hideLibreOffice{
- if(self.focused){
-
- self.focused = NO;
-
- [self.topbar hideLibreOffice];
-
- [[UIApplication sharedApplication]setStatusBarHidden:NO];
-
- [self.role hideLibreOffice];
- [self.view removeFromSuperview];
-
- [[MLOManager getInstance] hideLibreOffice];
- }
-}
-
--(void)initCanvas{
- self.view.frame = self.view.bounds =[self getFullFrameForRect:[[MLOManager getInstance] bounds]];
- 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.role.view = self.canvas;
- self.canvas.clipsToBounds = YES;
- self.canvas.backgroundColor = [UIColor whiteColor];
-}
-
-- (id) init{
- self = [super init];
- if(self){
-
- self.role = [MLOAppRoleFactory getInstanceWithMainViewController:self];
-
- [self initCanvas];
-
- [self.role initSubviews];
-
- self.topbar = [[MLOTopbarViewController alloc] initWithMainViewController:self];
-
- [self addSubviews];
-
- [self onStart];
-
- self.focused = NO;
- self.topBarHeight = TOP_BAR_HEIGHT;
- }
- return self;
-}
-
--(void) flash{
- self.flasher.frame =self.view.frame;
- self.flasher.alpha = 1.0f;
- [self.view addSubview:_flasher];
- [UIView animateWithDuration:FLASH_DURATION animations:^{
- self.flasher.alpha=0.0f;
- } completion:^(BOOL finished) {
- [self.flasher removeFromSuperview];
- }];
-}
-
--(void) toggleExpand{
- CGFloat targetHeight = (_topBarHeight==0.0f)?TOP_BAR_HEIGHT:0.0f;
- CGRect mainFrame = self.view.frame;
-
- [UIView animateWithDuration:EXPAND_DURATION animations:^(void){
-
- self.canvas.frame = CGRectMake(0, targetHeight, mainFrame.size.width, mainFrame.size.height - targetHeight);
- self.renderManager.view.alpha= 0.0f;
-
-
- } completion:^(BOOL completed){
-
- self.topBarHeight = targetHeight;
- [self rotate];
- [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 - self.topBarHeight;
-
- CGRect canvasRect =CGRectMake(0, _topBarHeight, width, height);
- self.canvas.frame = canvasRect;
- [self.role setWidth:width height:height];
-
- LOG_RECT(canvasRect, @"MLO Resize: canvas");
-}
-
--(void) addSubviews{
-
- [self.topbar addToMainViewController];
- [self.view addSubview:self.canvas];
- self.view.backgroundColor = [UIColor whiteColor];
- [self.role addSubviews];
-}
-
--(void)rotate{
- if(self.focused){
- [self.role rotate];
- }
-}
-
--(void)resetSubviews{
-
- [_gestureEngine reset];
- [_scroller reset];
- [_selection reset];
-}
-
--(CGFloat) getZoom{
- return [_gestureEngine.limiter zoom];
-}
-
-
-@end
-
-
-// vim:set shiftwidth=4 softtabstop=4 expandtab:
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
deleted file mode 100644
index b15a63a7a023..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Friend.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- Mode: ObjC; 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/MLOMainViewController_Private.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Private.h
deleted file mode 100644
index 37f6a385c97f..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController_Private.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-@class MLOAppRoleBase,MLOToolbarButton,MLOTopbarViewController,MLOToolbarViewController;
-@interface MLOMainViewController ()
-@property BOOL focused;
-@property CGFloat topBarHeight;
-@property UIView * flasher;
-@property MLOTopbarViewController * topbar;
-@property MLOToolbarViewController * toolbar;
-@property MLOAppRoleBase * role;
-
--(void)resize;
--(void)resetSubviews;
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
deleted file mode 100644
index 041e19862ea7..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h
+++ /dev/null
@@ -1,23 +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 "MLOObject.h"
-
-typedef enum {WIDTH_IS_HEIGHT,WIDTH_IS_NOT_HEIGHT} MLOTestingTileParametersMode;
-#define MLOTestingTileParametersModeString(enum) [@[@"WIDTH_IS_HEIGHT",@"WIDTH_IS_NOT_HEIGHT"] objectAtIndex:enum]
-
-typedef void (^MLOTestingTileParameterExtractor)(CGFloat value);
-
-@class MLOTestingTileParametersViewController;
-@interface MLOTestingTileParameter : MLOObject
--(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label widthIsNotHeightExtractor:(MLOTestingTileParameterExtractor) widthIsNotHeightExtractor widthIsHeightExtractor:(MLOTestingTileParameterExtractor) widthIsHeightExtractor defaultValue:(NSInteger) defaultValue;
--(void)extractMode:(MLOTestingTileParametersMode) mode;
--(void)setParamFrame:(CGRect) paramFrame;
--(void)addToSuperview;
--(void)enterMode:(MLOTestingTileParametersMode)mode;
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
deleted file mode 100644
index f43dfb8e322b..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ /dev/null
@@ -1,204 +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 "MLOTestingTileParameter.h"
-#import "MLOTestingTileParametersViewController.h"
-
-@interface MLOTestingTileParameter ()
-@property MLOTestingTileParametersViewController * params;
-@property (nonatomic,strong) MLOTestingTileParameterExtractor widthIsHeightExtractor;
-@property (nonatomic,strong) MLOTestingTileParameterExtractor widthIsNotHeightExtractor;
-@property UILabel * label;
-@property UITextField * data;
-@property UITextField * step;
-@property NSInteger defaultValue;
-@property UIStepper * dataStepper;
-@property UIStepper * stepStepper;
-@end
-
-static const CGFloat DEFAULT_STEP_VALUE = 10;
-
-@implementation MLOTestingTileParameter
-
--(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label widthIsNotHeightExtractor:(MLOTestingTileParameterExtractor) widthIsNotHeightExtractor widthIsHeightExtractor:(MLOTestingTileParameterExtractor) widthIsHeightExtractor defaultValue:(NSInteger) defaultValue{
- NSLog(@"Creating tile testing param %@ with default value %d",label,defaultValue);
- self = [self init];
- if(self){
- self.params = params;
- self.widthIsHeightExtractor = widthIsHeightExtractor;
- self.widthIsNotHeightExtractor = widthIsNotHeightExtractor;
- self.defaultValue = defaultValue;
- [self initLabel:label];
- self.dataStepper = [self stepperWithMinValue:-MAXFLOAT];
- self.stepStepper = [self stepperWithMinValue:1];
- // The step stepper obviously needs a step value of 1,
- // and an initial value of DEFAULT_STEP_VALUE.
- self.stepStepper.stepValue = 1;
- self.stepStepper.value = DEFAULT_STEP_VALUE;
- [self initDataTextField];
- [self initStepTextField];
- }
- return self;
-}
-
--(UIStepper *) stepperWithMinValue:(CGFloat) minValue{
- UIStepper * stepper = [UIStepper new];
- stepper.maximumValue = MAXFLOAT;
- stepper.minimumValue = minValue;
- stepper.stepValue = DEFAULT_STEP_VALUE;
- stepper.autorepeat = YES;
- stepper.continuous = NO;
- [stepper addObserver:self forKeyPath:@"value"
- options: NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld
- context:0];
- return stepper;
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
-{
-
- if (object == self.dataStepper) {
- NSNumber * newNumber = change[NSKeyValueChangeNewKey];
- NSNumber * oldNumber = change[NSKeyValueChangeOldKey];
-
- CGFloat value = [self currentDataValue] + [newNumber floatValue] - [oldNumber floatValue];
-
- if(value == ((NSInteger) value)){
- self.data.text = [[NSNumber numberWithInteger:(NSInteger) value] stringValue];
- }else{
- self.data.text = [[NSNumber numberWithFloat:value] stringValue];
- }
- [self.params renderTile];
- }else if (object == self.stepStepper){
-
- NSNumber * floatNumber = change[NSKeyValueChangeNewKey];
- NSInteger value = [floatNumber integerValue];
- NSNumber * newValue = [NSNumber numberWithInteger:value];
- self.step.text = [newValue stringValue];
- self.dataStepper.stepValue = [newValue floatValue];
- }
-}
-
-
--(void)initStepTextField{
-
- self.step =[[UITextField alloc] initWithFrame:CGRECT_ZERO];
- self.data.textAlignment = NSTextAlignmentLeft;
- self.step.text = [[NSNumber numberWithInteger:(NSInteger)DEFAULT_STEP_VALUE] stringValue];
-}
-
--(NSString *)description{
- return [@"MLOTestingTileParameter: " stringByAppendingString:self.label.text];
-}
-
--(void) initLabel:(NSString *) label{
- self.label =[[UILabel alloc] initWithFrame:CGRECT_ZERO];
- self.label.text = label;
- self.label.textAlignment = NSTextAlignmentCenter;
-}
-
--(void) initDataTextField{
- self.data = [[UITextField alloc] initWithFrame:CGRECT_ZERO];
- [self.data setKeyboardType:UIKeyboardTypeNumberPad];
- self.data.textAlignment = NSTextAlignmentLeft;
- [self resetValue];
-}
-
--(void)resetValue{
-
- self.data.text = [NSString stringWithFormat:@"%d",self.defaultValue];
-}
-
--(void)setParamFrame:(CGRect) paramFrame{
- NSLog(@"%@ setParamFrame",self);
-
- CGFloat x = paramFrame.origin.x;
- CGFloat y = paramFrame.origin.y;
- CGFloat w = paramFrame.size.width;
- CGFloat h = paramFrame.size.height;
-
- CGFloat labelW = w/3.0f;
- CGFloat otherW = w/6.0f;
-
- self.label.frame=CGRectMake(x,
- y,
- labelW,
- h);
- self.data.frame =CGRectMake(x + labelW,
- y,
- otherW,
- h);
- self.dataStepper.frame = CGRectMake(x + labelW + otherW,
- y,
- otherW,
- h);
-
- self.step.frame = CGRectMake(x + labelW + 2*otherW,
- y,
- otherW,
- h);
- self.stepStepper.frame = CGRectMake(x + labelW + 3*otherW,
- y,
- otherW,
- h);
-
-}
-
--(void)addToSuperview{
- NSLog(@"%@ addToSuperview",self);
- [self.params.view addSubview:self.label];
- [self.params.view addSubview:self.data];
- [self.params.view addSubview:self.dataStepper];
- [self.params.view addSubview:self.step];
- [self.params.view addSubview:self.stepStepper];
-}
-
--(BOOL)isNumber:(NSString *) string{
-
- return [[NSNumberFormatter new]numberFromString:string] == nil;
-}
-
--(CGFloat) currentDataValue{
- if([self isNumber:self.data.text]){
-
- NSLog(@"%@ got illegal value: %@, reseting to %d",self,self.data.text,self.defaultValue);
-
- [self resetValue];
- }
- return [self.data.text floatValue];
-}
-
--(MLOTestingTileParameterExtractor) getExtractor:(MLOTestingTileParametersMode) mode{
- switch (mode) {
- case WIDTH_IS_HEIGHT:
- return self.widthIsHeightExtractor;
- case WIDTH_IS_NOT_HEIGHT:
- return self.widthIsNotHeightExtractor;
- }
-}
-
--(void)extractMode:(MLOTestingTileParametersMode) mode{
- MLOTestingTileParameterExtractor extractor = [self getExtractor:mode];
- if(extractor!=nil){
- // NSLog(@"%@ extract %@",self,MLOTestingTileParametersModeString(mode));
- extractor([self currentDataValue]);
- }
-}
--(BOOL)isSupportingMode:(MLOTestingTileParametersMode) mode{
- return [self getExtractor:mode]!=nil;
-}
--(void)enterMode:(MLOTestingTileParametersMode)mode{
- CGFloat alpha = [self isSupportingMode:mode] ? 1.0f: 0.0f;
- self.label.alpha = alpha;
- self.data.alpha = alpha;
- self.dataStepper.alpha = alpha;
- self.step.alpha =alpha;
- self.stepStepper.alpha = alpha;
-}
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.h
deleted file mode 100644
index 1eac2d7b889b..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- Mode: ObjC; 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"
-@class MLOMainViewController;
-@interface MLOTopbarViewController : MLOObject
--(void)addToMainViewController;
--(id)initWithMainViewController:(MLOMainViewController *) mainViewController;
--(void)hideLibreOffice;
--(void)showLibreOffice;
--(void)onRotate;
-@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
deleted file mode 100644
index 7799e500f733..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTopbarViewController.m
+++ /dev/null
@@ -1,93 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOTopbarViewController.h"
-#import "MLOMainViewController_Friend.h"
-#import "MLOMainViewController.h"
-#import "MLOButton.h"
-#import "MLOResourceImage.h"
-#import "MLOManager.h"
-
-@interface MLOTopbarViewController ()
-@property MLOMainViewController * mainViewController;
-@property UIView * blackbox;
-@property MLOButton * button;
-@property UILabel * label;
-@property MLOResourceImage * buttonImage;
-@end
-
-static const CGFloat
- BUTTON_LEFT_SPACING = 18.0f,
- FONT_SIZE = 15.0f;
-
-
-@implementation MLOTopbarViewController
--(id)initWithMainViewController:(MLOMainViewController *) mainViewController{
- self = [self init];
- if(self){
- self.mainViewController = mainViewController;
-
- self.blackbox = [[UIView alloc] initWithFrame:CGRECT_ZERO];
- _blackbox.backgroundColor = [UIColor blackColor];
-
- self.label = [[UILabel alloc] initWithFrame:CGRECT_ZERO];
- _label.textColor = [UIColor whiteColor];
- _label.backgroundColor = [UIColor clearColor];
- _label.textAlignment = NSTextAlignmentCenter;
- _label.font =[UIFont systemFontOfSize:FONT_SIZE];
-
- self.buttonImage = [MLOResourceImage backWithSize:NORMAL];
- self.button = [MLOButton buttonWithImage:_buttonImage];
- [_button addTarget:_mainViewController action:@selector(hideLibreOffice)];
-
- [self hideLibreOffice];
- }
- return self;
-}
--(void)addToMainViewController{
- [_mainViewController.view addSubview:_blackbox];
- [_mainViewController.view addSubview:_button];
- [_mainViewController.view addSubview:_label];
-}
-
--(void)hideLibreOffice{
- _button.alpha =0.0f;
- _button.alpha =0.0f;
- _label.alpha =0.0f;
- _blackbox.frame = CGRECT_ZERO;
- _button.frame =CGRECT_ZERO;
- _label.frame = CGRECT_ZERO;
-}
-
--(void)showLibreOffice{
- _blackbox.alpha= 1.0f;
- _button.alpha = 1.0f;
- _label.alpha=1.0f;
- _label.text = [[MLOManager getInstance] filenameWithExtension];
-}
-
--(void)onRotate{
-
- CGFloat screenWidth = _mainViewController.view.frame.size.width;
-
- _blackbox.frame = CGRectMake(0,0,screenWidth,TOP_BAR_HEIGHT);
-
- _button.frame = CGRectMake(0,//BUTTON_LEFT_SPACING,
- 0,//(TOP_BAR_HEIGHT - _buttonImage.image.size.height)/2.0f,
- TOP_BAR_HEIGHT,// _buttonImage.image.size.width,
- TOP_BAR_HEIGHT);// _buttonImage.image.size.height);
-
- static const CGFloat
- LABEL_Y = (TOP_BAR_HEIGHT - FONT_SIZE)/4.0f,
- LABEL_HEIGHT = TOP_BAR_HEIGHT - LABEL_Y;
-
- _label.frame = CGRectMake(BUTTON_LEFT_SPACING, LABEL_Y, screenWidth-BUTTON_LEFT_SPACING, LABEL_HEIGHT);
-}
-
-
-@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
deleted file mode 100644
index 65371709dfca..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- Mode: ObjC; 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"
-@class MLOMainViewController,MLOAppRoleBase;
-@interface MLOAppRoleBase : MLOViewController<MLOAppRoleProtocol>
-
-@property MLOMainViewController * mainViewController;
-
-@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
deleted file mode 100644
index 02f7ce9b3bff..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleBase.m
+++ /dev/null
@@ -1,13 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-@implementation MLOAppRoleBase
-
-@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
deleted file mode 100644
index 262f7c48fa24..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-@class MLOAppRoleBase,MLOMainViewController;
-@interface MLOAppRoleFactory : MLOObject
-+(MLOAppRoleBase *) getInstanceWithMainViewController:(MLOMainViewController *) mainViewController;
-@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
deleted file mode 100644
index ba27a4f36320..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.m
+++ /dev/null
@@ -1,37 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-@implementation MLOAppRoleFactory
-
-+(MLOAppRoleBase *) getInstanceWithMainViewController:(MLOMainViewController *) mainViewController{
- MLOAppRoleBase * role;
-
- NSLog(@"Creating app role: %@",MLOAppRoleString(APP_ROLE));
-
- switch (APP_ROLE) {
- case LO_APP:
- {
- role = [MLOAppRoleLoApp new];
- break;
- }
- case TILE_TESTER:
- {
- role= [MLOAppRoleTileTester new];
- break;
- }
- }
- role.mainViewController = mainViewController;
- return role;
-}
-
-@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
deleted file mode 100644
index 8fb181b810a2..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-@interface MLOAppRoleLoApp : MLOAppRoleBase
-
-@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
deleted file mode 100644
index fc3fb4ce004a..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.m
+++ /dev/null
@@ -1,112 +0,0 @@
-// -*- Mode: ObjC; 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;
-
-@implementation MLOAppRoleLoApp
-
--(NSString *)description{
- return @"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];
- [self.mainViewController.keyboard showLibreOffice];
-}
-
--(void)hideLibreOffice{
- MLOMainViewController * main = self.mainViewController;
-
- [main.toolbar hideLibreOffice];
- [main resetSubviews];
- [main.gestureEngine hideLibreOffice];
- [main.scroller hideLibreOffice];
- [main.selection reset];
- [main.keyboard hideLibreOffice];
-}
-
--(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];
-}
-
-@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
deleted file mode 100644
index fcbbdedc9ec4..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleProtocol.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- Mode: ObjC; 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>
-
-@protocol MLOAppRoleProtocol <NSObject>
-
-@optional
--(void)initSubviews;
--(void)setWidth:(CGFloat) width height:(CGFloat) height;
--(void)addSubviews;
--(void)rotate;
--(void)initWindow:(UIWindow *) window;
--(void)showLibreOffice;
--(void)hideLibreOffice;
-@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
deleted file mode 100644
index 01f121ee2d40..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// -*- Mode: ObjC; 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"
-@class MLOTestingTileRendererViewController,MLOTestingTileParametersViewController;
-@interface MLOAppRoleTileTester : MLOAppRoleBase
-@property MLOTestingTileRendererViewController * renderer;
-@property MLOTestingTileParametersViewController * params;
-
-@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
deleted file mode 100644
index 743c0c113cde..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.m
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-
-@implementation MLOAppRoleTileTester
-
--(void)initSubviews{
- NSLog(@"%@ initSubviews",self);
- self.renderer = [[MLOTestingTileRendererViewController alloc] initWithTester:self];
- self.params = [[MLOTestingTileParametersViewController alloc] initWithTester:self];
-
-}
-
--(NSString *)description{
- return @"MLOAppRoleTileTester";
-}
-
-
--(void)setWidth:(CGFloat) width height:(CGFloat) height{
- NSLog(@"%@ setWidth:height",self);
- 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.params.view.frame =CGRectMake(0, 0, width, halfHeight);
- self.renderer.view.frame =CGRectMake(0,halfHeight, width, halfHeight);
- }
- [self.renderer resize];
- [self.params resize];
-
-}
--(void)addSubviews{
- NSLog(@"%@ addSubviews",self);
-
- [self.renderer addToSuperview];
- [self.params addToSuperview];
-
- [self.mainViewController resize];
-}
-
--(void)rotate{
- NSLog(@"%@ rotate",self);
- MLOMainViewController * main = [self mainViewController];
-
- [main resize];
-
- [main.topbar onRotate];
-
- [self.renderer resize];
- [self.params resize];
-}
-
-
--(void)showLibreOffice{
- NSLog(@"%@ showLibreOffice",self);
-}
--(void)hideLibreOffice{
- NSLog(@"%@ hideLibreOffice",self);
-}
-
--(void)initWindow:(UIWindow *) window{
- NSLog(@"%@ initWindow",self);
-
-}
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.h
deleted file mode 100644
index d47b4db00f32..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-static const CGFloat
- PIXEL_TO_LOGIC_RATIO = 14.978,//513885/30/MLO_IPAD_HEIGHT_IN_PIXELS,
- CANVAS_WIDTH_IN_LOGIC = 13000,
- // NOTE:
- // value keeps shifting between 14.975 and 14.984,
- // though mostly it is on the 14.975 area
-
- LO_PAGE_SEPARATOR_HEIGHT_IN_LOGIC = 18 * PIXEL_TO_LOGIC_RATIO,
- LO_HORIZONAL_BORDER_WIDTH_IN_LOGIC = 18 * PIXEL_TO_LOGIC_RATIO,
- PORTRAIT_PAGE_HEIGHT_IN_LOGIC_WITH_SEPARATOR = 513885 /30,
- PORTRAIT_PAGE_HEIGHT_IN_LOGIC_WITHOUT_SEPARATOR = PORTRAIT_PAGE_HEIGHT_IN_LOGIC_WITH_SEPARATOR - LO_PAGE_SEPARATOR_HEIGHT_IN_LOGIC;
-
-@class MLOMainViewController, MLOScrollerTooltip,MLOScrollerGridViewController;
-@interface MLOScrollerData : MLOObject
--(id)initWithMainViewController:(MLOMainViewController *) mainViewController;
--(void) onRotateWithGrid:(MLOScrollerGridViewController *) grid;
--(NSInteger) getTotalPages;
--(CGRect) getNewScrollerFrame;
--(CGRect) getShiftedScrollerFrame:(CGFloat) pixelDeltaX;
--(void) updateTooltip:(MLOScrollerTooltip *) tooltip withGrid:(MLOScrollerGridViewController *) grid;
--(void) showLibreOffice;
--(void) hideLibreOffice;
-@end
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
deleted file mode 100644
index 61d0f1eadb58..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.m
+++ /dev/null
@@ -1,209 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOScrollerData.h"
-#import "MLOMainViewController_Friend.h"
-#import "MLOGestureEngine_Impl.h"
-#import "MLOScrollerGridViewController.h"
-#import "MLOScrollerTooltip.h"
-#import "MLOGestureLimiter.h"
-#import "mlo_uno.h"
-#import "mlo_utils.h"
-
-@interface MLOScrollerData ()
-
-@property int left, top, zoom, visibleLeft, visibleTop, visibleRight, visibleBottom, zoomType, isBooklet;
-@property float totalPages, totalHeightInLogic, frameWidth, frameHeight, scrollerX, scrollerTotalHeight,tooltipPageHeight,tooltipX,tooltipMaxY;
-@property NSMutableString *mutableString;
-@property CGRect maxCanvas,contentCanvas,visibleCanvas;
-@property MLOMainViewController * mainViewController;
-
-@end
-
-static const float
- SCROLLER_WIDTH=10,
- SCROLLER_PADDING = 0,
-
- GRID_TO_TOOLTIP_DISTANCE = 2.0f,
-
- TOOLTIP_HEIGHT=60,
- TOOLTIP_WIDTH=100,
-
- FLOAT_RESET=-1.0f;
-
-static const int INT_RESET= -1;
-
-@implementation MLOScrollerData
-
-
--(id)initWithMainViewController:(MLOMainViewController *) mainViewController{
- self= [super init];
- if(self){
- self.mutableString = [NSMutableString stringWithString:@""];
- self.mainViewController = mainViewController;
- [self reset];
- }
- return self;
-}
-
--(void) showLibreOffice{
-}
-
--(void)hideLibreOffice{
- [self reset];
-}
-
--(void)reset{
- _tooltipMaxY= _tooltipPageHeight = _tooltipX = _totalPages = _totalHeightInLogic = _frameWidth= _frameHeight= _scrollerX= _scrollerTotalHeight = FLOAT_RESET;
- _left = _top = _zoom = _visibleLeft = _visibleTop = _visibleRight = _visibleBottom = _zoomType = _isBooklet = INT_RESET;
-
-}
-
--(void) updateViewData{
-
- mlo_fetch_view_data(_mutableString);
-
- sscanf([_mutableString UTF8String], "%d;%d;%d;%d;%d;%d;%d;%d;%d;",
- &_left,
- &_top,
- &_zoom,
- &_visibleLeft,
- &_visibleTop,
- &_visibleRight,
- &_visibleBottom,
- &_zoomType,
- &_isBooklet);
-
- if(LOG_GET_VIEW_DATA){
- NSLog(@"left=%d top=%d zoom=%d vLeft=%d vTop=%d vRight=%d vBottom=%d zoomType=%d isBooklet=%d",
- _left,
- _top,
- _zoom,
- _visibleLeft,
- _visibleTop,
- _visibleRight,
- _visibleBottom,
- _zoomType,
- _isBooklet);
- }
-}
-
--(BOOL)canCalculateDocumentSizeInLogic{
- return (_totalHeightInLogic != FLOAT_RESET);
-}
-
--(void) onRotateWithGrid:(MLOScrollerGridViewController *) grid{
- static const float SCROLLLER_X_OFFSET =SCROLLER_PADDING + SCROLLER_WIDTH ,
- DOUBLE_SCROLLER_PADDING =2*SCROLLER_PADDING,
- GRID_X_OFFSET= MLO_SCROLLER_GRID_WIDTH,
- TOOLTIP_X_OFFSET= GRID_X_OFFSET + GRID_TO_TOOLTIP_DISTANCE+ TOOLTIP_WIDTH;
-
- CGRect canvasFrame = _mainViewController.canvas.frame;
-
- _frameHeight = canvasFrame.size.height;
-
- _frameWidth = canvasFrame.size.width;
-
- _scrollerX = _frameWidth - SCROLLLER_X_OFFSET;
-
- _tooltipX = _frameWidth - TOOLTIP_X_OFFSET;
-
- _tooltipMaxY = _frameHeight - TOOLTIP_HEIGHT;
-
- _scrollerTotalHeight =_frameHeight -DOUBLE_SCROLLER_PADDING;
-
- _tooltipPageHeight = _frameHeight/_totalPages;
-
- [grid onRotate:_frameWidth - GRID_X_OFFSET];
-}
-
--(NSInteger) getTotalPages{
-
- NSInteger newTotalPages= mlo_get_page_count();
-
- if(newTotalPages!= _totalPages){
-
- _totalPages = newTotalPages;
- _totalHeightInLogic = _totalPages* PORTRAIT_PAGE_HEIGHT_IN_LOGIC_WITH_SEPARATOR;
-
- _tooltipPageHeight = _frameHeight/_totalPages;
-
- _mainViewController.gestureEngine.limiter.documentSizeInLogic = CGSizeMake(CANVAS_WIDTH_IN_LOGIC,
- _totalHeightInLogic);
- }
-
- return newTotalPages;
-}
-
-
--(CGRect) getShiftedScrollerFrame:(CGFloat) pixelDeltaX{
- pixelDeltaX *= PIXEL_TO_LOGIC_RATIO / [_mainViewController getZoom] * 100;
- CGFloat newTop = _visibleTop + pixelDeltaX;
- CGFloat newBottom = _visibleBottom + pixelDeltaX;
-
- BOOL isOverTop = newTop < 0.0f;
- BOOL isBelowBotton = newBottom > _totalHeightInLogic;
-
- if(!isOverTop && !isBelowBotton){
- _visibleTop = newTop;
- _visibleBottom = newBottom;
- }else{
- CGFloat scrollerHeightInLogic = _visibleBottom- _visibleTop;
- if(isOverTop){
- _visibleTop = 0.0f;
- _visibleBottom =scrollerHeightInLogic;
- }else{
- _visibleBottom = _totalHeightInLogic;
- _visibleTop = _totalHeightInLogic - scrollerHeightInLogic;
- }
- }
-
- return [self getNewScrollerFrame];
-}
--(CGRect)getNewScrollerFrame{
-
- [self updateViewData];
-
- CGFloat topRatio = max(_visibleTop / _totalHeightInLogic,0.0);
- CGFloat heightRatio = min((_visibleBottom / _totalHeightInLogic) - topRatio,1.0);
-
- return CGRectMake(_scrollerX,
- SCROLLER_PADDING +topRatio*_scrollerTotalHeight,
- SCROLLER_WIDTH,
- heightRatio*_scrollerTotalHeight);
-}
--(NSInteger) getCurrentPage{
-
- return min(
- max(
- ceilf(
- _visibleTop
- / PORTRAIT_PAGE_HEIGHT_IN_LOGIC_WITH_SEPARATOR
- ),
- 1),
- _totalPages);
-}
-
--(void) updateTooltip:(MLOScrollerTooltip *) tooltip withGrid:(MLOScrollerGridViewController *) grid{
- if(mlo_is_document_open() && _visibleTop>=0){
-
- NSInteger currentPage = [self getCurrentPage];
-
- if(tooltip){
-
- [tooltip updateWithFrame:CGRectMake(_tooltipX,
- min(_tooltipPageHeight * (currentPage -1),_tooltipMaxY),
- TOOLTIP_WIDTH,
- TOOLTIP_HEIGHT) inPage:currentPage];
- }
- [grid onCurrentPageChanged:currentPage];
- }
-}
-
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerGridViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerGridViewController.h
deleted file mode 100644
index 70bb544b6238..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerGridViewController.h
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-static const CGFloat MLO_SCROLLER_GRID_WIDTH = 20.0f;
-@class MLOMainViewController;
-@interface MLOScrollerGridViewController : MLOObject
--(id) initWithMainViewController:(MLOMainViewController *) mainViewController;
--(void) hide;
--(void) onCurrentPageChanged:(NSInteger) newCurrentPage;
--(void) onPageCountChanged:(NSInteger) newPageCount;
--(void)onRotate:(CGFloat) x;
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerGridViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerGridViewController.m
deleted file mode 100644
index a7162453940a..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerGridViewController.m
+++ /dev/null
@@ -1,136 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOScrollerGridViewController.h"
-#import "MLOMainViewController.h"
-
-static const CGFloat GRID_LINE_WIDTH=1.5f,
- GRID_ACTUAL_WIDTH = MLO_SCROLLER_GRID_WIDTH- GRID_LINE_WIDTH,
- UNSELECTED_ALPHA=0.05f,
- SELECTED_ALPHA=0.15f;
-
-@interface MLOScrollerGridViewController ()
-@property MLOMainViewController * mainViewController;
-@property NSInteger pageCount,currentPage;
-@property CGFloat height,x,gridCellHeight;
-@property NSMutableArray * pages;
-@end
-
-@implementation MLOScrollerGridViewController
-
-
--(void)hide{
-
- [self resetMembers];
-
- for(UIView * cell in _pages){
- [cell removeFromSuperview];
- cell.alpha=0.0f;
- }
-
- [_pages removeAllObjects];
-
-}
-
--(void)resetMembers{
- _pageCount=-1;
- _currentPage=0;
- _height=-1.0f;
- _x=-1.0f;
- _gridCellHeight=-1.0;
-}
-
--(id) initWithMainViewController:(MLOMainViewController *) mainViewController{
- self = [super init];
- if (self) {
- self.mainViewController = mainViewController;
- [self resetMembers];
- self.pages = [NSMutableArray new];
- }
- return self;
-}
-
--(void)onRotate:(CGFloat) x{
- _height =_mainViewController.canvas.frame.size.height;
- _x=x;
- [self reshape];
-}
-
--(UIView *) getNewCell{
- UIView * cell =[UIView new];
-
- cell.backgroundColor = [UIColor blackColor];
- cell.alpha = UNSELECTED_ALPHA;
-
- [_mainViewController.canvas addSubview:cell];
-
- return cell;
-}
-
--(void)onPageCountChanged:(NSInteger) newPageCount{
- if(_pageCount!=newPageCount){
- _pageCount = newPageCount;
-
- NSInteger currentSize = [_pages count];
-
- NSInteger delta = abs(currentSize-newPageCount);
-
- if(delta>0){
- BOOL isAdd = currentSize< newPageCount;
-
- for (NSInteger i=0; i<delta; i++) {
-
- if(isAdd){
-
- [_pages addObject:[self getNewCell]];
-
- }else{
- [_pages removeLastObject];
- }
- }
-
- [self reshape];
-
- if(!isAdd){
- if(_currentPage > newPageCount){
- [self onCurrentPageChanged:newPageCount];
- }
- }
- }
- }
-}
-
--(void)reshape{
- if((_x>=0) &&(_pageCount>0)){
- _gridCellHeight= (_height - GRID_LINE_WIDTH*(_pageCount +1 ))/_pageCount;
-
- CGFloat y = GRID_LINE_WIDTH;
-
- for (UIView * cell in _pages){
-
- cell.frame = CGRectMake(_x+GRID_LINE_WIDTH, y, GRID_ACTUAL_WIDTH, _gridCellHeight);
-
- y+=_gridCellHeight +GRID_LINE_WIDTH;
- }
- }
-}
-
--(void) onCurrentPageChanged:(NSInteger) newCurrentPage{
- if(_currentPage!=newCurrentPage){
- if( (_currentPage > 0) && ([_pages count] >= _currentPage)){
- ((UIView *) [_pages objectAtIndex:_currentPage-1]).alpha = UNSELECTED_ALPHA;
- }
- if( (newCurrentPage > 0) && ([_pages count] >= newCurrentPage)){
- ((UIView *) [_pages objectAtIndex:newCurrentPage -1]).alpha = SELECTED_ALPHA;
- }
- _currentPage = newCurrentPage;
- }
-
-}
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerTooltip.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerTooltip.h
deleted file mode 100644
index fdc3b4f05849..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerTooltip.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- Mode: ObjC; 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 <UIKit/UIKit.h>
-
-@interface MLOScrollerTooltip : UITextView
-@property NSString * extension;
--(void) updateWithFrame:(CGRect) newFrame inPage:(NSInteger) page;
--(void) hide;
--(void) hideLibreOffice;
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerTooltip.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerTooltip.m
deleted file mode 100644
index 776f84e01f51..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerTooltip.m
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOCommon.h"
-#import "MLOScrollerTooltip.h"
-#import "MLOManager.h"
-#import <QuartzCore/QuartzCore.h>
-
-@interface MLOScrollerTooltip ()
-@property NSInteger lastPage;
-@end
-
-static const CGFloat BORDER_WIDTH = 1.0f,VISIBLE_ALPHA=0.85f;
-
-@implementation MLOScrollerTooltip
-
-- (id)init{
-
- self = [super init];
- if(self){
-
- self.alpha= 0.0f;
- self.frame =CGRECT_ONE;
- self.backgroundColor = [UIColor whiteColor];
-
- self.layer.borderWidth = BORDER_WIDTH;
- self.layer.borderColor = [[UIColor grayColor] CGColor];
-
- self.extension=nil;
- _lastPage = -1;
-
- self.textAlignment = NSTextAlignmentCenter;
- self.textColor = [UIColor blackColor];
- }
- return self;
-}
-
--(void) updateWithFrame:(CGRect) newFrame inPage:(NSInteger) page{
-
- BOOL isForceUpdateFrame =NO;
-
- if(_extension==nil){
- self.extension = [[[MLOManager getInstance] extension] uppercaseString];
-
- isForceUpdateFrame = YES;
- }
-
- if((self.frame.origin.y != newFrame.origin.y) || isForceUpdateFrame){
-
- self.alpha=VISIBLE_ALPHA;
-
- self.frame = newFrame;
-
- self.text = [NSString stringWithFormat:@"Page %d This %@ is editable",page,_extension];
-
- [self setNeedsDisplay];
-
- _lastPage = page;
- }
-
-}
-
--(void) hide{
- self.frame = self.bounds=CGRECT_ONE;
- self.alpha = 0.0f;
-}
-
--(void) hideLibreOffice{
- self.extension = nil;
-}
-
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerViewController.h
deleted file mode 100644
index 4498e1e2c363..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerViewController.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// -*- Mode: ObjC; 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"
-@class MLOScrollerData;
-@class MLOMainViewController;
-@interface MLOScrollerViewController : MLOObject
-@property MLOScrollerData * data;
-
--(void)updateByLogic;
--(void)updateByPixelDeltaY:(CGFloat) pixelDeltaY;
--(void)contentHasChanged;
--(void)onRotate;
--(id)initWithMainViewController:(MLOMainViewController *) mainViewController;
--(void) reset;
--(void) fadeOut;
--(void) addToMainViewController;
--(void) hideLibreOffice;
--(void) showLibreOffice;
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerViewController.m
deleted file mode 100644
index ccb9d5df6ffd..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerViewController.m
+++ /dev/null
@@ -1,157 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOScrollerViewController.h"
-#import "MLOMainViewController.h"
-#import "MLOSubView.h"
-#import "MLOScrollerData.h"
-#import "MLOScrollerTooltip.h"
-#import "MLOScrollerGridViewController.h"
-#import "mlo_uno.h"
-
-@interface MLOScrollerViewController ()
-@property BOOL isContentChanged,hasUpdated;
-@property MLOMainViewController * mainViewController;
-@property MLOSubView * scroller;
-@property MLOScrollerTooltip * tooltip;
-@property MLOScrollerGridViewController * grid;
-@property NSDate * fadeOutTime;
-@end
-
-static const CGFloat
-SCROLLER_CORNER_RADIUS =3.0f,
-RESHAPE_ANIMATION_DURATION= 0.05f,
-SCROLLER_FADE_OUT_DELAY=0.45f,
-SCROLLER_FADE_OUT_DURATION=1.0f,
-SCROLLER_FADE_OUT_INVOCATION =SCROLLER_FADE_OUT_DELAY+0.05f;
-
-// Tooltip is removed at request of PM
-// Maybe they'll want it back, or similar, in the future
-
-static const BOOL IS_SHOW_TOOLTIP =NO;
-
-@implementation MLOScrollerViewController
-
--(id) initWithMainViewController:(MLOMainViewController *) mainViewController{
- self = [super init];
- if(self){
- self.mainViewController = mainViewController;
- self.scroller = [[MLOSubView alloc] initHiddedWithColor:[UIColor grayColor] cornerRadius:SCROLLER_CORNER_RADIUS];
- self.data = [[MLOScrollerData alloc] initWithMainViewController:mainViewController];
- if(IS_SHOW_TOOLTIP){
- self.tooltip = [MLOScrollerTooltip new];
- }else{
- self.tooltip = nil;
- }
- self.fadeOutTime = nil;
- self.grid = [[MLOScrollerGridViewController alloc] initWithMainViewController:mainViewController];
- _isContentChanged =YES;
- _hasUpdated =NO;
-
- [_data onRotateWithGrid:_grid];
- }
- return self;
-}
-
--(void) addToMainViewController{
-
- [_mainViewController.canvas addSubview:_scroller];
- [_mainViewController.canvas addSubview:_tooltip];
-}
-
--(void) showLibreOffice{
- [_data showLibreOffice];
- [self contentHasChanged];
-
- if(mlo_is_document_open()){
- [self updateByLogic:NO];
- }
-}
-
--(void)contentHasChanged{
- self.isContentChanged = YES;
-}
-
--(void)onRotate{
- [self contentHasChanged];
- [_data onRotateWithGrid:_grid];
-
-}
-
--(void)updateByLogic{
- [self updateByLogic:YES];
-}
-
--(void)updateByPixelDeltaY:(CGFloat) pixelDeltaY{
-
- [self updateAndShowScroller:YES newScrollerFrame:[_data getShiftedScrollerFrame:pixelDeltaY]];
-}
-
--(void)updateByLogic:(BOOL) isShow {
-
- if(_isContentChanged){
-
- [_grid onPageCountChanged:[_data getTotalPages]];
-
- _isContentChanged=NO;
- }
-
- [self updateAndShowScroller:isShow newScrollerFrame:[_data getNewScrollerFrame]];
-}
-
--(void)updateAndShowScroller:(BOOL) isShow newScrollerFrame:(CGRect) newScrollerFrame{
-
- if(isShow){
-
- _scroller.alpha = 0.5;
- }
- [UIView animateWithDuration:_hasUpdated ? RESHAPE_ANIMATION_DURATION :0.0f
- animations:^{ _scroller.frame = newScrollerFrame; }
- completion:^(BOOL isCompleted){
-
- self.fadeOutTime = [NSDate dateWithTimeIntervalSinceNow:SCROLLER_FADE_OUT_DELAY];
- [self performSelector:@selector(timedFadeOut) withObject:nil afterDelay:SCROLLER_FADE_OUT_INVOCATION];
-
- }];
-
- [_data updateTooltip:_tooltip withGrid:_grid];
-
- _hasUpdated=YES;
-}
-
-
--(void) reset{
-
- [_scroller hide];
- [_tooltip hide];
-
- _hasUpdated=NO;
- [self onRotate];
-}
-
--(void) timedFadeOut {
- NSDate * date = self.fadeOutTime;
-
- if(![[date laterDate:[NSDate date]] isEqualToDate:date]){
- [self fadeOut];
- }
-}
-
--(void)fadeOut{
-
- [_scroller fade:OUT];
-}
-
--(void) hideLibreOffice{
- [_tooltip hideLibreOffice];
- [_grid hide];
- [self contentHasChanged];
- [_data hideLibreOffice];
-}
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOContextualMenuFocus.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOContextualMenuFocus.h
deleted file mode 100644
index f89e5c238351..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOContextualMenuFocus.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- Mode: ObjC; 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 <UIKit/UIKit.h>
-
-@class MLOSelectionViewController;
-@interface MLOContextualMenuFocus : UIView
--(id)initWithSelectionViewController:(MLOSelectionViewController *) selectionViewController;
--(void)loCopyToClipboard:(id) sender;
--(void)loSelectAll:(id) sender;
--(void)defineBuffer:(id) sender;
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOContextualMenuFocus.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOContextualMenuFocus.m
deleted file mode 100644
index 3587d4d5a1f2..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOContextualMenuFocus.m
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOCommon.h"
-#import "MLOContextualMenuFocus.h"
-#import "MLOSelectionViewController_Impl.h"
-#import "mlo_uno.h"
-
-@interface MLOContextualMenuFocus ()
-@property MLOSelectionViewController * selectionViewController;
-@end
-@implementation MLOContextualMenuFocus
-
--(id)initWithSelectionViewController:(MLOSelectionViewController *) selectionViewController{
- self = [self init];
- if(self){
- self.selectionViewController = selectionViewController;
- self.frame = CGRECT_ZERO;
- self.backgroundColor = [UIColor clearColor];
- }
- return self;
-}
-
--(void)loCopyToClipboard:(id) sender{
- [UIPasteboard generalPasteboard].string =[_selectionViewController.buffer copy];
-
-}
-
--(void)loSelectAll:(id) sender{
-
- NSLog(@"Calling mlo_select_all()");
- mlo_select_all();
- NSLog(@"mlo_select_all() returned. reshowing contextualMenu");
- [_selectionViewController showPostSelectAll];
-}
-
-
--(void)defineBuffer:(id) sender{
- [_selectionViewController defineBuffer];
-}
-
--(NSString *) description{
- return @"MLO contextual menu focus UIView";
-}
-- (BOOL) canPerformAction:(SEL)selector withSender:(id) sender {
- if ((selector == @selector(loCopyToClipboard:)) ||
- ((selector == @selector(loSelectAll:)) ||
- (selector == @selector(defineBuffer:)))) {
- return YES;
- }
- return NO;
-}
-- (BOOL) canBecomeFirstResponder {
- return YES;
-}
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.h
deleted file mode 100644
index ad8db2a50559..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- Mode: ObjC; 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 <UIKit/UIKit.h>
-
-@class MLOMainViewController;
-@interface MLOMagnifier : UIView
-
--(id) initWithMainViewController:(MLOMainViewController *) mainViewController;
--(void) addToMainViewController;
-
--(void) showAt:(CGPoint) point;
--(void) hide;
-
-@end
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
deleted file mode 100644
index f877ce8164b5..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOMagnifier.m
+++ /dev/null
@@ -1,94 +0,0 @@
-// -*- Mode: ObjC; 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"
-#import "MLOMagnifier.h"
-#import "MLOResourceImage.h"
-#import "MLORenderManager.h"
-#import <QuartzCore/QuartzCore.h>
-
-
-@interface MLOMagnifier ()
-@property CGPoint hotspot;
-@property MLOMainViewController * mainViewController;
-@property NSString * glassImageName,* maskImageName;
-@property BOOL shown,added;
-@end
-
-static const CGFloat MAGNIFIER_DIM = 160.0f,
- HOTSPOT_TO_MAGNIFIER_DISTANCE= 66.0f;
-
-@implementation MLOMagnifier
-
--(id) initWithMainViewController:(MLOMainViewController *) mainViewController{
- self = [self initWithFrame:CGRectMake(MAGNIFIER_DIM,MAGNIFIER_DIM,MAGNIFIER_DIM,MAGNIFIER_DIM)];
- if(self){
- self.mainViewController = mainViewController;
- self.layer.cornerRadius = MAGNIFIER_DIM / 2.0f;
- self.layer.masksToBounds = YES;
- self.glassImageName = [MLOResourceImage magnifierName:IMAGE];
- self.maskImageName = [MLOResourceImage magnifierName:MASK];
- self.shown = NO;
- self.added = NO;
- }
- return self;
-}
-
--(void) addToMainViewController{
-
-}
-
-
--(void) showAt:(CGPoint) point{
- if(!self.shown){
- self.shown = YES;
- [_mainViewController.canvas addSubview:self];
- }
-
- self.hotspot = point;
-
- self.center = CGPointMake(point.x, point.y-HOTSPOT_TO_MAGNIFIER_DISTANCE);
-
- [self setNeedsDisplay];
-
-}
--(void) hide{
-
- if(self.shown){
- self.shown =NO;
- [self removeFromSuperview];
- }
-
- self.center = CGPointMake(2*MAGNIFIER_DIM, 2*MAGNIFIER_DIM);
-
-}
-
-
-- (void)drawRect:(CGRect)rect
-{
- CGContextRef context = UIGraphicsGetCurrentContext();
- UIImage * glass = [UIImage imageNamed:_glassImageName];
- // CGImageRef mask = [UIImage imageNamed:_maskImageName].CGImage;
- CGRect bounds = self.bounds;
-
- CGContextSaveGState(context);
- //CGContextClipToMask(context, bounds, mask);
- CGContextFillRect(context, bounds);
- CGContextScaleCTM(context, 1.2, 1.2);
-
- //draw your subject view here
- CGContextTranslateCTM(context,1*(self.frame.size.width*0.5),1*(self.frame.size.height*0.5));
- //CGContextScaleCTM(context, 1.5, 1.5);
- CGContextTranslateCTM(context,-1*(self.hotspot.x),-1*(self.hotspot.y));
- [_mainViewController.renderManager renderInContext:context];
-
- CGContextRestoreGState(context);
- [glass drawInRect: bounds];
-}
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.h
deleted file mode 100644
index 72148f1524f4..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- Mode: ObjC; 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/.
-
-typedef enum {TOP_LEFT,BOTTOM_RIGHT} MLOSelectionHandleType;
-#define MLOSelectionHandleTypeString(enum) [@[@"TOP_LEFT",@"BOTTOM_RIGHT"] objectAtIndex:enum]
-
-@class MLOSelectionViewController;
-@interface MLOSelectionHandle : UIView
-
--(id)initWithType:(MLOSelectionHandleType) type selection:(MLOSelectionViewController *) selectionViewController;
--(void)addToMainViewController;
--(void)showAt:(CGPoint) edge;
--(void)hide;
--(void)onRotate;
--(CGPoint)getPivot;
--(BOOL)handleMoveAtPoint:(CGPoint) center gestureState:(UIGestureRecognizerState) state;
-@end
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
deleted file mode 100644
index 646a4c243957..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionHandle.m
+++ /dev/null
@@ -1,168 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOSelectionHandle.h"
-#import "MLOMainViewController_Friend.h"
-#import "MLOSelectionViewController_Impl.h"
-#import "MLOGestureEngine_Impl.h"
-#import "MLOResourceImage.h"
-
-@interface MLOSelectionHandle ()
-@property MLOSelectionViewController * selection;
-@property CGPoint lineTop, pivot;
-@property BOOL tracking;
-@end
-
-static const CGFloat LINE_HEIGHT = 20.0f,
- LINE_WIDTH = 2.0f,
- LINE_TO_HANDLE_SPACING=7.0f,
- LINE_THICKNESS_PADDING = 3.0f,
- HANDLE_THICKNESS_PADDING = 15.0f,
- EXTERNAL_PADDING = 3.0f,
- SIDE_PADDING = 15.0f,
- VERTICAL_PADDING = HANDLE_THICKNESS_PADDING + LINE_THICKNESS_PADDING,
- HORIZONAL_PADDING = SIDE_PADDING * 2.0f;
-
-@implementation MLOSelectionHandle
-
--(id)initWithType:(MLOSelectionHandleType) type selection:(MLOSelectionViewController *) selectionViewController{
- self = [self init];
- if(self){
-
- self.selection = selectionViewController;
- self.backgroundColor = [UIColor clearColor];
-
- MLOResourceImage * handleImage = [MLOResourceImage selectionHandle];
-
- CGFloat handleWidth = handleImage.image.size.width;
- CGFloat handleHeight = handleImage.image.size.height;
- CGFloat handleHeightWithSpacingToLine = LINE_TO_HANDLE_SPACING + handleHeight;
- CGFloat frameWidth = HORIZONAL_PADDING + handleWidth;
-
- CGFloat lineYOrigin;
- CGFloat handleYOrigin;
- CGFloat pivotY;
-
- switch (type) {
- case TOP_LEFT:
- handleYOrigin = HANDLE_THICKNESS_PADDING;
- pivotY = handleYOrigin + LINE_HEIGHT;
- lineYOrigin = pivotY + LINE_TO_HANDLE_SPACING;
- break;
-
- case BOTTOM_RIGHT:
- lineYOrigin = LINE_THICKNESS_PADDING;
- pivotY = lineYOrigin + LINE_HEIGHT;
- handleYOrigin = pivotY+ LINE_TO_HANDLE_SPACING;
- break;
- }
-
- self.frame = CGRectMake(0,
- 0,
- frameWidth,
- VERTICAL_PADDING + LINE_HEIGHT + handleHeightWithSpacingToLine);
-
- self.lineTop = CGPointMake(SIDE_PADDING + ((handleWidth - LINE_WIDTH) / 2.0f),
- lineYOrigin);
-
- self.pivot = CGPointMake(frameWidth/2.0f,
- pivotY);
-
- UIImageView * handle = [[UIImageView alloc] initWithImage:handleImage.image];
-
- [self addSubview: handle];
- handle.frame = CGRectMake(SIDE_PADDING,
- handleYOrigin,
- handleWidth,
- handleHeight);
- self.alpha = 0.0f;
- self.tracking =NO;
- }
- return self;
-}
--(void)addToMainViewController{
- [_selection.mainViewController.canvas addSubview:self];
-
-
-}
--(CGPoint) getPivot{
- return CGPointMake(self.frame.origin.x + _pivot.x, self.frame.origin.y + _pivot.y);
-}
--(void)showAt:(CGPoint) edge{
-
- [self putAt:edge withAlpha:1.0f];
-}
-
--(void)putAt:(CGPoint) center withAlpha:(CGFloat) alpha{
- self.frame = CGRectMake(center.x - _pivot.x,
- center.y - _pivot.y,
- self.frame.size.width,
- self.frame.size.height);
- self.alpha = alpha;
-}
-
--(void)hide{
- [self putAt:CGPointMake(0,0) withAlpha:0.0f];
-}
-
--(void)onRotate{
- [self hide];
-}
--(void)drawRect:(CGRect)rect{
- [super drawRect:rect];
-
- CGContextRef context = UIGraphicsGetCurrentContext();
- CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
-
- CGContextSetLineWidth(context, LINE_WIDTH);
-
- CGContextMoveToPoint(context, _lineTop.x,_lineTop.y); //start at this point
-
- CGContextAddLineToPoint(context, _lineTop.x, _lineTop.y + LINE_HEIGHT); //draw to this point
-
- CGContextStrokePath(context); // draw the path
-}
-
--(BOOL)handleMoveAtPoint:(CGPoint) center gestureState:(UIGestureRecognizerState) state{
- if((self.alpha==0.0f)||
- !CGRectContainsPoint(self.frame, center)){
-
- [self endTracking];
-
- return NO;
- }
-
- if (state == UIGestureRecognizerStateChanged) {
- self.tracking = YES;
- [self showAt:center];
-
- _selection.finger = center;
-
- [_selection reselect:NO];
-
- }else if((state == UIGestureRecognizerStateEnded) ||
- (state == UIGestureRecognizerStateCancelled) ||
- (state == UIGestureRecognizerStateFailed)){
-
- _selection.finger = center;
-
- [self endTracking];
- }
- return YES;
-}
-
--(void)endTracking{
- if(self.tracking){
- self.tracking=NO;
-
- [_selection reselect:YES];
-
- }
-}
-@end
-
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.h
deleted file mode 100644
index fb904dfdff18..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-@class MLOMainViewController;
-@interface MLOSelectionViewController : MLOObject
-
--(id)initWithMainViewController:(MLOMainViewController *) mainViewController;
--(void)addToMainViewController;
--(void)reset;
--(void) onRotate;
--(void) showBetweenFinger:(CGPoint) finger andPreviousPoint:(CGPoint) previousPoint showMenu:(BOOL) showMenu;
--(void) showPostSelectAll;
--(void) hide;
--(BOOL)handleMoveAtPoint:(CGPoint) center gestureState:(UIGestureRecognizerState) state;
-@end
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
deleted file mode 100644
index 4e042b5e779d..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController.m
+++ /dev/null
@@ -1,231 +0,0 @@
-// -*- Mode: ObjC; 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"
-#import "MLOSelectionViewController_Impl.h"
-#import "MLOContextualMenuFocus.h"
-#import "MLOSelectionHandle.h"
-#import "MLOMagnifier.h"
-#import "MLORenderManager.h"
-#import "MLOThesaurusViewController.h"
-#import "mlo_utils.h"
-#import "mlo_uno.h"
-#include <touch/touch.h>
-
-@interface MLOSelectionViewController ()
-@property MLOContextualMenuFocus * focus;
-@property MLOSelectionHandle * topLeft, * bottomRight;
-@property MLOMagnifier * magnifier;
-@property BOOL menuShown,magnifierShown;
-@end
-
-static const CGFloat FOCUS_DIM=20.0f;
-
-@implementation MLOSelectionViewController
-
--(id) initWithMainViewController:(MLOMainViewController *)mainViewController{
- self = [super init];
- if(self){
- self.mainViewController = mainViewController;
- self.buffer = [NSMutableString stringWithString:@""];
- self.focus = [[MLOContextualMenuFocus alloc] initWithSelectionViewController:self];
- self.topLeft = [[MLOSelectionHandle alloc] initWithType: TOP_LEFT selection:self];
- self.bottomRight = [[MLOSelectionHandle alloc] initWithType: BOTTOM_RIGHT selection:self];
- self.magnifier = [[MLOMagnifier alloc] initWithMainViewController:mainViewController];
- self.menuShown =NO;
- self.magnifierShown =NO;
- self.finger = CGPointMake(0,0);
- }
-
- return self;
-}
--(void) addToMainViewController{
- [_mainViewController.canvas addSubview:_focus];
- [_topLeft addToMainViewController];
- [_bottomRight addToMainViewController];
- [_magnifier addToMainViewController];
-}
-
--(void) reset{
- [self hide:NO];
-}
--(UIMenuItem *)copyItem{
- return [[UIMenuItem alloc]
- initWithTitle: @"Copy"
- action: @selector(loCopyToClipboard:)];
-}
--(UIMenuItem *)selectAllItem{
- return [[UIMenuItem alloc]
- initWithTitle: @"Select All"
- action: @selector(loSelectAll:)];
-}
-
--(UIMenuItem *)defineItem{
- return [[UIMenuItem alloc]
- initWithTitle: @"Define"
- action: @selector(defineBuffer:)];
-}
-
--(void) showMenuAtCenter:(CGPoint)center{
- [self showAtCenter:center selectAll:YES];
-}
-
--(void) showPostSelectAll{
-
- [self hideTouchTrackers];
- [self showAtCenter:CGPointMake(_mainViewController.canvas.frame.size.width / 2.0f, FOCUS_DIM) selectAll:NO];
-}
-
--(void) showAtTopLeft:(CGPoint) topLeft bottomRight:(CGPoint) bottomRight showMenu:(BOOL) showMenu{
- [_topLeft showAt:topLeft];
- [_bottomRight showAt:bottomRight];
- if(showMenu){
- [self hideMagnifier];
- [self showMenuAtCenter:CGPointMake( (bottomRight.x + bottomRight.x) /2.0f,
- (bottomRight.y + bottomRight.y) /2.0f)];
- self.menuShown = YES;
- }else{
- [self hideMenu:YES];
- [_magnifier showAt:self.finger];
- self.magnifierShown=YES;
- }
-
- [_mainViewController.renderManager renderNow];
-}
-
--(void) showBetweenFinger:(CGPoint) finger andPreviousPoint:(CGPoint) previousPoint showMenu:(BOOL) showMenu{
- self.finger = finger;
- [self showBetweenPointA:finger andPointB:previousPoint showMenu:showMenu];
-}
-
--(void) showBetweenPointA:(CGPoint) pointA andPointB:(CGPoint) pointB showMenu:(BOOL) showMenu{
-
- if((pointA.y < pointB.y) ||
- ((pointA.y == pointB.y) && (pointA.x < pointB.x))){
-
- [self showAtTopLeft:pointA bottomRight:pointB showMenu:showMenu];
- }else{
- [self showAtTopLeft:pointB bottomRight:pointA showMenu:showMenu];
- }
-}
-
--(void)showAtCenter:(CGPoint) center selectAll:(BOOL) isSelectAll{
-
- CGFloat width = _mainViewController.canvas.frame.size.width;
- CGFloat height = _mainViewController.canvas.frame.size.height;
-
- self.focus.frame = CGRectMake( min(max(0,center.x - FOCUS_DIM),width - FOCUS_DIM),
- min(max(0,center.y - FOCUS_DIM),height - FOCUS_DIM),
- FOCUS_DIM,
- FOCUS_DIM);
-
- [self.focus becomeFirstResponder];
-
- UIMenuController *menuController = [UIMenuController sharedMenuController];
-
- [menuController setMenuItems:[self getMenuItems:isSelectAll]];
-
- [menuController setTargetRect:self.focus.frame
- inView:_mainViewController.canvas];
- [menuController setMenuVisible:YES animated:YES];
-}
-
--(NSArray *)getMenuItems:(BOOL) isSelectAll{
-
- mlo_get_selection(_buffer);
-
- NSLog(@"Copied LO selection to keyboard: %@",_buffer);
-
- if(isSelectAll){
-
- if([UIReferenceLibraryViewController dictionaryHasDefinitionForTerm:_buffer]){
- NSLog(@"Creating contextual menu with Copy, Select All, and Define");
-
- return @[[self copyItem], [self selectAllItem], [self defineItem]];
-
- }
- NSLog(@"Creating contextual menu with Copy and Select All");
-
- return @[[self copyItem],[self selectAllItem]];
- }
-
- NSLog(@"Creating contextual menu with Copy only");
-
- return @[[self copyItem]];
- }
-
--(NSString *)description{
- return @"MLO contextual menu view controller";
-}
-
--(void) hide{
- [self hide:YES];
-}
-
--(void) hideTouchTrackers{
- [_topLeft hide];
- [_bottomRight hide];
- [self hideMagnifier];
-}
-
--(void) hideMenu:(BOOL) animate{
- if(self.menuShown){
- self.menuShown =NO;
- [[UIMenuController sharedMenuController] setMenuVisible:NO animated:animate];
- }
-}
-
--(void) hideMagnifier{
- if(self.magnifierShown){
- self.magnifierShown =NO;
- [_magnifier hide];
- }
-}
-
--(void) hide:(BOOL) animate{
-
- [self hideTouchTrackers];
-
- [self hideMenu:animate];
-
- [self.focus resignFirstResponder];
- self.focus.frame =CGRECT_ZERO;
-}
-
--(void)reselect:(BOOL) showMenu{
-
- CGPoint pointA = [_topLeft getPivot];
- CGPoint pointB = [_bottomRight getPivot];
-
- touch_lo_mouse_drag(pointA.x, pointA.y, DOWN);
-
- touch_lo_mouse_drag(pointB.x, pointB.y, MOVE);
-
- touch_lo_mouse_drag(pointB.x, pointB.y, UP);
-
- [self showBetweenPointA:pointA andPointB:pointB showMenu:showMenu];
-}
-
--(void) onRotate{
- [self reset];
-
-}
-
--(BOOL)handleMoveAtPoint:(CGPoint) center gestureState:(UIGestureRecognizerState) state{
- return (self.focus.frame.origin.x != 0) &&
- ([_topLeft handleMoveAtPoint:center gestureState:state] ||
- [_bottomRight handleMoveAtPoint:center gestureState:state]);
-}
-
-
--(void)defineBuffer{
- [[[MLOThesaurusViewController alloc] initWithSelectionViewController:self] show];
-
-}
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController_Impl.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController_Impl.h
deleted file mode 100644
index 1654f530b020..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOSelectionViewController_Impl.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOSelectionViewController.h"
-@class MLOMainViewController;
-@interface MLOSelectionViewController ()
-@property MLOMainViewController * mainViewController;
-@property NSMutableString * buffer;
-@property CGPoint finger;
--(void)reselect:(BOOL) showMenu;
--(void)defineBuffer;
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.h
deleted file mode 100644
index 78864b6d944b..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// -*- Mode: ObjC; 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 <UIKit/UIKit.h>
-@class MLOSelectionViewController;
-@interface MLOThesaurusViewController : UIReferenceLibraryViewController
-
--(id) initWithSelectionViewController:(MLOSelectionViewController *) selectionViewController;
--(void)show;
-@end
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
deleted file mode 100644
index e6249033be91..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/selection/MLOThesaurusViewController.m
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOThesaurusViewController.h"
-#import "MLOSelectionViewController_Impl.h"
-#import "MLOMainViewController_Friend.h"
-#import "MLOGestureEngine_Impl.h"
-
-static const CGFloat THESAURUS_PADDING = 100.0f;
-@interface MLOThesaurusViewController ()
-@property MLOSelectionViewController * selection;
-@end
-
-@implementation MLOThesaurusViewController
-
-
--(id) initWithSelectionViewController:(MLOSelectionViewController *) selectionViewController{
- self = [self initWithTerm:selectionViewController.buffer];
- if(self){
- self.selection = selectionViewController;
- self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
- self.modalPresentationStyle = UIModalPresentationFormSheet;
- }
- return self;
-}
-
--(void)show{
- static const CGFloat TWO_PADDINGS = THESAURUS_PADDING*2.0;
- self.view.frame = CGRectMake(THESAURUS_PADDING,
- THESAURUS_PADDING,
- _selection.mainViewController.canvas.frame.size.width - TWO_PADDINGS ,
- _selection.mainViewController.canvas.frame.size.height - TWO_PADDINGS);
-
- _selection.mainViewController.gestureEngine.focused = NO;
- [_selection.mainViewController presentViewController:self animated:YES completion:nil];
-
-}
-
--(void)viewDidDisappear:(BOOL)animated{
- _selection.mainViewController.gestureEngine.focused = YES;
- [_selection reselect:YES];
-}
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.h
deleted file mode 100644
index 1bfaa8d87df6..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.h
+++ /dev/null
@@ -1,14 +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 "MLOSubView.h"
-@class MLOAppRoleTileTester;
-@interface MLOTestingTile : MLOSubView
--(id)initWithTester:(MLOAppRoleTileTester *) tester;
--(void)resize;
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
deleted file mode 100644
index 784c0dd848ef..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m
+++ /dev/null
@@ -1,71 +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 "MLOTestingTile.h"
-#import "MLOTestingTileParametersViewController.h"
-#import "MLOTestingTileRendererViewController.h"
-#import "MLOAppRoleTileTester.h"
-#include <touch/touch.h>
-
-@interface MLOTestingTile ()
-@property MLOAppRoleTileTester * tester;
-@end
-
-@implementation MLOTestingTile
-
-
--(id)initWithTester:(MLOAppRoleTileTester *)tester{
-
- self = [self initWithFrame:[MLOTestingTile resized:tester]];
- if(self){
- self.tester =tester;
- self.backgroundColor =[UIColor greenColor];
- }
- return self;
-
-}
-
-+(CGRect)resized:(MLOAppRoleTileTester *)tester{
- return CGRectMake( 10,
- 10,
- tester.params.contextWidth,
- tester.params.contextHeight);
-}
-
--(void)resize{
- self.frame = [MLOTestingTile resized:self.tester];
-}
-
-- (void)drawRect:(CGRect)rect
-{
- NSTimeInterval startTime = CACurrentMediaTime();
- CGContextRef context = UIGraphicsGetCurrentContext();
-
- MLODpxPoint tilePosition =MLODpxPointByDpxes(self.tester.params.tilePosX,self.tester.params.tilePosY);
- MLODpxSize tileSize = MLODpxSizeByDpxes(self.tester.params.tileWidth,self.tester.params.tileHeight);
- NSInteger contextWidth = self.tester.params.contextWidth;
- NSInteger contextHeight = self.tester.params.contextHeight;
-
- NSLog(@"touch_lo_draw_tile(contextWidth=%d, contextHeight=%d, tilePosition=%@, tileSize=%@",
- contextWidth,
- contextHeight,
- NSStringFromCGPoint(tilePosition),
- NSStringFromCGSize(tileSize));
-
- touch_lo_draw_tile(context,
- contextWidth,
- contextHeight,
- tilePosition,
- tileSize);
-
- NSLog(@"tile rendering took %f seconds",CACurrentMediaTime() - startTime);
- MLODpxSize size = touch_lo_get_content_size();
- NSLog(@"touch_lo_get_content_size: width=%f, height=%f",size.width, size.height);
-}
-
-@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
deleted file mode 100644
index 6c1aea2714ed..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-// The size of the actual pixel tile
-static const CGFloat CONTEXT_WIDTH_DEFAULT = 450;
-static const CGFloat CONTEXT_HEIGHT_DEFAULT = 450;
-
-// In our "decatwips"
-static const CGFloat TILE_POS_X_DEFAULT = 0;
-static const CGFloat TILE_POS_Y_DEFAULT = 0;
-
-// "Tile" size here means the decatwip size of the part of the document
-// rendered into the pixel tile
-static const CGFloat TILE_WIDTH_DEFAULT = 500;
-static const CGFloat TILE_HEIGHT_DEFAULT = 500;
-
-@interface MLOTestingTileParametersViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol>
-@property CGFloat contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight;
--(void)renderTile;
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
deleted file mode 100644
index 681693d38319..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
+++ /dev/null
@@ -1,167 +0,0 @@
-// -*- Mode: ObjC; 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"
-#import "MLOTestingTileParameter.h"
-#import "MLOAppRoleTileTester.h"
-#import "MLOTestingTileRendererViewController.h"
-
-static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
-
-@interface MLOTestingTileParametersViewController ()
-@property MLOAppRoleTileTester * tester;
-@property NSArray * params;
-@property UIButton * renderButton;
-@property UIButton * modeButton;
-@property MLOTestingTileParametersMode mode;
-@end
-@implementation MLOTestingTileParametersViewController
-
--(id)initWithTester:(MLOAppRoleTileTester *)tester{
- self = [self init];
- if(self){
- self.tester = tester;
- [self initParams];
- [self initModeButton];
- [self initRenderButton];
-
- self.mode = WIDTH_IS_NOT_HEIGHT;
- [self changeMode];
-
- }
-
- NSLog(@"%@ initWithTester",self);
- return self;
-}
-
--(NSString *)description{
- return @"MLOTestingTileParametersViewController";
-}
-
--(void)initParams{
- self.params = @[[self createParam:@"contextWidth"
- widthIsNotHeightExtractor:^(CGFloat value){self.contextWidth = value;}
- widthIsHeightExtractor:^(CGFloat value){self.contextWidth = self.contextHeight = value;}
- value:CONTEXT_WIDTH_DEFAULT],
-
- [self createParam:@"contextHeight"
- widthIsNotHeightExtractor:^(CGFloat value){self.contextHeight = value;}
- value:CONTEXT_HEIGHT_DEFAULT],
-
- [self createParam:@"tilePosX"
- anyExtractor:^(CGFloat value){self.tilePosX = value;}
- value:TILE_POS_X_DEFAULT],
-
- [self createParam:@"tilePosY"
- anyExtractor:^(CGFloat value){self.tilePosY = value;}
- value:TILE_POS_Y_DEFAULT],
-
- [self createParam:@"tileWidth"
- widthIsNotHeightExtractor:^(CGFloat value){self.tileWidth = value;}
- widthIsHeightExtractor:^(CGFloat value){self.tileWidth = self.tileHeight = value;}
- value:TILE_WIDTH_DEFAULT],
-
- [self createParam:@"tileHeight"
- widthIsNotHeightExtractor:^(CGFloat value){self.tileHeight = value;}
- value:TILE_HEIGHT_DEFAULT]
- ];
-}
-
--(void)initRenderButton{
- UIButton * button =[UIButton buttonWithType:UIButtonTypeRoundedRect];
- [button addTarget:self action:@selector(renderTile) forControlEvents:UIControlEventTouchDown];
- [button setTitle:@"Render Tile" forState:UIControlStateNormal];
- self.renderButton =button;
-}
-
--(void)initModeButton{
- UIButton * button =[UIButton buttonWithType:UIButtonTypeRoundedRect];
- [button addTarget:self action:@selector(changeMode) forControlEvents:UIControlEventTouchDown];
- [button setTitle:MLOTestingTileParametersModeString(self.mode) forState:UIControlStateNormal];
- self.modeButton =button;
-}
-
--(void)changeMode{
-
- switch (self.mode) {
- case WIDTH_IS_HEIGHT:
- self.mode = WIDTH_IS_NOT_HEIGHT;
- break;
- case WIDTH_IS_NOT_HEIGHT:
- self.mode = WIDTH_IS_HEIGHT;
- break;
- }
-
- [self.modeButton setTitle:MLOTestingTileParametersModeString(self.mode) forState:UIControlStateNormal];
- for(MLOTestingTileParameter * param in self.params){
- [param enterMode:self.mode];
- }
-}
-
-
-
--(MLOTestingTileParameter *) createParam:(NSString *)name anyExtractor:(MLOTestingTileParameterExtractor) anyExtractor value:(CGFloat)defaultValue{
- return [self createParam:name widthIsNotHeightExtractor:anyExtractor widthIsHeightExtractor:anyExtractor value:defaultValue];
-}
-
--(MLOTestingTileParameter *) createParam:(NSString *)name widthIsNotHeightExtractor:(MLOTestingTileParameterExtractor) widthIsNotHeightExtractor value:(CGFloat)defaultValue{
- return [self createParam:name widthIsNotHeightExtractor:widthIsNotHeightExtractor widthIsHeightExtractor:nil value:defaultValue];
-}
-
--(MLOTestingTileParameter *) createParam:(NSString *)name widthIsNotHeightExtractor:(MLOTestingTileParameterExtractor) extractor1 widthIsHeightExtractor:(MLOTestingTileParameterExtractor) extractor2 value:(CGFloat)defaultValue{
- return [[MLOTestingTileParameter alloc] initWithParams:self label:name widthIsNotHeightExtractor:extractor1 widthIsHeightExtractor:extractor2 defaultValue:defaultValue];
-}
-
-
--(void)resize{
- NSLog(@"%@ resize",self);
- CGFloat height = self.view.frame.size.height;
- CGFloat width = self.view.frame.size.width;
- if(width<height){
- height = height/2.0f;
- }
- CGFloat heightWithoutButton = height - RENDER_BUTTON_HEIGHT;
- CGFloat paramHeight = heightWithoutButton / [self.params count];
- CGFloat originY = 0;
- for (MLOTestingTileParameter * param in self.params) {
- [param setParamFrame:CGRectMake(0,
- originY,
- width,
- paramHeight)];
- originY+=paramHeight;
- }
- CGFloat halfWidth = width/2.0f;
- self.modeButton.frame = CGRectMake(0,
- originY,
- halfWidth,
- RENDER_BUTTON_HEIGHT);
- self.renderButton.frame = CGRectMake(halfWidth,
- originY,
- halfWidth,
- RENDER_BUTTON_HEIGHT);
-
-}
--(void)addToSuperview{
- NSLog(@"%@ addToSuperview",self);
- [self.tester.view addSubview:self.view];
- for (MLOTestingTileParameter * param in self.params) {
- [param addToSuperview];
- }
-
- [self.view addSubview:self.renderButton];
- [self.view addSubview:self.modeButton];
-
-
-}
--(void)renderTile{
- for (MLOTestingTileParameter * param in self.params) {
- [param extractMode:self.mode];
- }
- [self.tester.renderer render];
-}
-@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
deleted file mode 100644
index 33fd647d7386..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-@interface MLOTestingTileRendererViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol>
--(void)render;
-@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
deleted file mode 100644
index 5dc9db16732a..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m
+++ /dev/null
@@ -1,56 +0,0 @@
-// -*- Mode: ObjC; 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"
-#import "MLOTestingTile.h"
-
-@interface MLOTestingTileRendererViewController ()
-@property MLOAppRoleTileTester * tester;
-@property UIScrollView * scrollView;
-@property MLOTestingTile * tile;
-@end
-
-@implementation MLOTestingTileRendererViewController
-
--(id)initWithTester:(MLOAppRoleTileTester *)tester{
- self = [self init];
- if(self){
- self.tester = tester;
- [self initScrollView];
- }
- NSLog(@"%@ initWithTester",self);
- return self;
-}
-
--(void)initScrollView{
- self.scrollView = [UIScrollView new];
- self.scrollView.backgroundColor = [UIColor grayColor];
- self.view = self.scrollView;
-}
--(void)resize{
- NSLog(@"%@ resize",self);
- [self.tile resize];
-}
--(NSString *)description{
- return @"MLOAppRoleTileTester";
-}
--(void)addToSuperview{
- NSLog(@"%@ addToSuperview",self);
-
- [self.tester.view addSubview:self.view];
-}
--(void)render{
-
- [self.tile removeFromSuperview];
- self.tile = [[MLOTestingTile alloc] initWithTester:self.tester];
- [self.scrollView addSubview:self.tile];
- self.scrollView.contentSize = self.tile.frame.size;
-
-}
-@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
deleted file mode 100644
index 9b9c977cdfab..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewControllerProtocol.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- Mode: ObjC; 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>
-
-@class MLOAppRoleTileTester;
-@protocol MLOTestingTileSubviewControllerProtocol <NSObject>
--(id)initWithTester:(MLOAppRoleTileTester *)tester;
--(void)addToSuperview;
--(void)resize;
-@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
deleted file mode 100644
index e7448435c252..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//
-// 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/.
-//
-// MLOTestingTileSubviewViewController.h
-// ios_sharedlo
-//
-
-#import "MLOViewController.h"
-
-@class MLOAppRoleTileTester;
-@interface MLOTestingTileSubviewViewController : MLOViewController
-@property MLOAppRoleTileTester * tester;
-
-@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
deleted file mode 100644
index 2fbe82d93e18..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewViewController.m
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// 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/.
-//
-// MLOTestingTileSubviewViewController.m
-// ios_sharedlo
-//
-
-#import "MLOTestingTileSubviewViewController.h"
-
-@implementation MLOTestingTileSubviewViewController
-
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.h
deleted file mode 100644
index df1a634cb8f1..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-@class MLOToolbarButton,MLOMainViewController;
-@interface MLOFinder : MLOObject
--(id)initWithToolbarButton:(MLOToolbarButton *) findButton;
--(void)addToMainViewController:(MLOMainViewController *)mainViewController;
--(void)show;
--(void)hide;
-
-@end
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
deleted file mode 100644
index 17d1081c2974..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOFinder.m
+++ /dev/null
@@ -1,281 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOFinder.h"
-#import "MLOToolbarButton.h"
-#import "MLOButton.h"
-#import "MLOMainViewController_Friend.h"
-#import "MLOGestureEngine_Impl.h"
-#import "MLORenderManager.h"
-#import "MLOSubView.h"
-#import "MLOResourceImage.h"
-#import "mlo_uno.h"
-
-@interface MLOFinder ()
-@property MLOSubView * blackBox;
-@property UILabel * label;
-@property UITextField * textField;
-@property NSString * lastSearched;
-@property NSDate * findTime;
-@property MLOButton * leftButton,* rightButton;
-@property NSInteger selectionCount,selectedIndex;
-@property MLOMainViewController * mainViewController;
-@end
-
-static const NSTimeInterval
-
- NAVIGATION_BUTTON_FADE_DURATION = 1.0f,
- FIND_DELAY = 1.0,
- FIND_INVOCATION=FIND_DELAY+0.01;
-
-static const CGFloat
- FADE_DURATION = 0.5f,
- FADE_IN_TARGET = 1.0f,
- FADE_OUT_TARGET = 0.0f,
-
- TEXT_AREA_WIDTH = 150.0f,
- SPACING_FROM_FIND_TOOLBAR_BUTTON=50.0f,
- BLACK_BOX_CORNER_RADIUS=15.0f,
-
- BLACK_BOX_INNER_PADDING_X = 10.0f,
- BLACK_BOX_INNER_PADDING_Y = 10.0f,
- TEXT_AREA_TO_NAVIAGATION_BUTTONS_SPACING = 5.0f,
-
- LABEL_HEIGHT = 18.0f,
- LABEL_TO_INPUT_FIELD_PADDING=8.0f,
-
- INPUT_FIELD_HEIGHT = 20.0f,
-
- BLACK_BOX_INNER_HEIGHT =LABEL_HEIGHT + LABEL_TO_INPUT_FIELD_PADDING + INPUT_FIELD_HEIGHT,
- BLACK_BOX_HEIGHT=2*BLACK_BOX_INNER_PADDING_Y + BLACK_BOX_INNER_HEIGHT;
-
-@implementation MLOFinder
-
--(id)initWithToolbarButton:(MLOToolbarButton *) findButton{
-
- self = [super init];
- if(self){
-
- self.selectedIndex = -1;
- self.selectionCount = -1;
-
- MLOResourceImage * leftButtonImage = [MLOResourceImage left];
- MLOResourceImage * rightButtonImage =[MLOResourceImage right];
-
- CGFloat leftButtonWidth =leftButtonImage.image.size.width;
- CGFloat rightButtonWidth = rightButtonImage.image.size.width;
-
- CGRect findButtonFrame = findButton.frame;
-
- CGFloat xOrigin = findButtonFrame.origin.x + findButtonFrame.size.width + SPACING_FROM_FIND_TOOLBAR_BUTTON;
- CGFloat yOrigin = findButtonFrame.origin.y;
-
- CGFloat leftButtonXOrigin = xOrigin + BLACK_BOX_INNER_PADDING_X;
-
- CGFloat textAreaXOrigin = leftButtonXOrigin +leftButtonWidth + TEXT_AREA_TO_NAVIAGATION_BUTTONS_SPACING;
- CGFloat textAreaYOrigin = yOrigin +BLACK_BOX_INNER_PADDING_Y;
-
- CGFloat rightButtonXOrigin = textAreaXOrigin + TEXT_AREA_WIDTH + TEXT_AREA_TO_NAVIAGATION_BUTTONS_SPACING;
-
- [self addBlackBoxXOrigin: xOrigin
- yOrigin: yOrigin
- width: leftButtonWidth +
- rightButtonWidth +
- (TEXT_AREA_TO_NAVIAGATION_BUTTONS_SPACING + BLACK_BOX_INNER_PADDING_X)*2 +
- TEXT_AREA_WIDTH ];
-
-
- [self addLabelXOrigin:textAreaXOrigin yOrigin:textAreaYOrigin];
- [self addTextFieldXOrigin:textAreaXOrigin yOrigin:textAreaYOrigin];
-
- self.leftButton =
- [self addButtonXOrigin:leftButtonXOrigin
- yOrigin:textAreaYOrigin
- image:leftButtonImage
- selector:@selector(onTapLeft)
- name:@"left (previous)"];
-
- self.rightButton =
- [self addButtonXOrigin:rightButtonXOrigin
- yOrigin:textAreaYOrigin
- image:rightButtonImage
- selector:@selector(onTapRight)
- name:@"right (next)"];
-
- self.lastSearched = @"";
- self.findTime = [NSDate date];
- }
- return self;
-}
--(void) onTapLeft{
- [self onTap:MARK_PREVIOUS];
-}
--(void) onTapRight{
- [self onTap:MARK_NEXT];
-}
-
--(void) onTap:(MLOFindSelectionType) type{
- self.selectedIndex = mlo_find(_lastSearched, type);
- [self updateLabel];
-
-}
-
--(void)updateLabel{
- CGFloat navigationAlpha;
- if(_selectionCount>0){
- self.label.text = [NSString stringWithFormat: @"Find (%d of %d)",_selectedIndex + 1,_selectionCount];
- navigationAlpha = 1.0f;
-
- }else{
-
- self.label.text = @"Find";
- navigationAlpha = 0.0f;
- }
-
- [self.mainViewController.gestureEngine.renderer renderNow];
-
- if(_leftButton.alpha != navigationAlpha){
- [UIView animateWithDuration:NAVIGATION_BUTTON_FADE_DURATION animations:^{
- _leftButton.alpha = navigationAlpha;
- _rightButton.alpha = navigationAlpha;
-
- }];
- }
-
-}
-
--(MLOButton *) addButtonXOrigin:(CGFloat) xOrigin yOrigin:(CGFloat) yOrigin image:(MLOResourceImage *) image selector:(SEL) selector name:(NSString *) buttonName{
- MLOButton * button = [MLOButton buttonWithImage:image];
-
- CGFloat height = image.image.size.height;
-
- if(height < BLACK_BOX_INNER_HEIGHT){
- yOrigin += (BLACK_BOX_INNER_HEIGHT - height)/2.0f;
- }
-
- button.frame = CGRectMake(xOrigin,yOrigin,image.image.size.width,height);
- button.alpha = 0.0f;
- [button addTarget:self action:selector];
- NSLog(@"Created the navigation button %@",buttonName);
- return button;
-}
-
--(void)addBlackBoxXOrigin:(CGFloat) xOrigin yOrigin:(CGFloat)yOrigin width:(CGFloat) width{
- self.blackBox =
- [[MLOSubView alloc]
- initWithFrame: CGRectMake(xOrigin,
- yOrigin,
- width,
- BLACK_BOX_HEIGHT)
- color: [UIColor blackColor]
- cornerRadius: BLACK_BOX_CORNER_RADIUS
- alpha: 0.0f];
-
- NSLog(@"Created finder blackbox");
-}
-
--(void) addLabelXOrigin:(CGFloat) xOrigin yOrigin:(CGFloat) yOrigin{
- self.label = [[UILabel alloc] initWithFrame:CGRectMake(xOrigin,
- yOrigin,
- TEXT_AREA_WIDTH,
- LABEL_HEIGHT)];
- _label.textColor=[UIColor whiteColor];
- _label.backgroundColor = [UIColor clearColor];
- _label.alpha=0.0f;
-
- [self updateLabel];
-}
-
--(void) addTextFieldXOrigin:(CGFloat) xOrigin yOrigin:(CGFloat) yOrigin{
- self.textField = [[UITextField alloc] initWithFrame:CGRectMake(xOrigin,
- yOrigin+LABEL_HEIGHT +LABEL_TO_INPUT_FIELD_PADDING,
- TEXT_AREA_WIDTH,
- INPUT_FIELD_HEIGHT)];
- _textField.text =@"";
- _textField.textColor = [UIColor blackColor];
- _textField.backgroundColor = [UIColor whiteColor];
- _textField.alpha = 0.0f;
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(onTextChanged)
- name:UITextFieldTextDidChangeNotification
- object:_textField];
-}
-
-
-
--(void)show{
- [self fadeTo:FADE_IN_TARGET];
- [_textField becomeFirstResponder];
-}
--(void)hide{
- [self fadeTo:FADE_OUT_TARGET];
-
- [_textField resignFirstResponder];
-}
-
--(void)fadeTo:(CGFloat) alphaTarget{
- if(_blackBox.alpha !=alphaTarget){
-
- BOOL isFadeNavigationButton = (_selectionCount > 0) || (alphaTarget == 0.0f);
-
- [UIView animateWithDuration:FADE_DURATION animations:^{
- _blackBox.alpha = alphaTarget;
- _label.alpha = alphaTarget;
- _textField.alpha = alphaTarget;
-
- if(isFadeNavigationButton){
- _leftButton.alpha = alphaTarget;
- _rightButton.alpha = alphaTarget;
- }
- }];
- }
-}
-
-
--(void)addToMainViewController:(MLOMainViewController *)mainViewController{
- [mainViewController.canvas addSubview:_blackBox];
- [mainViewController.canvas addSubview:_label];
- [mainViewController.canvas addSubview:_textField];
- [mainViewController.canvas addSubview:_leftButton];
- [mainViewController.canvas addSubview:_rightButton];
- self.mainViewController = mainViewController;
-}
-- (void)onTextChanged{
-
- self.findTime = [NSDate dateWithTimeIntervalSinceNow:FIND_DELAY];
-
- [self performSelector:@selector(invokeFind) withObject:nil afterDelay:FIND_INVOCATION];
-
-}
-
--(void) invokeFind{
-
- if(![[_findTime laterDate:[NSDate date]] isEqualToDate:_findTime]){
-
- NSInteger trimmedLength = [_textField.text stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]].length;
-
- if( (_textField.text.length > 0) &&
- (trimmedLength>0) &&
- ![_textField.text isEqualToString:_lastSearched]){
-
- self.lastSearched = [_textField.text copy];
-
- self.selectionCount = mlo_find(_lastSearched, MARK_FIRST);
- self.selectedIndex = 0;
-
- }else if(trimmedLength==0){
-
- self.lastSearched =@"";
- self.selectionCount = -1;
- self.selectedIndex = -1;
- }
-
- [self updateLabel];
- }
-}
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarButton.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarButton.h
deleted file mode 100644
index 5e6b297570f2..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarButton.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOButton.h"
-
-typedef void (^MLOToolbarButtonCallback)();
-#define MLO_TOOLBAR_BUTTON_STUB_CALLBACK ^{ NSLog(@"stub toolbar button callback");}
-
-
-@class MLOToolbarViewController,MLOResourceImage;
-
-typedef enum { AUTOMATIC, RETAP_OR_OTHER_TAPPED,RETAP_ONLY} MLOToolbarButtonTapReleaseType;
-#define MLOToolbarButtonTapReleaseTypeString(enum) [@[@"AUTOMATIC",@"RETAP_OR_OTHER_TAPPED",@"RETAP_ONLY"] objectAtIndex:enum]
-
-@interface MLOToolbarButton : MLOButton
-@property MLOResourceImage * alternateImage;
-
-+(MLOToolbarButton*)buttonWithImage:(MLOResourceImage *) image onTap:(MLOToolbarButtonCallback) onTap tapRelease:(MLOToolbarButtonTapReleaseType)type;
-+(MLOToolbarButton*)buttonWithImage:(MLOResourceImage *) image onTap:(MLOToolbarButtonCallback) onTap tapRelease:(MLOToolbarButtonTapReleaseType)type onTapRelease:(MLOToolbarButtonCallback)onTapRelease;
-
--(void)addToToolbarControler:(MLOToolbarViewController *) toolbar;
--(void)showLibreOffice;
--(void)hideLibreOffice;
--(void)onOtherButtonTapped;
--(void)switchImage;
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarButton.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarButton.m
deleted file mode 100644
index 5576ec9a19f9..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarButton.m
+++ /dev/null
@@ -1,157 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOToolbarButton.h"
-#import "MLOToolbarViewController.h"
-#import "MLOToolbarViewController_Impl.h"
-#import "MLOMainViewController.h"
-#import "MLOResourceImage.h"
-
-static const CGFloat
- TAPPED_ALPHA=1.0f,
- UNTAPPED_ALPHA=0.3f,
- BUTTON_IMAGE_X_EDGE_OF_CANVAS_PADDING = 40.0f,
- BUTTON_IMAGE_Y_EDGE_OF_CANVAS_PADDING = 30.0f,
- BUTTON_IMAGE_Y_SPACING = 40.0f,
- BUTTON_THICKENING = 10.f,
- FADE_TO_UNTAPPED_TIME=0.5f;
-
-static NSInteger toolbarButtonsTotalHeight=BUTTON_IMAGE_Y_EDGE_OF_CANVAS_PADDING;
-
-static const BOOL IS_FLASH_ON_TAP = NO;
-
-@interface MLOToolbarButton ()
-@property MLOToolbarViewController * toolbarController;
-@property (nonatomic,strong) MLOToolbarButtonCallback onTap, onTapRelease;
-@property BOOL isTapped,currentImageIsMain;
-@property MLOToolbarButtonTapReleaseType tapReleaseType;
-@property MLOResourceImage * mainImage;
-@end
-
-
-@implementation MLOToolbarButton
-
--(void)addToToolbarControler:(MLOToolbarViewController *) toolbar{
- self.toolbarController = toolbar;
-
-}
-+(MLOToolbarButton *)buttonWithImage:(MLOResourceImage *) image onTap:(MLOToolbarButtonCallback) onTap tapRelease:(MLOToolbarButtonTapReleaseType)type{
- return [MLOToolbarButton buttonWithImage:image onTap:onTap tapRelease:type onTapRelease:MLO_TOOLBAR_BUTTON_STUB_CALLBACK];
-}
-+(MLOToolbarButton *)buttonWithImage:(MLOResourceImage *) image onTap:(MLOToolbarButtonCallback) onTap tapRelease:(MLOToolbarButtonTapReleaseType)type onTapRelease:(MLOToolbarButtonCallback)onTapRelease
-{
-
- MLOToolbarButton * button = [MLOToolbarButton buttonWithType:UIButtonTypeCustom];
-
- if(button){
-
- button.mainImage = image;
- button.onTap = onTap;
- button.tapReleaseType = type;
- button.onTapRelease = onTapRelease;
- button.alternateImage=nil;
-
- static const CGFloat BUTTON_X=BUTTON_IMAGE_X_EDGE_OF_CANVAS_PADDING -BUTTON_THICKENING,
- BUTTON_TWICE_THICKENING=2.0f*BUTTON_THICKENING;
-
- button.frame = CGRectMake(BUTTON_X,
- toolbarButtonsTotalHeight-BUTTON_THICKENING,
- image.image.size.width + BUTTON_TWICE_THICKENING,
- image.image.size.height + BUTTON_TWICE_THICKENING);
-
- toolbarButtonsTotalHeight += image.image.size.height + BUTTON_IMAGE_Y_SPACING;
-
- [button reset:0];
- [button addAction:@selector(onTapAction)];
-
- }
- return button;
-}
-
--(BOOL)isHold{
- return _tapReleaseType != AUTOMATIC;
-}
-
--(void)releaseIfNeeded{
- if(_isTapped && [self isHold]){
- [self invokeOnTapRelease];
- }
- _isTapped = NO;
-}
-
--(void)reset:(CGFloat) alpha{
- [self releaseIfNeeded];
- self.alpha = alpha;
-}
-
--(void)onOtherButtonTapped{
- if(_tapReleaseType == RETAP_OR_OTHER_TAPPED){
- [self releaseIfNeeded];
- [self fadeToUntapped];
- }
-}
-
--(void)invokeOnTapRelease{
- [self invoke:_onTapRelease named:@"onTapRelease"];
-}
-
--(void)switchImage{
- if(_alternateImage!=nil){
-
- [self setDefaultImage:_currentImageIsMain ? _alternateImage.image : _mainImage.image ];
- _currentImageIsMain^=YES;
- }
-}
-- (void) onTapAction{
- if(_isTapped){
- if([self isHold]){
- [self fadeToUntapped];
- [self invokeOnTapRelease];
- }
- }else{
- _isTapped=YES;
-
- if(IS_FLASH_ON_TAP){
- [_toolbarController.mainViewController flash];
- }
- self.alpha = TAPPED_ALPHA;
- if(![self isHold]){
- [self fadeToUntapped];
- }
- [_toolbarController hideAllButtonsBut:self];
- [self invoke:_onTap named:@"onTap"];
- }
-}
-
--(void) fadeToUntapped{
- if(self.alpha>UNTAPPED_ALPHA){
-
- [UIView animateWithDuration:FADE_TO_UNTAPPED_TIME animations:^{
- self.alpha = UNTAPPED_ALPHA;
- }];
- }
-
- _isTapped = NO;
-}
-
--(void)showLibreOffice{
- [self setDefaultImage:_mainImage.image];
- _currentImageIsMain = YES;
- [self reset:UNTAPPED_ALPHA];
-}
-
--(void)hideLibreOffice{
- [self reset: 0];
-}
-
--(void) invoke:(MLOToolbarButtonCallback) callback named:(NSString *) name{
- callback();
- NSLog(@"%@ button perfromed: %@",_mainImage.name, name);
-}
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.h
deleted file mode 100644
index 454cf0134f51..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- Mode: ObjC; 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"
-
-@class MLOMainViewController,MLOToolbarButton;
-@interface MLOToolbarViewController : MLOViewController
--(id)initWithMainViewController:(MLOMainViewController *) mainViewController;
--(void)addToMainViewController;
--(void)showLibreOffice;
--(void)hideLibreOffice;
--(void) expandDidToggle;
--(BOOL) isTappable;
--(void) onRotate;
--(void)hideAllButtonsBut:(MLOToolbarButton *) showButton;
-@end
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
deleted file mode 100644
index 83a689cf7ef3..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.m
+++ /dev/null
@@ -1,137 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOToolbarViewController.h"
-#import "MLOMainViewController.h"
-#import "MLOToolbarButton.h"
-#import "MLOFinder.h"
-#import "MLOToolbarViewController_Impl.h"
-#import "MLOMainViewController_Friend.h"
-#import "MLOResourceImage.h"
-#import "MLOTopbarViewController.h"
-#import "MLOKeyboardManager.h"
-#import "mlo_uno.h"
-
-@interface MLOToolbarViewController ()
-@property NSArray * buttons;
-@property MLOToolbarButton * expandButton;
-@property MLOFinder * finder;
-@property CGFloat previousHeightOffset;
-@property BOOL tappable;
-@end
-
-@implementation MLOToolbarViewController
-
--(id)initWithMainViewController:(MLOMainViewController *) mainViewController{
- self = [self init];
- if (self) {
- self.mainViewController = mainViewController;
- self.buttons=@[[self createExpandButton],
- [self createFindButton],
- [self createEditButton],
- [self createSaveButton]
- //[self createPrintButton]
- ];
- self.tappable = NO;
-
- _previousHeightOffset=-1.0f;
-
- }
- return self;
-}
-
--(void)addToMainViewController{
-
- for (MLOToolbarButton * button in _buttons) {
-
- [button addToToolbarControler:self];
-
- [_mainViewController.canvas addSubview:button];
- }
- [_finder addToMainViewController:_mainViewController];
-}
-
--(void)showLibreOffice{
-
- for (MLOToolbarButton * button in _buttons) {
- [button showLibreOffice];
- }
-}
-
--(void)hideAllButtonsBut:(MLOToolbarButton *) showButton{
- for (MLOToolbarButton * button in _buttons) {
- if(![button isEqual:showButton]){
- [button onOtherButtonTapped];
- }
- }
-}
--(BOOL)isTappable{
- return _tappable;
-}
--(void)expandDidToggle{
- [_expandButton switchImage];
-}
-
--(MLOToolbarButton *)createExpandButton{
- self.expandButton=
- [MLOToolbarButton
- buttonWithImage: [MLOResourceImage expand]
- onTap: ^{ [self.mainViewController toggleExpand]; }
- tapRelease: AUTOMATIC];
-
- _expandButton.alternateImage =[MLOResourceImage shrink];
-
- return _expandButton;
-}
--(void) hideLibreOffice{
- for (MLOToolbarButton * button in _buttons) {
- [button hideLibreOffice];
- }
-}
-
--(MLOToolbarButton *)createFindButton{
- MLOToolbarButton* findButton=
- [MLOToolbarButton
- buttonWithImage: [MLOResourceImage find]
- onTap: ^{ [self.finder show]; }
- tapRelease: RETAP_OR_OTHER_TAPPED
- onTapRelease: ^{ [self.finder hide]; }];
-
- self.finder = [[MLOFinder alloc] initWithToolbarButton:findButton];
-
- return findButton;
-}
-
--(void)onRotate{
-}
-
--(MLOToolbarButton *)createEditButton{
- return [MLOToolbarButton
- buttonWithImage: [MLOResourceImage edit]
- onTap: ^{ self.tappable =YES; }
- tapRelease: RETAP_ONLY
- onTapRelease: ^{ self.tappable = NO;
- [self.mainViewController.keyboard hide];
- }];
-}
-
--(MLOToolbarButton *)createPrintButton{
- return [MLOToolbarButton
- buttonWithImage: [MLOResourceImage print]
- onTap: MLO_TOOLBAR_BUTTON_STUB_CALLBACK
- tapRelease: RETAP_OR_OTHER_TAPPED];
-}
-
--(MLOToolbarButton *)createSaveButton{
- return [MLOToolbarButton
- buttonWithImage: [MLOResourceImage save]
- onTap: ^{ mlo_save(); }
- tapRelease: AUTOMATIC];
-}
-
-@end
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController_Impl.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController_Impl.h
deleted file mode 100644
index 19eab1c92d5f..000000000000
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController_Impl.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// -*- Mode: ObjC; 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 "MLOToolbarViewController.h"
-
-@interface MLOToolbarViewController ()
-@property MLOMainViewController * mainViewController;
-@end