diff options
Diffstat (limited to 'ios/MobileLibreOffice/MobileLibreOffice')
40 files changed, 0 insertions, 1149 deletions
diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Default-568h@2x.png b/ios/MobileLibreOffice/MobileLibreOffice/Default-568h@2x.png Binary files differdeleted file mode 100644 index 0891b7aabfcf..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Default-568h@2x.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Default.png b/ios/MobileLibreOffice/MobileLibreOffice/Default.png Binary files differdeleted file mode 100644 index 4c8ca6f693f9..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Default.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Default@2x.png b/ios/MobileLibreOffice/MobileLibreOffice/Default@2x.png Binary files differdeleted file mode 100644 index 35b84cffeb4d..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Default@2x.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/MLOAppDelegate.h b/ios/MobileLibreOffice/MobileLibreOffice/MLOAppDelegate.h deleted file mode 100644 index 98d8ba277631..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/MLOAppDelegate.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> -#import "MLOInvoker.h" - -@class MLOAppViewController; - -@interface MLOAppDelegate : UIResponder <UIApplicationDelegate,MLOInvoker> - -@property (strong, nonatomic) UIWindow *window; - -@property (strong, nonatomic) MLOAppViewController *viewController; - -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/MLOAppDelegate.m b/ios/MobileLibreOffice/MobileLibreOffice/MLOAppDelegate.m deleted file mode 100644 index bbea665ef95a..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/MLOAppDelegate.m +++ /dev/null @@ -1,113 +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 "MLOAppDelegate.h" -#import "MLOAppViewController.h" -#import "MLOFileManagerViewController.h" -#import "MLOManager.h" -#import "NSObject+MLOUtils.h" - - -@implementation MLOAppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - - [[UIApplication sharedApplication]setStatusBarHidden:YES]; - - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - - self.viewController = [[MLOAppViewController alloc] initWithAppDelegate:self]; - - self.window.rootViewController = self.viewController; - - [self.window makeKeyAndVisible]; - - [[UIApplication sharedApplication]setStatusBarHidden:YES]; - - [[MLOManager getInstance] application:application didFinishLaunchingWithOptions:launchOptions]; - - [[MLOManager getInstance] start]; - - [self.viewController.fileManager show]; - - - return YES; -} - - -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation -{ - if (url != nil && [url isFileURL]) { - - for (NSString * extension in @[@"docx",@"odt"]) { - if([[[url pathExtension]lowercaseString] isEqualToString:extension]){ - - [self.viewController.fileManager openFilePath:[url path]]; - } - } - - } - - return YES; -} - --(void)willShowLibreOffice{ - -} --(void)didShowLibreOffice{ - -} --(void)willHideLibreOffice{ - -} --(void)didHideLibreOffice{ - - [self.viewController.fileManager didHideLibreOffice]; -} --(CGRect) bounds{ - return self.window.bounds; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - - [[MLOManager getInstance] applicationWillResignActive:application]; -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - - [[MLOManager getInstance] applicationDidEnterBackground:application]; -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - - [[MLOManager getInstance] applicationWillEnterForeground:application]; -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - - [[MLOManager getInstance] applicationWillTerminate:application]; -} - - -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/MLOAppViewController.h b/ios/MobileLibreOffice/MobileLibreOffice/MLOAppViewController.h deleted file mode 100644 index a111dc80b367..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/MLOAppViewController.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 <UIKit/UIKit.h> - -@class MLOFileManagerViewController; -@class MLOAppDelegate; - -@interface MLOAppViewController : UIViewController -@property MLOFileManagerViewController * fileManager; -@property MLOAppDelegate * appDelegate; - --(id)initWithAppDelegate:(MLOAppDelegate *)appDelegate; --(CGRect)currentFullscreenFrame; - -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/MLOAppViewController.m b/ios/MobileLibreOffice/MobileLibreOffice/MLOAppViewController.m deleted file mode 100644 index eaef55f53861..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/MLOAppViewController.m +++ /dev/null @@ -1,131 +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 "MLOAppViewController.h" -#import "MLOAppDelegate.h" -#import "MLOManager.h" -#import "MLOFileManagerViewController.h" -#import "MLOResourceImage.h" - -static const CGFloat LOGO_SCALE_RATIO = 0.5f; -static const CGFloat BACKGROUND_ALPHA = 0.4f; -static const NSTimeInterval FADE_IN_DURATION = 1.0f; - -@interface MLOAppViewController () -@property UIView * backgroundImage; -@property CGRect currentFullscreenFrame; -@end - -@implementation MLOAppViewController - --(id)initWithAppDelegate:(MLOAppDelegate *)appDelegate{ - self = [self init]; - if(self){ - - self.appDelegate = appDelegate; - - [self addLoBackground]; - - [self rotateTo:[[UIApplication sharedApplication] statusBarOrientation]]; - - self.fileManager = [[MLOFileManagerViewController alloc] initWithAppViewController:self]; - - - } - return self; - -} - --(void)addLoBackground{ - - self.view.backgroundColor = [UIColor whiteColor]; - - self.backgroundImage = [[UIView alloc] initWithFrame:CGRECT_ZERO]; - - [self.view addSubview:self.backgroundImage]; - [self.view sendSubviewToBack:self.backgroundImage]; - - -} - --(CGRect)backgroundRectForOrientation:(UIInterfaceOrientation) orientation{ - - CGRect appBounds = [self.appDelegate bounds]; - CGFloat bigger = appBounds.size.height; - CGFloat smaller = appBounds.size.width; - - if(smaller>bigger){ - bigger= smaller; - smaller = appBounds.size.height; - } - - CGFloat frameWidth,frameHeight; - - if((orientation == UIInterfaceOrientationLandscapeLeft) || - (orientation == UIInterfaceOrientationLandscapeRight)){ - frameHeight = smaller; - frameWidth = bigger; - }else{ - frameHeight= bigger; - frameWidth = smaller; - } - - self.currentFullscreenFrame = CGRectMake(0,0,frameWidth,frameHeight); - - CGFloat width = frameWidth * LOGO_SCALE_RATIO; - - UIImage * logo = [MLOResourceImage loLogo]; - - CGFloat height = (width / logo.size.width) * logo.size.height; - CGFloat originX = (frameWidth- width) /2.0f; - CGFloat originY = (frameHeight - (height+((width-height)/2.0f))) /2.0f; - - return CGRectMake(originX,originY,width,height); -} - --(void)adjustLoBackground:(UIInterfaceOrientation) orientation{ - - self.backgroundImage.alpha = 0.0f; - - self.backgroundImage.frame = [self backgroundRectForOrientation:orientation]; - - UIGraphicsBeginImageContext( self.backgroundImage.frame.size); - [[MLOResourceImage loLogo] drawInRect: self.backgroundImage.bounds]; - UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - - self.backgroundImage.backgroundColor = [UIColor colorWithPatternImage:image]; - - [UIView animateWithDuration:FADE_IN_DURATION animations:^{ - self.backgroundImage.alpha = BACKGROUND_ALPHA; - }]; - -} - --(void)rotateTo:(UIInterfaceOrientation) orientation{ - - [self adjustLoBackground:orientation]; - - [self.fileManager onRotate]; -} --(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{ - - [UIView animateWithDuration:duration*0.7f animations:^{ - - self.backgroundImage.alpha = 0.0f; - }]; - - [self rotateTo:toInterfaceOrientation]; -} - --(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{ - - [[MLOManager getInstance] application:nil didChangeStatusBarFrame:self.view.frame]; -} - -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Info.plist b/ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Info.plist deleted file mode 100644 index 89629633e327..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Info.plist +++ /dev/null @@ -1,116 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>en</string> - <key>CFBundleDisplayName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundleDocumentTypes</key> - <array> - <dict> - <key>CFBundleTypeIconFiles</key> - <array> - <string>mlo-icon-29</string> - <string>mlo-icon-57</string> - <string>mlo-icon-58</string> - <string>mlo-icon-114</string> - </array> - <key>CFBundleTypeName</key> - <string>MobileLibreOFfice</string> - <key>LSItemContentTypes</key> - <array> - <string>com.oracle.odt</string> - <string>com.microsoft.word.doc</string> - <string>com.microsoft.word.docx</string> - </array> - </dict> - </array> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIcons</key> - <dict> - <key>CFBundlePrimaryIcon</key> - <dict> - <key>CFBundleIconFiles</key> - <array> - <string>mlo-icon-114.png</string> - <string>mlo-icon-72.png</string> - <string>mlo-icon-144.png</string> - <string>mlo-icon-57.png</string> - </array> - </dict> - </dict> - <key>CFBundleIdentifier</key> - <string>com.libreoffice.${PRODUCT_NAME:rfc1034identifier}</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1.0</string> - <key>LSRequiresIPhoneOS</key> - <true/> - <key>UIRequiredDeviceCapabilities</key> - <array> - <string>armv7</string> - </array> - <key>UISupportedInterfaceOrientations</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - <string>UIInterfaceOrientationLandscapeLeft</string> - <string>UIInterfaceOrientationLandscapeRight</string> - <string>UIInterfaceOrientationPortraitUpsideDown</string> - </array> - <key>UISupportedInterfaceOrientations~ipad</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - <string>UIInterfaceOrientationPortraitUpsideDown</string> - <string>UIInterfaceOrientationLandscapeLeft</string> - <string>UIInterfaceOrientationLandscapeRight</string> - </array> - <key>UTImportedTypeDeclarations</key> - <array> - <dict> - <key>UTTypeConformsTo</key> - <array> - <string>public.data</string> - </array> - <key>UTTypeDescription</key> - <string>Microsoft Office File</string> - <key>UTTypeIdentifier</key> - <string>com.microsoft.word.docx</string> - <key>UTTypeTagSpecification</key> - <dict> - <key>public.filename-extension</key> - <string>docx</string> - <key>public.mime-type</key> - <string>application/msword</string> - </dict> - </dict> - <dict> - <key>UTTypeConformsTo</key> - <array> - <string>public.data</string> - </array> - <key>UTTypeDescription</key> - <string>Open Office File</string> - <key>UTTypeIdentifier</key> - <string>com.oracle.odt</string> - <key>UTTypeTagSpecification</key> - <dict> - <key>public.filename-extension</key> - <string>odt</string> - <key>public.mime-type</key> - <string>application/msword</string> - </dict> - </dict> - </array> -</dict> -</plist> diff --git a/ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Prefix.pch b/ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Prefix.pch deleted file mode 100644 index d4eb9311df90..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Prefix.pch +++ /dev/null @@ -1,14 +0,0 @@ -// -// Prefix header for all source files of the 'MobileLibreOffice' target in the 'MobileLibreOffice' project -// - -#import <Availability.h> - -#ifndef __IPHONE_5_0 -#warning "This project uses features only available in iOS SDK 5.0 and later." -#endif - -#ifdef __OBJC__ - #import <UIKit/UIKit.h> - #import <Foundation/Foundation.h> -#endif diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonBack.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonBack.png Binary files differdeleted file mode 100644 index 3a35a56efa9b..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonBack.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonBack@2x.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonBack@2x.png Binary files differdeleted file mode 100644 index 36810b7a49d4..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonBack@2x.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonEdit.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonEdit.png Binary files differdeleted file mode 100644 index c537dd22e3a2..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonEdit.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonExpand.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonExpand.png Binary files differdeleted file mode 100644 index d262a11dba9b..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonExpand.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonFind.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonFind.png Binary files differdeleted file mode 100644 index f6b6720c2f8d..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonFind.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonLeft.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonLeft.png Binary files differdeleted file mode 100644 index e02ca9b22f1b..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonLeft.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonPrint.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonPrint.png Binary files differdeleted file mode 100644 index 9a72103c277d..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonPrint.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonRight.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonRight.png Binary files differdeleted file mode 100644 index 93103d187576..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonRight.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonSave.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonSave.png Binary files differdeleted file mode 100644 index 48129423fce7..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonSave.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonSelectionHandle.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonSelectionHandle.png Binary files differdeleted file mode 100644 index f9f118cbf1a4..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonSelectionHandle.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonShrink.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonShrink.png Binary files differdeleted file mode 100644 index 85d807fd2ab3..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOButtonShrink.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOContextualMenuEdge.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOContextualMenuEdge.png Binary files differdeleted file mode 100644 index 54d32ab90d3b..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOContextualMenuEdge.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOLibreOfficeLogo.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOLibreOfficeLogo.png Binary files differdeleted file mode 100644 index 3ba33dab8967..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOLibreOfficeLogo.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOMagnifier@2x.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOMagnifier@2x.png Binary files differdeleted file mode 100644 index 5de895b30b04..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOMagnifier@2x.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOMagnifierMask@2x.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOMagnifierMask@2x.png Binary files differdeleted file mode 100644 index a5b4e0b3fdc6..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/MLOMagnifierMask@2x.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/mlo-icon-114.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/mlo-icon-114.png Binary files differdeleted file mode 100644 index 3035ed574dd2..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/mlo-icon-114.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/mlo-icon-57.png b/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/mlo-icon-57.png Binary files differdeleted file mode 100644 index 49af1f9703fe..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/Images/mlo-icon-57.png +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/Resources/test1.odt b/ios/MobileLibreOffice/MobileLibreOffice/Resources/test1.odt Binary files differdeleted file mode 100644 index 6ae5681eaad2..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/Resources/test1.odt +++ /dev/null diff --git a/ios/MobileLibreOffice/MobileLibreOffice/en.lproj/InfoPlist.strings b/ios/MobileLibreOffice/MobileLibreOffice/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8f86..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOCachedFile.h b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOCachedFile.h deleted file mode 100644 index 18b6259c20a8..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOCachedFile.h +++ /dev/null @@ -1,23 +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" - -@interface MLOCachedFile : MLOObject - --(id)initWithOriginFilePath:(NSString *) originFilePath; --(id)initByLoading:(id) source; --(id)toSavable; --(BOOL)deleteFile; --(BOOL)exists; --(NSString *) cachedFilePath; --(NSString *) cachedFileNameWithExtension; --(NSDate *) lastModified; -+(NSUInteger)cachedFilesCount; -+(void)setCachedFilesCount:(NSUInteger) count; -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOCachedFile.m b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOCachedFile.m deleted file mode 100644 index c3e164e4b1f0..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOCachedFile.m +++ /dev/null @@ -1,99 +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 "MLOCachedFile.h" -#import "MLOFileCacheManager.h" -#import "MLOManager.h" -#import "NSObject+MLOFileUtils.h" -#import "NSObject+MLOUtils.h" - -static const NSString * CACHED_FILE_PATH_KEY = @"cahcedPath"; -static const NSString * CACHED_FILE_NAME_WITH_EXTENSION_KEY = @"cachedName"; - -@interface MLOCachedFile () -@property NSString * cachedFilePath; -@property NSString * cachedFileNameWithExtension; -@end - -static NSUInteger cachedFilesCounter = 0; -@implementation MLOCachedFile - - --(BOOL)createByCachingFilePath:(NSString *) originFilePath{ - self.cachedFileNameWithExtension = [originFilePath lastPathComponent]; - - NSString * newFileName = [NSString stringWithFormat:@"%d%@",cachedFilesCounter++,self.cachedFileNameWithExtension]; - self.cachedFilePath = [self cachedFilePath:newFileName]; - - NSError * error; - - return [self returnSuccees:[[NSFileManager defaultManager] copyItemAtPath:originFilePath - toPath:self.cachedFilePath - error:&error] - forAction:[NSString stringWithFormat:@"create cached file by copying %@ to %@", - originFilePath, - self.cachedFilePath] - andAlertForError:error]; -} - -+(NSUInteger)cachedFilesCount{ - return cachedFilesCounter; -} - -+(void)setCachedFilesCount:(NSUInteger) count{ - cachedFilesCounter = count; -} - --(id)initWithOriginFilePath:(NSString *) originFilePath{ - - self = [self init]; - - if(self){ - - if(![self createByCachingFilePath:originFilePath]){ - self = nil; - } - } - return self; -} - --(id)initByLoading:(id) source{ - self = [self init]; - if(self){ - NSDictionary * dictionary = source; - self.cachedFilePath = dictionary[CACHED_FILE_PATH_KEY]; - self.cachedFileNameWithExtension = dictionary[CACHED_FILE_NAME_WITH_EXTENSION_KEY]; - } - return self; -} - --(id) toSavable{ - return @{ CACHED_FILE_PATH_KEY : self.cachedFilePath, - CACHED_FILE_NAME_WITH_EXTENSION_KEY : self.cachedFileNameWithExtension}; -} - --(BOOL)deleteFile{ - NSError * error; - - return [self returnSuccees:[[NSFileManager defaultManager] removeItemAtPath:self.cachedFilePath - error:&error] - forAction:[NSString stringWithFormat:@"delete the cached file %@",self.cachedFilePath] - andAlertForError:error]; - -} --(NSDictionary *) fileAttrributes{ - return [[NSFileManager defaultManager] attributesOfItemAtPath:self.cachedFilePath error:nil]; -} --(NSDate *) lastModified{ - return[[self fileAttrributes] fileModificationDate]; -} - --(BOOL)exists{ - return [[NSFileManager defaultManager] fileExistsAtPath:self.cachedFilePath]; -} -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileCacheManager.h b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileCacheManager.h deleted file mode 100644 index 437859372ea4..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileCacheManager.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" -#import <MessageUI/MFMailComposeViewController.h> - -@class MLOFileManagerViewController,MLOCachedFile; - -@interface MLOFileCacheManager : MLOObject<MFMailComposeViewControllerDelegate> - -@property MLOFileManagerViewController * fileManager; - --(id)initWithFileManager:(MLOFileManagerViewController *) fileManager; --(NSUInteger)count; --(void)deleteIndexPath:(NSIndexPath *) indexPath; --(UITableViewCell*)cellForTableView:(UITableView *)tableView atIndexPath:(NSIndexPath *)indexPath; --(void)openFilePath:(NSString *) filePath; --(void)openFileAtIndex:(NSUInteger) index; --(void)sendFileAtIndexPath:(NSIndexPath *) indexPath; - -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileCacheManager.m b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileCacheManager.m deleted file mode 100644 index 51dd6924a131..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileCacheManager.m +++ /dev/null @@ -1,210 +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 "MLOFileCacheManager.h" -#import "MLOFileManagerViewController_Impl.h" -#import "MLOCachedFile.h" -#import "MLOAppViewController.h" -#import "MLOAppDelegate.h" -#import "MLOManager.h" -#import "NSObject+MLOUtils.h" -#import "NSObject+MLOFileUtils.h" - -#define CACHED_DATA_FILE_NAME @"mlo_cache_data" - -static const NSTimeInterval DELAY_BEFORE_OPENEING_FIRST_DOCUMENT = 2.0f; - -@interface MLOFileCacheManager () -@property NSMutableArray * files; -@property NSString *dbFilePath; -@end - -static NSString * OpenedFilesCountKey = @"openedFiles"; -static NSString * CachedFilesKey = @"cachedFiles"; - -@implementation MLOFileCacheManager - --(id)initWithFileManager:(MLOFileManagerViewController *) fileManager{ - self = [self init]; - if(self){ - self.fileManager =fileManager; - self.dbFilePath = [self cachedFilePath:CACHED_DATA_FILE_NAME]; - [self load]; - } - return self; -} - --(void)loadFile{ - - NSDictionary * dictionary = [NSDictionary dictionaryWithContentsOfFile:self.dbFilePath]; - - [MLOCachedFile setCachedFilesCount:[((NSNumber *)dictionary[OpenedFilesCountKey]) unsignedIntValue]]; - - NSArray * array = dictionary[CachedFilesKey]; - - for (id loadable in array) { - [self.files addObject:[[MLOCachedFile alloc] initByLoading:loadable]]; - } -} - --(void)load{ - - self.files = [NSMutableArray new]; - - if([[NSFileManager defaultManager] fileExistsAtPath:self.dbFilePath]){ - - [self loadFile]; - - }else{ - self.files = [NSMutableArray new]; - - NSString * exampleFileNameWithExtension = @"test1.odt"; - - [self addFileAndGetNewIndexForPath: - [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:exampleFileNameWithExtension]]; - - } - - [self.fileManager reloadData]; - -} --(void)save{ - NSMutableArray * array = [NSMutableArray new]; - - for (MLOCachedFile * file in self.files) { - - [array addObject:[file toSavable]]; - - } - - [@{OpenedFilesCountKey:[NSNumber numberWithUnsignedInt:[MLOCachedFile cachedFilesCount]], - CachedFilesKey:array} - - writeToFile:self.dbFilePath - atomically:YES]; - -} - --(NSUInteger)addFileAndGetNewIndexForPath:(NSString *) newFilePath{ - - NSUInteger nextFileIndex = self.files.count; - - MLOCachedFile * file = [[MLOCachedFile alloc] initWithOriginFilePath:newFilePath]; - - if([file exists]){ - - [self.files addObject:file]; - - [self save]; - - [self.fileManager reloadData]; - }else{ - nextFileIndex = self.files.count; - } - return nextFileIndex; -} - --(NSUInteger)count{ - return self.files.count; -} - --(MLOCachedFile *)getFileAtIndex:(NSUInteger) index{ - return self.files[index]; -} - --(void)deleteFileAtIndex:(NSUInteger)index{ - - MLOCachedFile * toDelete = [self getFileAtIndex:index]; - - if([toDelete deleteFile]){ - [self.files removeObject:toDelete]; - [self save]; - } -} - --(void)deleteIndexPath:(NSIndexPath*) indexPath{ - [self deleteFileAtIndex:indexPath.row]; -} - --(UITableViewCell*)cellForTableView:(UITableView *)tableView atIndexPath:(NSIndexPath *)indexPath{ - static NSString *CellIdentifier = @"Cell"; - - UITableViewCell * cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; - - MLOCachedFile * file = [self getFileAtIndex:indexPath.row]; - - cell.textLabel.text =file.cachedFileNameWithExtension; - cell.detailTextLabel.text = [NSDateFormatter localizedStringFromDate:[file lastModified] - dateStyle:NSDateFormatterShortStyle - timeStyle:NSDateFormatterFullStyle]; - cell.accessoryType =UITableViewCellAccessoryDetailDisclosureButton; - - return cell; -} - --(void)openFilePath:(NSString *) filePath{ - [self openFileAtIndex:[self addFileAndGetNewIndexForPath:filePath]]; -} --(void)openFileAtIndex:(NSUInteger) index{ - if(index != self.files.count){ - MLOCachedFile * file = [self getFileAtIndex:index]; - - [self performBlock:^{ - - [[MLOManager getInstance] openInLibreOfficeFilePath:[file cachedFilePath] - fileNameWithExtension:[file cachedFileNameWithExtension] - superView:self.fileManager.appViewController.view - window:self.fileManager.appViewController.appDelegate.window - invoker:self.fileManager.appViewController.appDelegate]; - - } afterDelay:DELAY_BEFORE_OPENEING_FIRST_DOCUMENT]; - - } -} - --(void)sendFileAtIndexPath:(NSIndexPath *) indexPath{ - - MLOCachedFile * file = [self getFileAtIndex:indexPath.row]; - - MFMailComposeViewController *mailer = [MFMailComposeViewController new]; - - mailer.mailComposeDelegate = self; - [mailer setMessageBody:@"Best" isHTML:NO]; - [mailer setSubject:file.cachedFileNameWithExtension]; - - NSData *myData =[[NSData alloc] initWithContentsOfFile:file.cachedFilePath]; - [mailer addAttachmentData:myData mimeType:@"iapplication/msword" fileName:file.cachedFileNameWithExtension]; - - [self.fileManager presentViewController:mailer animated:YES completion:nil]; - -} -- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error -{ - switch (result) - { - case MFMailComposeResultCancelled: - NSLog(@"Sending file: canceled"); - break; - case MFMailComposeResultSaved: - NSLog(@"Sending file: saved"); - break; - case MFMailComposeResultSent: - NSLog(@"Sending file: sent"); - break; - case MFMailComposeResultFailed: - NSLog(@"Sending file: failed"); - break; - default: - NSLog(@"Sending file: not sent"); - break; - } - [self.fileManager dismissViewControllerAnimated:YES completion:nil]; -} - - -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileListViewController.h b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileListViewController.h deleted file mode 100644 index 60c06c1c8180..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileListViewController.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 <UIKit/UIKit.h> - -@class MLOFileManagerViewController; -@interface MLOFileListViewController : UITableViewController - --(id)initWithFileManager:(MLOFileManagerViewController *)fileManager; --(void)onRotate; --(void)reloadData; - -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileListViewController.m b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileListViewController.m deleted file mode 100644 index 035af2319fdc..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileListViewController.m +++ /dev/null @@ -1,96 +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 "MLOFileListViewController.h" -#import "MLOFileManagerViewController_Impl.h" -#import "MLOFileCacheManager.h" -#import "MLOCachedFile.h" - -@interface MLOFileListViewController () -@property MLOFileManagerViewController * fileManager; -@property UITableView * list; -@end - -@implementation MLOFileListViewController - --(id)initWithFileManager:(MLOFileManagerViewController *)fileManager{ - self = [self initWithStyle:UITableViewStylePlain]; - - if(self){ - self.fileManager = fileManager; - - self.list = [UITableView new]; - - self.view.backgroundColor = [UIColor clearColor]; - - [self reloadData]; - } - return self; -} - --(void)onRotate{ - - self.list.frame = [self.fileManager currentFullscreenFrame]; -} - -#pragma mark - Table view data source - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} - --(void)reloadData{ - [self.list reloadData]; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return [self.fileManager.cache count]; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - return [self.fileManager.cache cellForTableView:tableView atIndexPath:indexPath]; -} - -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath -{ - return YES; -} - --(BOOL)hasFiles{ - return [self.fileManager.cache count] > 0; -} - -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (editingStyle == UITableViewCellEditingStyleDelete) { - [self.fileManager.cache deleteIndexPath:indexPath]; - [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; - - if(![self hasFiles]){ - [self.fileManager reloadData]; - } - } -} - - -- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath{ - [self.fileManager.cache sendFileAtIndexPath:indexPath]; -} - -#pragma mark - Table view delegate - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [self.fileManager.cache openFileAtIndex:indexPath.row]; - [tableView deselectRowAtIndexPath:indexPath animated:YES]; -} - -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileManagerViewController.h b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileManagerViewController.h deleted file mode 100644 index 4d5b14edbde7..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileManagerViewController.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 "MLOViewController.h" - -@class MLOAppViewController; -@interface MLOFileManagerViewController : MLOViewController --(id) initWithAppViewController:(MLOAppViewController *) appViewController; --(void)show; --(void)didHideLibreOffice; --(void)hide; --(void)onRotate; --(void)openFilePath:(NSString *) filePath; -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileManagerViewController.m b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileManagerViewController.m deleted file mode 100644 index 7f672e3f7714..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileManagerViewController.m +++ /dev/null @@ -1,159 +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 "MLOFileManagerViewController_Impl.h" -#import "MLOFileListViewController.h" -#import "MLOResourceImage.h" -#import "MLOAppViewController.h" -#import "MLOAppDelegate.h" -#import "MLOFileCacheManager.h" -#import "NSObject+MLOUtils.h" - -static const NSTimeInterval FADE_TIME=1.0f; - -static const CGFloat EMPTY_LABEL_WIDTH = 500.0f, - EMPTY_LABEL_HEIGHT =120.0f, - EMPTY_FONT_SIZE = 30.0f; - -@interface MLOFileManagerViewController () -@property MLOFileListViewController * list; -@property UILabel * emptyLabel; -@property BOOL isInit,isFirstRotation; -@end - -@implementation MLOFileManagerViewController - --(id) initWithAppViewController:(MLOAppViewController *) appViewController{ - self = [super init]; - if(self){ - - self.isInit = NO; - self.isFirstRotation = YES; - self.appViewController = appViewController; - self.cache = [[MLOFileCacheManager alloc] initWithFileManager:self]; - self.list = [[MLOFileListViewController alloc] initWithFileManager:self]; - [self initEmptyLabel]; - - } - return self; -} - --(void)initEmptyLabel{ - self.emptyLabel = [[UILabel alloc]initWithFrame:CGRECT_ZERO]; - self.emptyLabel.text = @"No files to open.\r\nTry opening files from other apps."; - self.emptyLabel.font = [UIFont systemFontOfSize:EMPTY_FONT_SIZE]; - self.emptyLabel.textAlignment =NSTextAlignmentCenter; - self.emptyLabel.backgroundColor = [UIColor clearColor]; - self.emptyLabel.numberOfLines = 2; - self.emptyLabel.alpha= 0.0f; -} - --(void)reloadData{ - if([self updateSubviewsAndIsHasItems]){ - [self.list reloadData]; - } -} --(void)show{ - - [[UIApplication sharedApplication]setStatusBarHidden:YES]; - - if(!self.isInit){ - self.isInit = YES; - - [self.appViewController.view addSubview:self.view]; - [self.view addSubview:self.list.view]; - [self.view addSubview:self.emptyLabel]; - - [self fade:0.0f]; - } - - [self reloadData]; - - [self onRotate]; - - [self animateFade:1.0f]; -} - --(void)didHideLibreOffice{ - self.isFirstRotation = YES; - [self show]; -} - --(void)hide{ - [self animateFade:0.0f]; -} - --(void)onRotate{ - - CGRect superFrame = [self currentFullscreenFrame]; - - if(self.isFirstRotation){ - self.isFirstRotation = NO; - self.view.frame = superFrame; - }else{ - self.view.frame = CGRectMake(0,0, superFrame.size.height, superFrame.size.width); - } - - LOG_RECT(self.view.frame, @"MLOFileManagerViewController frame"); - - if([self updateSubviewsAndIsHasItems]){ - - [self.list onRotate]; - } -} - --(BOOL)updateSubviewsAndIsHasItems{ - if([self.cache count]==0){ - - CGSize size =[self currentFullscreenFrame].size; - - self.emptyLabel.frame = CGRectMake((size.width - EMPTY_LABEL_WIDTH)/2.0f, - size.height -(EMPTY_LABEL_HEIGHT+ 50), - EMPTY_LABEL_WIDTH, - EMPTY_LABEL_HEIGHT); - - self.emptyLabel.adjustsFontSizeToFitWidth=YES; - - self.emptyLabel.alpha = 1.0f; - self.list.view.alpha = 0.0f; - - return NO; - - } - - self.emptyLabel.alpha = 0.0f; - self.list.view.alpha = 1.0f; - - return YES; - -} - --(void)animateFade:(CGFloat) alphaTarget{ - - if(self.view.alpha!=alphaTarget){ - - [UIView animateWithDuration:FADE_TIME animations:^{ - - [self fade:alphaTarget]; - }]; - } -} - --(void)openFilePath:(NSString *)filePath{ - [self.cache openFilePath:filePath]; -} - --(void)fade:(CGFloat) alpha{ - self.view.alpha = alpha; -} - - --(CGRect)currentFullscreenFrame{ - return [self.appViewController currentFullscreenFrame]; -} -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileManagerViewController_Impl.h b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileManagerViewController_Impl.h deleted file mode 100644 index 38836d585090..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/MLOFileManagerViewController_Impl.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 "MLOFileManagerViewController.h" -@class MLOFileCacheManager,MLOAppViewController,MLOFileListViewController; -@interface MLOFileManagerViewController () -@property MLOAppViewController * appViewController; -@property MLOFileCacheManager * cache; --(void)reloadData; --(CGRect)currentFullscreenFrame; -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/NSObject+MLOFileUtils.h b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/NSObject+MLOFileUtils.h deleted file mode 100644 index 32cf30a723d4..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/NSObject+MLOFileUtils.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 <Foundation/Foundation.h> - -@interface NSObject (MLOFileUtils) --(NSString *)cachedFilePath:(NSString *) lastPathComponent; -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/NSObject+MLOFileUtils.m b/ios/MobileLibreOffice/MobileLibreOffice/file_manager/NSObject+MLOFileUtils.m deleted file mode 100644 index 497b4f339417..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/file_manager/NSObject+MLOFileUtils.m +++ /dev/null @@ -1,35 +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 "NSObject+MLOFileUtils.h" - -@implementation NSObject (MLOFileUtils) --(NSString *)cachedFilePath:(NSString *) lastPathComponent{ - - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - - NSString *documentsDirectory = [paths objectAtIndex:0]; - - BOOL isDir; - - NSFileManager * fileManager = [NSFileManager defaultManager]; - - if (! [fileManager fileExistsAtPath:documentsDirectory isDirectory:&isDir]) { - - NSError * error; - - BOOL success = [fileManager createDirectoryAtPath:documentsDirectory withIntermediateDirectories:NO attributes:nil error:&error]; - - if (!success || error) { - NSLog(@"Error: %@", [error localizedDescription]); - } - } - - return [documentsDirectory stringByAppendingPathComponent:lastPathComponent]; -} -@end diff --git a/ios/MobileLibreOffice/MobileLibreOffice/main.m b/ios/MobileLibreOffice/MobileLibreOffice/main.m deleted file mode 100644 index 284a924bcd7e..000000000000 --- a/ios/MobileLibreOffice/MobileLibreOffice/main.m +++ /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 <UIKit/UIKit.h> - -#import "MLOAppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([MLOAppDelegate class])); - } -} |