get object of a listener

2015-10-18 Thread Mathias Röllig
Hello! I can use (register/react/remove) successfully event listeners. But I found no way to get the object of a listener if it is always registered. Goal: The application should react with specific actions if a document will be closed. Problem 1: The macro runs at a new created document. =

Re: Set property of selected cell range in a textable in Writer

2015-07-09 Thread Mathias Röllig
Hi! When selecting multiple cells, WritingMode of the first cell changed. The remaining cells didn't In contrast, ParaAdjust of all paragraphs in all the selected cells are changed. How do you "select"? With mouse or with API? I use simply a text document with one table and select the cells

Re: Set property of selected cell range in a textable in Writer

2015-07-08 Thread Mathias Röllig
Hello Mark! What is your Selection? If you select a complete cell or cellrange it should work. What means "it works not"? Is there a errror message? If not: Sub CellModifyTest Dim oCurrentSelection As Object Dim i As Integer i = oCurrentSelection.getPropertyValue( "WritingMode" ) oCu

Re: Set property of selected cell range in a textable in Writer

2015-07-08 Thread Mathias Röllig
Hello Mark! It works. Maybe you are missing something like oCurrentSelection.setPropertyValue( "ParaAdjust", com.sun.star.style.ParagraphAdjust.RIGHT ) Regards, Mathias - To unsubscribe, e-mail: api-unsubscr...@openoffice.apa

Re: Set property of selected cell range in a textable in Writer

2015-07-08 Thread Mathias Röllig
Hello Hung! It should be enough: Sub Snippet Dim oCurrentSelection As Variant oCurrentSelection = ThisComponent.getCurrentSelection() oCurrentSelection.setPropertyValue( "WritingMode", com.sun.star.text.WritingMode2.TB_RL ) End Sub Regards, Mathias

Re: macro crash problem

2015-05-05 Thread Mathias Röllig
Actually i have a listbox in dialog , Listbox have 2 items. when i click item, it opens the odt file. when i show dialog and click many times on listbox items program crashed. Depends it only on the amount of clicks or also on its speed? Do you change the window between clicks? Do you use Option

Re: macro crash problem

2015-05-05 Thread Mathias Röllig
When i run this macro 4 or 5 times application crash and close? what can i do for this problem. dim documentasobject Dim Props(0) As New com.sun.star.beans.PropertyValue document = ThisComponent.CurrentController.Frame document.loadComponentFromURL( Convert

Re: [Q] using graphics in dialog in an extension

2015-03-18 Thread Mathias Röllig
Hello Jörg! --> Determine the location of extensin in the file system, example: Many Thanks! But too much work for many graphics. With intelligent naming of the graphics there could be some iterations. But not at the moment. Regards, Mathias ---

[Q] using graphics in dialog in an extension

2015-03-17 Thread Mathias Röllig
Hello! It is not a problem using graphics in a dialog. Simply adding a graphics control or adding icons to push buttons. But how is the way if I want to provide such a dialog inside an extension? Must every single graphic be loaded at startup, and if so, is there a simple way for that? Tha

Re: [QUESTION] On (Local) Error GoTo

2015-02-25 Thread Mathias Röllig
Hello Bernard! Thank you very much for your search and answer! I've changed all "On Local Error" To "On Error". Regards, Mathias - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: a

[QUESTION] On (Local) Error GoTo

2015-02-22 Thread Mathias Röllig
Hello! Can anyone give me an example where On Error GoTo and On Local Error GoTo shows a difference? In my tests I can't find any difference if I use On Local Error GoTo in a subroutine. If I understand right the help the error handling should be reset if the subroutine was quit. Regards, Ma

Re: COM OLE Automation bridge; property Name not supported

2014-08-29 Thread Mathias Röllig
XRay is the better way, but it's a COM object, which have all the same properties and methods (e.g. invoke(), hasProperty()). hasProperty("Name") returns false. O.K. But reading at the site behind your posted link; what returns hasMethod( "Name" ) ? ---

Re: COM OLE Automation bridge; property Name not supported

2014-08-28 Thread Mathias Röllig
Good morning Peter! Having no Windows and no Word I cannot test your code. Try: bookmark = wordDoc.Bookmarks(i) GlobalScope.BasicLIbraries.loadLibrary( "Tools" ) writeDBGinfo( bookmark ) If there is nothing go step by step writeDBGinfo( wordDoc ) to find the right properties. Regards, Mathia

Re: COM OLE Automation bridge; property Name not supported

2014-08-28 Thread Mathias Röllig
Hi Peter! If you using the right syntax (I don't know): For i = 1 To wordDoc.Bookmarks.Count ^^^ bookmark = doc.Bookmarks(i) ^^^ msgbox bookmark.Name 'fails 'yes, it must 'Option Explicit enabled? Regards, Mathias --

Re: Incompatible change for extensions

2013-07-31 Thread Mathias Röllig
Hi! I must correct myself: I wrote But: It doesn't work for com.sun.star.frame.StartModule With an other extension I saw, it works! So I searched for the problem. For the first try to edit the Addons.xcu I have made a mistake and I inserted the new not at the right place. So AOO doesn't

Re: Incompatible change for extensions

2013-07-30 Thread Mathias Röllig
Hello! Now I'm trying AOO 4.0 and have to work over my extensions. First: Thank you for the change! But: It doesn't work for com.sun.star.frame.StartModule (Should I file a separate issue or comment bug 121577?) Second: As stated in https://issues.apache.org/ooo/show_bug.cgi?id=121577#c2 "Sett