Re: Set property of selected cell range in a textable in Writer
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.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: Set property of selected cell range in a textable in Writer
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 - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: Set property of selected cell range in a textable in Writer
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 ) oCurrentSelection.setPropertyValue( WritingMode, com.sun.star.text.WritingMode2.TB_RL ) MsgBox( WritingMode was: i new: oCurrentSelection.getPropertyValue( WritingMode ) i = oCurrentSelection.getPropertyValue( ParaAdjust ) oCurrentSelection.setPropertyValue( ParaAdjust, com.sun.star.style.ParagraphAdjust.RIGHT ) MsgBox( ParaAdjust was: i new: oCurrentSelection.getPropertyValue( ParaAdjust ) i = oCurrentSelection.getPropertyValue( ParaVertAlignment ) oCurrentSelection.setPropertyValue( ParaVertAlignment, com.sun.star.text.ParagraphVertAlign.BOTTOM ) MsgBox( ParaVertAlignment was: i new: oCurrentSelection.getPropertyValue( ParaVertAlignment ) End Sub See http://www.openoffice.org/api/docs/common/ref/com/sun/star/style/ParagraphPropertiesComplex.html#WritingMode http://www.openoffice.org/api/docs/common/ref/com/sun/star/style/ParagraphProperties.html#ParaAdjust http://www.openoffice.org/api/docs/common/ref/com/sun/star/style/ParagraphProperties.html#ParaVertAlignment Regards, Mathias - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: macro crash problem
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( ConvertToURL(strDosyaYol(oListBox.getSelectedItemPos())), _self, 0, Props() ) How strDosyaYol() is defined? Please go step by step through the macro and look if oListBox.getSelectedItemPos() always give a defined value for strDosyaYol(). - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: macro crash problem
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 Explicit? Please try to hold the frame in a global variable: 'for show dialog Option Explicit Private document as object Private oListBox As Object Private strDosyaIsim(1) As String Private strDosyaYol(1) As String Sub ShowOdtDialog() Dim Dlg As Object Dim i As Integer strDosyaIsim(0) = CREDITS strDosyaYol(0) = ConvertToURL(C:\SINERJIGROUP\YENIICRA\app\LibreOffice\CREDITS.odt) strDosyaIsim(1) = LICENSE strDosyaYol(1) = ConvertToURL(C:\SINERJIGROUP\YENIICRA\app\LibreOffice\LICENSE.odt) DialogLibraries.LoadLibrary(Standard) Dlg = CreateUnoDialog(DialogLibraries.Standard.showOdt) oListBox = Dlg.getControl(listOdt) For i=0 to Ubound(strDosyaIsim()) oListBox.addItem(strDosyaIsim(i), i) next i document = ThisComponent.CurrentController.Frame Dlg.Execute() Dlg.dispose() End Sub 'for select item Sub OpenOdt() Dim Props() As New com.sun.star.beans.PropertyValue document.loadComponentFromURL(strDosyaYol(oListBox.getSelectedItemPos()), _self, 0, Props()) End Sub - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: [Q] using graphics in dialog in an extension
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 - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
[Q] using graphics in dialog in an extension
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? Thanks for your answers! Regards, Mathias - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
[QUESTION] On (Local) Error GoTo
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, Mathias - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: COM OLE Automation bridge; property Name not supported
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 - 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! 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 prop Title ... not at the right place. So AOO doesn't read the title information and created the Add-on 1 title. But after I corrected my mistake I uninstalled and installed my extension many times, but the title stays at Add-on 1. The other modules that I doesn't started before shows the right name. That's why I was thinking that the title information doesn't work with the StartModule. Now I find that the information about the title was stored in registrymodifications.xcu. I deleted the node ... with the title information manually - now it works as expected! So the question and problem is: Why was the information about the (title of the) toolbar not deleted from registrymodifications after uninstalling the extension? But my suggestion resides; As stated in https://issues.apache.org/ooo/show_bug.cgi?id=121577#c2 Setting the toolbar title in Addons.xcu will take precedence over the ModuleWindowState.xcu. In my opinion the normal way is, that a special property overwrites the default property. So, if only one module should have a different title, there must be only this one ModuleWindowState.xcu. Could this behaviour be changed? Greetings, Mathias - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org
Re: Incompatible change for extensions
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 Setting the toolbar title in Addons.xcu will take precedence over the ModuleWindowState.xcu. In my opinion the normal way is, that a special property overwrites the default property. So, if only one module should have a different title, there must be only this one ModuleWindowState.xcu. Could this behaviour be changed? Greetings, Mathias - To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org