diff options
author | crupest <crupest@outlook.com> | 2022-01-23 21:07:03 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-23 21:07:03 +0800 |
commit | da9bdf2baced1ff51350c98047b7ade68fcae930 (patch) | |
tree | c51b9c8538c82b19d142eb1340e6dac0e88ff4e4 /src/ui/mapper/CornerRadiusMapper.cpp | |
parent | 13860c88910c00478abe3001cc80125e76767381 (diff) | |
download | cru-da9bdf2baced1ff51350c98047b7ade68fcae930.tar.gz cru-da9bdf2baced1ff51350c98047b7ade68fcae930.tar.bz2 cru-da9bdf2baced1ff51350c98047b7ade68fcae930.zip |
...
Diffstat (limited to 'src/ui/mapper/CornerRadiusMapper.cpp')
-rw-r--r-- | src/ui/mapper/CornerRadiusMapper.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/ui/mapper/CornerRadiusMapper.cpp b/src/ui/mapper/CornerRadiusMapper.cpp index 0c13db7c..9c8855a3 100644 --- a/src/ui/mapper/CornerRadiusMapper.cpp +++ b/src/ui/mapper/CornerRadiusMapper.cpp @@ -4,37 +4,34 @@ namespace cru::ui::mapper { bool CornerRadiusMapper::XmlElementIsOfThisType(xml::XmlElementNode* node) { - if (node->GetTag() == u"CornerRadius") { - return true; - } - return false; + return node->GetTag().CaseInsensitiveCompare(u"CornerRadius") == 0; } CornerRadius CornerRadiusMapper::DoMapFromXml(xml::XmlElementNode* node) { auto point_mapper = MapperRegistry::GetInstance()->GetMapper<Point>(); CornerRadius result; - auto all = node->GetOptionalAttribute(u"all"); + auto all = node->GetOptionalAttributeCaseInsensitive(u"all"); if (all) { result.SetAll(point_mapper->MapFromString(*all)); } - auto lefttop = node->GetOptionalAttribute(u"lefttop"); + auto lefttop = node->GetOptionalAttributeCaseInsensitive(u"lefttop"); if (lefttop) { result.left_top = point_mapper->MapFromString(*lefttop); } - auto righttop = node->GetOptionalAttribute(u"righttop"); + auto righttop = node->GetOptionalAttributeCaseInsensitive(u"righttop"); if (righttop) { result.right_top = point_mapper->MapFromString(*righttop); } - auto rightbottom = node->GetOptionalAttribute(u"rightbottom"); + auto rightbottom = node->GetOptionalAttributeCaseInsensitive(u"rightbottom"); if (rightbottom) { result.right_bottom = point_mapper->MapFromString(*rightbottom); } - auto leftbottom = node->GetOptionalAttribute(u"leftbottom"); + auto leftbottom = node->GetOptionalAttributeCaseInsensitive(u"leftbottom"); if (leftbottom) { result.left_bottom = point_mapper->MapFromString(*leftbottom); } |