Re: How can I change the path for /user/uno_packages

2015-08-27 Thread Oliver Brinzing

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

2015-07-10 Thread Oliver Brinzing

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

2015-06-24 Thread Oliver Brinzing

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

2015-06-17 Thread Oliver Brinzing

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: [EXT] Issue with stylename, doc corrupted but repaired

2015-02-28 Thread Oliver Brinzing

Hi Sébastien,


But when I look at the difference between what is considered as a « damaged » 
document and a « working » one,

 and after some digging, the only things that seems damaged are some style 
names. For example :

did you unzip the damaged and repaired document and compare each *.xml file?
maybe the manifest.xml contains invalid entries?

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

2015-01-07 Thread Oliver Brinzing

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

2015-01-04 Thread Oliver Brinzing

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

2015-01-03 Thread Oliver Brinzing

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

2015-01-03 Thread Oliver Brinzing

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

2014-12-05 Thread Oliver Brinzing

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

2013-02-04 Thread Oliver Brinzing
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