@@ -1,4 +1,4 @@
1−{-# LANGUAGE TemplateHaskell, OverloadedStrings #-}
1+{-# LANGUAGE TemplateHaskell #-}
3Copyright (C) 2008 John MacFarlane <jgm@berkeley.edu>
3Copyright (C) 2008 John MacFarlane <jgm@berkeley.edu>
@@ -43,11 +43,7 @@ import Text.XML.Light
43import Text.XML.Light.Cursor
43import Text.XML.Light.Cursor
44import Text.Pandoc.Shared ( withTempDir )
44import Text.Pandoc.Shared ( withTempDir )
45import Network.URI ( isURI )
45import Network.URI ( isURI )
46−import Data.String ( IsString (..) )
47−import qualified Data.ByteString.Char8 as B ( writeFile, pack, ByteString )
46+import qualified Data.ByteString.Char8 as B ( writeFile, pack )
49−instance IsString B.ByteString
50− where fromString = B.pack
52-- | Produce an ODT file from OpenDocument XML.
48-- | Produce an ODT file from OpenDocument XML.
53saveOpenDocumentAsODT :: FilePath -- ^ Pathname of ODT file to be produced.
49saveOpenDocumentAsODT :: FilePath -- ^ Pathname of ODT file to be produced.
@@ -68,7 +64,7 @@ saveOpenDocumentAsODT destinationODTPath sourceDirRelative xml = do
68 withTempDir "pandoc-odt" $ \tempDir -> do
64 withTempDir "pandoc-odt" $ \tempDir -> do
69 let tempODT = tempDir </> "reference.odt"
65 let tempODT = tempDir </> "reference.odt"
70 copyFile "odt-styles/reference.odt" tempODT
66 copyFile "odt-styles/reference.odt" tempODT
71− B.writeFile tempODT $(contentsOf "odt-styles/reference.odt")
67+ B.writeFile tempODT $ B.pack $(contentsOf "odt-styles/reference.odt")
72 createDirectory $ tempDir </> "Pictures"
68 createDirectory $ tempDir </> "Pictures"
73 xml' <- handlePictures tempODT sourceDirRelative xml
69 xml' <- handlePictures tempODT sourceDirRelative xml
74 writeFile (tempDir </> "content.xml") xml'
70 writeFile (tempDir </> "content.xml") xml'