infrastructure for ios tile testing app

Change-Id: I1a3d10b7fb61b19664b383d29c6e607c01b90a71
This commit is contained in:
Ptyl Dragon 2013-10-17 17:00:02 +02:00 committed by Jan Holesovsky
parent 647d766c32
commit ae549ad1e6
21 changed files with 333 additions and 240 deletions

View File

@ -1526,7 +1526,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
"MLO_APP_ROLE=LO_APP",
);
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@ -1567,6 +1567,7 @@
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_INPUT_FILETYPE = automatic;
GCC_PREPROCESSOR_DEFINITIONS = "MLO_APP_ROLE=LO_APP";
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
@ -1629,6 +1630,71 @@
};
name = Release;
};
88A1330F181023A40091F25E /* Debug_tile_tester */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 688EAAE8180D3130003741B3 /* lo.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = armv7;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CLANG_X86_VECTOR_INSTRUCTIONS = default;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_INPUT_FILETYPE = automatic;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"MLO_APP_ROLE=TILE_TESTER",
"DEBUG=1",
);
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
../shared/ios_sharedlo/objective_c,
../shared/ios_sharedlo/objective_c/utils,
);
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
LIBRARY_SEARCH_PATHS = "";
LLVM_LTO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = armv7;
};
name = Debug_tile_tester;
};
88A13310181023A40091F25E /* Debug_tile_tester */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_DYNAMIC_NO_PIC = NO;
GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MobileLibreOffice/MobileLibreOffice-Prefix.pch";
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = "MobileLibreOffice/MobileLibreOffice-Info.plist";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
lib_link,
);
LLVM_LTO = NO;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug_tile_tester;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -1636,6 +1702,7 @@
isa = XCConfigurationList;
buildConfigurations = (
689EBB0B18069FB8002F1CD7 /* Debug */,
88A1330F181023A40091F25E /* Debug_tile_tester */,
689EBB0C18069FB8002F1CD7 /* Release */,
);
defaultConfigurationIsVisible = 0;
@ -1645,6 +1712,7 @@
isa = XCConfigurationList;
buildConfigurations = (
689EBB0E18069FB8002F1CD7 /* Debug */,
88A13310181023A40091F25E /* Debug_tile_tester */,
689EBB0F18069FB8002F1CD7 /* Release */,
);
defaultConfigurationIsVisible = 0;

View File

@ -45,6 +45,12 @@
689EBBA31806D22D002F1CD7 /* MLOToolbarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 689EBB851806D22D002F1CD7 /* MLOToolbarViewController.m */; };
68FDBE2E18053A140064DD74 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68FDBE2D18053A140064DD74 /* Foundation.framework */; };
68FDBE3518053A140064DD74 /* ios_sharedlo.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FDBE3418053A140064DD74 /* ios_sharedlo.m */; };
889B7929180FF928005A3149 /* MLOAppRoleLoApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 889B7928180FF928005A3149 /* MLOAppRoleLoApp.m */; };
889B792C180FF967005A3149 /* MLOAppRoleTileTester.m in Sources */ = {isa = PBXBuildFile; fileRef = 889B792B180FF967005A3149 /* MLOAppRoleTileTester.m */; };
889B7930180FFBA5005A3149 /* MLOAppRoleBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 889B792F180FFBA5005A3149 /* MLOAppRoleBase.m */; };
88A132FC181020320091F25E /* MLOTestingTileRendererViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A132FB181020320091F25E /* MLOTestingTileRendererViewController.m */; };
88A132FF1810204E0091F25E /* MLOTestingTileParametersViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A132FE1810204E0091F25E /* MLOTestingTileParametersViewController.m */; };
88A1330B1810213F0091F25E /* MLOAppRoleFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A1330A1810213E0091F25E /* MLOAppRoleFactory.m */; };
88A2ED23180D4D7C009F39C0 /* MLOKeyboardManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A2ED22180D4D7C009F39C0 /* MLOKeyboardManager.m */; };
/* End PBXBuildFile section */
@ -110,7 +116,7 @@
689EBB621806D22C002F1CD7 /* NSObject+MLOUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+MLOUtils.m"; sourceTree = "<group>"; };
689EBB641806D22C002F1CD7 /* MLOMainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOMainViewController.h; sourceTree = "<group>"; };
689EBB651806D22C002F1CD7 /* MLOMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLOMainViewController.m; sourceTree = "<group>"; };
689EBB661806D22C002F1CD7 /* MLOMainViewController_Impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOMainViewController_Impl.h; sourceTree = "<group>"; };
689EBB661806D22C002F1CD7 /* MLOMainViewController_Friend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOMainViewController_Friend.h; sourceTree = "<group>"; };
689EBB681806D22C002F1CD7 /* MLOTopbarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOTopbarViewController.h; sourceTree = "<group>"; };
689EBB691806D22C002F1CD7 /* MLOTopbarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLOTopbarViewController.m; sourceTree = "<group>"; };
689EBB6B1806D22C002F1CD7 /* MLOScrollerData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOScrollerData.h; sourceTree = "<group>"; };
@ -143,6 +149,21 @@
68FDBE3118053A140064DD74 /* ios_sharedlo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ios_sharedlo-Prefix.pch"; sourceTree = "<group>"; };
68FDBE3218053A140064DD74 /* ios_sharedlo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ios_sharedlo.h; path = ../ios_sharedlo.h; sourceTree = "<group>"; };
68FDBE3418053A140064DD74 /* ios_sharedlo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ios_sharedlo.m; path = ../ios_sharedlo.m; sourceTree = "<group>"; };
889B7927180FF928005A3149 /* MLOAppRoleLoApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOAppRoleLoApp.h; path = role/MLOAppRoleLoApp.h; sourceTree = "<group>"; };
889B7928180FF928005A3149 /* MLOAppRoleLoApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOAppRoleLoApp.m; path = role/MLOAppRoleLoApp.m; sourceTree = "<group>"; };
889B792A180FF967005A3149 /* MLOAppRoleTileTester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOAppRoleTileTester.h; path = role/MLOAppRoleTileTester.h; sourceTree = "<group>"; };
889B792B180FF967005A3149 /* MLOAppRoleTileTester.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOAppRoleTileTester.m; path = role/MLOAppRoleTileTester.m; sourceTree = "<group>"; };
889B792D180FF9E2005A3149 /* MLOMainViewController_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MLOMainViewController_Private.h; sourceTree = "<group>"; };
889B792E180FFBA5005A3149 /* MLOAppRoleBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOAppRoleBase.h; path = role/MLOAppRoleBase.h; sourceTree = "<group>"; };
889B792F180FFBA5005A3149 /* MLOAppRoleBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOAppRoleBase.m; path = role/MLOAppRoleBase.m; sourceTree = "<group>"; };
889B793618101709005A3149 /* MLOAppRoleProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MLOAppRoleProtocol.h; path = role/MLOAppRoleProtocol.h; sourceTree = "<group>"; };
88A132FA181020320091F25E /* MLOTestingTileRendererViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOTestingTileRendererViewController.h; path = testing_tiles/MLOTestingTileRendererViewController.h; sourceTree = "<group>"; };
88A132FB181020320091F25E /* MLOTestingTileRendererViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOTestingTileRendererViewController.m; path = testing_tiles/MLOTestingTileRendererViewController.m; sourceTree = "<group>"; };
88A132FD1810204E0091F25E /* MLOTestingTileParametersViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOTestingTileParametersViewController.h; path = testing_tiles/MLOTestingTileParametersViewController.h; sourceTree = "<group>"; };
88A132FE1810204E0091F25E /* MLOTestingTileParametersViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOTestingTileParametersViewController.m; path = testing_tiles/MLOTestingTileParametersViewController.m; sourceTree = "<group>"; };
88A13300181020E40091F25E /* MLOTestingTileSubviewControllerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MLOTestingTileSubviewControllerProtocol.h; path = testing_tiles/MLOTestingTileSubviewControllerProtocol.h; sourceTree = "<group>"; };
88A133091810213E0091F25E /* MLOAppRoleFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLOAppRoleFactory.h; path = role/MLOAppRoleFactory.h; sourceTree = "<group>"; };
88A1330A1810213E0091F25E /* MLOAppRoleFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MLOAppRoleFactory.m; path = role/MLOAppRoleFactory.m; sourceTree = "<group>"; };
88A2ED21180D4D7C009F39C0 /* MLOKeyboardManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLOKeyboardManager.h; sourceTree = "<group>"; };
88A2ED22180D4D7C009F39C0 /* MLOKeyboardManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLOKeyboardManager.m; sourceTree = "<group>"; };
88E94760180D4E9800771808 /* MLOToolbarViewController_Impl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MLOToolbarViewController_Impl.h; sourceTree = "<group>"; };
@ -257,9 +278,12 @@
689EBB631806D22C002F1CD7 /* view_controllers */ = {
isa = PBXGroup;
children = (
889B7926180FF8DF005A3149 /* role */,
889EBEC0180F04A300A34A68 /* testing_tiles */,
689EBB641806D22C002F1CD7 /* MLOMainViewController.h */,
689EBB661806D22C002F1CD7 /* MLOMainViewController_Friend.h */,
889B792D180FF9E2005A3149 /* MLOMainViewController_Private.h */,
689EBB651806D22C002F1CD7 /* MLOMainViewController.m */,
689EBB661806D22C002F1CD7 /* MLOMainViewController_Impl.h */,
689EBB681806D22C002F1CD7 /* MLOTopbarViewController.h */,
689EBB691806D22C002F1CD7 /* MLOTopbarViewController.m */,
689EBB6A1806D22C002F1CD7 /* scroller */,
@ -360,6 +384,34 @@
name = "Supporting Files";
sourceTree = "<group>";
};
889B7926180FF8DF005A3149 /* role */ = {
isa = PBXGroup;
children = (
889B7927180FF928005A3149 /* MLOAppRoleLoApp.h */,
889B7928180FF928005A3149 /* MLOAppRoleLoApp.m */,
889B792A180FF967005A3149 /* MLOAppRoleTileTester.h */,
889B792B180FF967005A3149 /* MLOAppRoleTileTester.m */,
889B792E180FFBA5005A3149 /* MLOAppRoleBase.h */,
889B792F180FFBA5005A3149 /* MLOAppRoleBase.m */,
88A133091810213E0091F25E /* MLOAppRoleFactory.h */,
88A1330A1810213E0091F25E /* MLOAppRoleFactory.m */,
889B793618101709005A3149 /* MLOAppRoleProtocol.h */,
);
name = role;
sourceTree = "<group>";
};
889EBEC0180F04A300A34A68 /* testing_tiles */ = {
isa = PBXGroup;
children = (
88A132FA181020320091F25E /* MLOTestingTileRendererViewController.h */,
88A132FB181020320091F25E /* MLOTestingTileRendererViewController.m */,
88A132FD1810204E0091F25E /* MLOTestingTileParametersViewController.h */,
88A132FE1810204E0091F25E /* MLOTestingTileParametersViewController.m */,
88A13300181020E40091F25E /* MLOTestingTileSubviewControllerProtocol.h */,
);
name = testing_tiles;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -446,6 +498,12 @@
689EBBA21806D22D002F1CD7 /* MLOToolbarButton.m in Sources */,
689EBBA31806D22D002F1CD7 /* MLOToolbarViewController.m in Sources */,
88A2ED23180D4D7C009F39C0 /* MLOKeyboardManager.m in Sources */,
889B7929180FF928005A3149 /* MLOAppRoleLoApp.m in Sources */,
889B792C180FF967005A3149 /* MLOAppRoleTileTester.m in Sources */,
889B7930180FFBA5005A3149 /* MLOAppRoleBase.m in Sources */,
88A132FC181020320091F25E /* MLOTestingTileRendererViewController.m in Sources */,
88A132FF1810204E0091F25E /* MLOTestingTileParametersViewController.m in Sources */,
88A1330B1810213F0091F25E /* MLOAppRoleFactory.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -470,8 +528,8 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"MLO_APP_ROLE=LO_APP",
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@ -508,6 +566,7 @@
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_PREPROCESSOR_DEFINITIONS = "MLO_APP_ROLE=LO_APP";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
@ -560,6 +619,63 @@
};
name = Release;
};
88A1331218102A8F0091F25E /* Debug_tile_tester */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 689EBADD1806975D002F1CD7 /* lo.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = armv7;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"MLO_APP_ROLE=TILE_TESTER",
"DEBUG=1",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"$(LO_BUILDDIR)/config_host",
"$(LO_SRCDIR)/include",
"$(LO_WORKDIR)/UnoApiHeadersTarget/udkapi/comprehensive",
"$(LO_WORKDIR)/UnoApiHeadersTarget/offapi/comprehensive",
);
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
LD_NO_PIE = NO;
LINK_WITH_STANDARD_LIBRARIES = NO;
LLVM_LTO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug_tile_tester;
};
88A1331318102A8F0091F25E /* Debug_tile_tester */ = {
isa = XCBuildConfiguration;
buildSettings = {
DSTROOT = /tmp/ios_sharedlo.dst;
GCC_DYNAMIC_NO_PIC = NO;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ios_sharedlo/ios_sharedlo-Prefix.pch";
LD_NO_PIE = NO;
LINK_WITH_STANDARD_LIBRARIES = NO;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
VALID_ARCHS = armv7;
};
name = Debug_tile_tester;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -567,6 +683,7 @@
isa = XCConfigurationList;
buildConfigurations = (
68FDBE3618053A140064DD74 /* Debug */,
88A1331218102A8F0091F25E /* Debug_tile_tester */,
68FDBE3718053A140064DD74 /* Release */,
);
defaultConfigurationIsVisible = 0;
@ -576,6 +693,7 @@
isa = XCConfigurationList;
buildConfigurations = (
68FDBE3918053A140064DD74 /* Debug */,
88A1331318102A8F0091F25E /* Debug_tile_tester */,
68FDBE3A18053A140064DD74 /* Release */,
);
defaultConfigurationIsVisible = 0;

View File

@ -10,12 +10,11 @@
#import "MLOInvoker.h"
@class MLOMainViewController;
@interface MLOManager : UIResponder <UIApplicationDelegate,UITextViewDelegate>
@property (strong,nonatomic) MLOMainViewController * mainViewController;
@interface MLOManager : UIResponder <UIApplicationDelegate>
@property MLOMainViewController * mainViewController;
+(MLOManager *) getInstance;
-(BOOL) textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
-(void)openInLibreOfficeFilePath:(NSString *) filePath fileNameWithExtension:(NSString *) fileName superView:(UIView *) superview window:(UIWindow *) window invoker:(NSObject<MLOInvoker> *) invoker;
-(void)openInLibreOfficeFilePath:(NSString *) filePath superView:(UIView *) superview window:(UIWindow *) window invoker:(NSObject<MLOInvoker> *) invoker;
-(void) hideLibreOffice;
@ -23,5 +22,4 @@
-(NSString *)extension;
-(CGRect)bounds;
-(void)start;
@end

View File

@ -136,23 +136,6 @@ static const NSTimeInterval FADE_IN_DURATION = 0.3;
}
}
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
NSLog(@"textView: %@ shouldChangeTextInRange:[%u,%u] replacementText:%@", textView, range.location, range.length, text);
int length =[text length];
for (NSUInteger i = 0; i < length; i++){
touch_lo_keyboard_input([text characterAtIndex: i]);
}
if(length>0){
[self.mainViewController onTextEdit];
}
return NO;
}
-(void) hideLibreOffice{
[self.invoker willHideLibreOffice];

View File

@ -7,7 +7,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import "MLOAnimation.h"
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLORenderManager_Impl.h"
#import "MLOSelectionViewController.h"
#import "MLOScrollerViewController.h"

View File

@ -8,7 +8,7 @@
#import "MLOGestureLimiter.h"
#import "MLOGestureEngine_Impl.h"
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLOScrollerData.h"
#import "MLOScrollerViewController.h"
#import "MLORenderManager_Impl.h"

View File

@ -7,7 +7,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import "MLOKeyboardManager.h"
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLOManager.h"
#import "MLOGestureEngine_Impl.h"
#include <touch/touch.h>
@ -65,9 +65,15 @@
{
NSLog(@"textView: %@ shouldChangeTextInRange:[%u,%u] replacementText:%@", textView, range.location, range.length, text);
for (NSUInteger i = 0; i < [text length]; i++){
NSInteger length = [text length];
for (NSUInteger i = 0; i < length; i++){
touch_lo_keyboard_input([text characterAtIndex: i]);
}
if(length>0){
[self.mainViewController onTextEdit];
}
return NO;
}

View File

@ -53,7 +53,7 @@ static CGFloat averageFps,maxFps;
- (void)drawRect:(CGRect)rect
{
if(ENABLE_LO_DESKTOP){
CGContextRef context = UIGraphicsGetCurrentContext();
//rect = self.frame;
@ -94,6 +94,7 @@ static CGFloat averageFps,maxFps;
[_manager swapPreviousBuffer:_previous withNextBuffer:self];
}
}
}
+(CGFloat) getAverageFps{
return max(averageFps, MIN_FPS);

View File

@ -250,6 +250,8 @@ typedef enum {X,Y,Z} MLOGestureDirection;
-(void) renderWithRect:(CGRect) rect{
if(ENABLE_LO_DESKTOP){
switch(self.currentGesture){
case PAN:
{
@ -287,6 +289,7 @@ typedef enum {X,Y,Z} MLOGestureDirection;
break;
}
}
}
-(void)renderNow{
[[self getNextBuffer] setNeedsDisplayInRect:self.bufferFrame];

View File

@ -9,6 +9,11 @@
#ifndef __Mobile_LibreOffice_MLOCommon_h__
#define __Mobile_LibreOffice_MLOCommon_h__
typedef enum { LO_APP, TILE_TESTER} MLOAppRole;
#define MLOAppRoleString(enum) [@[@"LO_APP",@"RENDER_TILE_TESTER"] objectAtIndex:enum]
static const MLOAppRole APP_ROLE = MLO_APP_ROLE;
static const BOOL ENABLE_LO_DESKTOP = APP_ROLE == LO_APP;
static const BOOL
LOG_DRAW_RECT = NO,
LOG_GET_VIEW_DATA = YES,

View File

@ -16,24 +16,15 @@
#import "MLORenderManager.h"
#import "NSObject+MLOUtils.h"
#import "MLOTopbarViewController.h"
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Private.h"
#import "MLOKeyboardManager.h"
#import "MLOAppRoleFactory.h"
#import "MLOAppRoleBase.h"
#import "mlo_uno.h"
@interface MLOMainViewController ()
@property BOOL focused;
@property CGFloat topBarHeight;
@property UIView * flasher;
@property MLOTopbarViewController * topbar;
@property MLOToolbarViewController * toolbar;
@end
static const CGFloat
FLASH_DURATION= 0.2f,
EXPAND_DURATION=0.5f,
ROTATE_FLASH_DURATION=0.5f;
EXPAND_DURATION=0.5f;
@implementation MLOMainViewController
@ -47,19 +38,19 @@ static const CGFloat
-(void)showLibreOffice:(UIWindow *) window{
_topBarHeight = TOP_BAR_HEIGHT;
self.topBarHeight = TOP_BAR_HEIGHT;
[[UIApplication sharedApplication]setStatusBarHidden:YES];
self.view.bounds = self.view.frame = [self getFullFrameForRect:self.view.frame];
[_renderManager setWidth:self.view.frame.size.width height:self.view.frame.size.height];
[_gestureEngine showLibreOffice:window];
[self.role initWindow:window];
[self onStart];
[_topbar showLibreOffice];
[_toolbar showLibreOffice];
[self.topbar showLibreOffice];
[self.role showLibreOffice];
}
@ -72,21 +63,12 @@ static const CGFloat
if(self.focused){
self.focused = NO;
[self.topbar hideLibreOffice];
[self.toolbar hideLibreOffice];
[self resetSubviews];
[self.topbar hideLibreOffice];
[[UIApplication sharedApplication]setStatusBarHidden:NO];
[self.gestureEngine hideLibreOffice];
[self.scroller hideLibreOffice];
[self.selection reset];
[self.keyboard hide];
[self.role hideLibreOffice];
[self.view removeFromSuperview];
[[MLOManager getInstance] hideLibreOffice];
@ -94,14 +76,12 @@ static const CGFloat
}
-(void)initCanvas{
self.view.frame = self.view.bounds =[self getFullFrameForRect:[[MLOManager getInstance] bounds]];
self.canvas = [[UIView alloc]
initWithFrame:CGRectMake(0,
CGRect canvasRect = CGRectMake(0,
TOP_BAR_HEIGHT,
self.view.frame.size.width,
self.view.frame.size.height - TOP_BAR_HEIGHT)];
self.view.frame.size.height - TOP_BAR_HEIGHT);
self.canvas = [[UIView alloc] initWithFrame:canvasRect];
self.canvas.clipsToBounds = YES;
self.canvas.backgroundColor = [UIColor whiteColor];
}
@ -110,42 +90,32 @@ static const CGFloat
self = [super init];
if(self){
self.role = [MLOAppRoleFactory getInstanceWithMainViewController:self];
[self initCanvas];
self.scroller = [[MLOScrollerViewController alloc] initWithMainViewController:self];
self.selection = [[MLOSelectionViewController alloc] initWithMainViewController: self];
self.toolbar = [[MLOToolbarViewController alloc] initWithMainViewController:self];
[self.role initSubviews];
self.topbar = [[MLOTopbarViewController alloc] initWithMainViewController:self];
self.flasher =[[UIView alloc] initWithFrame:CGRECT_ZERO];
self.keyboard = [[MLOKeyboardManager alloc]initWithMainViewController:self];
_flasher.alpha = 0.0f;
_flasher.backgroundColor = [UIColor whiteColor];
self.gestureEngine = nil;
[self addSubviews];
[self onStart];
_focused =NO;
_topBarHeight = TOP_BAR_HEIGHT;
self.focused = NO;
self.topBarHeight = TOP_BAR_HEIGHT;
}
return self;
}
-(void) flash{
_flasher.frame =self.view.frame;
_flasher.alpha = 1.0f;
self.flasher.frame =self.view.frame;
self.flasher.alpha = 1.0f;
[self.view addSubview:_flasher];
[UIView animateWithDuration:FLASH_DURATION animations:^{
_flasher.alpha=0.0f;
self.flasher.alpha=0.0f;
} completion:^(BOOL finished) {
[_flasher removeFromSuperview];
[self.flasher removeFromSuperview];
}];
}
@ -155,91 +125,50 @@ static const CGFloat
[UIView animateWithDuration:EXPAND_DURATION animations:^(void){
_canvas.frame = CGRectMake(0, targetHeight, mainFrame.size.width, mainFrame.size.height - targetHeight);
_renderManager.view.alpha= 0.0f;
self.canvas.frame = CGRectMake(0, targetHeight, mainFrame.size.width, mainFrame.size.height - targetHeight);
self.renderManager.view.alpha= 0.0f;
} completion:^(BOOL completed){
_topBarHeight = targetHeight;
self.topBarHeight = targetHeight;
[self rotate];
[_toolbar expandDidToggle];
[self.toolbar expandDidToggle];
}];
}
-(void)resize{
CGRect mainViewRect = [self getFullFrameForRect:self.view.bounds];
LOG_RECT(mainViewRect, @"MLO Resize: main view");
self.view.bounds = self.view.frame = mainViewRect;
CGFloat width = self.view.frame.size.width;
CGFloat height = self.view.frame.size.height - _topBarHeight;
CGFloat height = self.view.frame.size.height - self.topBarHeight;
CGRect canvasRect =CGRectMake(0, _topBarHeight, width, height);
_canvas.frame = canvasRect;
[_renderManager setWidth:width height:height];
self.canvas.frame = canvasRect;
[self.role setWidth:width height:height];
LOG_RECT(canvasRect, @"MLO Resize: canvas");
}
-(void) addSubviews{
[_topbar addToMainViewController];
[self.view addSubview:_canvas];
[self.topbar addToMainViewController];
[self.view addSubview:self.canvas];
self.view.backgroundColor = [UIColor whiteColor];
self.renderManager = [MLORenderManager getInstance];
[self resize];
[self.canvas addSubview: _renderManager.view];
self.gestureEngine = [[MLOGestureEngine alloc] initWithMainViewController:self];
[_toolbar addToMainViewController];
[_scroller addToMainViewController];
[_selection addToMainViewController];
[_keyboard addToMainViewController];
[self.role addSubviews];
}
-(void)rotate{
if(_focused){
NSLog(@"MLO rotate");
_renderManager.view.alpha= 0.0f;
[self resize];
[_gestureEngine onRotate];
[_topbar onRotate];
[_scroller reset];
[_scroller showLibreOffice];
[_selection onRotate];
[_toolbar onRotate];
[UIView animateWithDuration:ROTATE_FLASH_DURATION animations:^(void){
_renderManager.view.alpha=1.0f;
}];
if(self.focused){
[self.role rotate];
}
}
-(void)resetSubviews{
[_gestureEngine reset];
[_scroller reset];
[_selection reset];

View File

@ -1,18 +0,0 @@
// -*- Mode: Objective-C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
//
// This file is part of the LibreOffice project.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import "MLOMainViewController.h"
static const CGFloat TOP_BAR_HEIGHT =40.0f;
@class MLOGestureEngine,MLORenderManager;
@interface MLOMainViewController ()
@property MLOGestureEngine * gestureEngine;
@property MLORenderManager * renderManager;
-(void) toggleExpand;
@end

View File

@ -7,7 +7,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import "MLOTopbarViewController.h"
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLOMainViewController.h"
#import "MLOButton.h"
#import "MLOResourceImage.h"

View File

@ -7,7 +7,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import "MLOScrollerData.h"
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLOGestureEngine_Impl.h"
#import "MLOScrollerGridViewController.h"
#import "MLOScrollerTooltip.h"

View File

@ -6,7 +6,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLOMagnifier.h"
#import "MLOResourceImage.h"
#import "MLORenderManager.h"

View File

@ -7,7 +7,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import "MLOSelectionHandle.h"
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLOSelectionViewController_Impl.h"
#import "MLOGestureEngine_Impl.h"
#import "MLOResourceImage.h"

View File

@ -6,7 +6,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLOSelectionViewController_Impl.h"
#import "MLOContextualMenuFocus.h"
#import "MLOSelectionHandle.h"

View File

@ -8,7 +8,7 @@
#import "MLOThesaurusViewController.h"
#import "MLOSelectionViewController_Impl.h"
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLOGestureEngine_Impl.h"
static const CGFloat THESAURUS_PADDING = 100.0f;

View File

@ -9,7 +9,7 @@
#import "MLOFinder.h"
#import "MLOToolbarButton.h"
#import "MLOButton.h"
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLOGestureEngine_Impl.h"
#import "MLORenderManager.h"
#import "MLOSubView.h"

View File

@ -11,7 +11,7 @@
#import "MLOToolbarButton.h"
#import "MLOFinder.h"
#import "MLOToolbarViewController_Impl.h"
#import "MLOMainViewController_Impl.h"
#import "MLOMainViewController_Friend.h"
#import "MLOResourceImage.h"
#import "MLOTopbarViewController.h"
#import "MLOKeyboardManager.h"