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)
Tracking
()
VERIFIED
DUPLICATE
of bug 131852
mozilla1.0
People
(Reporter: rcummins, Assigned: samir_bugzilla)
References
Details
(Whiteboard: [adt2])
Attachments
(1 file, 1 obsolete file)
1.14 KB,
patch
|
Details | Diff | Splinter Review |
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).
Assignee | ||
Comment 2•23 years ago
|
||
And why is this a front-end bug?
Assignee | ||
Comment 3•23 years ago
|
||
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.
Assignee | ||
Comment 4•23 years ago
|
||
Only init globalPrintSettings once while in print preview mode.
![]() |
||
Comment 6•23 years ago
|
||
My comment was predicated on the assumption of a clear and documented API.... :)
Assignee | ||
Comment 7•23 years ago
|
||
!mIsDoingPrintPreview really should have been mIsDoingPrintPreview in the last
patch.
Attachment #71036 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Assignee | ||
Comment 8•23 years ago
|
||
Boris,
Never mind then. I thought you had some insight and could educate me about the
semantics. Thanks.
Comment 9•23 years ago
|
||
Is there a reason why we do not check for the return code of
InitPrintSettingsFromPrinter() ?
![]() |
||
Comment 10•23 years ago
|
||
*** Bug 128722 has been marked as a duplicate of this bug. ***
Comment 11•23 years ago
|
||
*** Bug 128732 has been marked as a duplicate of this bug. ***
Comment 12•23 years ago
|
||
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
...) ?
Assignee | ||
Comment 14•23 years ago
|
||
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.
Assignee | ||
Updated•23 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 15•23 years ago
|
||
Rod says this is covered by a more thorough patch in bug 131852.
*** This bug has been marked as a duplicate of 131852 ***
You need to log in
before you can comment on or make changes to this bug.
Description
•