From 01483f91bd152ad806a8110d75353edfc9551ec8 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 22 Jan 2017 10:37:19 +0100 Subject: Revert "Added page breaks into Pandoc." This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14. --- src/Text/Pandoc/Readers/Odt/StyleReader.hs | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'src/Text/Pandoc/Readers/Odt/StyleReader.hs') diff --git a/src/Text/Pandoc/Readers/Odt/StyleReader.hs b/src/Text/Pandoc/Readers/Odt/StyleReader.hs index cd31f50a8..26ba6df82 100644 --- a/src/Text/Pandoc/Readers/Odt/StyleReader.hs +++ b/src/Text/Pandoc/Readers/Odt/StyleReader.hs @@ -43,7 +43,6 @@ module Text.Pandoc.Readers.Odt.StyleReader , TextProperties (..) , ParaProperties (..) , VerticalTextPosition (..) -, ParaBreak (..) , ListItemNumberFormat (..) , ListLevel , ListStyle (..) @@ -274,7 +273,6 @@ instance Default TextProperties where data ParaProperties = PropP { paraNumbering :: ParaNumbering , indentation :: LengthOrPercent , margin_left :: LengthOrPercent - , page_break :: ParaBreak } deriving ( Eq, Show ) @@ -282,7 +280,6 @@ instance Default ParaProperties where def = PropP { paraNumbering = NumberingNone , indentation = def , margin_left = def - , page_break = AutoNone } ---- @@ -317,9 +314,6 @@ instance Lookupable UnderlineMode where data ParaNumbering = NumberingNone | NumberingKeep | NumberingRestart Int deriving ( Eq, Show ) -data ParaBreak = AutoNone | PageBefore | PageAfter | PageBoth - deriving ( Eq, Show ) - data LengthOrPercent = LengthValueMM Int | PercentValue Int deriving ( Eq, Show ) @@ -539,20 +533,16 @@ readLineMode modeAttr styleAttr = proc x -> do readParaProperties :: StyleReader _x ParaProperties readParaProperties = executeIn NsStyle "paragraph-properties" $ liftAsSuccess - ( liftA4 PropP + ( liftA3 PropP ( liftA2 readNumbering - ( isSet' NsText "number-lines" ) - ( readAttr' NsText "line-number" ) + ( isSet' NsText "number-lines" ) + ( readAttr' NsText "line-number" ) ) ( liftA2 readIndentation - ( isSetWithDefault NsStyle "auto-text-indent" False ) - ( getAttr NsXSL_FO "text-indent" ) - ) - ( getAttr NsXSL_FO "margin-left" ) - ( liftA2 readPageBreak - ( findAttrWithDefault NsXSL_FO "break-before" "auto" ) - ( findAttrWithDefault NsXSL_FO "break-after" "auto" ) + ( isSetWithDefault NsStyle "auto-text-indent" False ) + ( getAttr NsXSL_FO "text-indent" ) ) + ( getAttr NsXSL_FO "margin-left" ) ) where readNumbering (Just True) (Just n) = NumberingRestart n readNumbering (Just True) _ = NumberingKeep @@ -561,11 +551,6 @@ readParaProperties = readIndentation False indent = indent readIndentation True _ = def - readPageBreak "page" "page" = PageBoth - readPageBreak "page" _ = PageBefore - readPageBreak _ "page" = PageAfter - readPageBreak _ _ = AutoNone - ---- -- List styles ---- -- cgit v1.2.3