From 2df112bdf681ca5831c1d3137c2788e68d33ef43 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 10 Jul 2008 23:26:12 +0000 Subject: Changed inDefinition and indentPara to stInDefinition and stIndentPara (for consistency). git-svn-id: https://pandoc.googlecode.com/svn/trunk@1295 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Writers/OpenDocument.hs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'Text/Pandoc/Writers') diff --git a/Text/Pandoc/Writers/OpenDocument.hs b/Text/Pandoc/Writers/OpenDocument.hs index 1197c24a0..7348f0a51 100644 --- a/Text/Pandoc/Writers/OpenDocument.hs +++ b/Text/Pandoc/Writers/OpenDocument.hs @@ -51,22 +51,22 @@ plainToPara x = x -- data WriterState = - WriterState { stNotes :: [Doc] - , stTableStyles :: [Doc] - , stParaStyles :: [Doc] - , stListStyles :: [(Int, [Doc])] - , indentPara :: Int - , inDefinition :: Bool + WriterState { stNotes :: [Doc] + , stTableStyles :: [Doc] + , stParaStyles :: [Doc] + , stListStyles :: [(Int, [Doc])] + , stIndentPara :: Int + , stInDefinition :: Bool } defaultWriterState :: WriterState defaultWriterState = - WriterState { stNotes = [] - , stTableStyles = [] - , stParaStyles = [] - , stListStyles = [] - , indentPara = 0 - , inDefinition = False + WriterState { stNotes = [] + , stTableStyles = [] + , stParaStyles = [] + , stListStyles = [] + , stIndentPara = 0 + , stInDefinition = False } when :: Bool -> Doc -> Doc @@ -82,13 +82,13 @@ addParaStyle :: Doc -> State WriterState () addParaStyle i = modify $ \s -> s { stParaStyles = i : stParaStyles s } increaseIndent :: State WriterState () -increaseIndent = modify $ \s -> s { indentPara = 1 + indentPara s } +increaseIndent = modify $ \s -> s { stIndentPara = 1 + stIndentPara s } resetIndent :: State WriterState () -resetIndent = modify $ \s -> s { indentPara = 0 } +resetIndent = modify $ \s -> s { stIndentPara = 0 } setInDefinitionList :: Bool -> State WriterState () -setInDefinitionList b = modify $ \s -> s { inDefinition = b } +setInDefinitionList b = modify $ \s -> s { stInDefinition = b } inParagraphTags :: Doc -> Doc inParagraphTags = inTags False "text:p" [("text:style-name", "Text_20_body")] @@ -428,8 +428,8 @@ tableStyle num wcs = paraStyle :: String -> [(String,String)] -> State WriterState Int paraStyle parent attrs = do pn <- (+) 1 . length <$> gets stParaStyles - i <- (*) 0.5 . fromIntegral <$> gets indentPara :: State WriterState Double - b <- gets inDefinition + i <- (*) 0.5 . fromIntegral <$> gets stIndentPara :: State WriterState Double + b <- gets stInDefinition let styleAttr = [ ("style:name" , "P" ++ show pn) , ("style:family" , "paragraph" ) , ("style:parent-style-name", parent )] -- cgit v1.2.3