javaapiopenoffice.orgopenoffice-writer

How to know the property value in Open Office Java API


To use the XPropertySet's setPropertyValue() method I need to know the arguments to be passed inside the method.
For e.g., to underline a Text in OpenOffice Writer I use xTextProps.setPropertyValue("CharUnderline", com.sun.star.awt.FontUnderline.BOLD); which underlines the text, Similarly the want to know the names of all the properties like CharUnderline, so as to perform other tasks in OpenOffice Writer.

How do I know the names of these properties.

Pls suggest.


Solution

  • The properties of a text object are listed here

    https://wiki.openoffice.org/wiki/Documentation/DevGuide/Text/Formatting

    "CharFontName", "CharFontStyleName", "CharFontFamily", "com.sun.star.awt.FontFamily", "CharFontCharSet", "com.sun.star.awt.CharSet", "CharFontPitch", "com.sun.star.awt.FontPitch", "CharColor", "CharEscapement", "CharHeight", "CharUnderline", "com.sun.star.awt.FontUnderline", "CharWeight", "com.sun.star.awt.FontWeight", "CharPosture", "com.sun.star.awt.FontSlant", "CharAutoKerning", "CharBackColor", "CharBackTransparent", "CharCaseMap", "com.sun.star.style.CaseMap", "CharCrossedOut", "CharFlash", "CharStrikeout", "com.sun.star.awt.FontStrikeout", "CharWordMode", "CharKerning", "CharLocale", "com.sun.star.lang.Locale", "CharKeepTogether", "CharNoLineBreak", "CharShadowed", "CharFontType", "com.sun.star.awt.FontType", "CharStyleName", "CharContoured", "CharCombineIsOn", "CharCombinePrefix", "CharCombineSuffix", "CharEmphasis", "com.sun.star.text.FontEmphasis", "CharRelief", "RubyText", "RubyAdjust", "RubyCharStyleName", "RubyIsAbove", "CharRotation", "CharRotationIsFitToLine", "CharScaleWidth", "HyperLinkURL", "HyperLinkTarget", "HyperLinkName", "VisitedCharStyleName", "UnvisitedCharStyleName", "CharEscapementHeight", "CharNoHyphenation", "CharUnderlineColor", "Color", "CharUnderlineHasColor", "CharStyleNames", "CharHidden", "TextUserDefinedAttributes", "XNameContainer"