summaryrefslogtreecommitdiff
path: root/core/include/fxcrt
diff options
context:
space:
mode:
Diffstat (limited to 'core/include/fxcrt')
-rw-r--r--core/include/fxcrt/fx_basic.h10
-rw-r--r--core/include/fxcrt/fx_ext.h9
-rw-r--r--core/include/fxcrt/fx_stream.h2
-rw-r--r--core/include/fxcrt/fx_ucd.h84
4 files changed, 45 insertions, 60 deletions
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index 710bbcc3c3..e35084c3e8 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -193,7 +193,7 @@ class CFX_ArchiveLoader {
FX_DWORD m_LoadingSize;
};
-#endif
+#endif // PDF_ENABLE_XFA
class IFX_BufferArchive {
public:
@@ -441,7 +441,7 @@ typedef CFX_ArrayTemplate<FX_FILESIZE> CFX_FileSizeArray;
#ifdef PDF_ENABLE_XFA
typedef CFX_ArrayTemplate<FX_FLOAT> CFX_FloatArray;
typedef CFX_ArrayTemplate<int32_t> CFX_Int32Array;
-#endif
+#endif // PDF_ENABLE_XFA
template <class ObjectClass>
class CFX_ObjectArray : public CFX_BasicArray {
@@ -728,9 +728,7 @@ class CFX_MapPtrTemplate : public CFX_MapPtrToPtr {
FX_BOOL RemoveKey(KeyType key) {
return CFX_MapPtrToPtr::RemoveKey((void*)(uintptr_t)key);
}
-#endif
-#ifdef PDF_ENABLE_XFA
void GetNextAssoc(FX_POSITION& rNextPosition,
KeyType& rKey,
ValueType& rValue) const {
@@ -741,7 +739,7 @@ class CFX_MapPtrTemplate : public CFX_MapPtrToPtr {
rValue = (ValueType)(uintptr_t)pValue;
}
};
-#endif
+#endif // PDF_ENABLE_XFA
class CFX_CMapByteStringToPtr {
public:
CFX_CMapByteStringToPtr();
@@ -1203,7 +1201,7 @@ class IFX_Unknown {
virtual FX_DWORD AddRef() = 0;
};
#define FX_IsOdd(a) ((a)&1)
-#endif
+#endif // PDF_ENABLE_XFA
class CFX_Vector_3by1 {
public:
diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h
index 908d6c3fe5..48801bb196 100644
--- a/core/include/fxcrt/fx_ext.h
+++ b/core/include/fxcrt/fx_ext.h
@@ -10,10 +10,7 @@
#include <cctype>
#include <cwctype>
-#ifdef PDF_ENABLE_XFA
-#include "fx_string.h"
-#endif
-#include "fx_system.h"
+#include "core/include/fxcrt/fx_basic.h"
FX_FLOAT FXSYS_tan(FX_FLOAT a);
FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x);
@@ -86,14 +83,12 @@ typedef struct FX_GUID {
uint8_t data4[8];
} FX_GUID, *FX_LPGUID;
typedef FX_GUID const* FX_LPCGUID;
-
void FX_GUID_CreateV4(FX_LPGUID pGUID);
-
void FX_GUID_ToString(FX_LPCGUID pGUID,
CFX_ByteString& bsStr,
FX_BOOL bSeparator = TRUE);
+#endif // PDF_ENABLE_XFA
-#endif
template <class baseType>
class CFX_SSortTemplate {
public:
diff --git a/core/include/fxcrt/fx_stream.h b/core/include/fxcrt/fx_stream.h
index 300bfb1941..a5bec7f51b 100644
--- a/core/include/fxcrt/fx_stream.h
+++ b/core/include/fxcrt/fx_stream.h
@@ -137,8 +137,8 @@ class IFX_FileAccess {
virtual IFX_FileStream* CreateFileStream(FX_DWORD dwModes) = 0;
};
IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath);
+#endif // PDF_ENABLE_XFA
-#endif
class IFX_MemoryStream : public IFX_FileStream {
public:
virtual FX_BOOL IsConsecutive() const = 0;
diff --git a/core/include/fxcrt/fx_ucd.h b/core/include/fxcrt/fx_ucd.h
index 852a893843..27812de13d 100644
--- a/core/include/fxcrt/fx_ucd.h
+++ b/core/include/fxcrt/fx_ucd.h
@@ -7,11 +7,44 @@
#ifndef CORE_INCLUDE_FXCRT_FX_UCD_H_
#define CORE_INCLUDE_FXCRT_FX_UCD_H_
-#ifndef PDF_ENABLE_XFA
-#include "fx_system.h"
-#else
#include "fx_basic.h"
-#endif
+
+#define FX_BIDICLASSBITS 6
+#define FX_BIDICLASSBITSMASK (31 << FX_BIDICLASSBITS)
+enum FX_BIDICLASS {
+ FX_BIDICLASS_ON = 0, // Other Neutral
+ FX_BIDICLASS_L = 1, // Left Letter
+ FX_BIDICLASS_R = 2, // Right Letter
+ FX_BIDICLASS_AN = 3, // Arabic Number
+ FX_BIDICLASS_EN = 4, // European Number
+ FX_BIDICLASS_AL = 5, // Arabic Letter
+ FX_BIDICLASS_NSM = 6, // Non-spacing Mark
+ FX_BIDICLASS_CS = 7, // Common Number Separator
+ FX_BIDICLASS_ES = 8, // European Separator
+ FX_BIDICLASS_ET = 9, // European Number Terminator
+ FX_BIDICLASS_BN = 10, // Boundary Neutral
+ FX_BIDICLASS_S = 11, // Segment Separator
+ FX_BIDICLASS_WS = 12, // Whitespace
+ FX_BIDICLASS_B = 13, // Paragraph Separator
+ FX_BIDICLASS_RLO = 14, // Right-to-Left Override
+ FX_BIDICLASS_RLE = 15, // Right-to-Left Embedding
+ FX_BIDICLASS_LRO = 16, // Left-to-Right Override
+ FX_BIDICLASS_LRE = 17, // Left-to-Right Embedding
+ FX_BIDICLASS_PDF = 18, // Pop Directional Format
+ FX_BIDICLASS_N = FX_BIDICLASS_ON,
+};
+
+extern const FX_DWORD kTextLayoutCodeProperties[];
+extern const size_t kTextLayoutCodePropertiesSize;
+
+extern const FX_WCHAR kFXTextLayoutVerticalMirror[];
+extern const size_t kFXTextLayoutVerticalMirrorSize;
+
+extern const FX_WCHAR kFXTextLayoutBidiMirror[];
+extern const size_t kFXTextLayoutBidiMirrorSize;
+
+FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch);
+FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical);
#ifdef PDF_ENABLE_XFA
enum FX_CHARBREAKPROP {
@@ -55,42 +88,7 @@ enum FX_CHARBREAKPROP {
FX_CBP_TB = 37,
FX_CBP_NONE = 36,
};
-#endif
-#define FX_BIDICLASSBITS 6
-#define FX_BIDICLASSBITSMASK (31 << FX_BIDICLASSBITS)
-enum FX_BIDICLASS {
- FX_BIDICLASS_ON = 0, // Other Neutral
- FX_BIDICLASS_L = 1, // Left Letter
- FX_BIDICLASS_R = 2, // Right Letter
- FX_BIDICLASS_AN = 3, // Arabic Number
- FX_BIDICLASS_EN = 4, // European Number
- FX_BIDICLASS_AL = 5, // Arabic Letter
- FX_BIDICLASS_NSM = 6, // Non-spacing Mark
- FX_BIDICLASS_CS = 7, // Common Number Separator
- FX_BIDICLASS_ES = 8, // European Separator
- FX_BIDICLASS_ET = 9, // European Number Terminator
- FX_BIDICLASS_BN = 10, // Boundary Neutral
- FX_BIDICLASS_S = 11, // Segment Separator
- FX_BIDICLASS_WS = 12, // Whitespace
- FX_BIDICLASS_B = 13, // Paragraph Separator
- FX_BIDICLASS_RLO = 14, // Right-to-Left Override
- FX_BIDICLASS_RLE = 15, // Right-to-Left Embedding
- FX_BIDICLASS_LRO = 16, // Left-to-Right Override
- FX_BIDICLASS_LRE = 17, // Left-to-Right Embedding
- FX_BIDICLASS_PDF = 18, // Pop Directional Format
- FX_BIDICLASS_N = FX_BIDICLASS_ON,
-};
-
-extern const FX_DWORD kTextLayoutCodeProperties[];
-extern const size_t kTextLayoutCodePropertiesSize;
-
-extern const FX_WCHAR kFXTextLayoutVerticalMirror[];
-extern const size_t kFXTextLayoutVerticalMirrorSize;
-extern const FX_WCHAR kFXTextLayoutBidiMirror[];
-extern const size_t kFXTextLayoutBidiMirrorSize;
-
-#ifdef PDF_ENABLE_XFA
#define FX_CHARTYPEBITS 11
#define FX_CHARTYPEBITSMASK (15 << FX_CHARTYPEBITS)
enum FX_CHARTYPE {
@@ -109,13 +107,7 @@ enum FX_CHARTYPE {
FX_CHARTYPE_Arabic = (12 << FX_CHARTYPEBITS),
};
-#endif
-FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch);
-#ifdef PDF_ENABLE_XFA
FX_BOOL FX_IsCtrlCode(FX_WCHAR ch);
-#endif
-FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical);
-#ifdef PDF_ENABLE_XFA
FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch,
FX_DWORD dwProps,
FX_BOOL bRTL,
@@ -194,6 +186,6 @@ class CFX_RTFChar : public CFX_Char {
IFX_Unknown* m_pUserData;
};
typedef CFX_ArrayTemplate<CFX_RTFChar> CFX_RTFCharArray;
-#endif
+#endif // PDF_ENABLE_XFA
#endif // CORE_INCLUDE_FXCRT_FX_UCD_H_