Issue 21185 - Cannot set PaperOrientation in a macro
Summary: Cannot set PaperOrientation in a macro
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: OOo 1.1
Hardware: PC Windows 2000
: P3 Trivial (vote)
Target Milestone: ---
Assignee: stephan.wunderlich
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-14 17:00 UTC by nderwin
Modified: 2003-10-21 15:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Example macro code (158 bytes, text/plain)
2003-10-14 17:07 UTC, nderwin
no flags Details
Example macro code (158 bytes, text/plain)
2003-10-14 17:07 UTC, nderwin
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description nderwin 2003-10-14 17:00:36 UTC
When trying to set the PaperOrientation in a macro, the changes do not take effect.

I've written a small macro that is trying to change the page orientation to
landscape through a macro.  Upon inspecting the value before I set it, I see
that it's value is 0 (portrait).  I set the value to 1 for landscape, and
inspect the value afterwards.  It's set to 1, but once the macro finishes, the
paper orientation has not changed.  This used to work, I think on version 1.1.0RC4.
Comment 1 nderwin 2003-10-14 17:07:47 UTC
Created attachment 10312 [details]
Example macro code
Comment 2 jack.warchold 2003-10-17 10:52:42 UTC
reassigend to sw

can you please take a look on this issue
Comment 3 jack.warchold 2003-10-20 12:05:29 UTC
.
Comment 4 stephan.wunderlich 2003-10-20 13:34:32 UTC
The setPrinter command is missing in your basic macro, to set the
PrintDescriptor.
Following macro works just fine for me

Dim document As Object
Dim printer As Variant

document = ThisComponent
printer = document.getPrinter
for i=0 to UBOUND(printer)
	if printer(i).Name="PaperOrientation" then
		printer(i).Value = com.sun.star.view.PaperOrientation.LANDSCAPE
	endif
next i
document.setPrinter(printer)
 
Comment 5 nderwin 2003-10-20 14:17:25 UTC
Yep, that fixed it!  Thanks!
Comment 6 stephan.wunderlich 2003-10-21 15:12:07 UTC
closed