Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
cb4befa0
Commit
cb4befa0
authored
Sep 14, 2017
by
Alexey.Musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up
parent
f624f731
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
24 deletions
+46
-24
X2tConverter/test/iosTest/TestIOSX2tConverter/ViewController.m
...nverter/test/iosTest/TestIOSX2tConverter/ViewController.m
+46
-24
No files found.
X2tConverter/test/iosTest/TestIOSX2tConverter/ViewController.m
View file @
cb4befa0
...
...
@@ -52,36 +52,57 @@
{
[
super
viewDidLoad
];
//
[self testDOCX];
[
self
testDOCX
];
[
self
testXLSX
];
}
-
(
void
)
testDOCX
{
NSLog
(
@"==================== OPEN DOCX ===================="
);
NSString
*
path
=
[[
NSBundle
mainBundle
]
pathForResource
:
@"demo"
ofType
:
@"docx"
];
NSString
*
fullFileName
=
path
;
NSString
*
fullFileNameTo
=
[
NSString
stringWithFormat
:
@"%@demo.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
(
@"==================== OPEN DOCX ===================="
);
NSString
*
path
=
[[
NSBundle
mainBundle
]
pathForResource
:
@"demo"
ofType
:
@"docx"
];
NSString
*
fullFileName
=
path
;
NSString
*
fullFileNameTo
=
[
NSString
stringWithFormat
:
@"%@demo.bin"
,
NSTemporaryDirectory
()];
NSString
*
tempDir
=
NSTemporaryDirectory
();
NSString
*
fontsPath
=
@"/System/Library/Fonts"
;
X2tConverter
*
conv
=
[[
X2tConverter
alloc
]
init
];
conv
.
isNoBase64
=
YES
;
[
conv
sdk_docx2doct_bin
:
fullFileName
nsTo
:
fullFileNameTo
nsTemp
:
tempDir
nsFontPath
:
fontsPath
];
NSLog
(
@"doct output : %@"
,
fullFileNameTo
);
}
NSLog
(
@"doct output: %@"
,
fullFileNameTo
);
{
NSLog
(
@"==================== OPEN DOCT ===================="
);
NSString
*
path
=
[[
NSBundle
mainBundle
]
pathForResource
:
@"demo"
ofType
:
@"docx"
];
NSString
*
fullFileName
=
path
;
NSString
*
fullFileNameTo
=
[
NSString
stringWithFormat
:
@"%@demo.bin"
,
NSTemporaryDirectory
()];
NSString
*
tempDir
=
NSTemporaryDirectory
();
NSString
*
fontsPath
=
@"/System/Library/Fonts"
;
X2tConverter
*
conv
=
[[
X2tConverter
alloc
]
init
];
conv
.
isNoBase64
=
YES
;
[
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
];
conv
.
isNoBase64
=
YES
;
[
conv2
sdk_doct_bin2docx
:
fullFileNameTo
nsTo
:
docxOut
nsTemp
:
outTemp
nsFontPath
:
fontsPath
fromChanges
:
@
(
NO
)
nsThemeDir
:
@""
];
NSLog
(
@"doct output: %@"
,
fullFileNameTo
);
}
}
-
(
void
)
testXLSX
...
...
@@ -97,6 +118,7 @@
NSString
*
fontsPath
=
@"/System/Library/Fonts"
;
X2tConverter
*
conv
=
[[
X2tConverter
alloc
]
init
];
conv
.
isNoBase64
=
YES
;
[
conv
sdk_xlsx2xlst_bin
:
fullFileName
nsTo
:
fullFileNameTo
nsTemp
:
tempDir
nsFontPath
:
fontsPath
];
NSLog
(
@"xlst output : %@"
,
fullFileNameTo
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment