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

Unified Diff: xfa/src/fwl/src/core/fwl_gridimp.cpp

Issue 1453473002: FWL refcounts never incremented (part 2). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Rebased Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/src/fwl/src/core/fwl_formimp.cpp ('k') | xfa/src/fwl/src/core/fwl_noteimp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fwl/src/core/fwl_gridimp.cpp
diff --git a/xfa/src/fwl/src/core/fwl_gridimp.cpp b/xfa/src/fwl/src/core/fwl_gridimp.cpp
index 1d9c5d68a897aa6f178dbc9f7557da2243431358..ca9c6c26fd91fa08c3044f4bfbd90ba2ab377eea 100644
--- a/xfa/src/fwl/src/core/fwl_gridimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_gridimp.cpp
@@ -11,12 +11,16 @@
#include "include/fwl_widgetimp.h"
#include "include/fwl_contentimp.h"
#include "include/fwl_gridimp.h"
-FWL_ERR IFWL_Grid::Initialize(CFWL_WidgetImpProperties& properties) {
- CFWL_GridImp* pGridImpl = new CFWL_GridImp(properties);
- SetImpl(pGridImpl);
- pGridImpl->SetInterface(this);
- return pGridImpl->Initialize();
-}
+
+// static
+IFWL_Grid* IFWL_Grid::Create(const CFWL_WidgetImpProperties& properties) {
+ IFWL_Grid* pGrid = new IFWL_Grid;
+ CFWL_GridImp* pGridImpl = new CFWL_GridImp(properties, nullptr);
+ pGrid->SetImpl(pGridImpl);
+ pGridImpl->SetInterface(pGrid);
+ return pGrid;
+}
+IFWL_Grid::IFWL_Grid() {}
FWL_HGRIDCOLROW IFWL_Grid::InsertColRow(FX_BOOL bColumn, int32_t nIndex) {
return static_cast<CFWL_GridImp*>(GetImpl())->InsertColRow(bColumn, nIndex);
}
@@ -117,24 +121,10 @@ FWL_ERR IFWL_Grid::SetGridSize(FWL_GRIDSIZE eSize,
FWL_GRIDUNIT eUit) {
return static_cast<CFWL_GridImp*>(GetImpl())->SetGridSize(eSize, fSize, eUit);
}
-IFWL_Grid::IFWL_Grid() {
-}
-CFWL_GridImp::CFWL_GridImp() {
- m_Size[FWL_GRIDSIZE_Width].eUnit = FWL_GRIDUNIT_Auto;
- m_Size[FWL_GRIDSIZE_Width].fLength = 0;
- m_Size[FWL_GRIDSIZE_Height].eUnit = FWL_GRIDUNIT_Auto;
- m_Size[FWL_GRIDSIZE_Height].fLength = 0;
- m_Size[FWL_GRIDSIZE_MinWidth].eUnit = FWL_GRIDUNIT_Fixed;
- m_Size[FWL_GRIDSIZE_MinWidth].fLength = 0;
- m_Size[FWL_GRIDSIZE_MaxWidth].eUnit = FWL_GRIDUNIT_Infinity;
- m_Size[FWL_GRIDSIZE_MaxWidth].fLength = 0;
- m_Size[FWL_GRIDSIZE_MinHeight].eUnit = FWL_GRIDUNIT_Fixed;
- m_Size[FWL_GRIDSIZE_MinHeight].fLength = 0;
- m_Size[FWL_GRIDSIZE_MaxHeight].eUnit = FWL_GRIDUNIT_Infinity;
- m_Size[FWL_GRIDSIZE_MaxHeight].fLength = 0;
-}
-CFWL_GridImp::CFWL_GridImp(const CFWL_WidgetImpProperties& properties)
- : CFWL_ContentImp(properties) {
+
+CFWL_GridImp::CFWL_GridImp(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter)
+ : CFWL_ContentImp(properties, pOuter) {
m_Size[FWL_GRIDSIZE_Width].eUnit = FWL_GRIDUNIT_Auto;
m_Size[FWL_GRIDSIZE_Width].fLength = 0;
m_Size[FWL_GRIDSIZE_Height].eUnit = FWL_GRIDUNIT_Auto;
« no previous file with comments | « xfa/src/fwl/src/core/fwl_formimp.cpp ('k') | xfa/src/fwl/src/core/fwl_noteimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698