Closed Bug 127258 Opened 23 years ago Closed 23 years ago

Print Preview: changing scale also changes orientation from Landscape to Portrait

Categories

(Core :: Print Preview, defect, P3)

x86
Windows 2000
defect

Tracking

()

VERIFIED DUPLICATE of bug 131852
mozilla1.0

People

(Reporter: rcummins, Assigned: samir_bugzilla)

References

Details

(Whiteboard: [adt2])

Attachments

(1 file, 1 obsolete file)

w2k Build 2002022103 While in Print Preview, change the orientation to "Landscape". Now change the scale. The previewed page changes orientation back to "Portrait" (which is weird), but the state of the Portrait and Landscape buttons in the toolbar still indicate that the page is being displayed Landscape (which is also weird). If you click the Landscape button again, the previewed page will again be displayed as Landscape (which is expected).
front-end bug
Assignee: rods → sgehani
And why is this a front-end bug?
As I suspected, the semantics of globalPrintSetings and globalPrinSettingsValues have been unclear to me and are possibly the cause of this bug. In the quoted stack ``tracelet'' below, the print preview dialog gets the globalPrintSettings and tries to change the *scaling* attribute. But every time the GetGlobalPrintSettings() function is called it *initializes* the settings from the printer. ... nsPrintSettings::SetOrientation nsDeviceContextSpecWin::SetPrintSettingsFromDevMode nsPrinterEnumeratorWin::InitPrintSettingsFromPrinter DocumentViewerImpl::InitPrintSettingsFromPrinter DocumentViewerImpl::GetGlobalPrintSettings XPTC_InvokeByIndex ... Rod, What should the print preview dialog be using? Is it OK for the front end to ask for the globalPrintSettings and keep manipulating them as users change attributes like scaling and orientation while print previewing? The documentation is unclear to me. Or is it the case that the globalPrintSettings should be initialized only once while we are in print preview mode? I'll attach a patch that handles the latter case which fixes this bug and prints with the correct orientation. I don't know if this is the correct solution though and need your input. So please review or suggest alternatives. Thanks.
Status: NEW → ASSIGNED
Keywords: nsbeta1
Priority: -- → P3
Target Milestone: --- → mozilla1.0
Attached patch Patch to ``fix'' backend (obsolete) — Splinter Review
Only init globalPrintSettings once while in print preview mode.
CC'ing Boris. See comment 2. Thanks.
My comment was predicated on the assumption of a clear and documented API.... :)
Attached patch Better patchSplinter Review
!mIsDoingPrintPreview really should have been mIsDoingPrintPreview in the last patch.
Attachment #71036 - Attachment is obsolete: true
Keywords: patch, review
Boris, Never mind then. I thought you had some insight and could educate me about the semantics. Thanks.
Is there a reason why we do not check for the return code of InitPrintSettingsFromPrinter() ?
*** Bug 128722 has been marked as a duplicate of this bug. ***
*** Bug 128732 has been marked as a duplicate of this bug. ***
Other question: Is it legal that the printer name argument of InitPrintSettingsFromPrinter() is |nsnull| ? If yes - what should InitPrinttSettingsFromPrinter() do in this case (currently it's a NO-OP on unix platforms, see http://lxr.mozilla.org/seamonkey/source/gfx/src/gtk/nsDeviceContextSpecG.cpp#586 ...) ?
nsbeta1+ per Nav triage team
Keywords: nsbeta1nsbeta1+
Rod, Could you comment/review on the patch or take this bug if you think it can be fixed in the backend and my patch is incorrect? Thanks.
Whiteboard: [adt2]
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Rod says this is covered by a more thorough patch in bug 131852. *** This bug has been marked as a duplicate of 131852 ***
verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: