@@ -216,6 +216,7 @@ data ParPart = PlainRun Run
216216 | InternalHyperLink Anchor [Run]
217217 | ExternalHyperLink URL [Run]
218218 | Drawing FilePath String String B.ByteString Extent -- title, alt
219+ | Chart -- placeholder for now
219220 | PlainOMath [Exp]
220221 deriving Show
221222
@@ -223,6 +224,7 @@ data Run = Run RunStyle [RunElem]
223224 | Footnote [BodyPart]
224225 | Endnote [BodyPart]
225226 | InlineDrawing FilePath String String B.ByteString Extent -- title, alt
227+ | InlineChart -- placeholder
226228 deriving Show
227229
228230data RunElem = TextRun String | LnBrk | Tab | SoftHyphen | NoBreakHyphen
@@ -682,6 +684,13 @@ elemToParPart ns element
682684 -- Todo: check out title and attr for deprecated format.
683685 Just s -> expandDrawingId s >>= (\(fp, bs) -> return $ Drawing fp "" "" bs Nothing)
684686 Nothing -> throwError WrongElem
687+-- Chart
688+elemToParPart ns element
689+ | isElem ns "w" "r" element
690+ , Just drawingElem <- findChild (elemName ns "w" "drawing") element
691+ , c_ns <- "http://schemas.openxmlformats.org/drawingml/2006/chart"
692+ , Just _ <- findElement (QName "chart" (Just c_ns) (Just "c")) drawingElem
693+ = return Chart
685694elemToParPart ns element
686695 | isElem ns "w" "r" element =
687696 elemToRun ns element >>= (\r -> return $ PlainRun r)
@@ -778,6 +787,11 @@ childElemToRun ns element
778787 Just s -> expandDrawingId s >>=
779788 (\(fp, bs) -> return $ InlineDrawing fp title alt bs $ elemToExtent element)
780789 Nothing -> throwError WrongElem
790+childElemToRun ns element
791+ | isElem ns "w" "drawing" element
792+ , c_ns <- "http://schemas.openxmlformats.org/drawingml/2006/chart"
793+ , Just _ <- findElement (QName "chart" (Just c_ns) (Just "c")) element
794+ = return InlineChart
781795childElemToRun ns element
782796 | isElem ns "w" "footnoteReference" element
783797 , Just fnId <- findAttr (elemName ns "w" "id") element = do