cleanup "tdf#117274 XLSX export: fix VML comment shape type id"
Limit special MSO ID check for attribute values.
Follow-up of commit c5d37d324c
.
Change-Id: I0f16b0df0c5575b799bb505a93c660c15b3273c5
Reviewed-on: https://gerrit.libreoffice.org/84549
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
@@ -130,9 +130,7 @@ namespace sax_fastparser {
|
|||||||
if (nLen == -1)
|
if (nLen == -1)
|
||||||
nLen = pStr ? strlen(pStr) : 0;
|
nLen = pStr ? strlen(pStr) : 0;
|
||||||
|
|
||||||
if ( !bEscape ||
|
if (!bEscape)
|
||||||
// tdf#127274 don't escape the special VML shape type id "#_x0000_t202"
|
|
||||||
(pStr && strcmp(pStr, "#_x0000_t202") == 0) )
|
|
||||||
{
|
{
|
||||||
writeBytes( pStr, nLen );
|
writeBytes( pStr, nLen );
|
||||||
return;
|
return;
|
||||||
@@ -465,7 +463,12 @@ namespace sax_fastparser {
|
|||||||
|
|
||||||
writeBytes(sEqualSignAndQuote, N_CHARS(sEqualSignAndQuote));
|
writeBytes(sEqualSignAndQuote, N_CHARS(sEqualSignAndQuote));
|
||||||
|
|
||||||
write(rAttrList.getFastAttributeValue(j), rAttrList.AttributeValueLength(j), true);
|
const char* pAttributeValue = rAttrList.getFastAttributeValue(j);
|
||||||
|
|
||||||
|
// tdf#127274 don't escape the special VML shape type id "#_x0000_t202"
|
||||||
|
bool bEscape = !(pAttributeValue && strcmp(pAttributeValue, "#_x0000_t202") == 0);
|
||||||
|
|
||||||
|
write(pAttributeValue, rAttrList.AttributeValueLength(j), bEscape);
|
||||||
|
|
||||||
writeBytes(sQuote, N_CHARS(sQuote));
|
writeBytes(sQuote, N_CHARS(sQuote));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user