1e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Copyright 2014 PDFium Authors. All rights reserved. 2e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Use of this source code is governed by a BSD-style license that can be 3e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// found in the LICENSE file. 4ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann 5e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov 7ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann#include "public/fpdf_searchex.h" 8ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann 9ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann#include "core/include/fpdftext/fpdf_text.h" 10e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov 11ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. MoltmannDLLEXPORT int STDCALL 12ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. MoltmannFPDFText_GetCharIndexFromTextIndex(FPDF_TEXTPAGE text_page, int nTextIndex) { 13ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann if (!text_page) 14ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann return -1; 15ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann return ((IPDF_TextPage*)text_page)->CharIndexFromTextIndex(nTextIndex); 16e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov} 17