[Libreoffice-commits] core.git: 2 commits - oox/source unoxml/source writerfilter/source
Tor Lillqvist
tml at collabora.com
Tue Jan 24 14:59:08 UTC 2017
oox/source/drawingml/fillproperties.cxx | 26 +++++++++++++-------------
oox/source/token/tokens.txt | 10 +++++-----
unoxml/source/dom/node.cxx | 4 +++-
writerfilter/source/ooxml/model.xml | 8 ++++----
4 files changed, 25 insertions(+), 23 deletions(-)
New commits:
commit dda1c7b6fabbda4cf40c21b5fb8cb30f7c1f0743
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Jan 24 15:52:28 2017 +0200
Drop incorrect "artistic" prefix from some token names
Apparently copy/paste mistakes in the
642a252cf1a2f1d08c4bbfcae15527bb82c7664d and
21d4cfe19e2796ebf89c408e292c4473924b2bc4 commits from 2014; most of
the picture effect type tokens added in that commit do have names that
start with "artistic" but not all.
Does not break any unit test. (Does not fix the bug I am investigating
either, though.)
Change-Id: I2c3bb7243e1feaa3fa949b58d3acf34825d6987b
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index ed8dbfc..fa2fa5a 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -843,10 +843,10 @@ OUString ArtisticEffectProperties::getEffectString( sal_Int32 nToken )
case OOX_TOKEN( a14, artisticPlasticWrap ): return OUString( "artisticPlasticWrap" );
case OOX_TOKEN( a14, artisticTexturizer ): return OUString( "artisticTexturizer" );
case OOX_TOKEN( a14, artisticWatercolorSponge ): return OUString( "artisticWatercolorSponge" );
- case OOX_TOKEN( a14, artisticBrightnessContrast ): return OUString( "artisticBrightnessContrast" );
- case OOX_TOKEN( a14, artisticColorTemperature ): return OUString( "artisticColorTemperature" );
- case OOX_TOKEN( a14, artisticSaturation ): return OUString( "artisticSaturation" );
- case OOX_TOKEN( a14, artisticSharpenSoften ): return OUString( "artisticSharpenSoften" );
+ case OOX_TOKEN( a14, brightnessContrast ): return OUString( "brightnessContrast" );
+ case OOX_TOKEN( a14, colorTemperature ): return OUString( "colorTemperature" );
+ case OOX_TOKEN( a14, saturation ): return OUString( "saturation" );
+ case OOX_TOKEN( a14, sharpenSoften ): return OUString( "sharpenSoften" );
// attributes
case XML_visible: return OUString( "visible" );
@@ -869,7 +869,7 @@ OUString ArtisticEffectProperties::getEffectString( sal_Int32 nToken )
case XML_sat: return OUString( "sat" );
case XML_amount: return OUString( "amount" );
}
- SAL_WARN( "oox.drawingml", "ArtisticEffectProperties::getEffectString - unexpected token" );
+ SAL_WARN( "oox.drawingml", "ArtisticEffectProperties::getEffectString: unexpected token " << nToken );
return OUString();
}
@@ -920,14 +920,14 @@ sal_Int32 ArtisticEffectProperties::getEffectToken( const OUString& sName )
return XML_artisticTexturizer;
else if( sName == "artisticWatercolorSponge" )
return XML_artisticWatercolorSponge;
- else if( sName == "artisticBrightnessContrast" )
- return XML_artisticBrightnessContrast;
- else if( sName == "artisticColorTemperature" )
- return XML_artisticColorTemperature;
- else if( sName == "artisticSaturation" )
- return XML_artisticSaturation;
- else if( sName == "artisticSharpenSoften" )
- return XML_artisticSharpenSoften;
+ else if( sName == "brightnessContrast" )
+ return XML_brightnessContrast;
+ else if( sName == "colorTemperature" )
+ return XML_colorTemperature;
+ else if( sName == "saturation" )
+ return XML_saturation;
+ else if( sName == "sharpenSoften" )
+ return XML_sharpenSoften;
// attributes
else if( sName == "visible" )
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 6d4fcb8..00577f8 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -647,12 +647,9 @@ array
arrow
arrowok
artDeco
-artisticBackgroundRemoval
artisticBlur
-artisticBrightnessContrast
artisticCement
artisticChalkSketch
-artisticColorTemperature
artisticCrisscrossEtching
artisticCutout
artisticFilmGrain
@@ -670,8 +667,6 @@ artisticPencilGrayscale
artisticPencilSketch
artisticPhotocopy
artisticPlasticWrap
-artisticSaturation
-artisticSharpenSoften
artisticTexturizer
artisticWatercolorSponge
asDisplayed
@@ -776,6 +771,7 @@ background1
background2
backgroundQuery
backgroundRefresh
+backgroundRemoval
backupFile
backward
backwardCompatible
@@ -975,6 +971,7 @@ breadthByNode
bright
brightRoom
brightness
+brightnessContrast
brk
brkBin
brkBinSub
@@ -1294,6 +1291,7 @@ colorFilter
colorId
colorScale
colorTemp
+colorTemperature
colormenu
colormode
colormru
@@ -4440,6 +4438,7 @@ sans-serif
sat
satMod
satOff
+saturation
saveData
saveExternalLinkValues
saveFormsData
@@ -4566,6 +4565,7 @@ shapetype
shared
sharedItems
sharksTeeth
+sharpenSoften
shd
shdw1
shdw10
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 24a020b..5312510 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -5641,16 +5641,16 @@
<element name="artisticWatercolorSponge">
<ref name="CT_PictureEffectWatercolorSponge"/>
</element>
- <element name="artisticBrightnessContrast">
+ <element name="brightnessContrast">
<ref name="CT_PictureEffectBrightnessContrast"/>
</element>
- <element name="artisticColorTemperature">
+ <element name="colorTemperature">
<ref name="CT_PictureEffectColorTemperature"/>
</element>
- <element name="artisticSaturation">
+ <element name="saturation">
<ref name="CT_PictureEffectSaturation"/>
</element>
- <element name="artisticSharpenSoften">
+ <element name="sharpenSoften">
<ref name="CT_PictureEffectSharpenSoften"/>
</element>
</choice>
commit c0ee5231c9d7a3186fe39e0955320b2bf14f0e50
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Jan 24 15:12:42 2017 +0200
Probably makes more sense to return DONTKNOW if the element is DONTKNOW ...
... and not the namespace token without any element token ORed in.
DONTKNOW is what the two callers look for.
Does not break any unit test. (Does not fix the bug I am investigating
either, though.)
Change-Id: Ibd75ee06797d7b62476d4bf2302338b2bb3266d4
diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx
index c863a0e..3617d1f 100644
--- a/unoxml/source/dom/node.cxx
+++ b/unoxml/source/dom/node.cxx
@@ -120,7 +120,9 @@ namespace DOM
{
nNamespaceToken = aIter->mnToken;
sal_Int32 nNameToken = getToken( rContext, pName );
- if( nNameToken != FastToken::DONTKNOW )
+ if( nNameToken == FastToken::DONTKNOW )
+ nNamespaceToken = FastToken::DONTKNOW;
+ else
nNamespaceToken |= nNameToken;
}
More information about the Libreoffice-commits
mailing list