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

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: Created 5 years, 6 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
Index: core/src/fpdftext/fpdf_text.cpp
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index 91d0e41b8d5731b9e0870a24bb0a6322c7cb3083..4b92b9f96af35b76b556e49f96accbd2244b5043 100644
--- a/core/src/fpdftext/fpdf_text.cpp
+++ b/core/src/fpdftext/fpdf_text.cpp
@@ -316,28 +316,29 @@ void NormalizeString(CFX_WideString& str)
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);
+ IFX_BidiChar::Direction ret =
+ pBidiChar->GetBidiInfo(&start, &count);
order.Add(start);
order.Add(count);
order.Add(ret);
if(!bR2L) {
- if(ret == 2) {
+ if (ret == IFX_BidiChar::RIGHT) {
nR2L++;
- } else if (ret == 1) {
+ } else if (ret == IFX_BidiChar::LEFT) {
nL2R++;
}
}
}
}
if(pBidiChar->EndChar()) {
- int32_t ret = pBidiChar->GetBidiInfo(start, count);
+ IFX_BidiChar::Direction ret = pBidiChar->GetBidiInfo(&start, &count);
order.Add(start);
order.Add(count);
order.Add(ret);
if(!bR2L) {
- if(ret == 2) {
+ if (ret == IFX_BidiChar::RIGHT) {
nR2L++;
- } else if(ret == 1) {
+ } else if (ret == IFX_BidiChar::LEFT) {
nL2R++;
}
}

Powered by Google App Engine
This is Rietveld 408576698