Bug 1401069 - Part 7. Declare GetPageCount as a const member function. draft
authorcku <cku@mozilla.com>
Mon, 18 Sep 2017 23:46:44 +0800
changeset 668141 d62efd8e9a54d10e14ab93ec7312c4a132cc6f59
parent 668140 5fc419fb381e412f17e1fb5f6aa31db892fd4921
child 668142 534d52841c5b6abb64859ecd4a4645659f64381b
push id80936
push usercku@mozilla.com
push dateThu, 21 Sep 2017 04:54:21 +0000
bugs1401069
milestone57.0a1
Bug 1401069 - Part 7. Declare GetPageCount as a const member function. MozReview-Commit-ID: IRM8FikStJi
widget/windows/PDFViaEMFPrintHelper.h
--- a/widget/windows/PDFViaEMFPrintHelper.h
+++ b/widget/windows/PDFViaEMFPrintHelper.h
@@ -32,17 +32,17 @@ public:
   ~PDFViaEMFPrintHelper();
 
   /** Loads the specified PDF file. */
   NS_IMETHOD OpenDocument(nsIFile *aFile);
 
   /** Releases document buffer. */
   void CloseDocument();
 
-  int GetPageCount() { return mPDFiumEngine->GetPageCount(mPDFDoc); }
+  int GetPageCount() const { return mPDFiumEngine->GetPageCount(mPDFDoc); }
 
   /** Convert specified PDF page to EMF and draw the EMF onto the given DC. */
   bool DrawPage(HDC aPrinterDC, unsigned int aPageIndex,
                 int aPageWidth, int aPageHeight);
 
   /** Convert specified PDF page to EMF and save it to file. */
   bool DrawPageToFile(const wchar_t* aFilePath, unsigned int aPageIndex,
                       int aPageWidth, int aPageHeight);