summaryrefslogtreecommitdiff
path: root/core/src/fxcrt
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 11:29:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 11:29:12 -0700
commitb116136da234afcad018bb44a3ccb64b9ad2a554 (patch)
treee81b2016bc21485d1d6bdc7c1a5c65f610f18b20 /core/src/fxcrt
parentb69545dd059b8a5bb3695969e622462559c97276 (diff)
downloadpdfium-b116136da234afcad018bb44a3ccb64b9ad2a554.tar.xz
Merge to XFA: Remove more cruft from fx_system.h
New manual edits in the following to fix compilation: fx_bmp.h, fx_gif.h, fx_graphics.h Original Review URL: https://codereview.chromium.org/1169963003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1170103004
Diffstat (limited to 'core/src/fxcrt')
-rw-r--r--core/src/fxcrt/extension.h58
-rw-r--r--core/src/fxcrt/fx_arabic.h14
2 files changed, 36 insertions, 36 deletions
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index 0f37bbfefc..86e46eb5a0 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -66,7 +66,7 @@ protected:
CFX_WideString m_path;
FX_DWORD m_RefCount;
};
-class CFX_CRTFileStream FX_FINAL : public IFX_FileStream
+class CFX_CRTFileStream final : public IFX_FileStream
{
public:
CFX_CRTFileStream(IFXCRT_FileAccess* pFA) : m_pFile(pFA), m_dwCount(1), m_bUseRange(FALSE), m_nOffset(0), m_nSize(0) {}
@@ -76,27 +76,27 @@ public:
m_pFile->Release();
}
}
- virtual IFX_FileStream* Retain() FX_OVERRIDE
+ virtual IFX_FileStream* Retain() override
{
m_dwCount ++;
return this;
}
- virtual void Release() FX_OVERRIDE
+ virtual void Release() override
{
FX_DWORD nCount = -- m_dwCount;
if (!nCount) {
delete this;
}
}
- virtual FX_FILESIZE GetSize() FX_OVERRIDE
+ virtual FX_FILESIZE GetSize() override
{
return m_bUseRange ? m_nSize : m_pFile->GetSize();
}
- virtual FX_BOOL IsEOF() FX_OVERRIDE
+ virtual FX_BOOL IsEOF() override
{
return GetPosition() >= GetSize();
}
- virtual FX_FILESIZE GetPosition() FX_OVERRIDE
+ virtual FX_FILESIZE GetPosition() override
{
FX_FILESIZE pos = m_pFile->GetPosition();
if (m_bUseRange) {
@@ -104,7 +104,7 @@ public:
}
return pos;
}
- virtual FX_BOOL SetRange(FX_FILESIZE offset, FX_FILESIZE size) FX_OVERRIDE
+ virtual FX_BOOL SetRange(FX_FILESIZE offset, FX_FILESIZE size) override
{
if (offset < 0 || size < 0) {
return FALSE;
@@ -122,11 +122,11 @@ public:
m_pFile->SetPosition(m_nOffset);
return TRUE;
}
- virtual void ClearRange() FX_OVERRIDE
+ virtual void ClearRange() override
{
m_bUseRange = FALSE;
}
- virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) FX_OVERRIDE
+ virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override
{
if (m_bUseRange && offset < 0) {
return FALSE;
@@ -141,7 +141,7 @@ public:
}
return (FX_BOOL)m_pFile->ReadPos(buffer, size, pos.ValueOrDie());
}
- virtual size_t ReadBlock(void* buffer, size_t size) FX_OVERRIDE
+ virtual size_t ReadBlock(void* buffer, size_t size) override
{
if (m_bUseRange) {
FX_FILESIZE availSize = m_nOffset + m_nSize - m_pFile->GetPosition();
@@ -151,14 +151,14 @@ public:
}
return m_pFile->Read(buffer, size);
}
- virtual FX_BOOL WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) FX_OVERRIDE
+ virtual FX_BOOL WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) override
{
if (m_bUseRange) {
offset += m_nOffset;
}
return (FX_BOOL)m_pFile->WritePos(buffer, size, offset);
}
- virtual FX_BOOL Flush() FX_OVERRIDE
+ virtual FX_BOOL Flush() override
{
return m_pFile->Flush();
}
@@ -171,7 +171,7 @@ public:
#define FX_MEMSTREAM_BlockSize (64 * 1024)
#define FX_MEMSTREAM_Consecutive 0x01
#define FX_MEMSTREAM_TakeOver 0x02
-class CFX_MemoryStream FX_FINAL : public IFX_MemoryStream
+class CFX_MemoryStream final : public IFX_MemoryStream
{
public:
CFX_MemoryStream(FX_BOOL bConsecutive)
@@ -204,12 +204,12 @@ public:
}
m_Blocks.RemoveAll();
}
- virtual IFX_FileStream* Retain() FX_OVERRIDE
+ virtual IFX_FileStream* Retain() override
{
m_dwCount ++;
return this;
}
- virtual void Release() FX_OVERRIDE
+ virtual void Release() override
{
FX_DWORD nCount = -- m_dwCount;
if (nCount) {
@@ -217,15 +217,15 @@ public:
}
delete this;
}
- virtual FX_FILESIZE GetSize() FX_OVERRIDE
+ virtual FX_FILESIZE GetSize() override
{
return m_bUseRange ? (FX_FILESIZE) m_nSize : (FX_FILESIZE)m_nCurSize;
}
- virtual FX_BOOL IsEOF() FX_OVERRIDE
+ virtual FX_BOOL IsEOF() override
{
return m_nCurPos >= (size_t)GetSize();
}
- virtual FX_FILESIZE GetPosition() FX_OVERRIDE
+ virtual FX_FILESIZE GetPosition() override
{
FX_FILESIZE pos = (FX_FILESIZE)m_nCurPos;
if (m_bUseRange) {
@@ -233,7 +233,7 @@ public:
}
return pos;
}
- virtual FX_BOOL SetRange(FX_FILESIZE offset, FX_FILESIZE size) FX_OVERRIDE
+ virtual FX_BOOL SetRange(FX_FILESIZE offset, FX_FILESIZE size) override
{
if (offset < 0 || size < 0) {
return FALSE;
@@ -249,11 +249,11 @@ public:
m_nCurPos = m_nOffset;
return TRUE;
}
- virtual void ClearRange() FX_OVERRIDE
+ virtual void ClearRange() override
{
m_bUseRange = FALSE;
}
- virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) FX_OVERRIDE
+ virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override
{
if (!buffer || !size) {
return FALSE;
@@ -296,7 +296,7 @@ public:
}
return TRUE;
}
- virtual size_t ReadBlock(void* buffer, size_t size) FX_OVERRIDE
+ virtual size_t ReadBlock(void* buffer, size_t size) override
{
if (m_nCurPos >= m_nCurSize) {
return 0;
@@ -313,7 +313,7 @@ public:
}
return nRead;
}
- virtual FX_BOOL WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) FX_OVERRIDE
+ virtual FX_BOOL WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) override
{
if (!buffer || !size) {
return FALSE;
@@ -373,15 +373,15 @@ public:
}
return TRUE;
}
- virtual FX_BOOL Flush() FX_OVERRIDE
+ virtual FX_BOOL Flush() override
{
return TRUE;
}
- virtual FX_BOOL IsConsecutive() const FX_OVERRIDE
+ virtual FX_BOOL IsConsecutive() const override
{
return m_dwFlags & FX_MEMSTREAM_Consecutive;
}
- virtual void EstimateSize(size_t nInitSize, size_t nGrowSize) FX_OVERRIDE
+ virtual void EstimateSize(size_t nInitSize, size_t nGrowSize) override
{
if (m_dwFlags & FX_MEMSTREAM_Consecutive) {
if (m_Blocks.GetSize() < 1) {
@@ -393,11 +393,11 @@ public:
m_nGrowSize = FX_MAX(nGrowSize, 4096);
}
}
- virtual FX_LPBYTE GetBuffer() const FX_OVERRIDE
+ virtual FX_LPBYTE GetBuffer() const override
{
return m_Blocks.GetSize() ? (FX_LPBYTE)m_Blocks[0] : NULL;
}
- virtual void AttachBuffer(FX_LPBYTE pBuffer, size_t nSize, FX_BOOL bTakeOver = FALSE) FX_OVERRIDE
+ virtual void AttachBuffer(FX_LPBYTE pBuffer, size_t nSize, FX_BOOL bTakeOver = FALSE) override
{
if (!(m_dwFlags & FX_MEMSTREAM_Consecutive)) {
return;
@@ -409,7 +409,7 @@ public:
m_dwFlags = FX_MEMSTREAM_Consecutive | (bTakeOver ? FX_MEMSTREAM_TakeOver : 0);
ClearRange();
}
- virtual void DetachBuffer() FX_OVERRIDE
+ virtual void DetachBuffer() override
{
if (!(m_dwFlags & FX_MEMSTREAM_Consecutive)) {
return;
diff --git a/core/src/fxcrt/fx_arabic.h b/core/src/fxcrt/fx_arabic.h
index cf221301f2..66e8bc8000 100644
--- a/core/src/fxcrt/fx_arabic.h
+++ b/core/src/fxcrt/fx_arabic.h
@@ -180,22 +180,22 @@ void FX_BidiResolveImplicit(const CFX_Int32Array &classes, CFX_Int32Array &level
void FX_BidiResolveWhitespace(FX_INT32 iBaseLevel, const CFX_Int32Array &classes, CFX_Int32Array &levels);
FX_INT32 FX_BidiReorderLevel(FX_INT32 iBaseLevel, CFX_WideString &wsText, const CFX_Int32Array &levels, FX_INT32 iStart, FX_BOOL bReverse = FALSE);
void FX_BidiReorder(FX_INT32 iBaseLevel, CFX_WideString &wsText, const CFX_Int32Array &levels);
-class CFX_BidiChar FX_FINAL : public IFX_BidiChar
+class CFX_BidiChar final : public IFX_BidiChar
{
public:
CFX_BidiChar();
- virtual void Release() FX_OVERRIDE
+ virtual void Release() override
{
delete this;
}
- virtual void SetPolicy(FX_BOOL bSeparateNeutral = TRUE) FX_OVERRIDE
+ virtual void SetPolicy(FX_BOOL bSeparateNeutral = TRUE) override
{
m_bSeparateNeutral = bSeparateNeutral;
}
- virtual FX_BOOL AppendChar(FX_WCHAR wch) FX_OVERRIDE;
- virtual FX_BOOL EndChar() FX_OVERRIDE;
- virtual FX_INT32 GetBidiInfo(FX_INT32 &iStart, FX_INT32 &iCount) FX_OVERRIDE;
- virtual void Reset() FX_OVERRIDE;
+ virtual FX_BOOL AppendChar(FX_WCHAR wch) override;
+ virtual FX_BOOL EndChar() override;
+ virtual FX_INT32 GetBidiInfo(FX_INT32 &iStart, FX_INT32 &iCount) override;
+ virtual void Reset() override;
private:
~CFX_BidiChar() { }