[Libreoffice-commits] core.git: 2 commits - ios/LibreOfficeKit ios/LibreOfficeLight
jan Iversen
jani at libreoffice.org
Thu Nov 16 13:30:28 UTC 2017
ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c | 30 +++++++
ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h | 2
ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj | 38 +++-------
ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/AppIcon.appiconset/main.png |binary
ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift | 3
ios/LibreOfficeLight/LibreOfficeLight/Info.plist | 9 --
6 files changed, 46 insertions(+), 36 deletions(-)
New commits:
commit 6085f7a78a137f7ea3b88c014d203c5e674eb603
Author: jan Iversen <jani at libreoffice.org>
Date: Thu Nov 16 14:27:56 2017 +0100
iOS, add tile sizing function
Added function to calculate needed tiles.
Change-Id: Ie598f6a5f438dea72c298e769bdba8fd00bbb4bf
diff --git a/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c b/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c
index a56daa71a09e..a907f82d3e83 100644
--- a/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c
+++ b/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c
@@ -28,6 +28,12 @@ static LibreOfficeKit* kit;
static LibreOfficeKitDocument* document;
+// Tile variables
+static int tileSizeX, tileSizeY, tileMaxY, documentParts;
+static double twipsPerXtile, twipsPerYtile;
+
+
+
// Bridge functions to LibreOfficeKit
int BridgeLOkit_Init(const char *path)
{
@@ -46,6 +52,30 @@ int BridgeLOkit_Init(const char *path)
+int BridgeLOkit_Sizing(const int countXtiles, const int countYtiles,
+ const int pixelsXtile, const int pixelsYtile)
+{
+ long docWidth, docHeight;
+
+ // Remember for later
+ tileSizeX = pixelsXtile;
+ tileSizeY = pixelsYtile;
+
+ // Calculate twips to pixels in X,Y direction
+ document->pClass->getDocumentSize(document, &docWidth, &docHeight);
+ twipsPerXtile = docWidth / countXtiles;
+ double ratio = (double)docHeight / (double)docWidth + 0.05;
+ int x0 = (int)((ratio - (int)ratio) * 10.0);
+ int x1 = x0 * countXtiles / 10;
+ int x2 = (int)ratio;
+ tileMaxY = x1 + x2;
+ twipsPerYtile = docHeight / tileMaxY;
+ documentParts = document->pClass->getParts(document);
+ return 0;
+}
+
+
+
int BridgeLOkit_open(const char *path)
{
document = kit->pClass->documentLoad(kit, path);
diff --git a/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h b/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h
index 1314f0df66eb..3c6498c06854 100644
--- a/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h
+++ b/ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h
@@ -12,6 +12,8 @@
// The functions (LibreOfficeKit.mm) calls functions directly in LibreOffice
int BridgeLOkit_Init(const char *path);
+int BridgeLOkit_Sizing(const int countXtiles, const int countYtiles,
+ const int pixelsXtile, const int pixelsYtile);
int BridgeLOkit_open(const char *path);
int BridgeLOkit_ClientCommand(const char *input);
int BridgeLOkit_Hipernate(void);
diff --git a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
index 7e907b4639f2..7dd2a1e7da12 100644
--- a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
+++ b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
@@ -38,26 +38,22 @@
39022C1C1EDC2A2C00100066 /* services */ = {isa = PBXFileReference; lastKnownFileType = folder; name = services; path = ../generated/resources/services; sourceTree = "<group>"; };
39022C1E1EDC2AB000100066 /* share */ = {isa = PBXFileReference; lastKnownFileType = folder; name = share; path = ../generated/resources/share; sourceTree = "<group>"; };
39022C201EDC2D0800100066 /* icudt59l.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = icudt59l.dat; path = ../generated/resources/icudt59l.dat; sourceTree = "<group>"; };
+ 391FE7591FBC89BE00C592BA /* LibreOfficeKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibreOfficeKit.h; path = ../LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h; sourceTree = "<group>"; };
39284DB01FA5E150006F43E4 /* dummyLOkit.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = dummyLOkit.c; sourceTree = "<group>"; };
39284DB21FA5F207006F43E4 /* DocumentActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentActions.swift; sourceTree = "<group>"; };
392ED9B21E5E4B03005C8435 /* ViewPrintManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewPrintManager.swift; path = LibreOfficeLight/ViewPrintManager.swift; sourceTree = SOURCE_ROOT; };
393975771F8BECB0002DC80B /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
393975791F8BECC1002DC80B /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
- 3944C2061FB7701100A06096 /* init.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = init.cxx; path = ../../desktop/source/lib/init.cxx; sourceTree = "<group>"; };
39503A6F1F94C4AC00F19C78 /* lokit-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "lokit-Bridging-Header.h"; sourceTree = "<group>"; };
39503A741F94D44900F19C78 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
- 3956B72E1FAB3E0D00BF5DE4 /* appquit.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = appquit.cxx; path = ../../sfx2/source/appl/appquit.cxx; sourceTree = "<group>"; };
- 3956B7301FAB3E4700BF5DE4 /* appdata.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = appdata.cxx; path = ../../sfx2/source/appl/appdata.cxx; sourceTree = "<group>"; };
- 3956B7321FAB3E7300BF5DE4 /* docinsert.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = docinsert.cxx; path = ../../sfx2/source/doc/docinsert.cxx; sourceTree = "<group>"; };
396F92F61E7AE62400A28C82 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
397275391E77D9F1006ACDCC /* LibreOfficeLight.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LibreOfficeLight.entitlements; sourceTree = "<group>"; };
+ 3975A8C91FBD70EE00A87B3A /* LibreOfficeKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibreOfficeKit.h; path = ../../include/LibreOfficeKit/LibreOfficeKit.h; sourceTree = "<group>"; };
397868D71E59A3EA007F9248 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
397E08FA1E597BD8001374E0 /* LibreOfficeLight.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LibreOfficeLight.app; sourceTree = BUILT_PRODUCTS_DIR; };
397E08FD1E597BD8001374E0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = LibreOfficeLight/AppDelegate.swift; sourceTree = SOURCE_ROOT; };
397E09021E597BD8001374E0 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/Main.storyboard; sourceTree = "<group>"; };
397E09071E597BD8001374E0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = LibreOfficeLight/Assets.xcassets; sourceTree = SOURCE_ROOT; };
- 398F37C81FB5E37400707604 /* sofficemain.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sofficemain.cxx; path = ../../desktop/source/app/sofficemain.cxx; sourceTree = "<group>"; };
- 398F37CA1FB5E3D800707604 /* salmain.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = salmain.cxx; path = ../../vcl/source/salmain/salmain.cxx; sourceTree = "<group>"; };
3992D8591E5B762A00BEA987 /* DocumentController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DocumentController.swift; path = LibreOfficeLight/DocumentController.swift; sourceTree = SOURCE_ROOT; };
399648461E5B87DC00E73E83 /* ViewProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewProperties.swift; path = LibreOfficeLight/ViewProperties.swift; sourceTree = SOURCE_ROOT; };
39ACF4181F8A317600DA7334 /* loApp.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = loApp.xcconfig; path = ../../../../../../../Users/jani/lo_ios/workdir/ios/loApp.xcconfig; sourceTree = "<group>"; };
@@ -69,12 +65,9 @@
39B08B9B1E5F0BB600682A59 /* udkapi.rdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = udkapi.rdb; path = ../generated/resources/udkapi.rdb; sourceTree = SOURCE_ROOT; };
39B08B9C1E5F0BB600682A59 /* unorc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = unorc; path = ../generated/resources/unorc; sourceTree = SOURCE_ROOT; };
39B092501E5F3DEA00682A59 /* LibreOfficeLight-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "LibreOfficeLight-Prefix.pch"; sourceTree = "<group>"; };
+ 39E7CD5D1FB9C7F000FD9BE1 /* LibreOfficeKit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = LibreOfficeKit.c; path = ../LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c; sourceTree = "<group>"; };
39EE81531FA644E800B73AB8 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
39EF4E2E1FA500C9001914AC /* PropertiesController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PropertiesController.swift; sourceTree = "<group>"; };
- 39F5C6EA1FADE79000728B10 /* app.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = app.cxx; path = ../../sfx2/source/appl/app.cxx; sourceTree = "<group>"; };
- 39F5C6EC1FADEA8300728B10 /* module.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = module.cxx; path = ../../sfx2/source/appl/module.cxx; sourceTree = "<group>"; };
- 39F5C6EE1FADEC4000728B10 /* globalevents.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = globalevents.cxx; path = ../../sfx2/source/notify/globalevents.cxx; sourceTree = "<group>"; };
- 39FCD43C1FB5DDB000644AA3 /* svmain.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = svmain.cxx; path = ../../vcl/source/app/svmain.cxx; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -107,16 +100,9 @@
3956B72D1FAB3DBF00BF5DE4 /* extra */ = {
isa = PBXGroup;
children = (
- 3944C2061FB7701100A06096 /* init.cxx */,
- 398F37CA1FB5E3D800707604 /* salmain.cxx */,
- 398F37C81FB5E37400707604 /* sofficemain.cxx */,
- 39FCD43C1FB5DDB000644AA3 /* svmain.cxx */,
- 39F5C6EE1FADEC4000728B10 /* globalevents.cxx */,
- 39F5C6EC1FADEA8300728B10 /* module.cxx */,
- 39F5C6EA1FADE79000728B10 /* app.cxx */,
- 3956B7321FAB3E7300BF5DE4 /* docinsert.cxx */,
- 3956B7301FAB3E4700BF5DE4 /* appdata.cxx */,
- 3956B72E1FAB3E0D00BF5DE4 /* appquit.cxx */,
+ 391FE7591FBC89BE00C592BA /* LibreOfficeKit.h */,
+ 39E7CD5D1FB9C7F000FD9BE1 /* LibreOfficeKit.c */,
+ 3975A8C91FBD70EE00A87B3A /* LibreOfficeKit.h */,
);
name = extra;
sourceTree = "<group>";
@@ -487,7 +473,7 @@
CLANG_WARN_INFINITE_RECURSION = NO;
CODE_SIGN_ENTITLEMENTS = LibreOfficeLight/LibreOfficeLight.entitlements;
DEVELOPMENT_TEAM = TM977DU7EF;
- ENABLE_TESTABILITY = YES;
+ ENABLE_TESTABILITY = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "LibreOfficeLight/LibreOfficeLight-Prefix.pch";
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
@@ -502,7 +488,7 @@
"$(LO_WORKDIR)/ios/generated",
);
INFOPLIST_FILE = LibreOfficeLight/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "$(LINK_LDFLAGS)";
@@ -527,11 +513,11 @@
CODE_SIGN_ENTITLEMENTS = LibreOfficeLight/LibreOfficeLight.entitlements;
COPY_PHASE_STRIP = YES;
DEVELOPMENT_TEAM = TM977DU7EF;
- ENABLE_TESTABILITY = YES;
+ ENABLE_TESTABILITY = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "LibreOfficeLight/LibreOfficeLight-Prefix.pch";
INFOPLIST_FILE = LibreOfficeLight/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "$(LINK_LDFLAGS)";
@@ -639,7 +625,7 @@
CLANG_WARN_INFINITE_RECURSION = NO;
CODE_SIGN_ENTITLEMENTS = LibreOfficeLight/LibreOfficeLight.entitlements;
DEVELOPMENT_TEAM = TM977DU7EF;
- ENABLE_TESTABILITY = YES;
+ ENABLE_TESTABILITY = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "LibreOfficeLight/LibreOfficeLight-Prefix.pch";
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
@@ -654,7 +640,7 @@
"$(LO_WORKDIR)/ios/generated",
);
INFOPLIST_FILE = LibreOfficeLight/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "$(LINK_LDFLAGS)";
diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/AppIcon.appiconset/main.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/AppIcon.appiconset/main.png
new file mode 100644
index 000000000000..747145a9b999
Binary files /dev/null and b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/AppIcon.appiconset/main.png differ
diff --git a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
index e1949f4cb90c..273b0e04ea97 100755
--- a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
+++ b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
@@ -207,7 +207,6 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC
openMenu?.browserUserInterfaceStyle = UIDocumentBrowserViewController.BrowserUserInterfaceStyle.dark
openMenu?.delegate = self
self.present(openMenu!, animated: true, completion: nil)
- print("menu Open... to be done")
}
@@ -319,8 +318,8 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC
// Real open and presentation of document
public func doOpen(_ docURL : URL)
{
- //FIXME
BridgeLOkit_open(docURL.absoluteString);
+ BridgeLOkit_Sizing(4, 4, 256, 256);
}
}
commit 29c21f6dd7b3c915c989102e7c790face1bae55f
Author: jan Iversen <jani at libreoffice.org>
Date: Thu Nov 16 10:11:18 2017 +0100
iOS, update LibreOfficeLight version
Getting close to a realistic beta state
Change-Id: I30dddce6b52f622a3295b905d781b6c0543f45f7
diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Info.plist b/ios/LibreOfficeLight/LibreOfficeLight/Info.plist
index 56f55ab5f6b1..c87ee6def6a2 100755
--- a/ios/LibreOfficeLight/LibreOfficeLight/Info.plist
+++ b/ios/LibreOfficeLight/LibreOfficeLight/Info.plist
@@ -1,12 +1,5 @@
<?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">
-<!--
-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/.
--->
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@@ -370,7 +363,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>0.4.7</string>
+ <string>0.8.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
More information about the Libreoffice-commits
mailing list