Commit e1170d55 authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander Trofimov

[ios] x2tConverter update

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@68997 954022d7-b5bf-4e40-9824-e11837661b57
parent 5bd3e07b
......@@ -9318,37 +9318,10 @@ X2tConverter/build/Mac/X2tConverterCommandLineTool/X2tConverterCommandLineTool.x
X2tConverter/build/Mac/X2tConverterCommandLineTool/X2tConverterCommandLineTool.xcodeproj/xcuserdata svnc_tsvn_003alogminsize=5
X2tConverter/build/Mac/X2tConverterCommandLineTool/X2tConverterCommandLineTool.xcodeproj/xcuserdata/alexey.musinov.xcuserdatad svnc_tsvn_003alogminsize=5
X2tConverter/build/Mac/X2tConverterCommandLineTool/X2tConverterCommandLineTool.xcodeproj/xcuserdata/alexey.musinov.xcuserdatad/xcschemes svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter.xcodeproj svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter.xcodeproj/project.xcworkspace svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter.xcodeproj/project.xcworkspace/xcuserdata svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter.xcodeproj/project.xcworkspace/xcuserdata/alexey.musinov.xcuserdatad svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter.xcodeproj/project.xcworkspace/xcuserdata/alexey.musinov.xcuserdatad/UserInterfaceState.xcuserstate svn_mime_002dtype=application%2Foctet-stream
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter.xcodeproj/xcuserdata svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter.xcodeproj/xcuserdata/alexey.musinov.xcuserdatad svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter.xcodeproj/xcuserdata/alexey.musinov.xcuserdatad/xcschemes svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter/Base.lproj svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter/Demo-Hayden-Management-v2.docx svn_mime_002dtype=application%2Foctet-stream
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter/Images.xcassets svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter/Images.xcassets/AppIcon.appiconset svnc_tsvn_003alogminsize=5
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter/price.xlsx svn_mime_002dtype=application%2Foctet-stream
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter/shapes.xlsx svn_mime_002dtype=application%2Foctet-stream
X2tConverter/test/TestIOSX2tConverter/TestIOSX2tConverter/smeta.xlsx svn_mime_002dtype=application%2Foctet-stream
X2tConverter/test/TestMacX2tConverter svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter.xcodeproj svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter.xcodeproj/project.xcworkspace svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter.xcodeproj/project.xcworkspace/xcuserdata svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter.xcodeproj/project.xcworkspace/xcuserdata/alexey.musinov.xcuserdatad svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter.xcodeproj/project.xcworkspace/xcuserdata/alexey.musinov.xcuserdatad/UserInterfaceState.xcuserstate svn_mime_002dtype=application%2Foctet-stream
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter.xcodeproj/xcuserdata svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter.xcodeproj/xcuserdata/alexey.musinov.xcuserdatad svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter.xcodeproj/xcuserdata/alexey.musinov.xcuserdatad/xcdebugger svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter.xcodeproj/xcuserdata/alexey.musinov.xcuserdatad/xcschemes svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter/Base.lproj svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter/Images.xcassets svnc_tsvn_003alogminsize=5
X2tConverter/test/TestMacX2tConverter/TestMacX2tConverter/Images.xcassets/AppIcon.appiconset svnc_tsvn_003alogminsize=5
X2tConverter/test/iosTest/TestIOSX2tConverter/Demo-Hayden-Management-v2.docx svn_mime_002dtype=application%2Foctet-stream
X2tConverter/test/iosTest/TestIOSX2tConverter/price.xlsx svn_mime_002dtype=application%2Foctet-stream
X2tConverter/test/iosTest/TestIOSX2tConverter/shapes.xlsx svn_mime_002dtype=application%2Foctet-stream
X2tConverter/test/iosTest/TestIOSX2tConverter/smeta.xlsx svn_mime_002dtype=application%2Foctet-stream
/XpsFile svnc_tsvn_003alogminsize=5
XpsFile/XpsFileTest svnc_tsvn_003alogminsize=5
XpsFile/XpsLib svnc_tsvn_003alogminsize=5
......@@ -492,7 +492,6 @@
698AED3B1C0726990080D889 /* rbbirb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rbbirb.cpp; sourceTree = "<group>"; };
698AED3C1C0726990080D889 /* rbbirb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rbbirb.h; sourceTree = "<group>"; };
698AED3D1C0726990080D889 /* rbbirpt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rbbirpt.h; sourceTree = "<group>"; };
698AED3E1C0726990080D889 /* rbbirpt.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rbbirpt.txt; sourceTree = "<group>"; };
698AED3F1C0726990080D889 /* rbbiscan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rbbiscan.cpp; sourceTree = "<group>"; };
698AED401C0726990080D889 /* rbbiscan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rbbiscan.h; sourceTree = "<group>"; };
698AED411C0726990080D889 /* rbbisetb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rbbisetb.cpp; sourceTree = "<group>"; };
......@@ -1174,7 +1173,6 @@
698AED3B1C0726990080D889 /* rbbirb.cpp */,
698AED3C1C0726990080D889 /* rbbirb.h */,
698AED3D1C0726990080D889 /* rbbirpt.h */,
698AED3E1C0726990080D889 /* rbbirpt.txt */,
698AED3F1C0726990080D889 /* rbbiscan.cpp */,
698AED401C0726990080D889 /* rbbiscan.h */,
698AED411C0726990080D889 /* rbbisetb.cpp */,
......
......@@ -2,12 +2,9 @@
<Workspace
version = "1.0">
<FileRef
location = "group:TestIOSX2tConverter/TestIOSX2tConverter.xcodeproj">
location = "group:/Volumes/trunk/ServerComponents/X2tConverter/test/iosTest/iosTest.xcodeproj">
</FileRef>
<FileRef
location = "group:TestMacX2tConverter/../X2tConverter/X2tConverter.xcodeproj">
</FileRef>
<FileRef
location = "group:TestMacX2tConverter/TestMacX2tConverter.xcodeproj">
</FileRef>
</Workspace>
//
// AppDelegate.h
// TestIOSX2tConverter
//
// Created by alexey.musinov on 01.04.15.
// Copyright (c) 2015 Ascensio System SIA. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
//
// AppDelegate.m
// TestIOSX2tConverter
//
// Created by alexey.musinov on 01.04.15.
// Copyright (c) 2015 Ascensio System SIA. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
return YES;
}
- (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.
}
- (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.
}
- (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.
}
- (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:.
}
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Ascensio System SIA. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="iosTest" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
<?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>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.onlyoffice.$(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</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIFileSharingEnabled</key>
<true/>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
//
// ViewController.h
// TestIOSX2tConverter
//
// Created by alexey.musinov on 01.04.15.
// Copyright (c) 2015 Ascensio System SIA. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
//
// ViewController.m
// TestIOSX2tConverter
//
// Created by alexey.musinov on 01.04.15.
// Copyright (c) 2015 Ascensio System SIA. All rights reserved.
//
#import "ViewController.h"
#import "X2tConverter.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[self testXLSX];
}
- (void)testDOCX {
NSString *path = [[NSBundle mainBundle] pathForResource:@"Demo-Hayden-Management-v2" ofType:@"docx"];
NSString* fullFileName = path;
NSString* fullFileNameTo = [NSString stringWithFormat:@"%@sample.bin", NSTemporaryDirectory()];
NSString* tempDir = NSTemporaryDirectory();
NSString* fontsPath = @"/System/Library/Fonts";
X2tConverter* conv = [[X2tConverter alloc]init];
[conv sdk_docx2doct_bin:fullFileName nsTo:fullFileNameTo nsTemp:tempDir nsFontPath:fontsPath];
NSLog(@"%@",fullFileNameTo);
NSString* docxOut = [NSString stringWithFormat:@"%@document.docx", NSTemporaryDirectory()];
NSString* outTemp = [NSString stringWithFormat:@"%@OUT_TEMP", NSTemporaryDirectory()];
[self createDirectory:outTemp];
[self clearDirectory:outTemp];
X2tConverter* conv2 = [[X2tConverter alloc]init];
[conv2 sdk_doct_bin2docx:fullFileNameTo nsTo:docxOut nsTemp:outTemp nsFontPath:fontsPath fromChanges:@(NO) nsThemeDir:@""];
NSLog(@"%@",fullFileNameTo);
}
- (void)testXLSX {
NSString *path = [[NSBundle mainBundle] pathForResource:@"price" ofType:@"xlsx"];
NSString* fullFileName = path;
NSString* fullFileNameTo = [NSString stringWithFormat:@"%@sample.bin", NSTemporaryDirectory()];
NSString* tempDir = NSTemporaryDirectory();
NSString* fontsPath = @"/System/Library/Fonts";
X2tConverter* conv = [[X2tConverter alloc]init];
[conv sdk_xlsx2xlst_bin:fullFileName nsTo:fullFileNameTo nsTemp:tempDir nsFontPath:fontsPath];
NSLog(@"%@",fullFileNameTo);
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
#pragma mark -
#pragma Utils
- (void)clearDirectory:(NSString*)directory
{
NSFileManager *fm = [NSFileManager defaultManager];
NSError *error = nil;
for (NSString *file in [fm contentsOfDirectoryAtPath:directory error:&error]) {
BOOL success = [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@", directory, file] error:&error];
if (!success || error) {
NSLog(@"Failed to clear directory \"%@\". Error: %@", directory, error);
}
}
}
- (void)createDirectory:(NSString*)directory
{
NSFileManager *fileManager= [NSFileManager defaultManager];
NSError *error = nil;
if(![fileManager createDirectoryAtPath:directory withIntermediateDirectories:YES attributes:nil error:&error]) {
// An error has occurred, do something to handle it
NSLog(@"Failed to create directory \"%@\". Error: %@", directory, error);
}
}
@end
//
// main.m
// TestIOSX2tConverter
//
// Created by alexey.musinov on 01.04.15.
// Copyright (c) 2015 Ascensio System SIA. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:TestIOSX2tConverter.xcodeproj">
</FileRef>
</Workspace>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment