Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: core/src/fpdftext/fpdf_text.cpp

Issue 1197643002: Cleanup IFX_BidiChar (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments, similarity 20 Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fxcrt/fx_ucd.h ('k') | core/src/fpdftext/fpdf_text_int.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdftext/fpdf_text.cpp
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index e7ca6c136f983f71479f2a0b447014983d4b13c6..af944d965e1713eb3469564dfc2f9798fddf13fb 100644
--- a/core/src/fpdftext/fpdf_text.cpp
+++ b/core/src/fpdftext/fpdf_text.cpp
@@ -9,7 +9,7 @@
#include "../../include/fpdfapi/fpdf_pageobj.h"
#include "../../include/fpdfapi/fpdf_resource.h"
#include "../../include/fpdftext/fpdf_text.h"
-#include "../../include/fxcrt/fx_arb.h"
+#include "../../include/fxcrt/fx_bidi.h"
#include "../../include/fxcrt/fx_ucd.h"
#include "text_int.h"
#include "txtproc.h"
@@ -321,35 +321,35 @@ void NormalizeString(CFX_WideString& str) {
return;
}
CFX_WideString sBuffer;
- nonstd::unique_ptr<IFX_BidiChar> pBidiChar(IFX_BidiChar::Create());
+ nonstd::unique_ptr<CFX_BidiChar> pBidiChar(new CFX_BidiChar);
CFX_WordArray order;
FX_BOOL bR2L = FALSE;
int32_t start = 0, count = 0, i = 0;
int nR2L = 0, nL2R = 0;
for (i = 0; i < str.GetLength(); i++) {
if (pBidiChar->AppendChar(str.GetAt(i))) {
- int32_t ret = pBidiChar->GetBidiInfo(start, count);
+ CFX_BidiChar::Direction ret = pBidiChar->GetBidiInfo(&start, &count);
order.Add(start);
order.Add(count);
order.Add(ret);
if (!bR2L) {
- if (ret == 2) {
+ if (ret == CFX_BidiChar::RIGHT) {
nR2L++;
- } else if (ret == 1) {
+ } else if (ret == CFX_BidiChar::LEFT) {
nL2R++;
}
}
}
}
if (pBidiChar->EndChar()) {
- int32_t ret = pBidiChar->GetBidiInfo(start, count);
+ CFX_BidiChar::Direction ret = pBidiChar->GetBidiInfo(&start, &count);
order.Add(start);
order.Add(count);
order.Add(ret);
if (!bR2L) {
- if (ret == 2) {
+ if (ret == CFX_BidiChar::RIGHT) {
nR2L++;
- } else if (ret == 1) {
+ } else if (ret == CFX_BidiChar::LEFT) {
nL2R++;
}
}
« no previous file with comments | « core/include/fxcrt/fx_ucd.h ('k') | core/src/fpdftext/fpdf_text_int.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698