Skip to content

Commit

Permalink
Enhance the pptx emitter to support text alignment of page numbering (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
speckyspooky authored Jan 31, 2025
1 parent a6f8cab commit c76651b
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation and others
* Copyright (c) 2021, 2024, 2025 Contributors to the Eclipse Foundation and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -288,6 +288,19 @@ private void writeAutoText(ContainerArea container) {
writer.attribute("type", "slidenum");
setTextProperty("a:rPr", text.getStyle());
writer.openTag("a:pPr");
TextStyle style = text.getStyle();
// text alignment of slide number
if (style != null) {
if (hAlign != null) {
writer.attribute("algn", hAlign);
}
if (render.isRTL() || style.isRtl()) {
writer.attribute("rtl", 1);
if (hAlign == null) {
writer.attribute("algn", "r");
}
}
}
writer.closeTag("a:pPr");
writer.openTag("a:t");
canvas.writeText("‹#›");
Expand Down

0 comments on commit c76651b

Please sign in to comment.