Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add superscript #258

Closed
2 tasks done
ashahabov opened this issue Jun 11, 2022 · 1 comment
Closed
2 tasks done

Add superscript #258

ashahabov opened this issue Jun 11, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request help-wanted This issue is identified as a good community contribution opportunity

Comments

@ashahabov
Copy link
Member

ashahabov commented Jun 11, 2022

Make possibility of adding superscript content.

image

Expected Behavior

There is a method on the TextBox, Paragraph or Portion level that allows adding superscripts. Adding superscript can be looked like this:

var pres = SCPresentation.Open("add-superscript.pptx", true);
var autoShape = pres.Slides[0].Shapes.GetByName<IAutoShape>("AutoShape 1");
var paragraph = autoShape.TextBox.Paragraphs[0];

var newPortion = new SCPortion();
newPortion.Font.OffsetEffect = 30;
newPortion.Text = "®";
paragraph.Portions.Add(newPortion);

Check List

  • implement feature;
  • add unit-test.

Pull Requests

Testing

  • IFont.OffsetEffect.get()
  • IFont.OffsetEffect.set()
@ashahabov ashahabov added enhancement New feature or request help-wanted This issue is identified as a good community contribution opportunity labels Jun 11, 2022
@ashahabov ashahabov added this to To do in v1.0 classic via automation Jun 11, 2022
@ashahabov ashahabov moved this from To do to In progress in v1.0 classic Oct 11, 2022
@ashahabov ashahabov assigned ashahabov and unassigned ashahabov Oct 11, 2022
@ashahabov ashahabov moved this from In progress to In testing in v1.0 classic Oct 11, 2022
@ashahabov ashahabov self-assigned this Oct 11, 2022
@ashahabov
Copy link
Member Author

ashahabov commented Oct 12, 2022

@amescodes, could you please check the following test case? Looks like setter of OffsetEffect breaks presentation:

branch: master (code was refactored)
presentation: autoshape-case010.pptx
validator log: ooxml-validator.2022-10-12T06_53_14.318Z.json.zip

Steps:

  1. Run:
using var pres = SCPresentation.Open("autoshape-case010.pptx");
var font = pres.Slides[2].Shapes.GetById<IAutoShape>(2).TextFrame!.Paragraphs[0].Portions[0].Font;

font.OffsetEffect = 12;

pres.Save();
  1. Open modified autoshape-case010.pptx

Actual behavior: PowerPoint suggests "Repair":

image

Expected behavior: PowerPoint should not suggests "Repair".

@ashahabov ashahabov moved this from In testing to In progress in v1.0 classic Oct 12, 2022
@ashahabov ashahabov removed their assignment Oct 12, 2022
@ashahabov ashahabov self-assigned this Oct 12, 2022
@ashahabov ashahabov moved this from In progress to In testing in v1.0 classic Oct 12, 2022
@ashahabov ashahabov removed this from In testing in v1.0 classic Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help-wanted This issue is identified as a good community contribution opportunity
Projects
None yet
Development

No branches or pull requests

1 participant