Re-land else-after-returns
[pdfium.git] / core / src / fpdftext / text_int.h
index 70c53d9..ce52371 100644 (file)
@@ -1,20 +1,12 @@
 // Copyright 2014 PDFium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
+
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
 #ifndef CORE_SRC_FPDFTEXT_TEXT_INT_H_
 #define CORE_SRC_FPDFTEXT_TEXT_INT_H_
 
-class CPDF_TextParseOptions 
-{
-public:
-    CPDF_TextParseOptions();
-    FX_BOOL                    m_bCheckObjectOrder;
-    FX_BOOL                    m_bCheckDirection;
-    int                                m_nCheckSameObject;
-};
 class CPDF_TextPage;
 class CPDF_LinkExtract;
 class CPDF_TextPageFind;
@@ -74,7 +66,6 @@ public:
             FX_FLOAT yTorelance) const;
     virtual CFX_WideString                     GetTextByRect(const CFX_FloatRect& rect) const;
     virtual void                                       GetRectsArrayByRect(const CFX_FloatRect& rect, CFX_RectArray& resRectArray) const;
-    virtual    int                                             GetOrderByDirection(int order, int direction) const;
     virtual    CFX_WideString                  GetPageText(int start = 0, int nCount = -1) const;
 
     virtual int                                                CountRects(int start, int nCount);
@@ -95,7 +86,7 @@ public:
     static     FX_BOOL                                 IsLetter(FX_WCHAR unicode);
 private:
     FX_BOOL                                                    IsHyphen(FX_WCHAR curChar);
-    FX_BOOL                                                    IsControlChar(PAGECHAR_INFO* pCharInfo);
+    bool                                                       IsControlChar(const PAGECHAR_INFO& charInfo);
     FX_BOOL                                                    GetBaselineRotate(int start, int end, int& Rotate);
     void                                                       ProcessObject();
     void                                                       ProcessFormObject(CPDF_FormObject*      pFormObj, const CFX_AffineMatrix& formMatrix);
@@ -157,7 +148,7 @@ public:
 protected:
     void                                                       ExtractFindWhat(const CFX_WideString& findwhat);
     FX_BOOL                                                    IsMatchWholeWord(const CFX_WideString& csPageText, int startPos, int endPos);
-    FX_BOOL                                                    ExtractSubString(CFX_WideString& rString, FX_LPCWSTR lpszFullString,
+    FX_BOOL                                                    ExtractSubString(CFX_WideString& rString, const FX_WCHAR* lpszFullString,
             int iSubString, FX_WCHAR chSep);
     CFX_WideString                                     MakeReverse(const CFX_WideString& str);
     int                                                                ReverseFind(const CFX_WideString& csPageText, const CFX_WideString& csWord, int nStartPos, int& WordLength);
@@ -215,7 +206,7 @@ private:
     CFX_WideString                                     m_strPageText;
     FX_BOOL                                                    m_IsParserd;
 };
-FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_LPWSTR pDst);
+FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst);
 void NormalizeString(CFX_WideString& str);
 void NormalizeCompositeChar(FX_WCHAR wChar, CFX_WideString& sDest);