Re: How can I change the path for /user/uno_packages
Hi Jörg, How can I change the path for /user/uno_packages? I know how I can change the complete path /user by using a macro, but only /user/uno_packages? i never tried, but i think you have to change several entries inside the uno.ini. Regards Oliver - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: Changing Screen Cursor to Wait
Hi Berkhan, not sure, but maybe this old thread can help: http://osdir.com/ml/openoffice.devel.api/2008-05/msg00165.html Regards Oliver - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: Registration of an accelerator at extension installation
Hi Amenel, you can use an Accelerators.xcu file in you extension, for example: [...] node oor:name=LEFT_MOD1_MOD2 oor:op=replace prop oor:name=Command value xml:lang=en-USservice:my.extension.Service?myParam1/value /prop /node and register it during extension installation, for example add manifest:file-entry manifest:full-path=Accelerators.xcu manifest:media-type=application/vnd.sun.star.configuration-data / to the manifest.xml of your extension. your service has to implement the com.sun.star.task.XJobExecutor Interface with the trigger(string Event ) method. if you want your extension being instantiated during aoo startup, implement the com.sun.star.task.XJob Interface with it's execute(NamedValue[] args) method. add a Jobs.xcu, for example: https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Jobs/Configuration ?xml version='1.0' encoding='UTF-8'? oor:component-data oor:name=Jobs oor:package=org.openoffice.Office xmlns:oor=http://openoffice.org/2001/registry; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; node oor:name=Jobs node oor:name=my.extension.Service oor:op=replace prop oor:name=Service oor:type=xs:string valuemy.extension.Service/value /prop /node /node !-- https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Jobs/List_of_Supported_Events -- node oor:name=Events node oor:name=onFirstVisibleTask oor:op=modify node oor:name=JobList node oor:name=my.extension.Service oor:op=replace/ /node /node /node /oor:component-data and register in manifest.xml manifest:file-entry manifest:full-path=Jobs.xcu manifest:media-type=application/vnd.sun.star.configuration-data / Regards Oliver - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: need some help to Accelerators.xcu
just found, that there is a service com.sun.star.ui.GlobalAcceleratorConfiguration maybe this will work: Sub Main oGlobalAccelCfg = createUnoService(com.sun.star.ui.GlobalAcceleratorConfiguration) Dim aKeyEvent as new com.sun.star.awt.KeyEvent aKeyEvent.KeyCode = com.sun.star.awt.Key.F11 aKeyEvent.Modifiers = com.sun.star.awt.KeyModifier.MOD1 oGlobalAccelCfg.setKeyEvent(aKeyEvent, vnd.sun.star.script:Standard.Module1.ShowMsgBox?language=Basiclocation=application ) oGlobalAccelCfg.store() End Sub Sub ShowMsgBox MsgBox(Hello World!!!) End Sub - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: copy an existing style
Hi Jörg, Using the following code will _not_ transfer the setting position-at (in a german AOO Position-bei) of an numbering style. i think you have to iterate over the NumberingRules Objects and Copy it's properties For j = 0 To oPStyle.NumberingRules.getCount()-1 mArray() =oPStyle.NumberingRules.getByIndex(j) ... Next j Regards Oliver - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: copy an existing style
Hi, res = xModel.getStyleFamilies().loadStylesFromURL(url, (ppp,)) yes, XStyleLoader should work in general but there are some limitations, for example: https://issues.apache.org/ooo/show_bug.cgi?id=75048 XStyleLoader - user defined number formats are not imported Regards Oliver - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: copy an existing style
Hi Jörg, the_style = ThisComponent.getStyleFamilies.getByName(ParagraphStyles).getByName(jms1) ThisComponent.getStyleFamilies.getByName(ParagraphStyles).insertByName(jms3, the_style) i think you have to copy all Properties from old to new style. this should work for Pagestyles: REM * BASIC * OPTION EXPLICIT Sub PageStyle On Local Error Goto ErrorHandler Dim oDocument as Object Dim oSheet as Object Dim oPStyle as Object Dim oStyles as Object Dim oCpyStyle as Object Dim aProperties as Object Dim vTmp as Variant Dim sCopy as String Dim sX as String Dim i as Integer oDocument = ThisComponent oSheet = oDocument.getSheets.getByIndex(0) oStyles = oDocument.StyleFamilies.getByName(PageStyles) oPStyle = oStyles.getByName(Default) sCopy = NewStyle oCpyStyle = oDocument.createInstance(com.sun.star.style.PageStyle) If oStyles.hasByName(sCopy) Then oStyles.removeByName(sCopy) EndIf oStyles.insertByName(sCopy, oCpyStyle) oSheet.PageStyle = oCpyStyle.Name aProperties = oPStyle.PropertySetInfo.Properties For i = LBound(aProperties) to UBound(aProperties) sX = aProperties(i).Name If Not IsNull(sX) Then If sX Then If oPStyle.getPropertyState(sX) = com.sun.star.beans.PropertyState.DIRECT_VALUE Then vTmp = oPStyle.getPropertyValue(sX) oCpyStyle.setPropertyValue(sX, vTmp) EndIf EndIf EndIf Next i Exit Sub ErrorHandler: msgbox Erl Error Err Resume Next End Sub - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: copy an existing style
Hi Jörg, or try to set the parent style: newStyle.ParentStyle = oldStyle.Name oStyles.insertByName(myNewStyle, newStyle) so newStyle inherits all properties from oldStyle Regards Oliver - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: [EXT][GUI] Autoclosing of a dialog when exiting the application
Hi, Amenel, it seeems OnCloseApp is fired as last event if the last frame is closed (if quickstart is not enabled) or if quickstart is closed (if there is no other frame). Do you need a modal dialog? maybe a sidebar integration could be the better solution? or try using a window maybe it can help adding a frameactionlistener to retrive frame actionevents: https://www.openoffice.org/api/docs/common/ref/com/sun/star/frame/FrameAction.html Regards Oliver -- - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: Incompatible change for extensions
Hi What do you think how much effort it would be to create a new scheme for the new extended toolbars and keep the old one at least for a while? +1 due to api changes (e.g. toolsbars, com.sun.star.awt.XMessageBox, ...) i cannot run my oo32 extension with aoo 3.5 at the moment. so testing is pretty difficult. Best Regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature