We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Wrong inheritance of Indent in Styles


I have a problem with derived Styles.

  • BaseStyle (MyHeading1): Contains NumberFormat (which leads to a hanging indent)
  • Derived Style (MyHeading2): BassedOn BaseStyle with NumberFormat removed

The Problem is:

  • when I open the dotx in word, the derived style doesn’t have any indent (as I expected) but
  • if I use the Aspose API to access the properties, the derived style contains indents

Here a simple code snippet to reproduce:
public void run() {
try {
Document dot = new Document(“D:\Temp\MyDot.dotx”);

StyleCollection styles = dot.getStyles();
for (int i = 0; i < styles.getCount(); i++) {
Style style = styles.get(i);
System.out.println("Name: " + style.getName());

ParagraphFormat pFormat = style.getParagraphFormat();
if (pFormat == null) {

System.out.println("leftIndent: " + pFormat.getLeftIndent());
System.out.println("FirstLineIndet: " + pFormat.getFirstLineIndent());

} catch (Exception e) {
// TODO Auto-generated catch block

Is there any workaround to get the true indent of the derived style?

So long,