| OLD | NEW |
| 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" |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 } | 385 } |
| 386 FX_DOUBLE dValue = (dwFractional / 4294967296.0); | 386 FX_DOUBLE dValue = (dwFractional / 4294967296.0); |
| 387 dValue = nIntegral + (nIntegral >= 0 ? dValue : -dValue); | 387 dValue = nIntegral + (nIntegral >= 0 ? dValue : -dValue); |
| 388 if (nExponent != 0) { | 388 if (nExponent != 0) { |
| 389 dValue *= FXSYS_pow(10, (FX_FLOAT)nExponent); | 389 dValue *= FXSYS_pow(10, (FX_FLOAT)nExponent); |
| 390 } | 390 } |
| 391 return dValue; | 391 return dValue; |
| 392 } | 392 } |
| 393 | 393 |
| 394 FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal) { | 394 FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal) { |
| 395 CFX_WideString wsValue = | 395 CFX_WideString wsValue = CFX_WideString::FromUTF8(szStringVal); |
| 396 CFX_WideString::FromUTF8(szStringVal.c_str(), szStringVal.GetLength()); | |
| 397 return XFA_WideStringToDouble(wsValue); | 396 return XFA_WideStringToDouble(wsValue); |
| 398 } | 397 } |
| 399 | 398 |
| 400 int32_t XFA_MapRotation(int32_t nRotation) { | 399 int32_t XFA_MapRotation(int32_t nRotation) { |
| 401 nRotation = nRotation % 360; | 400 nRotation = nRotation % 360; |
| 402 nRotation = nRotation < 0 ? nRotation + 360 : nRotation; | 401 nRotation = nRotation < 0 ? nRotation + 360 : nRotation; |
| 403 return nRotation; | 402 return nRotation; |
| 404 } | 403 } |
| OLD | NEW |