Lines Matching refs:eAttr

212 bool CJX_Object::HasAttribute(XFA_Attribute eAttr) {  in HasAttribute()  argument
213 void* pKey = GetMapKey_Element(GetXFAObject()->GetElementType(), eAttr); in HasAttribute()
217 void CJX_Object::SetAttribute(XFA_Attribute eAttr, in SetAttribute() argument
220 switch (ToNode(GetXFAObject())->GetAttributeType(eAttr)) { in SetAttribute()
223 SetEnum(eAttr, in SetAttribute()
224 item ? *item : *(ToNode(GetXFAObject())->GetDefaultEnum(eAttr)), in SetAttribute()
229 SetCData(eAttr, WideString(wsValue), bNotify, false); in SetAttribute()
232 SetBoolean(eAttr, !wsValue.EqualsASCII("0"), bNotify); in SetAttribute()
235 SetInteger(eAttr, in SetAttribute()
241 SetMeasure(eAttr, CXFA_Measurement(wsValue), bNotify); in SetAttribute()
273 Optional<WideString> CJX_Object::TryAttribute(XFA_Attribute eAttr, in TryAttribute() argument
275 switch (ToNode(GetXFAObject())->GetAttributeType(eAttr)) { in TryAttribute()
277 Optional<XFA_AttributeValue> value = TryEnum(eAttr, bUseDefault); in TryAttribute()
283 return TryCData(eAttr, bUseDefault); in TryAttribute()
286 Optional<bool> value = TryBoolean(eAttr, bUseDefault); in TryAttribute()
292 Optional<int32_t> iValue = TryInteger(eAttr, bUseDefault); in TryAttribute()
298 Optional<CXFA_Measurement> value = TryMeasure(eAttr, bUseDefault); in TryAttribute()
324 Optional<bool> CJX_Object::TryBoolean(XFA_Attribute eAttr, bool bUseDefault) { in TryBoolean() argument
325 void* pKey = GetMapKey_Element(GetXFAObject()->GetElementType(), eAttr); in TryBoolean()
331 return ToNode(GetXFAObject())->GetDefaultBoolean(eAttr); in TryBoolean()
334 void CJX_Object::SetBoolean(XFA_Attribute eAttr, bool bValue, bool bNotify) { in SetBoolean() argument
335 CFX_XMLElement* elem = SetValue(eAttr, (void*)(uintptr_t)bValue, bNotify); in SetBoolean()
337 elem->SetAttribute(WideString::FromASCII(XFA_AttributeToName(eAttr)), in SetBoolean()
342 bool CJX_Object::GetBoolean(XFA_Attribute eAttr) { in GetBoolean() argument
343 return TryBoolean(eAttr, true).value_or(false); in GetBoolean()
346 void CJX_Object::SetInteger(XFA_Attribute eAttr, int32_t iValue, bool bNotify) { in SetInteger() argument
347 CFX_XMLElement* elem = SetValue(eAttr, (void*)(uintptr_t)iValue, bNotify); in SetInteger()
349 elem->SetAttribute(WideString::FromASCII(XFA_AttributeToName(eAttr)), in SetInteger()
354 int32_t CJX_Object::GetInteger(XFA_Attribute eAttr) const { in GetInteger()
355 return TryInteger(eAttr, true).value_or(0); in GetInteger()
358 Optional<int32_t> CJX_Object::TryInteger(XFA_Attribute eAttr, in TryInteger() argument
360 void* pKey = GetMapKey_Element(GetXFAObject()->GetElementType(), eAttr); in TryInteger()
366 return ToNode(GetXFAObject())->GetDefaultInteger(eAttr); in TryInteger()
369 Optional<XFA_AttributeValue> CJX_Object::TryEnum(XFA_Attribute eAttr, in TryEnum() argument
371 void* pKey = GetMapKey_Element(GetXFAObject()->GetElementType(), eAttr); in TryEnum()
379 return ToNode(GetXFAObject())->GetDefaultEnum(eAttr); in TryEnum()
382 void CJX_Object::SetEnum(XFA_Attribute eAttr, in SetEnum() argument
385 CFX_XMLElement* elem = SetValue(eAttr, (void*)(uintptr_t)eValue, bNotify); in SetEnum()
387 elem->SetAttribute(WideString::FromASCII(XFA_AttributeToName(eAttr)), in SetEnum()
392 XFA_AttributeValue CJX_Object::GetEnum(XFA_Attribute eAttr) const { in GetEnum()
393 return TryEnum(eAttr, true).value_or(XFA_AttributeValue::Unknown); in GetEnum()
396 void CJX_Object::SetMeasure(XFA_Attribute eAttr, in SetMeasure() argument
399 void* pKey = GetMapKey_Element(GetXFAObject()->GetElementType(), eAttr); in SetMeasure()
400 OnChanging(eAttr, bNotify); in SetMeasure()
402 OnChanged(eAttr, bNotify, false); in SetMeasure()
405 Optional<CXFA_Measurement> CJX_Object::TryMeasure(XFA_Attribute eAttr, in TryMeasure() argument
407 void* pKey = GetMapKey_Element(GetXFAObject()->GetElementType(), eAttr); in TryMeasure()
416 return ToNode(GetXFAObject())->GetDefaultMeasurement(eAttr); in TryMeasure()
426 CXFA_Measurement CJX_Object::GetMeasure(XFA_Attribute eAttr) const { in GetMeasure()
427 return TryMeasure(eAttr, true).value_or(CXFA_Measurement()); in GetMeasure()
430 float CJX_Object::GetMeasureInUnit(XFA_Attribute eAttr, XFA_Unit unit) const { in GetMeasureInUnit() argument
431 auto measure = TryMeasure(eAttr, true).value_or(CXFA_Measurement()); in GetMeasureInUnit()
435 WideString CJX_Object::GetCData(XFA_Attribute eAttr) const { in GetCData()
436 return TryCData(eAttr, true).value_or(WideString()); in GetCData()
439 void CJX_Object::SetCData(XFA_Attribute eAttr, in SetCData() argument
444 void* pKey = GetMapKey_Element(xfaObj->GetElementType(), eAttr); in SetCData()
445 OnChanging(eAttr, bNotify); in SetCData()
446 if (eAttr == XFA_Attribute::Value) { in SetCData()
451 if (eAttr == XFA_Attribute::Name) in SetCData()
454 OnChanged(eAttr, bNotify, bScriptModify); in SetCData()
456 if (!xfaObj->IsNeedSavingXMLNode() || eAttr == XFA_Attribute::QualifiedName || in SetCData()
457 eAttr == XFA_Attribute::BindingNode) { in SetCData()
461 if (eAttr == XFA_Attribute::Name && in SetCData()
467 if (eAttr == XFA_Attribute::Value) { in SetCData()
472 WideString wsAttrName = WideString::FromASCII(XFA_AttributeToName(eAttr)); in SetCData()
473 if (eAttr == XFA_Attribute::ContentType) in SetCData()
501 Optional<WideString> CJX_Object::TryCData(XFA_Attribute eAttr, in TryCData() argument
503 void* pKey = GetMapKey_Element(GetXFAObject()->GetElementType(), eAttr); in TryCData()
504 if (eAttr == XFA_Attribute::Value) { in TryCData()
521 return ToNode(GetXFAObject())->GetDefaultCData(eAttr); in TryCData()
524 CFX_XMLElement* CJX_Object::SetValue(XFA_Attribute eAttr, in SetValue() argument
527 void* pKey = GetMapKey_Element(GetXFAObject()->GetElementType(), eAttr); in SetValue()
528 OnChanging(eAttr, bNotify); in SetValue()
530 OnChanged(eAttr, bNotify, false); in SetValue()
1052 void CJX_Object::OnChanging(XFA_Attribute eAttr, bool bNotify) { in OnChanging() argument
1058 pNotify->OnValueChanging(ToNode(GetXFAObject()), eAttr); in OnChanging()
1061 void CJX_Object::OnChanged(XFA_Attribute eAttr, in OnChanged() argument
1065 ToNode(GetXFAObject())->SendAttributeChangeMessage(eAttr, bScriptModify); in OnChanged()