office-gobmx/writerfilter/source/ooxml
Luboš Luňák a1f516893b remove duplicate definitions for w:sdt and w:sdtContent (bnc#705949)
The duplicates are merged somehow (and thus it doesn't work).
2011-07-27 17:42:08 +02:00
..
analyzemodel.xsl gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
analyzestage2.xsl
analyzestage3.xsl
attrsprm.xsl writerfilter08ooo330: applied patch for writerfilter08 2010-07-28 14:17:26 +02:00
checkmodel.xsl changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) 2010-02-12 15:01:35 +01:00
dummyannotate.xsl sw34bf04: #i114533# handle SDT 2011-03-03 14:51:57 +01:00
effort.xsl annotated model.xml with tags and used tags to calculate left efforts 2010-09-08 13:02:09 +02:00
efforts.sh
factory.xsl Remove RCS lines. 2011-01-31 18:59:03 +01:00
factory_ns.xsl gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
factory_values.xsl Remove RCS lines. 2011-01-31 18:59:03 +01:00
factoryimpl.xsl gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
factoryimpl_ns.xsl gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
factoryimpl_values.xsl Remove RCS lines. 2011-01-31 18:59:03 +01:00
factoryinc.xsl Remove RCS lines. 2011-01-31 18:59:03 +01:00
factorytools.xsl Remove obsolete RCS lines. 2011-01-21 20:52:35 +01:00
fasttokens.xsl gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
gperffasttokenhandler.xsl gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
Handler.cxx fix for fod#37367 ( docx import of hyperlinks ) 2011-05-19 17:25:12 +01:00
Handler.hxx add modelines to .hxx files as well 2010-10-28 15:49:40 +01:00
model.xml remove duplicate definitions for w:sdt and w:sdtContent (bnc#705949) 2011-07-27 17:42:08 +02:00
modelcleanup
modelcleanup.xsl sw34bf04: #i114533# handle SDT 2011-03-03 14:51:57 +01:00
modelpreprocess.xsl writerfilter07: merged DEV300_m75 2010-03-23 17:33:11 +01:00
namespaceids.xsl dr77: optimizations in generation of XML tokens, XML namespaces, property names; code cleanup 2010-11-08 13:47:01 +01:00
nostatus.xsl
OOXMLBinaryObjectReference.cxx Add vim/emacs modelines to all source files 2010-10-13 10:57:42 +02:00
OOXMLBinaryObjectReference.hxx add modelines to .hxx files as well 2010-10-28 15:49:40 +01:00
OOXMLDocumentImpl.cxx gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
OOXMLDocumentImpl.hxx fdo#34489: fix the docx import of comments, properly resolve all ids 2011-03-31 12:43:07 +02:00
OOXMLFactory.cxx gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
OOXMLFactory.hxx gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
OOXMLFastContextHandler.cxx gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
OOXMLFastContextHandler.hxx gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
OOXMLFastDocumentHandler.cxx gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
OOXMLFastDocumentHandler.hxx gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
OOXMLFastHelper.hxx Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 2011-03-09 22:49:23 -06:00
OOXMLFastTokenHandler.cxx gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
OOXMLFastTokenHandler.hxx add modelines to .hxx files as well 2010-10-28 15:49:40 +01:00
ooxmlLoggers.hxx Coherent use of debug level for writerfilter diagnostics 2010-11-23 21:26:02 +01:00
OOXMLParserState.cxx Some cppcheck cleaning 2011-06-12 22:39:06 +02:00
OOXMLParserState.hxx fdo#34489: fix the docx import of comments, properly resolve all ids 2011-03-31 12:43:07 +02:00
OOXMLPropertySet.hxx add modelines to .hxx files as well 2010-10-28 15:49:40 +01:00
OOXMLPropertySetImpl.cxx Some cppcheck cleaning 2011-06-12 22:39:06 +02:00
OOXMLPropertySetImpl.hxx add modelines to .hxx files as well 2010-10-28 15:49:40 +01:00
OOXMLStreamImpl.cxx gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
OOXMLStreamImpl.hxx add modelines to .hxx files as well 2010-10-28 15:49:40 +01:00
qnametostr.xsl writerfilter07: merged DEV300_m75 2010-03-23 17:33:11 +01:00
README.efforts
RefAndPointer.hxx gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
resourceids.xsl writerfilter07: merged DEV300_m75 2010-03-23 17:33:11 +01:00
rngtocxx use $(GPERF) instead of hardcoded gperf (fdo#32195) 2010-12-14 11:08:11 +01:00
status.sh gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
todo.xsl gnumake4: switching gbuildization 2011-06-20 20:38:45 +02:00
tokenxmlfooter
tokenxmlheader

This file describes how the remaining efforts for writerfilter can be
extracted from the source code.

1. Marking up the efforts in the code.

Efforts are marked up in the code with comments like this:

/* WRITERFILTERSTATUS: done: <percent done>, planned: <effort planned>, spent: <effort spent, yet> */

The comments have to follow a case-label immediately. Consecutive
case-labels can be marked up, too. In the latter case the efforts are
counted for the preceeding case-labels as a whole.

2. Extraction process

2.1. Stage 1:

This stage is handled in status.sh. An XML-file is generated that
contains a top level element <stage1>. <stage1> contains an element
<analyze> and several <qname> and <status> elements.

2.1.1.  Use analyzemodel.xsl to extract necessary data from model.xml.

- Namespaces can be flagged with attribute @todo="ignore" to prevent
  the namespace being considered.

- For every <element>/<attribute> an entry in an according element in <analyze> is genereated. These elements look like this:

<attribute id="..." resource="..." tokenid="..." qname="..." namespace="..." define="..." name="..."/>

Important for the extraction of efforts: @qname is the identifier used
in case-labels in .cxx files and thus links the status mark up
comments with elements/attributes in the model.xml.

2.1.2. Extract status information

The variable SEARCHIN in status.sh determines in what directory the script will search for case labels and status comments. Only .cxx files are searched. Lines like this

case NS_rtf::LN_UNUSED4:

result in elements like this

<qname file="/DomainMapper.cxx" line="216" qname="NS_rtf::LN_UNUSED4"/>.

Lines like this

/* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */

result in elements like this

<status done="0" planned="0" spent="0"/>

The <qname> and <status> elements are children of the <stage1>
element. The are inserted in the same order as found in the
code. Therefore a <status> element corresponds to the group of
consecutive preceding <qname> elements.

2.2. Stage 2

In this stage analyzestage2.xsl is used on the result of stage 1 to
group the <qname> and <status> elements from stage 1. For each
<status> element a <qnames> element is generated that contains the
<qname> elements that the <status> element refers to, plus the
<status> element.

2.3. Stage 3

This stage associates the <attribute> and <element> elements in
model.xml with the extracted data. It uses analyzestage3.xsl on the
result of stage 2 to do this.

E.g. for given elements from stage 2:

<attribute 
	   id="dml-wordprocessingDrawing:CT_Inline:distR" 
	   resource="Properties"  
	   tokenid="ooxml:CT_Inline_distR" 
	   qname="NS_ooxml::LN_CT_Inline_distR" 
	   namespace="dml-wordprocessingDrawing" 
	   define="CT_Inline" 
	   name="distR"/>

and 

   <qnames>
    <qname file="/GraphicImport.cxx" line="1078" qname="NS_ooxml::LN_CT_Inline_distT"/>
    <qname file="/GraphicImport.cxx" line="1079" qname="NS_ooxml::LN_CT_Inline_distB"/>
    <qname file="/GraphicImport.cxx" line="1080" qname="NS_ooxml::LN_CT_Inline_distL"/>
    <qname file="/GraphicImport.cxx" line="1081" qname="NS_ooxml::LN_CT_Inline_distR"/>
    <status done="0" planned="0.5" spent="0"/>
  </qnames>

the result of stage 3 will be

  <attribute 
  	     id="dml-wordprocessingDrawing:CT_Inline:distR" 
	     resource="Properties" 
	     tokenid="ooxml:CT_Inline_distR" 
	     qname="NS_ooxml::LN_CT_Inline_distR" 
	     namespace="dml-wordprocessingDrawing" 
	     define="CT_Inline" name="distR">

	     <file name="/GraphicImport.cxx" line="1081">
      	     	   <status done="0" planned="0.5" spent="0" qname-count="4"/>
    	     </file>

  </attribute>

@qname-count is the number of case-labels that the according mark-up comment refers to.

3. Collect efforts

This is done by the script efforts.sh. It uses status.sh to extract the status and determines the efforts in two steps.

3.1. Choose which <attribute>/<element> elements need effort

This stage uses todo.xsl on the result of 2.3.

There are two criteria that imply effort:

- The <attribute>/<element> is not handled in any file.

- The status for the <attribute>/<element> declares that work is
  planned for it and less than 100 percent of this work is done.

3.2. Generate table of efforts in CSV format

This stage uses effort.xsl on the results of 3.1. and produces the
table of efforts. If there is no status defined for an
<attribute>/<element> it is assumed that the planned effort is 0.5
hours and no work has been done.