Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6926558
Merge branch 'issue20' of https://github.com/oneeightyg/DocX into rel…
andalman Oct 7, 2022
80504be
Merge branch 'master' of https://github.com/oneeightyg/DocX into release
andalman Oct 8, 2022
672833e
Merge branch 'master' of https://github.com/oneeightyg/DocX into release
andalman Oct 25, 2022
d025f99
Turn on XML escaping in the document.xml.rels file
andalman Oct 25, 2022
a12f507
Merge branch 'issue24' of https://github.com/oneeightyg/DocX into rel…
andalman Oct 26, 2022
5f76c42
Write “modern” docx files that don’t show “Compatibility Mode” in Word
andalman Oct 27, 2022
9cb4b45
Merge branch 'master' of https://github.com/oneeightyg/DocX into release
andalman Nov 1, 2022
536ecbd
Merge branch 'master' of https://github.com/oneeightyg/DocX into release
andalman Nov 2, 2022
5996565
started page size
Jan 13, 2023
ffedac8
page size and margins are now stored as a flexible Measurement<UnitLe…
Jan 16, 2023
890d78c
an attempt at image autosizing
Jan 16, 2023
9651910
Underlining doesn’t require specifying a foreground color
andalman Jan 26, 2023
34d2c6c
Merge branch 'Image_ScaleToFit' of https://github.com/oneeightyg/DocX…
andalman Jan 26, 2023
418c1ea
Merge branch 'issue36' of https://github.com/oneeightyg/DocX into rel…
andalman Jan 26, 2023
4f9dac1
Merge branch 'master' of https://github.com/oneeightyg/DocX into release
andalman Mar 16, 2023
0b10743
Added ability to write out lists
andalman Mar 27, 2026
3caf8aa
Added ability to write out endnotes and footnotes
andalman Mar 28, 2026
1f62847
Update project to use minimum deployment version of macOS 11.5
andalman Mar 31, 2026
c7a111a
Added tests for new lists, endnotes, and footnotes features
andalman Mar 31, 2026
8c344fd
Merge branch 'shinjukunian:master' into master
andalman Apr 2, 2026
f51d935
use NSTextList attributes for lists as well
Apr 6, 2026
a271a18
Use NSTextList to indicate lists, rather than custom attributes
andalman Apr 7, 2026
b5325f7
Allow clients to specify image width, flow, and alt text
andalman Apr 4, 2026
00cfa5e
Allow clients to specify image width, flow, and alt text
andalman Apr 4, 2026
b64ac2b
testWriteSections no longer creates bad docx
andalman Apr 10, 2026
310ec0f
Merge branch 'master' into lists-and-notes
andalman Apr 13, 2026
7f702c0
Merge branch 'master' into image-width-and-flow-pr
andalman Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions DocX-iOS-Tests/DocX_iOS_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,12 @@ class DocX_iOS_Tests: XCTestCase {
@available(iOS 15, *)
func testAttributed(){
var att=AttributedString("Lorem ipsum dolor sit amet")
att.strokeColor = .green
att.strokeWidth = -2
att.font = UIFont(name: "Helvetica", size: 12)
att.foregroundColor = .gray
var attributes = AttributeContainer()
attributes.uiKit.strokeColor = .green
attributes.uiKit.strokeWidth = -2
attributes.uiKit.font = UIFont(name: "Helvetica", size: 12)
attributes.uiKit.foregroundColor = .gray
att.mergeAttributes(attributes)
let title=String(att.characters.prefix(10))
let url=self.tempURL.appendingPathComponent(UUID().uuidString + "_myDocument_\(title)").appendingPathExtension("docx")
print(url.absoluteString)
Expand Down
66 changes: 41 additions & 25 deletions DocX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -33,8 +33,6 @@
5A8406CE2609DF65002B8B34 /* Bundle+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A8406CC2609DF65002B8B34 /* Bundle+Extensions.swift */; };
5A907B882982A35800E1A581 /* DocXPageDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A907B862982A35800E1A581 /* DocXPageDefinition.swift */; };
5A907B892982A35800E1A581 /* DocXPageDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A907B862982A35800E1A581 /* DocXPageDefinition.swift */; };
5A907B8A2982A35800E1A581 /* DocXStyleConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A907B872982A35800E1A581 /* DocXStyleConfiguration.swift */; };
5A907B8B2982A35800E1A581 /* DocXStyleConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A907B872982A35800E1A581 /* DocXStyleConfiguration.swift */; };
5A9F70AA223502D6008E967C /* DocX.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A9F70A0223502D6008E967C /* DocX.framework */; };
5A9F70AF223502D6008E967C /* DocXTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A9F70AE223502D6008E967C /* DocXTests.swift */; };
5A9F70B1223502D6008E967C /* DocX.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A9F70A3223502D6008E967C /* DocX.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -74,10 +72,13 @@
5AE8342722377A5B00E68343 /* NSUnderlineStyle+Elements.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AE8341A22375D9E00E68343 /* NSUnderlineStyle+Elements.swift */; };
5AE83428223781F600E68343 /* NSAttributedString+DocX.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AE833EB223683F000E68343 /* NSAttributedString+DocX.swift */; };
5AE834292237822B00E68343 /* blank in Resources */ = {isa = PBXBuildFile; fileRef = 5AE833F2223688A400E68343 /* blank */; };
6D51921D29AD8B7A0043ECA8 /* DocXStyleConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D51921C29AD8B7A0043ECA8 /* DocXStyleConfiguration.swift */; };
6D51921F29AD8C800043ECA8 /* DocXStyleConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D51921C29AD8B7A0043ECA8 /* DocXStyleConfiguration.swift */; };
6D51922129AD8D320043ECA8 /* styles.xml in Resources */ = {isa = PBXBuildFile; fileRef = 6D51922029AD8D320043ECA8 /* styles.xml */; };
6D010E002F8491DA0045DC3E /* DocXImageAttachment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D010DFF2F8491DA0045DC3E /* DocXImageAttachment.swift */; };
6D010E012F8491DA0045DC3E /* DocXImageAttachment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D010DFF2F8491DA0045DC3E /* DocXImageAttachment.swift */; };
6D51922229AD8D320043ECA8 /* styles.xml in Resources */ = {isa = PBXBuildFile; fileRef = 6D51922029AD8D320043ECA8 /* styles.xml */; };
6D98C4DC2F7C4F06004C4FFB /* DocXNumbering.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D98C4DB2F7C4F06004C4FFB /* DocXNumbering.swift */; };
6D98C4DD2F7C4F06004C4FFB /* DocXNumbering.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D98C4DB2F7C4F06004C4FFB /* DocXNumbering.swift */; };
6D98C4DF2F7C4F1B004C4FFB /* DocXNotes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D98C4DE2F7C4F1B004C4FFB /* DocXNotes.swift */; };
6D98C4E02F7C4F1B004C4FFB /* DocXNotes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D98C4DE2F7C4F1B004C4FFB /* DocXNotes.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -139,8 +140,11 @@
5AE8340B22373A5200E68343 /* NSParagraphStyle+Elements.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSParagraphStyle+Elements.swift"; sourceTree = "<group>"; };
5AE834112237573F00E68343 /* FontElements.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontElements.swift; sourceTree = "<group>"; };
5AE8341A22375D9E00E68343 /* NSUnderlineStyle+Elements.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSUnderlineStyle+Elements.swift"; sourceTree = "<group>"; };
6D010DFF2F8491DA0045DC3E /* DocXImageAttachment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocXImageAttachment.swift; sourceTree = "<group>"; };
6D51921C29AD8B7A0043ECA8 /* DocXStyleConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DocXStyleConfiguration.swift; sourceTree = "<group>"; };
6D51922029AD8D320043ECA8 /* styles.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = styles.xml; sourceTree = "<group>"; };
6D98C4DB2F7C4F06004C4FFB /* DocXNumbering.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocXNumbering.swift; sourceTree = "<group>"; };
6D98C4DE2F7C4F1B004C4FFB /* DocXNotes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocXNotes.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -219,6 +223,8 @@
5A9F70BF22350300008E967C /* DocumentRoot.swift */,
5A9F70BC22350300008E967C /* DocX.swift */,
5AC6C9B4260ACCEB0059F7B0 /* DocXWriting.swift */,
6D98C4DE2F7C4F1B004C4FFB /* DocXNotes.swift */,
6D98C4DB2F7C4F06004C4FFB /* DocXNumbering.swift */,
5A6B3DBE26D86D33009F6859 /* DocXOptions.swift */,
6D51921C29AD8B7A0043ECA8 /* DocXStyleConfiguration.swift */,
5AC6C9B7260AD4CF0059F7B0 /* DocXWriter.swift */,
Expand All @@ -241,6 +247,7 @@
5A2E47BC29B4535200DFAC1F /* DocXStyleConfiguration.swift */,
5A9F70A3223502D6008E967C /* DocX.h */,
5A9F70A4223502D6008E967C /* Info.plist */,
6D010DFF2F8491DA0045DC3E /* DocXImageAttachment.swift */,
);
path = DocX;
sourceTree = "<group>";
Expand Down Expand Up @@ -378,8 +385,9 @@
5A9F7097223502D6008E967C /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1020;
LastUpgradeCheck = 1420;
LastUpgradeCheck = 2630;
ORGANIZATIONNAME = "telethon k.k.";
TargetAttributes = {
5A9F709F223502D6008E967C = {
Expand Down Expand Up @@ -471,11 +479,12 @@
5A8406CD2609DF65002B8B34 /* Bundle+Extensions.swift in Sources */,
5A2E47BD29B4535200DFAC1F /* DocXStyleConfiguration.swift in Sources */,
5AC6C9B8260AD4CF0059F7B0 /* DocXWriter.swift in Sources */,
6D010E012F8491DA0045DC3E /* DocXImageAttachment.swift in Sources */,
5AE833F12236861F00E68343 /* PlatformSpecific-macOS.swift in Sources */,
5A9F70F922350DDE008E967C /* AttributeElements.swift in Sources */,
5AE8341B22375D9E00E68343 /* NSUnderlineStyle+Elements.swift in Sources */,
5A907B8A2982A35800E1A581 /* DocXStyleConfiguration.swift in Sources */,
5AE5BE9B25EE283F009A152F /* NSAttributedString+DocX-macOS.swift in Sources */,
6D98C4DD2F7C4F06004C4FFB /* DocXNumbering.swift in Sources */,
5A9F70FB22354F1C008E967C /* RubyAnnotationElement.swift in Sources */,
5AC6C9B5260ACCEB0059F7B0 /* DocXWriting.swift in Sources */,
5AE8340C22373A5200E68343 /* NSParagraphStyle+Elements.swift in Sources */,
Expand All @@ -487,6 +496,7 @@
5A8406C22609DF38002B8B34 /* NSTextAttachement+Extensions.swift in Sources */,
5A8406B52609DF1B002B8B34 /* NSAttributedString+Writing.swift in Sources */,
5A8406BC2609DF2B002B8B34 /* ImageRelationship.swift in Sources */,
6D98C4DF2F7C4F1B004C4FFB /* DocXNotes.swift in Sources */,
5AE83428223781F600E68343 /* NSAttributedString+DocX.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -510,11 +520,12 @@
5A8406CE2609DF65002B8B34 /* Bundle+Extensions.swift in Sources */,
5A2E47BE29B4535200DFAC1F /* DocXStyleConfiguration.swift in Sources */,
5AC6C9B9260AD4CF0059F7B0 /* DocXWriter.swift in Sources */,
6D010E002F8491DA0045DC3E /* DocXImageAttachment.swift in Sources */,
5AE833D12236831500E68343 /* NSAttributedString+Extensions.swift in Sources */,
5AE833D52236831500E68343 /* AttributeElements.swift in Sources */,
5AE833DA2236831500E68343 /* RubyAnnotationElement.swift in Sources */,
5A907B8B2982A35800E1A581 /* DocXStyleConfiguration.swift in Sources */,
5AE5BEA025EE2847009A152F /* NSAttributedString+DocX-macOS.swift in Sources */,
6D98C4DC2F7C4F06004C4FFB /* DocXNumbering.swift in Sources */,
5AE833EC223683F000E68343 /* NSAttributedString+DocX.swift in Sources */,
5AC6C9B6260ACCEB0059F7B0 /* DocXWriting.swift in Sources */,
5AE8340D22373A5200E68343 /* NSParagraphStyle+Elements.swift in Sources */,
Expand All @@ -526,6 +537,7 @@
5A8406C72609DF39002B8B34 /* NSTextAttachement+Extensions.swift in Sources */,
5A8406B62609DF1B002B8B34 /* NSAttributedString+Writing.swift in Sources */,
5A8406BD2609DF2B002B8B34 /* ImageRelationship.swift in Sources */,
6D98C4E02F7C4F1B004C4FFB /* DocXNotes.swift in Sources */,
5AE833DC2236831500E68343 /* ParagraphElement.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -609,7 +621,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -669,7 +681,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
Expand All @@ -694,6 +706,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = DocX/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -703,7 +716,8 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MACOSX_DEPLOYMENT_TARGET = 11.5;
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.telethon.docx;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand All @@ -728,6 +742,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = DocX/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -737,7 +752,8 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MACOSX_DEPLOYMENT_TARGET = 11.5;
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.telethon.docx;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand All @@ -750,18 +766,17 @@
5A9F70B8223502D6008E967C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = DVQ96RL2KL;
DEVELOPMENT_TEAM = XCAC6BGJ49;
INFOPLIST_FILE = DocXTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.5;
PRODUCT_BUNDLE_IDENTIFIER = com.telethon.docx.DocXTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -771,18 +786,17 @@
5A9F70B9223502D6008E967C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = DVQ96RL2KL;
DEVELOPMENT_TEAM = XCAC6BGJ49;
INFOPLIST_FILE = DocXTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MACOSX_DEPLOYMENT_TARGET = 11.5;
PRODUCT_BUNDLE_IDENTIFIER = com.telethon.docx.DocXTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -802,6 +816,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = "$(SRCROOT)/DocX/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -811,7 +826,8 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MACOSX_DEPLOYMENT_TARGET = 11.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.telethon.docx;
PRODUCT_MODULE_NAME = DocX;
Expand All @@ -838,6 +854,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = "$(SRCROOT)/DocX/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -847,7 +864,8 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MACOSX_DEPLOYMENT_TARGET = 11.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.telethon.docx;
PRODUCT_MODULE_NAME = DocX;
Expand All @@ -863,7 +881,6 @@
5AE8340122368A4500E68343 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = DVQ96RL2KL;
Expand All @@ -874,7 +891,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MACOSX_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.telethon.docx.DocX-iOS-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -887,7 +904,6 @@
5AE8340222368A4500E68343 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = DVQ96RL2KL;
Expand All @@ -898,7 +914,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MACOSX_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.telethon.docx.DocX-iOS-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DocX.xcodeproj/xcshareddata/xcschemes/DocX-iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
LastUpgradeVersion = "2630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion DocX.xcodeproj/xcshareddata/xcschemes/DocX.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
LastUpgradeVersion = "2630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
1 change: 0 additions & 1 deletion DocX/AttributeElements.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ extension Dictionary where Key == NSAttributedString.Key{
if let style=self[.underlineStyle] as? Int {
// If the `underlineColor` attribute is present, use that as the color
let underlineColor = self[.underlineColor] as? NSColor

let underline=NSUnderlineStyle(rawValue: style)
attributesElement.addChild(underline.underlineElement(for: underlineColor))
}
Expand Down
17 changes: 15 additions & 2 deletions DocX/DocX.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import AEXML
enum DocXSavingErrors:Error{
case noBlankDocument
case compressionFailed
case duplicateNoteId(kind: String, id: Int)
}

protocol DocumentRelationship {
Expand All @@ -29,7 +30,7 @@ protocol DocX{
options:DocXOptions) throws ->String
func writeDocX(to url:URL)throws
func writeDocX(to url:URL, options:DocXOptions) throws
func prepareLinks(linkXML:AEXMLDocument, mediaURL:URL)->[DocumentRelationship]
func prepareLinks(linkXML:AEXMLDocument, mediaURL:URL, options:DocXOptions, mediaFilenamePrefix: String)->[DocumentRelationship]
}

public let docXUTIType="org.openxmlformats.wordprocessingml.document"
Expand All @@ -54,10 +55,22 @@ public extension NSAttributedString.Key{

/// A custom attribute that specifies the styleId to use for characters
static let characterStyleId = NSAttributedString.Key("com.telethon.docx.attributedstringkey.characterStyleId")

/// A custom attribute that specifies the id for a footnote reference
static let footnoteReferenceId = NSAttributedString.Key("com.telethon.docx.attributedstringkey.footnoteReferenceId")

/// A custom attribute that specifies the id for an endnote reference
static let endnoteReferenceId = NSAttributedString.Key("com.telethon.docx.attributedstringkey.endnoteReferenceId")

/// A custom attribute that assigns a paragraph to a footnote body
static let footnoteBodyId = NSAttributedString.Key("com.telethon.docx.attributedstringkey.footnoteBodyId")

/// A custom attribute that assigns a paragraph to an endnote body
static let endnoteBodyId = NSAttributedString.Key("com.telethon.docx.attributedstringkey.endnoteBodyId")
}

/// Encapsulates different break types in a document.
public enum BreakType: String, Equatable{
public enum BreakType: String, Equatable {
/// The text continues in the next line
case wrap
/// The text continues on the next page
Expand Down
Loading