| 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 "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
| 8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
| 9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" |
| 10 #include "../../include/javascript/JS_Object.h" | 10 #include "../../include/javascript/JS_Object.h" |
| (...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1756 | 1756 |
| 1757 return FALSE; | 1757 return FALSE; |
| 1758 } | 1758 } |
| 1759 | 1759 |
| 1760 FX_BOOL Document::removeIcon(OBJ_METHOD_PARAMS) | 1760 FX_BOOL Document::removeIcon(OBJ_METHOD_PARAMS) |
| 1761 { | 1761 { |
| 1762 if (params.size() != 1)return FALSE; | 1762 if (params.size() != 1)return FALSE; |
| 1763 if(!m_pIconTree) | 1763 if(!m_pIconTree) |
| 1764 return FALSE; | 1764 return FALSE; |
| 1765 CFX_WideString swIconName = params[0].operator CFX_WideString(); | 1765 CFX_WideString swIconName = params[0].operator CFX_WideString(); |
| 1766 #ifndef FOXIT_CHROME_BUILD | |
| 1767 m_pIconTree->DeleteIconElement(swIconName); | |
| 1768 #endif | |
| 1769 return TRUE; | 1766 return TRUE; |
| 1770 } | 1767 } |
| 1771 | 1768 |
| 1772 FX_BOOL Document::createDataObject(OBJ_METHOD_PARAMS) | 1769 FX_BOOL Document::createDataObject(OBJ_METHOD_PARAMS) |
| 1773 { | 1770 { |
| 1774 if (IsSafeMode(cc)) return TRUE; | 1771 if (IsSafeMode(cc)) return TRUE; |
| 1775 ASSERT(m_pDocument != NULL); | 1772 ASSERT(m_pDocument != NULL); |
| 1776 | 1773 |
| 1777 CFX_WideString swName = L""; | 1774 CFX_WideString swName = L""; |
| 1778 CFX_ByteString sbName = ""; | 1775 CFX_ByteString sbName = ""; |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2148 if (nStart < 0) nStart = 0; | 2145 if (nStart < 0) nStart = 0; |
| 2149 if (nStart >= nTotal) nStart = nTotal - 1; | 2146 if (nStart >= nTotal) nStart = nTotal - 1; |
| 2150 | 2147 |
| 2151 if (nEnd < 0) nEnd = 0; | 2148 if (nEnd < 0) nEnd = 0; |
| 2152 if (nEnd >= nTotal) nEnd = nTotal - 1; | 2149 if (nEnd >= nTotal) nEnd = nTotal - 1; |
| 2153 | 2150 |
| 2154 if (nEnd < nStart) nEnd = nStart; | 2151 if (nEnd < nStart) nEnd = nStart; |
| 2155 | 2152 |
| 2156 | 2153 |
| 2157 | 2154 |
| 2158 #ifndef FOXIT_CHROME_BUILD | |
| 2159 return m_pDocument->DeletePages(nStart, nEnd - nStart + 1); | |
| 2160 #else | |
| 2161 return TRUE; | 2155 return TRUE; |
| 2162 #endif | |
| 2163 } | 2156 } |
| 2164 | 2157 |
| 2165 FX_BOOL Document::extractPages(OBJ_METHOD_PARAMS) | 2158 FX_BOOL Document::extractPages(OBJ_METHOD_PARAMS) |
| 2166 { | 2159 { |
| 2167 | 2160 |
| 2168 | 2161 |
| 2169 | 2162 |
| 2170 | 2163 |
| 2171 | 2164 |
| 2172 | 2165 |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2525 | 2518 |
| 2526 void Document::DoAnnotDelay() | 2519 void Document::DoAnnotDelay() |
| 2527 { | 2520 { |
| 2528 CFX_DWordArray DelArray; | 2521 CFX_DWordArray DelArray; |
| 2529 | 2522 |
| 2530 for (int j=DelArray.GetSize()-1; j>=0; j--) | 2523 for (int j=DelArray.GetSize()-1; j>=0; j--) |
| 2531 { | 2524 { |
| 2532 m_DelayData.RemoveAt(DelArray[j]); | 2525 m_DelayData.RemoveAt(DelArray[j]); |
| 2533 } | 2526 } |
| 2534 } | 2527 } |
| OLD | NEW |