зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1660502 part 2: Rename nsSharedPageData::mTotNumPages to mRawNumPages, for consistency. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D87887
This commit is contained in:
Родитель
e3a6a51032
Коммит
b8192a4fc2
|
@ -98,7 +98,7 @@ void PrintedSheetFrame::Reflow(nsPresContext* aPresContext,
|
|||
if (status.IsFullyComplete()) {
|
||||
// The page we just reflowed is the final page! Record its page number
|
||||
// as the number of pages:
|
||||
mPD->mTotNumPages = pageFrame->GetPageNum();
|
||||
mPD->mRawNumPages = pageFrame->GetPageNum();
|
||||
|
||||
// Normally, we (the parent frame) would be responsible for deleting the
|
||||
// next-in-flow of our fully-complete children. But since we don't
|
||||
|
|
|
@ -208,7 +208,7 @@ void nsPageFrame::ProcessSpecialCodes(const nsString& aStr, nsString& aNewStr) {
|
|||
if (aStr.Find(kPageAndTotal) != kNotFound) {
|
||||
nsAutoString uStr;
|
||||
nsTextFormatter::ssprintf(uStr, mPD->mPageNumAndTotalsFormat.get(),
|
||||
mPageNum, mPD->mTotNumPages);
|
||||
mPageNum, mPD->mRawNumPages);
|
||||
aNewStr.ReplaceSubstring(kPageAndTotal, uStr);
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ void nsPageFrame::ProcessSpecialCodes(const nsString& aStr, nsString& aNewStr) {
|
|||
if (aStr.Find(kPageTotal) != kNotFound) {
|
||||
nsAutoString uStr;
|
||||
nsTextFormatter::ssprintf(uStr, mPD->mPageNumFormat.get(),
|
||||
mPD->mTotNumPages);
|
||||
mPD->mRawNumPages);
|
||||
aNewStr.ReplaceSubstring(kPageTotal, uStr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -406,7 +406,7 @@ nsresult nsPageSequenceFrame::StartPrint(nsPresContext* aPresContext,
|
|||
// If printing a range of pages make sure at least the starting page
|
||||
// number is valid
|
||||
if (mDoingPageRange) {
|
||||
if (mFromPageNum > mPageData->mTotNumPages) {
|
||||
if (mFromPageNum > mPageData->mRawNumPages) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,8 +38,7 @@ class nsSharedPageData {
|
|||
|
||||
// Total number of pages (populated by PrintedSheetFrame when it determines
|
||||
// that it's reflowed the final page):
|
||||
// XXXdholbert The next patch in this series will rename this to mRawNumPages.
|
||||
int32_t mTotNumPages = 0;
|
||||
int32_t mRawNumPages = 0;
|
||||
|
||||
// Margin for headers and footers; it defaults to 4/100 of an inch on UNIX
|
||||
// and 0 elsewhere; I think it has to do with some inconsistency in page size
|
||||
|
@ -89,7 +88,7 @@ class nsPageSequenceFrame final : public nsContainerFrame {
|
|||
nsresult PrintNextPage();
|
||||
void ResetPrintCanvasList();
|
||||
int32_t GetCurrentPageNum() const { return mPageNum; }
|
||||
int32_t GetRawNumPages() const { return mPageData->mTotNumPages; }
|
||||
int32_t GetRawNumPages() const { return mPageData->mRawNumPages; }
|
||||
bool IsDoingPrintRange() const { return mDoingPageRange; }
|
||||
void GetPrintRange(int32_t* aFromPage, int32_t* aToPage) const;
|
||||
nsresult DoPageEnd();
|
||||
|
|
Загрузка…
Ссылка в новой задаче