[poppler] poppler/Linearization.cc poppler/Linearization.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 26 18:18:39 UTC 2019
poppler/Linearization.cc | 22 +++++++++++-----------
poppler/Linearization.h | 21 +++++++++++----------
2 files changed, 22 insertions(+), 21 deletions(-)
New commits:
commit 7d570b79419750eb60a621c7c312c59910a3746c
Author: Albert Astals Cid <aacid at kde.org>
Date: Tue Nov 26 19:07:28 2019 +0100
Linearization: add const to functions
diff --git a/poppler/Linearization.cc b/poppler/Linearization.cc
index ed8d086f..9602850c 100644
--- a/poppler/Linearization.cc
+++ b/poppler/Linearization.cc
@@ -6,7 +6,7 @@
//
// Copyright 2010, 2012 Hib Eris <hib at hiberis.nl>
// Copyright 2015 Jason Crain <jason at aquaticape.us>
-// Copyright 2017 Albert Astals Cid <aacid at kde.org>
+// Copyright 2017, 2019 Albert Astals Cid <aacid at kde.org>
// Copyright 2019 Adam Reichold <adam.reichold at t-online.de>
// Copyright 2019 Even Rouault <even.rouault at spatialys.com>
//
@@ -47,7 +47,7 @@ Linearization:: ~Linearization()
{
}
-unsigned int Linearization::getLength()
+unsigned int Linearization::getLength() const
{
if (!linDict.isDict()) return 0;
@@ -61,7 +61,7 @@ unsigned int Linearization::getLength()
}
}
-unsigned int Linearization::getHintsOffset()
+unsigned int Linearization::getHintsOffset() const
{
int hintsOffset;
@@ -80,7 +80,7 @@ unsigned int Linearization::getHintsOffset()
return hintsOffset;
}
-unsigned int Linearization::getHintsLength()
+unsigned int Linearization::getHintsLength() const
{
int hintsLength;
@@ -99,7 +99,7 @@ unsigned int Linearization::getHintsLength()
return hintsLength;
}
-unsigned int Linearization::getHintsOffset2()
+unsigned int Linearization::getHintsOffset2() const
{
int hintsOffset2 = 0; // default to 0
@@ -119,7 +119,7 @@ unsigned int Linearization::getHintsOffset2()
return hintsOffset2;
}
-unsigned int Linearization::getHintsLength2()
+unsigned int Linearization::getHintsLength2() const
{
int hintsLength2 = 0; // default to 0
@@ -139,7 +139,7 @@ unsigned int Linearization::getHintsLength2()
return hintsLength2;
}
-int Linearization::getObjectNumberFirst()
+int Linearization::getObjectNumberFirst() const
{
int objectNumberFirst = 0;
if (linDict.isDict() &&
@@ -152,7 +152,7 @@ int Linearization::getObjectNumberFirst()
}
}
-unsigned int Linearization::getEndFirst()
+unsigned int Linearization::getEndFirst() const
{
int pageEndFirst = 0;
if (linDict.isDict() &&
@@ -165,7 +165,7 @@ unsigned int Linearization::getEndFirst()
}
}
-int Linearization::getNumPages()
+int Linearization::getNumPages() const
{
int numPages = 0;
if (linDict.isDict() &&
@@ -178,7 +178,7 @@ int Linearization::getNumPages()
}
}
-unsigned int Linearization::getMainXRefEntriesOffset()
+unsigned int Linearization::getMainXRefEntriesOffset() const
{
int mainXRefEntriesOffset = 0;
if (linDict.isDict() &&
@@ -191,7 +191,7 @@ unsigned int Linearization::getMainXRefEntriesOffset()
}
}
-int Linearization::getPageFirst()
+int Linearization::getPageFirst() const
{
int pageFirst = 0; // Optional, defaults to 0.
diff --git a/poppler/Linearization.h b/poppler/Linearization.h
index 6db33b3d..9835dce4 100644
--- a/poppler/Linearization.h
+++ b/poppler/Linearization.h
@@ -5,6 +5,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright 2010 Hib Eris <hib at hiberis.nl>
+// Copyright 2019 Albert Astals Cid <aacid at kde.org>
//
//========================================================================
@@ -24,16 +25,16 @@ public:
Linearization(BaseStream *str);
~Linearization();
- unsigned int getLength();
- unsigned int getHintsOffset();
- unsigned int getHintsLength();
- unsigned int getHintsOffset2();
- unsigned int getHintsLength2();
- int getObjectNumberFirst();
- unsigned int getEndFirst();
- int getNumPages();
- unsigned int getMainXRefEntriesOffset();
- int getPageFirst();
+ unsigned int getLength() const;
+ unsigned int getHintsOffset() const;
+ unsigned int getHintsLength() const;
+ unsigned int getHintsOffset2() const;
+ unsigned int getHintsLength2() const;
+ int getObjectNumberFirst() const;
+ unsigned int getEndFirst() const;
+ int getNumPages() const;
+ unsigned int getMainXRefEntriesOffset() const;
+ int getPageFirst() const;
private:
More information about the poppler
mailing list