2

Im making a docx reader (libopc and C++) and I have problem when I want to get the minor and major Font from the theme1.xml. The problem is that I dont know how I have to write the namespace for attributes without it:

<a:latin typeface="Calibri"/>

I have tryed with:

mce_start_attribute(&reader, _X(""), _X("typeface")) {//type
    _majorFont = (char*) xmlTextReaderConstValue(reader.reader);
}mce_end_attribute(&reader);

and:

mce_start_attribute(&reader, _X("http://www.3w.org/2000/xmlns"), _X("typeface")) {//type
    _majorFont = (char*) xmlTextReaderConstValue(reader.reader);
}mce_end_attribute(&reader);

And I get the same result: nothing.

Any Suggestion. Thanks in advance.

Todd Main
  • 28,951
  • 11
  • 82
  • 146
Miguel Angel
  • 630
  • 7
  • 18

1 Answers1

2

I answer myself. After ckeck libopc source code the solution is set namespace value in mce_start_attribute macro as NULL:

mce_start_attribute(&reader, NULL, _X("typeface")) {//type
    _majorFont = (char*) xmlTextReaderConstValue(reader.reader);
}mce_end_attribute(&reader);
Miguel Angel
  • 630
  • 7
  • 18