11import Foundation
2- import DocConverterSwift
2+ import CommonConverterSwift
33import OOXMLSwift
44
55public struct WordHTMLConverter : DocumentConverter {
66 public static let sourceFormat = " docx "
77
88 public init ( ) { }
99
10- public func convert< W: DocConverterSwift . StreamingOutput > (
10+ public func convert< W: StreamingOutput > (
1111 input: URL ,
1212 output: inout W ,
1313 options: ConversionOptions
@@ -16,7 +16,7 @@ public struct WordHTMLConverter: DocumentConverter {
1616 try convert ( document: document, source: input, output: & output, options: options)
1717 }
1818
19- public func convert< W: DocConverterSwift . StreamingOutput > (
19+ public func convert< W: StreamingOutput > (
2020 document: WordDocument ,
2121 output: inout W ,
2222 options: ConversionOptions = . default
@@ -28,12 +28,12 @@ public struct WordHTMLConverter: DocumentConverter {
2828 document: WordDocument ,
2929 options: ConversionOptions = . default
3030 ) throws -> String {
31- var writer = DocConverterSwift . StringOutput ( )
31+ var writer = StringOutput ( )
3232 try convert ( document: document, output: & writer, options: options)
3333 return writer. content
3434 }
3535
36- private func convert< W: DocConverterSwift . StreamingOutput > (
36+ private func convert< W: StreamingOutput > (
3737 document: WordDocument ,
3838 source: URL ? ,
3939 output: inout W ,
@@ -73,7 +73,7 @@ public struct WordHTMLConverter: DocumentConverter {
7373
7474 // MARK: - Document Shell
7575
76- private func emitFrontmatter< W: DocConverterSwift . StreamingOutput > (
76+ private func emitFrontmatter< W: StreamingOutput > (
7777 document: WordDocument ,
7878 source: URL ? ,
7979 title: String ,
@@ -91,7 +91,7 @@ public struct WordHTMLConverter: DocumentConverter {
9191 try output. writeLine ( " --> " )
9292 }
9393
94- private func emitDocumentStart< W: DocConverterSwift . StreamingOutput > (
94+ private func emitDocumentStart< W: StreamingOutput > (
9595 title: String ,
9696 output: inout W
9797 ) throws {
@@ -112,15 +112,15 @@ public struct WordHTMLConverter: DocumentConverter {
112112 try output. writeLine ( " <main class= \" document \" > " )
113113 }
114114
115- private func emitDocumentEnd< W: DocConverterSwift . StreamingOutput > ( output: inout W ) throws {
115+ private func emitDocumentEnd< W: StreamingOutput > ( output: inout W ) throws {
116116 try output. writeLine ( " </main> " )
117117 try output. writeLine ( " </body> " )
118118 try output. writeLine ( " </html> " )
119119 }
120120
121121 // MARK: - Blocks
122122
123- private func emitParagraph< W: DocConverterSwift . StreamingOutput > (
123+ private func emitParagraph< W: StreamingOutput > (
124124 _ paragraph: Paragraph ,
125125 context: inout ConversionContext ,
126126 output: inout W
@@ -159,7 +159,7 @@ public struct WordHTMLConverter: DocumentConverter {
159159 try output. writeLine ( " <p> \( html) </p> " )
160160 }
161161
162- private func emitTable< W: DocConverterSwift . StreamingOutput > (
162+ private func emitTable< W: StreamingOutput > (
163163 _ table: Table ,
164164 context: inout ConversionContext ,
165165 output: inout W
@@ -249,7 +249,7 @@ public struct WordHTMLConverter: DocumentConverter {
249249 }
250250 }
251251
252- private func emitListBlock< W: DocConverterSwift . StreamingOutput > (
252+ private func emitListBlock< W: StreamingOutput > (
253253 _ items: [ FlatListItem ] ,
254254 output: inout W
255255 ) throws {
@@ -260,7 +260,7 @@ public struct WordHTMLConverter: DocumentConverter {
260260 }
261261 }
262262
263- private func renderList< W: DocConverterSwift . StreamingOutput > (
263+ private func renderList< W: StreamingOutput > (
264264 items: [ FlatListItem ] ,
265265 index: inout Int ,
266266 level: Int ,
@@ -423,7 +423,7 @@ public struct WordHTMLConverter: DocumentConverter {
423423
424424 // MARK: - Footnotes
425425
426- private func emitFootnotes< W: DocConverterSwift . StreamingOutput > (
426+ private func emitFootnotes< W: StreamingOutput > (
427427 context: ConversionContext ,
428428 output: inout W
429429 ) throws {
0 commit comments