1. 10 Aug, 2013 6 commits
  2. 09 Aug, 2013 3 commits
  3. 08 Aug, 2013 2 commits
  4. 07 Aug, 2013 7 commits
  5. 06 Aug, 2013 2 commits
  6. 05 Aug, 2013 11 commits
  7. 04 Aug, 2013 4 commits
    • Friedrich W. H. Kossebau's avatar
      Add own product for rng2cpp · 24f4f22f
      Friedrich W. H. Kossebau authored
    • Jos van den Oever's avatar
    • Jos van den Oever's avatar
      Add api for writing ODF that is generated from the ODF RNG file. · db70d8b5
      Jos van den Oever authored
      Two years ago I wrote an initial version of this patch and a detailed discussion on the mailing list [1] followed. The main objections to the patch have been dealt with (see below).
      Most of this new version was written at Akademy in Bilbao.
      Very short summary of the patch:
       This patch should help everybody, young and old, with coding C++ for writing ODF and make errors easier to catch.
       The OpenDocument Format specification is published with a Relax NG file that specifies the XML format. This file can be used to check if ODF files are valid. It can also be used to generate a C++ API headers. This is what this patch does.
       Instead of writing:
        xmlWriter->addAttribute("text:style-name", "italic");
        xmlWriter->addAttribute("text:style-name", "bold");
        xmlWriter->addTextNode("Hello World!");
      you can write:
        text_p p(xmlWriter);
        text_span span(p.add_text_span());
        span.addTextNode("Hello World!");
      Some advantages:
       - autocompletion when coding: faster coding
       - tag and attribute names are not strings but class and function names: less errors
       - nesting is checked by the compiler
       - you write to elements (span, p), not xmlwriter: easier to read
       - required attributes are part of the element constructor
      Implementation considerations:
       - Calligra is large, so the generated code mixes well with the use of KoXmlWriter and porting can be done in small steps.
       - class and function names are similar to the xml tags with ':' and '-' replaced by '_'.
       - stack based: no heap allocations
       - only header files: all code will inline and have low impact on runtime
       - modular: one header file per namespace to reduce compile overhead
       - code generator is Qt code, part of Calligra and runs as a build step
      Not in this patch (and places where you can help in the future):
       - generate enumerations based on Relax NG
       - check data type for attributes (you can still write "hello" to an integer attribute)
       - complete port of Calligra to the generated code
       - improved speed by using static QString instead of const char*
      Provided solutions to previously raised issues:
       - modular headers to reduce compile overhead
       - function "end()" to optionally close an element before it goes out of scope
       - use structure of Relax NG file to reduce header sizes by inheritance from common groups
       - provide most KoXmlWriter functionality safely through the element instances
       - closing elements is now automatic at a slight runtime overhead
    • Friedrich W. H. Kossebau's avatar
  8. 03 Aug, 2013 5 commits