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

Side by Side Diff: xfa/fxfa/parser/xfa_utils_imp.cpp

Issue 1899103002: XFA unused function cleanup (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/parser/xfa_utils.h" 7 #include "xfa/fxfa/parser/xfa_utils.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fde/xml/fde_xml_imp.h" 10 #include "xfa/fde/xml/fde_xml_imp.h"
11 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" 11 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h"
12 #include "xfa/fxfa/parser/xfa_docdata.h"
13 #include "xfa/fxfa/parser/xfa_doclayout.h" 12 #include "xfa/fxfa/parser/xfa_doclayout.h"
14 #include "xfa/fxfa/parser/xfa_document.h" 13 #include "xfa/fxfa/parser/xfa_document.h"
15 #include "xfa/fxfa/parser/xfa_localemgr.h" 14 #include "xfa/fxfa/parser/xfa_localemgr.h"
16 #include "xfa/fxfa/parser/xfa_localevalue.h" 15 #include "xfa/fxfa/parser/xfa_localevalue.h"
17 #include "xfa/fxfa/parser/xfa_object.h" 16 #include "xfa/fxfa/parser/xfa_object.h"
18 #include "xfa/fxfa/parser/xfa_parser.h" 17 #include "xfa/fxfa/parser/xfa_parser.h"
19 #include "xfa/fxfa/parser/xfa_script.h" 18 #include "xfa/fxfa/parser/xfa_script.h"
20 19
21 CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType) { 20 CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType) {
22 XFA_ELEMENT eType = pNode->GetClassID(); 21 XFA_ELEMENT eType = pNode->GetClassID();
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 case XFA_ELEMENT_SubformSet: 258 case XFA_ELEMENT_SubformSet:
260 return TRUE; 259 return TRUE;
261 case XFA_ELEMENT_PageArea: 260 case XFA_ELEMENT_PageArea:
262 case XFA_ELEMENT_Form: 261 case XFA_ELEMENT_Form:
263 return TRUE; 262 return TRUE;
264 default: 263 default:
265 return FALSE; 264 return FALSE;
266 } 265 }
267 return FALSE; 266 return FALSE;
268 } 267 }
269 FX_BOOL XFA_IsTakingupSpace(XFA_ATTRIBUTEENUM ePresence) { 268
270 switch (ePresence) {
271 case XFA_ATTRIBUTEENUM_Visible:
272 case XFA_ATTRIBUTEENUM_Invisible:
273 return TRUE;
274 default:
275 return FALSE;
276 }
277 return FALSE;
278 }
279 FX_BOOL XFA_IsFlowingLayout(XFA_ATTRIBUTEENUM eLayout) {
280 switch (eLayout) {
281 case XFA_ATTRIBUTEENUM_Tb:
282 case XFA_ATTRIBUTEENUM_Lr_tb:
283 case XFA_ATTRIBUTEENUM_Rl_tb:
284 return TRUE;
285 default:
286 return FALSE;
287 }
288 return FALSE;
289 }
290 FX_BOOL XFA_IsHorizontalFlow(XFA_ATTRIBUTEENUM eLayout) {
291 switch (eLayout) {
292 case XFA_ATTRIBUTEENUM_Lr_tb:
293 case XFA_ATTRIBUTEENUM_Rl_tb:
294 return TRUE;
295 default:
296 return FALSE;
297 }
298 return FALSE;
299 }
300 static const FX_DOUBLE fraction_scales[] = {0.1, 269 static const FX_DOUBLE fraction_scales[] = {0.1,
301 0.01, 270 0.01,
302 0.001, 271 0.001,
303 0.0001, 272 0.0001,
304 0.00001, 273 0.00001,
305 0.000001, 274 0.000001,
306 0.0000001, 275 0.0000001,
307 0.00000001, 276 0.00000001,
308 0.000000001, 277 0.000000001,
309 0.0000000001, 278 0.0000000001,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal) { 364 FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal) {
396 CFX_WideString wsValue = CFX_WideString::FromUTF8(szStringVal); 365 CFX_WideString wsValue = CFX_WideString::FromUTF8(szStringVal);
397 return XFA_WideStringToDouble(wsValue); 366 return XFA_WideStringToDouble(wsValue);
398 } 367 }
399 368
400 int32_t XFA_MapRotation(int32_t nRotation) { 369 int32_t XFA_MapRotation(int32_t nRotation) {
401 nRotation = nRotation % 360; 370 nRotation = nRotation % 360;
402 nRotation = nRotation < 0 ? nRotation + 360 : nRotation; 371 nRotation = nRotation < 0 ? nRotation + 360 : nRotation;
403 return nRotation; 372 return nRotation;
404 } 373 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698