private Paragraph ConvertParagraphBlock(ParagraphBlock paragraphBlock, int numberingId, int nestLevel) { var inlineConverter = new InlineConverter(Manipulator, UserSettingStyleMap, BaseFolderPathForRelativePath); var oxmlInlineElements = inlineConverter.Convert(paragraphBlock.Inline); var styleId = UserSettingStyleMap.GetStyleId(UserSettingStyleMap.StyleMapKeyType.Paragraph, null); var oxmlParagraph = Manipulator.ElementCreator.CreateParagraphElement(oxmlInlineElements, styleId, numberingId, nestLevel); Manipulator.AdjustImageDimension(oxmlParagraph); return(oxmlParagraph); }
private Paragraph ConvertHeadingBlock(HeadingBlock headingBlock) { var inlineConverter = new InlineConverter(Manipulator, UserSettingStyleMap, BaseFolderPathForRelativePath); var oxmlInlineElements = inlineConverter.Convert(headingBlock.Inline); var styleId = UserSettingStyleMap.GetStyleId(UserSettingStyleMap.StyleMapKeyType.Heading, new UserSettingStyleMap.HeadingStyleMapArgs() { Level = headingBlock.Level }); var oxmlHeading = Manipulator.ElementCreator.CreateHeadingElement(oxmlInlineElements, styleId); Manipulator.AdjustImageDimension(oxmlHeading); return(oxmlHeading); }