Hello Nick,
Am 15.02.2012 16:31, schrieb Nick Burch:
On Wed, 15 Feb 2012, Fabian Ehls wrote:
Unfortunately i have a document here that shows the same effect in
word but does not have a <w:caps/> in its document.xml which can
describe why the code snippet i posted does not work (it works when
creating a new word file). It also shows the same checkbox marked in
the word dialog, so there must be something else triggering this.
Could it be set elsewhere, eg on a parent style or something?
That was the hint i needed. The <w:caps/> was in a parent style. I now
can check for uppercase effect like this:
XWPFStyle style =
paragraph.getDocument().getStyles().getStyle(paragraph.getStyleID());
CTRPr styleRpr = null;
if (style != null) {
styleRpr = style.getCTStyle().getRPr();
if (styleRpr != null) {
System.out.println(style.getName() + ": " + styleRpr.isSetCaps());
}
}
Thank you very much for the quick response and the hint.
Nick
Greetings,
Fabian
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]