DocX and Styletemplates with quotes in the name
Posted: Fri Nov 17, 2023 11:05 am
Hello Sergey,
after loading a with MS Word saved .docx file with ScaleRichView / RichView and save it back to docx it was not possible to open with Word again.
The problem is that the file contains templates with " in its name and german umlaute. I did look into CRVData.pas WriteSTProperties( ... )
and changed the line:
RVFWrite(Stream,
RVFormatA('<w:name w:val="%s"/>', [RV_MakeOOXMLStrW(s)]));
into - so that " are also quoted and saved.
RVFWrite(Stream,
RVFormatA('<w:name w:val="%s"/>', [RV_ProcessOOXMLStrA(Utf8Encode(s), true, true)]));
André
after loading a with MS Word saved .docx file with ScaleRichView / RichView and save it back to docx it was not possible to open with Word again.
The problem is that the file contains templates with " in its name and german umlaute. I did look into CRVData.pas WriteSTProperties( ... )
and changed the line:
RVFWrite(Stream,
RVFormatA('<w:name w:val="%s"/>', [RV_MakeOOXMLStrW(s)]));
into - so that " are also quoted and saved.
RVFWrite(Stream,
RVFormatA('<w:name w:val="%s"/>', [RV_ProcessOOXMLStrA(Utf8Encode(s), true, true)]));
André