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

Side by Side Diff: xfa/fde/cfde_txtedtengine.cpp

Issue 2609423003: Properly ref-count CFGAS_GEFont with CFX_RetainPtr. (Closed)
Patch Set: comments Created 3 years, 11 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
« no previous file with comments | « no previous file | xfa/fde/cfde_txtedttextset.h » ('j') | xfa/fde/fde_gedevice.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/fde/cfde_txtedtengine.h" 7 #include "xfa/fde/cfde_txtedtengine.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 } // namespace 28 } // namespace
29 29
30 FDE_TXTEDTPARAMS::FDE_TXTEDTPARAMS() 30 FDE_TXTEDTPARAMS::FDE_TXTEDTPARAMS()
31 : fPlateWidth(0), 31 : fPlateWidth(0),
32 fPlateHeight(0), 32 fPlateHeight(0),
33 nLineCount(0), 33 nLineCount(0),
34 dwLayoutStyles(0), 34 dwLayoutStyles(0),
35 dwAlignment(0), 35 dwAlignment(0),
36 dwMode(0), 36 dwMode(0),
37 pFont(nullptr),
38 fFontSize(10.0f), 37 fFontSize(10.0f),
39 dwFontColor(0xff000000), 38 dwFontColor(0xff000000),
40 fLineSpace(10.0f), 39 fLineSpace(10.0f),
41 fTabWidth(36), 40 fTabWidth(36),
42 bTabEquidistant(false), 41 bTabEquidistant(false),
43 wDefChar(0xFEFF), 42 wDefChar(0xFEFF),
44 wLineBreakChar('\n'), 43 wLineBreakChar('\n'),
45 nCharRotation(0), 44 nCharRotation(0),
46 nLineEnd(0), 45 nLineEnd(0),
47 nHorzScale(100), 46 nHorzScale(100),
48 fCharSpace(0), 47 fCharSpace(0),
49 pEventSink(nullptr) {} 48 pEventSink(nullptr) {}
50 49
50 FDE_TXTEDTPARAMS::~FDE_TXTEDTPARAMS() {}
51
51 FDE_TXTEDT_TEXTCHANGE_INFO::FDE_TXTEDT_TEXTCHANGE_INFO() {} 52 FDE_TXTEDT_TEXTCHANGE_INFO::FDE_TXTEDT_TEXTCHANGE_INFO() {}
52 53
53 FDE_TXTEDT_TEXTCHANGE_INFO::~FDE_TXTEDT_TEXTCHANGE_INFO() {} 54 FDE_TXTEDT_TEXTCHANGE_INFO::~FDE_TXTEDT_TEXTCHANGE_INFO() {}
54 55
55 CFDE_TxtEdtEngine::CFDE_TxtEdtEngine() 56 CFDE_TxtEdtEngine::CFDE_TxtEdtEngine()
56 : m_pTxtBuf(new CFDE_TxtEdtBuf()), 57 : m_pTxtBuf(new CFDE_TxtEdtBuf()),
57 m_nPageLineCount(20), 58 m_nPageLineCount(20),
58 m_nLineCount(0), 59 m_nLineCount(0),
59 m_nAnchorPos(-1), 60 m_nAnchorPos(-1),
60 m_nLayoutPos(0), 61 m_nLayoutPos(0),
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 m_SelRangePtrArr.RemoveAt(nCountRange); 1477 m_SelRangePtrArr.RemoveAt(nCountRange);
1477 DeleteRange_DoRecord(nSelStart, nSelCount, true); 1478 DeleteRange_DoRecord(nSelStart, nSelCount, true);
1478 } 1479 }
1479 ClearSelection(); 1480 ClearSelection();
1480 m_Param.pEventSink->OnTextChanged(m_ChangeInfo); 1481 m_Param.pEventSink->OnTextChanged(m_ChangeInfo);
1481 m_Param.pEventSink->OnSelChanged(); 1482 m_Param.pEventSink->OnSelChanged();
1482 SetCaretPos(nSelStart, true); 1483 SetCaretPos(nSelStart, true);
1483 return; 1484 return;
1484 } 1485 }
1485 } 1486 }
OLDNEW
« no previous file with comments | « no previous file | xfa/fde/cfde_txtedttextset.h » ('j') | xfa/fde/fde_gedevice.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698