[Libreoffice-commits] online.git: ios/Mobile

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 3 21:17:48 UTC 2020


 ios/Mobile/AppDelegate.mm                   |    2 +-
 ios/Mobile/CODocument.h                     |    2 +-
 ios/Mobile/CODocument.mm                    |    6 +++---
 ios/Mobile/DocumentBrowserViewController.mm |    4 ++--
 ios/Mobile/DocumentViewController.h         |    4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 95de5a74cce717cda5e1819761eead8e908b3dcf
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Sat Apr 4 00:04:20 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Sat Apr 4 00:07:35 2020 +0300

    Rename our Objective-C Document class to CODocument
    
    There are already several classes called Document on the C++ side.
    Let's reduce confusion a bit. (Also, we might need to use the
    Objective-C Document class from some of the Online C++ code (which is
    actually compiled as Objective-C++).)
    
    Change-Id: I34347ba0161c067b14bb125c3410eefd89bbca31

diff --git a/ios/Mobile/AppDelegate.mm b/ios/Mobile/AppDelegate.mm
index 50f323883..074230ff8 100644
--- a/ios/Mobile/AppDelegate.mm
+++ b/ios/Mobile/AppDelegate.mm
@@ -21,8 +21,8 @@
 #import "ios.h"
 #import "AppDelegate.h"
 #import "DocumentBrowserViewController.h"
+#import "CODocument.h"
 #import "DocumentViewController.h"
-#import "Document.h"
 
 #import "FakeSocket.hpp"
 #import "Kit.hpp"
diff --git a/ios/Mobile/Document.h b/ios/Mobile/CODocument.h
similarity index 95%
rename from ios/Mobile/Document.h
rename to ios/Mobile/CODocument.h
index a843dc7f1..82e2e80e3 100644
--- a/ios/Mobile/Document.h
+++ b/ios/Mobile/CODocument.h
@@ -15,7 +15,7 @@
 
 @class DocumentViewController;
 
- at interface Document : UIDocument {
+ at interface CODocument : UIDocument {
 @public
     int fakeClientFd;
 }
diff --git a/ios/Mobile/Document.mm b/ios/Mobile/CODocument.mm
similarity index 96%
rename from ios/Mobile/Document.mm
rename to ios/Mobile/CODocument.mm
index 3dba318d4..0a08d59f8 100644
--- a/ios/Mobile/Document.mm
+++ b/ios/Mobile/CODocument.mm
@@ -22,7 +22,7 @@
 
 #import "ios.h"
 #import "AppDelegate.h"
-#import "Document.h"
+#import "CODocument.h"
 #import "DocumentViewController.h"
 
 #import "ClientSession.hpp"
@@ -34,7 +34,7 @@
 #import "LOOLWSD.hpp"
 #import "Protocol.hpp"
 
- at implementation Document
+ at implementation CODocument
 
 - (id)contentsForType:(NSString*)typeName error:(NSError **)errorPtr {
     // Somehow this doesn't feel right, creating an NSFileWrapper around the file that was given to
@@ -49,7 +49,7 @@
 
 - (BOOL)loadFromContents:(id)contents ofType:(NSString *)typeName error:(NSError **)errorPtr {
 
-    // If this method is called a second time on the same Document object, just ignore it. This
+    // If this method is called a second time on the same CODocument object, just ignore it. This
     // seems to happen occastionally when the device is awakened after sleep. See tdf#122543.
     if (fakeClientFd >= 0)
         return YES;
diff --git a/ios/Mobile/DocumentBrowserViewController.mm b/ios/Mobile/DocumentBrowserViewController.mm
index bea28774a..92a9dedf0 100644
--- a/ios/Mobile/DocumentBrowserViewController.mm
+++ b/ios/Mobile/DocumentBrowserViewController.mm
@@ -9,8 +9,8 @@
 #import "config.h"
 
 #import "AppDelegate.h"
+#import "CODocument.h"
 #import "DocumentBrowserViewController.h"
-#import "Document.h"
 #import "DocumentViewController.h"
 #import "TemplateCollectionViewController.h"
 
@@ -67,7 +67,7 @@
 - (void)presentDocumentAtURL:(NSURL *)documentURL {
     UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
     DocumentViewController *documentViewController = [storyBoard instantiateViewControllerWithIdentifier:@"DocumentViewController"];
-    documentViewController.document = [[Document alloc] initWithFileURL:documentURL];
+    documentViewController.document = [[CODocument alloc] initWithFileURL:documentURL];
     documentViewController.document->fakeClientFd = -1;
     documentViewController.document.viewController = documentViewController;
     [self presentViewController:documentViewController animated:YES completion:nil];
diff --git a/ios/Mobile/DocumentViewController.h b/ios/Mobile/DocumentViewController.h
index 1f443b206..297255999 100644
--- a/ios/Mobile/DocumentViewController.h
+++ b/ios/Mobile/DocumentViewController.h
@@ -9,11 +9,11 @@
 #import <UIKit/UIKit.h>
 #import <WebKit/WebKit.h>
 
-#import "Document.h"
+#import "CODocument.h"
 
 @interface DocumentViewController : UIViewController
 
- at property (strong) Document *document;
+ at property (strong) CODocument *document;
 @property (strong) WKWebView *webView;
 @property (strong) WKWebView *slideshowWebView;
 @property std::string slideshowFile;


More information about the Libreoffice-commits mailing list