Issue 50579

Summary: UNO commands not working as in previous version 1.1
Product: App Dev Reporter: byl <office>
Component: apiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Includes Template file and Macro source none

Description byl 2005-06-10 12:53:08 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())
Comment 1 christianjunker 2005-07-08 20:40:19 UTC
byl:
Please attach sample document or post the full macro code and not part of it!
Comment 2 byl 2005-07-08 21:34:59 UTC
Created attachment 27801 [details]
Includes Template file and Macro source
Comment 3 byl 2005-07-08 21:41:47 UTC
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
Comment 4 stephan.wunderlich 2005-07-14 16:26:15 UTC
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
Comment 5 stephan.wunderlich 2005-07-14 16:42:53 UTC
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 :-)
Comment 6 byl 2005-07-26 17:27:40 UTC
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

Comment 7 Marcus 2017-05-20 11:28:07 UTC
Reset assigne to the default "issues@openoffice.apache.org".