[Libreoffice-commits] core.git: 4 commits - oox/source writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue Aug 5 08:32:54 PDT 2014
oox/source/token/tokens.txt | 58 ++++++++-------
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 7 -
writerfilter/source/ooxml/fasttokens.py | 8 +-
writerfilter/source/ooxml/model.xml | 53 ++++++++++++-
4 files changed, 88 insertions(+), 38 deletions(-)
New commits:
commit 4140b9b2a35ef08183b8d2fe4657bdc46fcf7237
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Aug 5 17:24:36 2014 +0200
writerfilter: tokenize all attributes of CT_Cnf
Change-Id: I745dd2aa257899e398f1ae3a79e321156cba7505
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 4cecd37..904128b 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -435,13 +435,6 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
}
}
break;
- case NS_ooxml::LN_CT_TrPrBase_cnfStyle:
- break; // the cnfStyle doesn't matter, instead the tblLook property is used to specify conditional styles that are to be used
- case NS_ooxml::LN_CT_PPrBase_cnfStyle:
- // TODO cnfStyle on a paragraph
- break;
- case NS_ooxml::LN_CT_TcPrBase_cnfStyle:
- break; // the cnfStyle doesn't matter, instead the tblLook property is used to specify conditional styles that are to be used
case NS_ooxml::LN_CT_TblPrBase_tblpPr:
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 0a574d3..0a1c9b3 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -18035,6 +18035,42 @@
<attribute name="val">
<ref name="ST_Cnf"/>
</attribute>
+ <attribute name="firstRow">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="lastRow">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="firstColumn">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="lastColumn">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="oddVBand">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="evenVBand">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="oddHBand">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="evenHBand">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="firstRowFirstColumn">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="firstRowLastColumn">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="lastRowFirstColumn">
+ <ref name="ST_OnOff"/>
+ </attribute>
+ <attribute name="lastRowLastColumn">
+ <ref name="ST_OnOff"/>
+ </attribute>
</define>
<define name="CT_TrPrBase">
<oneOrMore>
@@ -23089,9 +23125,20 @@
<action name="end" action="endParagraphGroup"/>
</resource>
<resource name="ST_Cnf" resource="String" generated="yes"/>
- <resource name="CT_Cnf" resource="Value" generated="yes">
- <attribute name="val" tokenid="ooxml:CT_Cnf_val" action="setValue"/>
- <action name="start" action="setDefaultStringValue"/>
+ <resource name="CT_Cnf" resource="Properties">
+ <attribute name="val" tokenid="ooxml:CT_Cnf_val"/>
+ <attribute name="firstRow" tokenid="ooxml:CT_Cnf_firstRow"/>
+ <attribute name="lastRow" tokenid="ooxml:CT_Cnf_lastRow"/>
+ <attribute name="firstColumn" tokenid="ooxml:CT_Cnf_firstColumn"/>
+ <attribute name="lastColumn" tokenid="ooxml:CT_Cnf_lastColumn"/>
+ <attribute name="oddVBand" tokenid="ooxml:CT_Cnf_oddVBand"/>
+ <attribute name="evenVBand" tokenid="ooxml:CT_Cnf_evenVBand"/>
+ <attribute name="oddHBand" tokenid="ooxml:CT_Cnf_oddHBand"/>
+ <attribute name="evenHBand" tokenid="ooxml:CT_Cnf_evenHBand"/>
+ <attribute name="firstRowFirstColumn" tokenid="ooxml:CT_Cnf_firstRowFirstColumn"/>
+ <attribute name="firstRowLastColumn" tokenid="ooxml:CT_Cnf_firstRowLastColumn"/>
+ <attribute name="lastRowFirstColumn" tokenid="ooxml:CT_Cnf_lastRowFirstColumn"/>
+ <attribute name="lastRowLastColumn" tokenid="ooxml:CT_Cnf_lastRowLastColumn"/>
</resource>
<resource name="CT_TrPrBase" resource="Properties">
<element name="cnfStyle" tokenid="ooxml:CT_TrPrBase_cnfStyle"/>
commit d1c1248bee686aebff12b0afd7c4d578607f3b3c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Aug 5 17:09:59 2014 +0200
oox: tokenize all attributes from CT_Cnf
Change-Id: Ifceb9c1319208c897a6f018fa0b5f8863b58c3e1
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 59ed938..ae7d2de 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -2120,8 +2120,10 @@ evalOrder
even
evenAndOddHeaders
evenFooter
+evenHBand
evenHeader
evenPage
+evenVBand
everyone
evt
evtFilter
@@ -2236,6 +2238,8 @@ firstLineOnly
firstPage
firstPageNumber
firstRow
+firstRowFirstColumn
+firstRowLastColumn
firstRowStripe
firstRowSubheading
firstSheet
@@ -2956,6 +2960,8 @@ lastPrinted
lastQuarter
lastRenderedPageBreak
lastRow
+lastRowFirstColumn
+lastRowLastColumn
lastTotalCell
lastValue
lastView
@@ -3651,8 +3657,10 @@ ocxPr
odbc
odcFile
oddFooter
+oddHBand
oddHeader
oddPage
+oddVBand
odso
odxf
ofPieChart
commit 19ef6b3e39b3a3e0b0c6883d3e8ed2f322c27d1d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Aug 5 17:08:08 2014 +0200
oox: sort tokens.txt
The benefit is that then it's possible to just add new tokens at the end
of the file, have your editor put them to their sorted place and have no
additional noise in the commit diff.
Change-Id: I221b8b10ae588180dd61207a6c9279fe8af7531f
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 45e90d4..59ed938 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -15,8 +15,6 @@
3TrafficLights2
3cd4
3cd8
-5cd8
-7cd8
3dDkShadow
3dLight
4Arrows
@@ -30,6 +28,8 @@
5ArrowsGray
5Quarters
5Rating
+5cd8
+7cd8
A1
A3
A4
@@ -414,8 +414,8 @@ YZ
Year
YearAccessed
ZX
-a14
a
+a14
aa
above
aboveAverage
@@ -642,9 +642,12 @@ array
arrow
arrowok
artDeco
+artisticBackgroundRemoval
artisticBlur
+artisticBrightnessContrast
artisticCement
artisticChalkSketch
+artisticColorTemperature
artisticCrisscrossEtching
artisticCutout
artisticFilmGrain
@@ -655,20 +658,17 @@ artisticLightScreen
artisticLineDrawing
artisticMarker
artisticMosiaicBubbles
-artisticPaintStrokes
artisticPaintBrush
+artisticPaintStrokes
artisticPastelsSmooth
artisticPencilGrayscale
artisticPencilSketch
artisticPhotocopy
artisticPlasticWrap
-artisticTexturizer
-artisticWatercolorSponge
-artisticBackgroundRemoval
-artisticBrightnessContrast
-artisticColorTemperature
artisticSaturation
artisticSharpenSoften
+artisticTexturizer
+artisticWatercolorSponge
asDisplayed
ascending
ascendingAlpha
@@ -1171,15 +1171,15 @@ chartStar
chartX
chartreuse
chartsheet
-checkbox
checkBox
checkCompatibility
-checkedState
checkErrors
checkStyle
+checkbox
checked
checkedBarBlack
checkedBarColor
+checkedState
checker
checkered
chevron
@@ -1577,9 +1577,6 @@ cyan
cycle
cylinder
d
-dc
-dcmitype
-dcterms
dLbl
dLblPos
dLbls
@@ -1673,6 +1670,9 @@ dbColumn
dbPr
dbl
dblStrike
+dc
+dcmitype
+dcterms
ddList
ddeItem
ddeItems
@@ -2926,7 +2926,6 @@ ky
l
lB
lBounds
-lc
lCtrCh
lCtrDes
lIns
@@ -2980,6 +2979,7 @@ layoutTableRowsApart
layoutTarget
lblAlgn
lblOffset
+lc
ld
le
leader
@@ -3113,11 +3113,11 @@ lines
linesAndChars
linestyle
link
-linkedTxbx
linkStyles
linkTarget
linkToQuery
linkedToFile
+linkedTxbx
list
listDataValidation
listEntry
@@ -3471,9 +3471,9 @@ nc
nd
ndxf
neCell
-negativeInteger
-negativeFillColor
negativeBarColorSameAsPositive
+negativeFillColor
+negativeInteger
neq
never
new
@@ -5054,15 +5054,15 @@ tabRatio
tabSelected
table
tableBorderDxfId
+tableCellDelete
+tableCellInsert
tableColumn
tableColumnId
tableColumns
tablePart
tableParts
-tableRowInsert
tableRowDelete
-tableCellInsert
-tableCellDelete
+tableRowInsert
tableStyle
tableStyleElement
tableStyleId
@@ -5721,8 +5721,11 @@ workbookViewId
worksheet
worksheetSource
wp
+wp14
wpJustification
wpSpaceWidth
+wpg
+wps
wrap
wrapIndent
wrapNone
@@ -5736,11 +5739,8 @@ wrapTopAndBottom
wrapTrailSpaces
wrapcoords
writeProtection
-wp14
-wpg
-wps
-wsp
wsDr
+wsp
x
x14
xAlign
commit 487eeedee89d90622e3bd8c7ec9c8c346f6fd02a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Aug 5 15:45:47 2014 +0200
writerfilter: fix OOXML_FAST_TOKENS_END generation
Change-Id: I2e257b9e2a989a7049f1d58074fbf47313699c7f
diff --git a/writerfilter/source/ooxml/fasttokens.py b/writerfilter/source/ooxml/fasttokens.py
index 1aa5559..2f662d2 100644
--- a/writerfilter/source/ooxml/fasttokens.py
+++ b/writerfilter/source/ooxml/fasttokens.py
@@ -34,6 +34,10 @@ class ContentHandler(xml.sax.handler.ContentHandler):
if self.inFasttoken:
self.chars.append(characters)
+ def endDocument(self):
+ print("const Token_t OOXML_FAST_TOKENS_END = %s;" % self.counter)
+
+
print("""
/*
@@ -62,9 +66,7 @@ parser = xml.sax.make_parser()
parser.setContentHandler(ContentHandler())
parser.parse(sys.argv[1])
-print("""const Token_t OOXML_FAST_TOKENS_END =5805;
-
-namespace writerfilter {
+print("""namespace writerfilter {
namespace ooxml {
#ifdef DEBUG_DOMAINMAPPER
More information about the Libreoffice-commits
mailing list