[xml] encode unknown hex reference

This commit is contained in:
REAndroid 2023-03-12 12:11:47 -04:00
parent 7fe33a0b8f
commit 4e9cfd4100
2 changed files with 5 additions and 0 deletions

View File

@ -79,6 +79,10 @@
}
Matcher matcher = ValueDecoder.PATTERN_REFERENCE.matcher(refString);
if(!matcher.find()){
ValueDecoder.EncodeResult ref = ValueDecoder.encodeHexReference(refString);
if(ref!=null){
return ref.value;
}
throw new EncodeException(
"Not proper reference string: '"+refString+"'");
}

View File

@ -37,6 +37,7 @@ class XMLValuesEncoderStyle extends XMLValuesEncoderBag{
String name=child.getAttributeValue("name");
int id=decodeUnknownAttributeHex(name);
if(id!=0){
item.setName(id);
String value = child.getTextContent();
if(ValueDecoder.isReference(value)){
item.setTypeAndData(ValueType.REFERENCE,