Hi!

Thank you Ariel for your example it really helped to solve this. Here is my 
code:

**********************************************

/* Retrieve the Desktop object, we need its XComponentLoader interface to load 
a new document*/
oDesktop         = UNO.createDesktop()    -- get the UNO Desktop service object
xComponentLoader = oDesktop~XDesktop~XComponentLoader  -- get componentLoader 
interface
/* open the blank file */
url = "private:factory/swriter"
xWriterComponent = xComponentLoader~loadComponentFromURL(url, "_blank", 0, 
.UNO~noProps)

xDocumentFactory = xWriterComponent~XMultiServiceFactory
xTextDocument = xWriterComponent~XTextDocument
xText = xTextDocument~getText()
xTextCursor = xText~createTextCursor()
xPropertySet = xTextCursor~xPropertySet

xDocumentFactory = xWriterComponent~XMultiServiceFactory
xTextDocument = xWriterComponent~XTextDocument
xText = xTextDocument~getText()
xTextCursor = xText~createTextCursor()
Textprops = xTextCursor~xPropertySet

/* disable underlining from hyperlinks in the whole document */
xFamiliesSupplier = xTextDocument~XStyleFamiliesSupplier
xCharStyleFamily = 
xFamiliesSupplier~getStyleFamilies~getByName("CharacterStyles")~XNameContainer
xInternetLinkStyleProps= xCharStyleFamily~getByName("Internet Link")
xVisitedInternetLinkStyleProps=xCharStyleFamily~getByName("Visited Internet 
Link")
xInternetLinkStyleProps~xPropertySet~setPropertyValue("CharUnderline", -
        box("short", bsf.getConstant("com.sun.star.awt.FontUnderline", 
"NONE"))) -- text is not underlined
xVisitedInternetLinkStyleProps~xPropertySet~setPropertyValue("CharUnderline", -
        box("short", bsf.getConstant("com.sun.star.awt.FontUnderline", 
"NONE"))) -- text is not underlined

  -- set a hyperlink 
Textprops~setPropertyValue("HyperLinkURL", 
"http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html";)
xText~insertString(xTextCursor, "module star", .false) -- insert the text with 
the hyperlink

::requires UNO.cls
****************************************************+

Regards
Nicole


-------- Original-Nachricht --------
> Datum: Sun, 21 Sep 2008 12:11:43 +0200
> Von: "Nicole Scholz" <[EMAIL PROTECTED]>
> An: [email protected]
> Betreff: Re: [api-dev] deactivate hyperlink underline

> Hi!
> 
> I want to remove the underline property from the hyperlinks for the whole
> document.
> 
> Regards
> Nicole
> 
> -------- Original-Nachricht --------
> > Datum: Sun, 21 Sep 2008 11:29:46 +0200
> > Von: Frank Meies <[EMAIL PROTECTED]>
> > An: [email protected]
> > Betreff: Re: [api-dev] deactivate hyperlink underline
> 
> > Hi Nicole,
> > 
> > On 09/19/08 21:13, Nicole Scholz wrote:
> > > Hi!
> > > 
> > > I try to deactivate the underlining of hyperlinks in my Writer
> Document.
> > Hence I accessed the CharacterStyles of the document. But now I don't
> know
> > how to deactivate the hyperlinks for the whole document. 
> > 
> > do you want to remove the underline property from the hyperlinks? Or do 
> > you want to disable the automatic URL recognition?
> > 
> > Regards,
> > 
> > Frank
> > 
> > --
> > Frank Meies (fme) - Co-lead OpenOffice.org Writer
> > OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -- 
> GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry
> Passion!
> http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196

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

Reply via email to