Apache OpenOffice (AOO) Bugzilla – Issue 50579
UNO commands not working as in previous version 1.1
Last modified: 2017-05-20 11:28:07 UTC
In version Open Office 1.1 I have a working macro which when run makes an object invisible using the following code. When the dispatch command was issued, No dialog would appear when changing the properties. In this version a dialog appears which must be dismissed by the user. Has some new functionality been added to the UNO commands. Is there a way to keep the dialog(s) from appearing? Thank you. code sample dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") 'GET THE DRAW OBJECTS drawobjs=thiscomponent.drawpage ... if drawobjname="TEXT_ACCOUNTS" then document.select(drawobj) props(0).Name ="FillStyle" props(0).Value ="NONE" empty=document.getselection() 'IMPORTANT - MUST GET SELECTION TO INITIALIZE FRAME OR ERROR NO DISPATCH dispatcher.executeDispatch(documentframe, ".uno:FillStyle", "", 0, props())
byl: Please attach sample document or post the full macro code and not part of it!
Created attachment 27801 [details] Includes Template file and Macro source
CYB I've attached a writer template file and my macros. Unfortunately I cannot include the database which the template/macro calls. If you need more info I won't be able to respond for about 2 weeks. Thanks
sw->byl: not sure what happens without having a working macro, but as far as I see you want to change the fillstyle of a shape to NONE ... for example in a Drawdocument with at least one shape this can be easily done by drawpage = thisComponent.Drawpages(0) shape = drawpage.getByIndex(0) shape.FillStyle = com.sun.star.drawing.FillStyle.NONE
sw->byl: just saw the attached document ;-) sw->cl: no dialog was shown on OOo1.1.x ... but now it is and I wonder why :-)
byl->sw 'I tried your solution using 'your code 'drawpage = thisComponent.Drawpages(0) ' shape = drawpage.getByIndex(0) ' shape.FillStyle = com.sun.star.drawing.FillStyle.NONE 'my code drawobjs=thiscomponent.drawpage for i=0 to drawobjs.count-1 drawobj=drawobjs.getbyindex(i) drawobjname=drawobj.name if drawobjname="TEXT_FILE" then document.select(drawobj) ' tried this drawobj.FillStyle=com.sun.star.drawing.FillStyle.SOLID drawobj.FillColor=RGB(231,231,231) 'however the shape object does not expose the FillStyle or FillColor as a property in a 'writer document. ' then I tried this drawobj.setPropertyValue("FillStyle","SOLID") drawobj.setPropertyValue("FillColor",RGB(231,231,231)) 'I get an Unknown Property exception end if Next i You can insert my attempts into the previously posted macro Any help would be appreciated. Thanks
Reset assigne to the default "issues@openoffice.apache.org".