diff options
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffapp.cpp | 6 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffdoc.cpp | 3 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp | 19 | ||||
-rw-r--r-- | xfa/src/fxfa/src/parser/xfa_object_imp.cpp | 6 |
4 files changed, 8 insertions, 26 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_ffapp.cpp b/xfa/src/fxfa/src/app/xfa_ffapp.cpp index 14c59e93f0..5cdbb3661b 100644 --- a/xfa/src/fxfa/src/app/xfa_ffapp.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffapp.cpp @@ -210,9 +210,6 @@ IXFA_Doc* CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, IFX_FileRead* pStream,
FX_BOOL bTakeOverFile) {
CXFA_FFDoc* pDoc = new CXFA_FFDoc(this, pProvider);
- if (!pDoc) {
- return NULL;
- }
FX_BOOL bSuccess = pDoc->OpenDoc(pStream, bTakeOverFile);
if (!bSuccess) {
delete pDoc;
@@ -226,9 +223,6 @@ IXFA_Doc* CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, return NULL;
}
CXFA_FFDoc* pDoc = new CXFA_FFDoc(this, pProvider);
- if (!pDoc) {
- return NULL;
- }
FX_BOOL bSuccess = pDoc->OpenDoc(pPDFDoc);
if (!bSuccess) {
delete pDoc;
diff --git a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp index 7846bdafcd..84beae9b8b 100644 --- a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp @@ -253,9 +253,6 @@ FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) { return FALSE;
}
IFX_FileRead* pFileRead = new CXFA_FileRead2(xfaStreams);
- if (!pFileRead) {
- return FALSE;
- }
m_pPDFDoc = pPDFDoc;
if (m_pStream) {
m_pStream->Release();
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp index 6185ade383..8a4c18823c 100644 --- a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp @@ -45,13 +45,12 @@ class CXFA_TextLayoutData : public CXFA_WidgetLayoutData { }
m_pTextProvider = NULL;
}
- FX_BOOL LoadText(CXFA_WidgetAcc* pAcc) {
- if (m_pTextLayout) {
- return TRUE;
- }
+ void LoadText(CXFA_WidgetAcc* pAcc) {
+ if (m_pTextLayout)
+ return;
+
m_pTextProvider = new CXFA_TextProvider(pAcc, XFA_TEXTPROVIDERTYPE_Text);
m_pTextLayout = new CXFA_TextLayout(m_pTextProvider);
- return m_pTextLayout != NULL;
}
CXFA_TextLayout* m_pTextLayout;
CXFA_TextProvider* m_pTextProvider;
@@ -130,7 +129,7 @@ class CXFA_FieldLayoutData : public CXFA_WidgetLayoutData { m_pCapTextProvider =
new CXFA_TextProvider(pAcc, XFA_TEXTPROVIDERTYPE_Caption);
m_pCapTextLayout = new CXFA_TextLayout(m_pCapTextProvider);
- return m_pCapTextLayout != NULL;
+ return TRUE;
}
return FALSE;
}
@@ -1043,9 +1042,7 @@ void CXFA_WidgetAcc::GetImageEditDpi(int32_t& iImageXDpi, int32_t& iImageYDpi) { iImageYDpi = ((CXFA_ImageEditData*)m_pLayoutData)->m_iImageYDpi;
}
FX_BOOL CXFA_WidgetAcc::CalculateTextAutoSize(CFX_SizeF& size) {
- if (!LoadText()) {
- return FALSE;
- }
+ LoadText();
CXFA_TextLayout* pTextLayout =
((CXFA_TextLayoutData*)m_pLayoutData)->m_pTextLayout;
if (pTextLayout) {
@@ -1054,9 +1051,9 @@ FX_BOOL CXFA_WidgetAcc::CalculateTextAutoSize(CFX_SizeF& size) { }
return CalculateWidgetAutoSize(size);
}
-FX_BOOL CXFA_WidgetAcc::LoadText() {
+void CXFA_WidgetAcc::LoadText() {
InitLayoutData();
- return ((CXFA_TextLayoutData*)m_pLayoutData)->LoadText(this);
+ ((CXFA_TextLayoutData*)m_pLayoutData)->LoadText(this);
}
FX_FLOAT CXFA_WidgetAcc::CalculateWidgetAutoWidth(FX_FLOAT fWidthCalc) {
CXFA_Margin mgWidget = this->GetMargin();
diff --git a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp index 65f5f6fc8f..db059675f8 100644 --- a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp +++ b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp @@ -3977,9 +3977,6 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr, OnChanging(eAttr, (void*)(const FX_WCHAR*)wsValue, bNotify);
if (eAttr == XFA_ATTRIBUTE_Value) {
CFX_WideString* pClone = new CFX_WideString(wsValue);
- if (pClone == NULL) {
- return FALSE;
- }
SetUserData(pKey, pClone, &deleteWideStringCallBack);
} else {
SetMapModuleString(pKey, wsValue);
@@ -4056,9 +4053,6 @@ FX_BOOL CXFA_Node::SetAttributeValue(const CFX_WideString& wsValue, }
OnChanging(XFA_ATTRIBUTE_Value, (void*)(const FX_WCHAR*)wsValue, bNotify);
CFX_WideString* pClone = new CFX_WideString(wsValue);
- if (pClone == NULL) {
- return FALSE;
- }
SetUserData(pKey, pClone, &deleteWideStringCallBack);
OnChanged(XFA_ATTRIBUTE_Value, (void*)(const FX_WCHAR*)wsValue, bNotify,
bScriptModify);
|