Hi Madhan,
In the sevice CharacterProperties inside CharacterStyle the properties
starting with Char is workinng
but all other properties are throwing the
UNKNOWN PROPERTY EXECEPTION
i.e) in the line
xStyleProps.setPropertyValue ("HyperLinkURL", new String("www.gmail.com "));

instead of HyperLinkUrl if we use the properties starting with Char(like
CharWeight,CharHeight,CharUnderLine) it works fine but if we use other
properties like HyperLinkUrl,
VisitedCharStyleName, UnvisitedCharStyleName...it is not working. why it is
happening so? any reason for that
Just out of curiosity I looked up the definitions for the service you are using:

------------ cut here ------------
say ppd(uno.getDefinition("com.sun.star.style.CharacterStyle"))
UNO_SERVICE|com.sun.star.style.CharacterStyle|
com.sun.star.style.Style|UNO_SERVICE||com.sun.star.style.CharacterStyle com.sun.star.style.CharacterProperties|UNO_SERVICE||com.sun.star.style.CharacterStyle CharDiffHeight|UNO_PROPERTY||float:UNO_FLOAT::|com.sun.star.style.CharacterStyle CharPropHeight|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.style.CharacterStyle CharDiffHeightAsian|UNO_PROPERTY||float:UNO_FLOAT::|com.sun.star.style.CharacterStyle CharPropHeightAsian|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.style.CharacterStyle CharDiffHeightComplex|UNO_PROPERTY||float:UNO_FLOAT::|com.sun.star.style.CharacterStyle CharPropHeightComplex|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.style.CharacterStyle
 ........................................... rexxtry.rex on WindowsNT

------------ cut here ------------

As you can see the property "HyperLinkURL" is not part of that service, which explains the exception you get.

---

Upon further investigation I found the following two services that possess the property you are looking for (note, the output is *not* sorted by property name).


Here's the output for the "CharacterProperties" service:

------------ cut here ------------
UNO_SERVICE|com.sun.star.style.CharacterProperties|
CharFontName|UNO_PROPERTY||string:UNO_STRING::|com.sun.star.style.CharacterProperties CharFontStyleName|UNO_PROPERTY||string:UNO_STRING::|com.sun.star.style.CharacterProperties CharFontFamily|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharFontCharSet|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharFontPitch|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharColor|UNO_PROPERTY||com.sun.star.util.Color:UNO_TYPEDEF:long:UNO_LONG|com.sun.star.style.CharacterProperties CharEscapement|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharHeight|UNO_PROPERTY||float:UNO_FLOAT::|com.sun.star.style.CharacterProperties CharUnderline|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharWeight|UNO_PROPERTY||float:UNO_FLOAT::|com.sun.star.style.CharacterProperties CharPosture|UNO_PROPERTY||com.sun.star.awt.FontSlant:UNO_ENUM::|com.sun.star.style.CharacterProperties CharAutoKerning|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharBackColor|UNO_PROPERTY|OPTIONAL|com.sun.star.util.Color:UNO_TYPEDEF:long:UNO_LONG|com.sun.star.style.CharacterProperties CharBackTransparent|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharCaseMap|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharCrossedOut|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharFlash|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharStrikeout|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharWordMode|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharKerning|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharLocale|UNO_PROPERTY||com.sun.star.lang.Locale:UNO_STRUCT::|com.sun.star.style.CharacterProperties CharKeepTogether|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharNoLineBreak|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharShadowed|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharFontType|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharStyleName|UNO_PROPERTY|OPTIONAL|string:UNO_STRING::|com.sun.star.style.CharacterProperties CharContoured|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharCombineIsOn|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharCombinePrefix|UNO_PROPERTY|OPTIONAL|string:UNO_STRING::|com.sun.star.style.CharacterProperties CharCombineSuffix|UNO_PROPERTY|OPTIONAL|string:UNO_STRING::|com.sun.star.style.CharacterProperties CharEmphasis|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharRelief|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.style.CharacterProperties RubyText|UNO_PROPERTY|OPTIONAL|string:UNO_STRING::|com.sun.star.style.CharacterProperties RubyAdjust|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.style.CharacterProperties RubyCharStyleName|UNO_PROPERTY|OPTIONAL|string:UNO_STRING::|com.sun.star.style.CharacterProperties RubyIsAbove|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharRotation|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.style.CharacterProperties CharRotationIsFitToLine|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharScaleWidth|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.style.CharacterProperties HyperLinkURL|UNO_PROPERTY|OPTIONAL|string:UNO_STRING::|com.sun.star.style.CharacterProperties HyperLinkTarget|UNO_PROPERTY|OPTIONAL|string:UNO_STRING::|com.sun.star.style.CharacterProperties HyperLinkName|UNO_PROPERTY|OPTIONAL|string:UNO_STRING::|com.sun.star.style.CharacterProperties VisitedCharStyleName|UNO_PROPERTY|OPTIONAL|string:UNO_STRING::|com.sun.star.style.CharacterProperties UnvisitedCharStyleName|UNO_PROPERTY|OPTIONAL|string:UNO_STRING::|com.sun.star.style.CharacterProperties CharEscapementHeight|UNO_PROPERTY|OPTIONAL|byte:UNO_BYTE::|com.sun.star.style.CharacterProperties CharNoHyphenation|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharUnderlineColor|UNO_PROPERTY||com.sun.star.util.Color:UNO_TYPEDEF:long:UNO_LONG|com.sun.star.style.CharacterProperties CharUnderlineHasColor|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties CharStyleNames|UNO_PROPERTY|OPTIONAL|[]string:UNO_SEQUENCE::|com.sun.star.style.CharacterProperties CharHidden|UNO_PROPERTY|OPTIONAL|boolean:UNO_BOOLEAN::|com.sun.star.style.CharacterProperties
------------ cut here ------------

and here is the output of the "BaseFrameProperties" service:

------------ cut here ------------
UNO_SERVICE|com.sun.star.text.BaseFrameProperties|
AnchorPageNo|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.text.BaseFrameProperties AnchorFrame|UNO_PROPERTY||com.sun.star.text.XTextFrame:UNO_INTERFACE::|com.sun.star.text.BaseFrameProperties BackColor|UNO_PROPERTY||com.sun.star.util.Color:UNO_TYPEDEF:long:UNO_LONG|com.sun.star.text.BaseFrameProperties BackGraphicURL|UNO_PROPERTY||string:UNO_STRING::|com.sun.star.text.BaseFrameProperties BackGraphicFilter|UNO_PROPERTY||string:UNO_STRING::|com.sun.star.text.BaseFrameProperties BackGraphicLocation|UNO_PROPERTY||com.sun.star.style.GraphicLocation:UNO_ENUM::|com.sun.star.text.BaseFrameProperties LeftBorder|UNO_PROPERTY||com.sun.star.table.BorderLine:UNO_STRUCT::|com.sun.star.text.BaseFrameProperties RightBorder|UNO_PROPERTY||com.sun.star.table.BorderLine:UNO_STRUCT::|com.sun.star.text.BaseFrameProperties TopBorder|UNO_PROPERTY||com.sun.star.table.BorderLine:UNO_STRUCT::|com.sun.star.text.BaseFrameProperties BottomBorder|UNO_PROPERTY||com.sun.star.table.BorderLine:UNO_STRUCT::|com.sun.star.text.BaseFrameProperties BorderDistance|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties LeftBorderDistance|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties RightBorderDistance|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties TopBorderDistance|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties BottomBorderDistance|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties BackTransparent|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties ContentProtected|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties LeftMargin|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties RightMargin|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties TopMargin|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties BottomMargin|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties Height|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties Width|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties RelativeHeight|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.text.BaseFrameProperties RelativeWidth|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.text.BaseFrameProperties IsSyncWidthToHeight|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties IsSyncHeightToWidth|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties HoriOrient|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.text.BaseFrameProperties HoriOrientPosition|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties HoriOrientRelation|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.text.BaseFrameProperties VertOrient|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.text.BaseFrameProperties VertOrientPosition|UNO_PROPERTY||long:UNO_LONG::|com.sun.star.text.BaseFrameProperties VertOrientRelation|UNO_PROPERTY||short:UNO_SHORT::|com.sun.star.text.BaseFrameProperties HyperLinkURL|UNO_PROPERTY||string:UNO_STRING::|com.sun.star.text.BaseFrameProperties HyperLinkTarget|UNO_PROPERTY||string:UNO_STRING::|com.sun.star.text.BaseFrameProperties HyperLinkName|UNO_PROPERTY||string:UNO_STRING::|com.sun.star.text.BaseFrameProperties Opaque|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties PageToggle|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties PositionProtected|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties Print|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties ShadowFormat|UNO_PROPERTY||com.sun.star.table.ShadowFormat:UNO_STRUCT::|com.sun.star.text.BaseFrameProperties ServerMap|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties Size|UNO_PROPERTY||com.sun.star.awt.Size:UNO_STRUCT::|com.sun.star.text.BaseFrameProperties SizeProtected|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties Surround|UNO_PROPERTY||com.sun.star.text.WrapTextMode:UNO_ENUM::|com.sun.star.text.BaseFrameProperties SurroundAnchorOnly|UNO_PROPERTY||boolean:UNO_BOOLEAN::|com.sun.star.text.BaseFrameProperties WrapInfluenceOnPosition|UNO_PROPERTY|OPTIONAL|short:UNO_SHORT::|com.sun.star.text.BaseFrameProperties
------------ cut here ------------

HTH,

---rony

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to