====================================
I found a way to get indirectly.
But I think it's not smart, and may make some accident.
Code: Select all
public static int get_index(XDrawPage xpage) {
XNamed xnamed = UnoRuntime.queryInterface(XNamed.class, xpage); // The name is "Page00"
Pattern p = Pattern.compile("(\\d+)"); // Get the name using regex expression
Matcher m = p.matcher(xnamed.getName());
m.find();
int page = Integer.parseInt(m.group()) - 1;
return page;
}