Closed
Bug 272386
Opened 20 years ago
Closed 19 years ago
For print preview header/footer, put several special codes at the same place
Categories
(Core :: Printing: Output, enhancement)
Core
Printing: Output
Tracking
()
RESOLVED
FIXED
People
(Reporter: atremon, Assigned: atremon)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
smontagu
:
review+
roc
:
superreview+
asa
:
approval1.8b2+
|
Details | Diff | Splinter Review |
For print preview header/footer, I would like to be able to put several special
codes at the same place (eg headerLeft, footerCenter, etc.), and have a special
code to put total number of pages.
Assignee | ||
Comment 1•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #167416 -
Flags: review?(smontagu)
Comment 2•20 years ago
|
||
Comment on attachment 167416 [details] [diff] [review]
&PT1 special code and no return after &PT treatment
If you want to allow any arbitrary combination of codes (which makes more sense
to me than allowing some combinations and not others), you need to remove the
return at the end of each block.
I would rather have a single letter code for "page total", to preserve the
pattern that single letter codes insert one piece of data and the double letter
code &PT inserts two. &T is already taken, of course, but you could use &O, &A,
or &L.
The change also needs to be reflected in the Help files, but that could be done
in a separate bug.
Attachment #167416 -
Flags: review?(smontagu) → review-
Updated•20 years ago
|
Component: Layout: Misc Code → Printing
OS: Windows 2000 → All
Hardware: PC → All
Assignee | ||
Comment 3•20 years ago
|
||
> you need to remove the
> return at the end of each block.
The problem is that the SubstValueForCode function used for the next patterns do a
Truncate() on the string passed if there is no title or url for the document.
Comment 4•20 years ago
|
||
So if I set one of the header fields to "Title: &T" and there is no <title>, no
header at all will appear? That seems bogus to me.
Comment 5•20 years ago
|
||
Alexandre, if I were you I would remove SubstValueForCode completely and replace
calls to
SubstValueForCode(aNewStr, foo, bar);
by
aNewStr.ReplaceSubstring(foo, bar);
As far as I can tell everything that SubstValueForCode is doing is either wrong
or a workaround for some problem in string code which no longer exists.
Comment 6•20 years ago
|
||
(In reply to comment #5)
> ... replace calls to
> SubstValueForCode(aNewStr, foo, bar);
> by
> aNewStr.ReplaceSubstring(foo, bar);
... that might be going too far: better at least do a null-check on "bar" like
the current code for &D
Assignee | ||
Comment 7•20 years ago
|
||
(In reply to comment #6)
> (In reply to comment #5)
> > ... replace calls to
> > SubstValueForCode(aNewStr, foo, bar);
> > by
> > aNewStr.ReplaceSubstring(foo, bar);
>
> ... that might be going too far: better at least do a null-check on "bar" like
> the current code for &D
Thanks Simon, I think that's what I'm going to do. That SubstValueForCode
function seemed strange to me because of that 'fixingSubstr' stuff. Makes sense
that this was to avoid a bogus behavior of ReplaceSubstring.
Assignee | ||
Comment 8•20 years ago
|
||
Attachment #167416 -
Attachment is obsolete: true
Assignee | ||
Comment 9•20 years ago
|
||
Comment on attachment 167623 [details] [diff] [review]
replaced call for SubstValueForCode by ReplaceSubstring, removed all "return;" statements
Hi Simon,
Can you review this new patch for me?
I can't find any doc on setting header footer using nsIPrintSettings.
I looked in embedding docs. Do you know where this might be?
Alex
Attachment #167623 -
Flags: review?(smontagu)
Comment 10•20 years ago
|
||
Comment on attachment 167623 [details] [diff] [review]
replaced call for SubstValueForCode by ReplaceSubstring, removed all "return;" statements
r=smontagu. Thank you, Alexandre, this is an excellent enhancement.
The help files that mention custom headers and footers are
extensions/help/resources/locale/en-US/nav_help.xhtml and
browser/components/help/locale/en-US/using_firebird.xhtml
Attachment #167623 -
Flags: review?(smontagu) → review+
Assignee | ||
Updated•20 years ago
|
Attachment #167623 -
Flags: superreview?(bryner)
Attachment #167623 -
Flags: superreview?(bryner) → superreview?(roc)
Attachment #167623 -
Flags: superreview?(roc) → superreview+
Comment 11•20 years ago
|
||
Does this still need to be checked in?
Comment 12•20 years ago
|
||
Let me know if you'd like me to check this in. It looks as if bug 232850 is
about to be fixed, so you may not need me :)
Assignee | ||
Comment 13•20 years ago
|
||
Simon, Kenneth,
It would be nice if this could be checked in, but I thought checkin was only for
drivers until 1.8 is released. So even when I get my write access I'll have to
wait, won't I?
Assignee | ||
Comment 14•20 years ago
|
||
Do I need to change the patch to update the path of the nsPageFrame file?
Comment 15•20 years ago
|
||
The freeze seems to have been delayed until after 1.8b2, so this can be checked
in now. You don't need to attach a new patch against the changed location of the
source file.
Comment 16•20 years ago
|
||
Alexandre, as Simon said, the tree is actually open right now. Even if it were
closed, it would only mean having to get permission to check in the patch. And
you don't have to check the patch in yourself; you can ask someone else to do it.
Comment 17•20 years ago
|
||
Is this still waiting to be checked in? It'd be nice to get this in before the
tree branches...
Assignee | ||
Comment 18•20 years ago
|
||
Yes, Kenneth,
Can you check this in for me?
Or Simon maybe?
Comment 19•20 years ago
|
||
Comment on attachment 167623 [details] [diff] [review]
replaced call for SubstValueForCode by ReplaceSubstring, removed all "return;" statements
I will be happy to check this in, if drivers will approve it.
Attachment #167623 -
Flags: approval1.8b2?
Comment 20•20 years ago
|
||
Comment on attachment 167623 [details] [diff] [review]
replaced call for SubstValueForCode by ReplaceSubstring, removed all "return;" statements
a=asa
Attachment #167623 -
Flags: approval1.8b2? → approval1.8b2+
Comment 21•19 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•