summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-20 20:11:13 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-03 15:00:45 +0000
commit727938b395693be2bf0956fff687193cff95f028 (patch)
tree09862b3df760b2580451b2956891282a28ff4ef5 /oox
parent7c5afbf494873ea2729e3db3f8bef5d960d1ca75 (diff)
oox, writerfilter: Support for artistic effects on pictures
Bitmaps can define artistic effects like in the following example: <a:blip r:embed="rId5"> <a:extLst> <a:ext uri="{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}"> <a14:imgProps xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main"> <a14:imgLayer r:embed="rId6"> <a14:imgEffect> <a14:artisticMarker trans="14000" size="80" /> </a14:imgEffect> </a14:imgLayer> </a14:imgProps> </a:ext> </a:extLst> </a:blip> They are defined in the MS-ODRAWXML extension. Ref: http://msdn.microsoft.com/en-us/library/dd905216(v=office.12).aspx LO core doesn't support them, but I'm preserving them using the shape grab bag. Bitmaps must not be transformed to a SwXTextGraphicObject so the grab bag of the XShape is not discarded. Added several Context and Properties objects on the import side to traverse and save the relevant tags, and added the corresponding code on the export side to extract the grab bag and output the effect back. When Word applies an artistic effect, it creates two embedded files; one contains the bitmap with the effect and the other one contains the original bitmap to be able to undo the effect. We also read the original bitmap, store it in the shape grab bag and save it back to the docx file. When two pictures apply different effects to the same picture, it is only saved once in the original document. Added a cache to DrawingML to know if the picture has already been exported. Finally, added unit tests for a selection of artistic effects. [Squashing commits from master: 21d4cfe19e2796ebf89c408e292c4473924b2bc4 642a252cf1a2f1d08c4bbfcae15527bb82c7664d 2e68a1468c035fc3bb4d02ad0b3187872fe1e67b b5f6a5cfc517ecd8aa6ba96471d854b07b92ebaa 38d7b82c277599f2e613256c4353aa7dfdc219ec] Change-Id: I39327a8118e23829c029122154a31ce3af5b48cd Reviewed-on: https://gerrit.libreoffice.org/9495 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/fillproperties.cxx205
-rw-r--r--oox/source/drawingml/fillpropertiesgroupcontext.cxx82
-rw-r--r--oox/source/drawingml/shape.cxx5
-rw-r--r--oox/source/export/drawingml.cxx100
-rw-r--r--oox/source/token/namespaces-strict.txt1
-rw-r--r--oox/source/token/namespaces.txt1
-rw-r--r--oox/source/token/tokens.txt43
7 files changed, 437 insertions, 0 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 6ae078a46465..96770425b047 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -205,6 +205,7 @@ void BlipFillProperties::assignUsed( const BlipFillProperties& rSourceProps )
maColorChangeTo.assignIfUsed( rSourceProps.maColorChangeTo );
maDuotoneColors[0].assignIfUsed( rSourceProps.maDuotoneColors[0] );
maDuotoneColors[1].assignIfUsed( rSourceProps.maDuotoneColors[1] );
+ maEffect.assignUsed( rSourceProps.maEffect );
}
@@ -596,6 +597,210 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
rPropMap.setProperty(PROP_MediaURL, maAudio.msEmbed);
}
+bool ArtisticEffectProperties::isEmpty() const
+{
+ return msName.isEmpty();
+}
+
+css::beans::PropertyValue ArtisticEffectProperties::getEffect()
+{
+ css::beans::PropertyValue pRet;
+ if( msName.isEmpty() )
+ return pRet;
+
+ css::uno::Sequence< css::beans::PropertyValue > aSeq( maAttribs.size() + 1 );
+ sal_uInt32 i = 0;
+ for( std::map< OUString, css::uno::Any >::iterator it = maAttribs.begin(); it != maAttribs.end(); ++it )
+ {
+ aSeq[i].Name = it->first;
+ aSeq[i].Value = it->second;
+ i++;
+ }
+
+ if( mrOleObjectInfo.maEmbeddedData.hasElements() )
+ {
+ css::uno::Sequence< css::beans::PropertyValue > aGraphicSeq( 2 );
+ aGraphicSeq[0].Name = "Id";
+ aGraphicSeq[0].Value = uno::makeAny( mrOleObjectInfo.maProgId );
+ aGraphicSeq[1].Name = "Data";
+ aGraphicSeq[1].Value = uno::makeAny( mrOleObjectInfo.maEmbeddedData );
+
+ aSeq[i].Name = "OriginalGraphic";
+ aSeq[i].Value = uno::makeAny( aGraphicSeq );
+ }
+
+ pRet.Name = msName;
+ pRet.Value = css::uno::Any( aSeq );
+
+ return pRet;
+}
+
+void ArtisticEffectProperties::assignUsed( const ArtisticEffectProperties& rSourceProps )
+{
+ if( !rSourceProps.isEmpty() )
+ {
+ msName = rSourceProps.msName;
+ maAttribs = rSourceProps.maAttribs;
+ }
+}
+
+OUString ArtisticEffectProperties::getEffectString( sal_Int32 nToken )
+{
+ switch( nToken )
+ {
+ // effects
+ case OOX_TOKEN( a14, artisticBlur ): return OUString( "artisticBlur" );
+ case OOX_TOKEN( a14, artisticCement ): return OUString( "artisticCement" );
+ case OOX_TOKEN( a14, artisticChalkSketch ): return OUString( "artisticChalkSketch" );
+ case OOX_TOKEN( a14, artisticCrisscrossEtching ): return OUString( "artisticCrisscrossEtching" );
+ case OOX_TOKEN( a14, artisticCutout ): return OUString( "artisticCutout" );
+ case OOX_TOKEN( a14, artisticFilmGrain ): return OUString( "artisticFilmGrain" );
+ case OOX_TOKEN( a14, artisticGlass ): return OUString( "artisticGlass" );
+ case OOX_TOKEN( a14, artisticGlowDiffused ): return OUString( "artisticGlowDiffused" );
+ case OOX_TOKEN( a14, artisticGlowEdges ): return OUString( "artisticGlowEdges" );
+ case OOX_TOKEN( a14, artisticLightScreen ): return OUString( "artisticLightScreen" );
+ case OOX_TOKEN( a14, artisticLineDrawing ): return OUString( "artisticLineDrawing" );
+ case OOX_TOKEN( a14, artisticMarker ): return OUString( "artisticMarker" );
+ case OOX_TOKEN( a14, artisticMosiaicBubbles ): return OUString( "artisticMosiaicBubbles" );
+ case OOX_TOKEN( a14, artisticPaintStrokes ): return OUString( "artisticPaintStrokes" );
+ case OOX_TOKEN( a14, artisticPaintBrush ): return OUString( "artisticPaintBrush" );
+ case OOX_TOKEN( a14, artisticPastelsSmooth ): return OUString( "artisticPastelsSmooth" );
+ case OOX_TOKEN( a14, artisticPencilGrayscale ): return OUString( "artisticPencilGrayscale" );
+ case OOX_TOKEN( a14, artisticPencilSketch ): return OUString( "artisticPencilSketch" );
+ case OOX_TOKEN( a14, artisticPhotocopy ): return OUString( "artisticPhotocopy" );
+ 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" );
+
+ // attributes
+ case XML_visible: return OUString( "visible" );
+ case XML_trans: return OUString( "trans" );
+ case XML_crackSpacing: return OUString( "crackSpacing" );
+ case XML_pressure: return OUString( "pressure" );
+ case XML_numberOfShades: return OUString( "numberOfShades" );
+ case XML_grainSize: return OUString( "grainSize" );
+ case XML_intensity: return OUString( "intensity" );
+ case XML_smoothness: return OUString( "smoothness" );
+ case XML_gridSize: return OUString( "gridSize" );
+ case XML_pencilSize: return OUString( "pencilSize" );
+ case XML_size: return OUString( "size" );
+ case XML_brushSize: return OUString( "brushSize" );
+ case XML_scaling: return OUString( "scaling" );
+ case XML_detail: return OUString( "detail" );
+ case XML_bright: return OUString( "bright" );
+ case XML_contrast: return OUString( "contrast" );
+ case XML_colorTemp: return OUString( "colorTemp" );
+ case XML_sat: return OUString( "sat" );
+ case XML_amount: return OUString( "amount" );
+ }
+ SAL_WARN( "oox.drawingml", "ArtisticEffectProperties::getEffectString - unexpected token" );
+ return OUString();
+}
+
+sal_Int32 ArtisticEffectProperties::getEffectToken( OUString sName )
+{
+ // effects
+ if( sName == "artisticBlur" )
+ return XML_artisticBlur;
+ else if( sName == "artisticCement" )
+ return XML_artisticCement;
+ else if( sName == "artisticChalkSketch" )
+ return XML_artisticChalkSketch;
+ else if( sName == "artisticCrisscrossEtching" )
+ return XML_artisticCrisscrossEtching;
+ else if( sName == "artisticCutout" )
+ return XML_artisticCutout;
+ else if( sName == "artisticFilmGrain" )
+ return XML_artisticFilmGrain;
+ else if( sName == "artisticGlass" )
+ return XML_artisticGlass;
+ else if( sName == "artisticGlowDiffused" )
+ return XML_artisticGlowDiffused;
+ else if( sName == "artisticGlowEdges" )
+ return XML_artisticGlowEdges;
+ else if( sName == "artisticLightScreen" )
+ return XML_artisticLightScreen;
+ else if( sName == "artisticLineDrawing" )
+ return XML_artisticLineDrawing;
+ else if( sName == "artisticMarker" )
+ return XML_artisticMarker;
+ else if( sName == "artisticMosiaicBubbles" )
+ return XML_artisticMosiaicBubbles;
+ else if( sName == "artisticPaintStrokes" )
+ return XML_artisticPaintStrokes;
+ else if( sName == "artisticPaintBrush" )
+ return XML_artisticPaintBrush;
+ else if( sName == "artisticPastelsSmooth" )
+ return XML_artisticPastelsSmooth;
+ else if( sName == "artisticPencilGrayscale" )
+ return XML_artisticPencilGrayscale;
+ else if( sName == "artisticPencilSketch" )
+ return XML_artisticPencilSketch;
+ else if( sName == "artisticPhotocopy" )
+ return XML_artisticPhotocopy;
+ else if( sName == "artisticPlasticWrap" )
+ return XML_artisticPlasticWrap;
+ else if( sName == "artisticTexturizer" )
+ 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;
+
+ // attributes
+ else if( sName == "visible" )
+ return XML_visible;
+ else if( sName == "trans" )
+ return XML_trans;
+ else if( sName == "crackSpacing" )
+ return XML_crackSpacing;
+ else if( sName == "pressure" )
+ return XML_pressure;
+ else if( sName == "numberOfShades" )
+ return XML_numberOfShades;
+ else if( sName == "grainSize" )
+ return XML_grainSize;
+ else if( sName == "intensity" )
+ return XML_intensity;
+ else if( sName == "smoothness" )
+ return XML_smoothness;
+ else if( sName == "gridSize" )
+ return XML_gridSize;
+ else if( sName == "pencilSize" )
+ return XML_pencilSize;
+ else if( sName == "size" )
+ return XML_size;
+ else if( sName == "brushSize" )
+ return XML_brushSize;
+ else if( sName == "scaling" )
+ return XML_scaling;
+ else if( sName == "detail" )
+ return XML_detail;
+ else if( sName == "bright" )
+ return XML_bright;
+ else if( sName == "contrast" )
+ return XML_contrast;
+ else if( sName == "colorTemp" )
+ return XML_colorTemp;
+ else if( sName == "sat" )
+ return XML_sat;
+ else if( sName == "amount" )
+ return XML_amount;
+
+ SAL_WARN( "oox.drawingml", "ArtisticEffectProperties::getEffectToken - unexpected token name" );
+ return XML_none;
+}
+
} // namespace drawingml
diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx b/oox/source/drawingml/fillpropertiesgroupcontext.cxx
index 89fdb26f7b74..e60f68947738 100644
--- a/oox/source/drawingml/fillpropertiesgroupcontext.cxx
+++ b/oox/source/drawingml/fillpropertiesgroupcontext.cxx
@@ -182,6 +182,9 @@ ContextHandlerRef BlipContext::onCreateContext(
case A_TOKEN( duotone ):
return new DuotoneContext( *this, rAttribs, mrBlipProps );
+ case A_TOKEN( extLst ):
+ return new BlipExtensionContext( *this, mrBlipProps );
+
case A_TOKEN( lum ):
mrBlipProps.moBrightness = rAttribs.getInteger( XML_bright );
mrBlipProps.moContrast = rAttribs.getInteger( XML_contrast );
@@ -292,6 +295,85 @@ SimpleFillPropertiesContext::~SimpleFillPropertiesContext()
mrColor = getBestSolidColor();
}
+BlipExtensionContext::BlipExtensionContext( ContextHandler2Helper& rParent, BlipFillProperties& rBlipProps ) :
+ ContextHandler2( rParent ),
+ mrBlipProps( rBlipProps )
+{
+}
+
+BlipExtensionContext::~BlipExtensionContext()
+{
+}
+
+ContextHandlerRef BlipExtensionContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( ext ):
+ return new BlipExtensionContext( *this, mrBlipProps );
+
+ case OOX_TOKEN( a14, imgProps ):
+ return new ArtisticEffectContext( *this, mrBlipProps.maEffect );
+ }
+ return 0;
+}
+
+ArtisticEffectContext::ArtisticEffectContext( ContextHandler2Helper& rParent, ArtisticEffectProperties& rEffect ) :
+ ContextHandler2( rParent ),
+ maEffect( rEffect )
+{
+}
+
+ArtisticEffectContext::~ArtisticEffectContext()
+{
+}
+
+ContextHandlerRef ArtisticEffectContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ // containers
+ if( nElement == OOX_TOKEN( a14, imgLayer ) )
+ {
+ if( rAttribs.hasAttribute( R_TOKEN( embed ) ) )
+ {
+ OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( embed ), OUString() ) );
+ if( !aFragmentPath.isEmpty() )
+ {
+ getFilter().importBinaryData( maEffect.mrOleObjectInfo.maEmbeddedData, aFragmentPath );
+ maEffect.mrOleObjectInfo.maProgId = aFragmentPath;
+ }
+ }
+ return new ArtisticEffectContext( *this, maEffect );
+ }
+ if( nElement == OOX_TOKEN( a14, imgEffect ) )
+ return new ArtisticEffectContext( *this, maEffect );
+
+ // effects
+ maEffect.msName = ArtisticEffectProperties::getEffectString( nElement );
+ if( maEffect.isEmpty() )
+ return 0;
+
+ // effect attributes
+ sal_Int32 aAttribs[19] = {
+ XML_visible, XML_trans, XML_crackSpacing, XML_pressure, XML_numberOfShades,
+ XML_grainSize, XML_intensity, XML_smoothness, XML_gridSize, XML_pencilSize,
+ XML_size, XML_brushSize, XML_scaling, XML_detail, XML_bright, XML_contrast,
+ XML_colorTemp, XML_sat, XML_amount
+ };
+ for( sal_Int32 i=0; i<19; ++i )
+ {
+ if( rAttribs.hasAttribute( aAttribs[i] ) )
+ {
+ OUString sName = ArtisticEffectProperties::getEffectString( aAttribs[i] );
+ if( !sName.isEmpty() )
+ maEffect.maAttribs[sName] = uno::makeAny( rAttribs.getInteger( aAttribs[i], 0 ) );
+ }
+ }
+
+ return 0;
+}
+
} // namespace drawingml
} // namespace oox
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index ca42d4a5d9f1..8c97b8781473 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -960,6 +960,11 @@ Reference< XShape > Shape::createAndInsert(
PUT_PROP( a3DEffectsGrabBag, 2, "Shape3D", Any( aShape3DEffects ) );
putPropertyToGrabBag( "3DEffectProperties", Any( a3DEffectsGrabBag ) );
}
+
+ // store bitmap artistic effects in the grab bag
+ if( !mpGraphicPropertiesPtr->maBlipProps.maEffect.isEmpty() )
+ putPropertyToGrabBag( "ArtisticEffectProperties",
+ Any( mpGraphicPropertiesPtr->maBlipProps.maEffect.getEffect() ) );
}
else if( mbLockedCanvas )
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 037466ad9eaf..05faa6d696bc 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -23,6 +23,7 @@
#include "oox/export/drawingml.hxx"
#include "oox/export/utils.hxx"
#include <oox/drawingml/color.hxx>
+#include <oox/drawingml/fillproperties.hxx>
#include <oox/token/tokens.hxx>
#include <oox/drawingml/drawingmltypes.hxx>
@@ -118,10 +119,14 @@ namespace drawingml {
// not thread safe
int DrawingML::mnImageCounter = 1;
+int DrawingML::mnWdpImageCounter = 1;
+std::map<OUString, OUString> DrawingML::maWdpCache;
void DrawingML::ResetCounters()
{
mnImageCounter = 1;
+ mnWdpImageCounter = 1;
+ maWdpCache.clear();
}
bool DrawingML::GetProperty( Reference< XPropertySet > rXPropSet, const OUString& aName )
@@ -836,6 +841,7 @@ OUString DrawingML::WriteBlip( Reference< XPropertySet > rXPropSet, const OUStri
XML_bright, nBright ? I32S( nBright*1000 ) : NULL,
XML_contrast, nContrast ? I32S( nContrast*1000 ) : NULL,
FSEND );
+ WriteArtisticEffect( rXPropSet );
mpFS->endElementNS( XML_a, XML_blip );
@@ -2565,6 +2571,100 @@ void DrawingML::WriteShape3DEffects( Reference< XPropertySet > xPropSet )
mpFS->endElementNS( XML_a, XML_sp3d );
}
+void DrawingML::WriteArtisticEffect( Reference< XPropertySet > rXPropSet )
+{
+ if( !GetProperty( rXPropSet, "InteropGrabBag" ) )
+ return;
+
+ PropertyValue aEffect;
+ Sequence< PropertyValue > aGrabBag;
+ mAny >>= aGrabBag;
+ for( sal_Int32 i=0; i < aGrabBag.getLength(); ++i )
+ {
+ if( aGrabBag[i].Name == "ArtisticEffectProperties" )
+ {
+ aGrabBag[i].Value >>= aEffect;
+ break;
+ }
+ }
+ sal_Int32 nEffectToken = ArtisticEffectProperties::getEffectToken( aEffect.Name );
+ if( nEffectToken == XML_none )
+ return;
+
+ Sequence< PropertyValue > aAttrs;
+ aEffect.Value >>= aAttrs;
+ sax_fastparser::FastAttributeList *aAttrList = mpFS->createAttrList();
+ OString sRelId;
+ for( sal_Int32 i=0; i < aAttrs.getLength(); ++i )
+ {
+ sal_Int32 nToken = ArtisticEffectProperties::getEffectToken( aAttrs[i].Name );
+ if( nToken != XML_none )
+ {
+ sal_Int32 nVal = 0;
+ aAttrs[i].Value >>= nVal;
+ aAttrList->add( nToken, OString::number( nVal ).getStr() );
+ }
+ else if( aAttrs[i].Name == "OriginalGraphic" )
+ {
+ Sequence< PropertyValue > aGraphic;
+ aAttrs[i].Value >>= aGraphic;
+ Sequence< sal_Int8 > aGraphicData;
+ OUString sGraphicId;
+ for( sal_Int32 j=0; j < aGraphic.getLength(); ++j )
+ {
+ if( aGraphic[j].Name == "Id" )
+ aGraphic[j].Value >>= sGraphicId;
+ else if( aGraphic[j].Name == "Data" )
+ aGraphic[j].Value >>= aGraphicData;
+ }
+ sRelId = WriteWdpPicture( sGraphicId, aGraphicData );
+ }
+ }
+
+ mpFS->startElementNS( XML_a, XML_extLst, FSEND );
+ mpFS->startElementNS( XML_a, XML_ext,
+ XML_uri, "{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}",
+ FSEND );
+ mpFS->startElementNS( XML_a14, XML_imgProps,
+ FSNS( XML_xmlns, XML_a14 ), "http://schemas.microsoft.com/office/drawing/2010/main",
+ FSEND );
+ mpFS->startElementNS( XML_a14, XML_imgLayer,
+ FSNS( XML_r, XML_embed), sRelId.getStr(),
+ FSEND );
+ mpFS->startElementNS( XML_a14, XML_imgEffect, FSEND );
+
+ sax_fastparser::XFastAttributeListRef xAttrList( aAttrList );
+ mpFS->singleElementNS( XML_a14, nEffectToken, xAttrList );
+
+ mpFS->endElementNS( XML_a14, XML_imgEffect );
+ mpFS->endElementNS( XML_a14, XML_imgLayer );
+ mpFS->endElementNS( XML_a14, XML_imgProps );
+ mpFS->endElementNS( XML_a, XML_ext );
+ mpFS->endElementNS( XML_a, XML_extLst );
+}
+
+OString DrawingML::WriteWdpPicture( const OUString& rFileId, const Sequence< sal_Int8 >& rPictureData )
+{
+ std::map<OUString, OUString>::iterator aCachedItem = maWdpCache.find( rFileId );
+ if( aCachedItem != maWdpCache.end() )
+ return OUStringToOString( aCachedItem->second, RTL_TEXTENCODING_UTF8 );
+
+ OUString sFileName = "media/hdphoto" + OUString::number( mnWdpImageCounter++ ) + ".wdp";
+ uno::Reference< io::XOutputStream > xOutStream =
+ mpFB->openFragmentStream( "word/" + sFileName,
+ "image/vnd.ms-photo" );
+ OUString sId;
+ xOutStream->writeBytes( rPictureData );
+ xOutStream->closeOutput();
+
+ sId = mpFB->addRelation( mpFS->getOutputStream(),
+ "http://schemas.microsoft.com/office/2007/relationships/hdphoto",
+ sFileName, false );
+
+ maWdpCache[rFileId] = sId;
+ return OUStringToOString( sId, RTL_TEXTENCODING_UTF8 );
+}
+
}
}
diff --git a/oox/source/token/namespaces-strict.txt b/oox/source/token/namespaces-strict.txt
index 9549483ec280..d49be5eed128 100644
--- a/oox/source/token/namespaces-strict.txt
+++ b/oox/source/token/namespaces-strict.txt
@@ -75,6 +75,7 @@ wps http://schemas.microsoft.com/office/word/2010/wordproces
wpg http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
wp14 http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
w14 http://schemas.microsoft.com/office/word/2010/wordml
+a14 http://schemas.microsoft.com/office/drawingml/2010/main
# extlst namespaces
diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt
index 6f0bee242736..63c0ce6af2f2 100644
--- a/oox/source/token/namespaces.txt
+++ b/oox/source/token/namespaces.txt
@@ -75,6 +75,7 @@ wps http://schemas.microsoft.com/office/word/2010/wordproces
wpg http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
wp14 http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
w14 http://schemas.microsoft.com/office/word/2010/wordml
+a14 http://schemas.microsoft.com/office/drawingml/2010/main
# extlst namespaces
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index bab7cf1dc859..1bdca90e2147 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -414,6 +414,7 @@ YZ
Year
YearAccessed
ZX
+a14
a
aa
above
@@ -560,6 +561,7 @@ always
alwaysMergeEmptyNamespace
alwaysShow
alwaysShowPlaceholderText
+amount
amt
anchor
anchorCtr
@@ -640,6 +642,33 @@ array
arrow
arrowok
artDeco
+artisticBlur
+artisticCement
+artisticChalkSketch
+artisticCrisscrossEtching
+artisticCutout
+artisticFilmGrain
+artisticGlass
+artisticGlowDiffused
+artisticGlowEdges
+artisticLightScreen
+artisticLineDrawing
+artisticMarker
+artisticMosiaicBubbles
+artisticPaintStrokes
+artisticPaintBrush
+artisticPastelsSmooth
+artisticPencilGrayscale
+artisticPencilSketch
+artisticPhotocopy
+artisticPlasticWrap
+artisticTexturizer
+artisticWatercolorSponge
+artisticBackgroundRemoval
+artisticBrightnessContrast
+artisticColorTemperature
+artisticSaturation
+artisticSharpenSoften
asDisplayed
ascending
ascendingAlpha
@@ -947,6 +976,7 @@ brkBinSub
brown
browse
browser
+brushSize
bstr
btLr
btnFace
@@ -1257,6 +1287,7 @@ color2
colorFilter
colorId
colorScale
+colorTemp
colormenu
colormode
colormru
@@ -1390,6 +1421,7 @@ cover
coverPg
cp
cr
+crackSpacing
crashSave
crazyMaze
created
@@ -1729,6 +1761,7 @@ destId
destOrd
destination
destinationFile
+detail
detectmouseclick
dgm
dgmbasetextscale
@@ -2430,6 +2463,7 @@ gradientInactiveCaption
gradientRadial
gradientUnscaled
gradientshapeok
+grainSize
gramEnd
gramStart
grammar
@@ -2471,6 +2505,7 @@ gridDropZones
gridLegend
gridLines
gridLinesSet
+gridSize
gridSpacing
gridSpan
group
@@ -2732,7 +2767,10 @@ imagedata
imagesize
imeMode
img
+imgEffect
imgH
+imgLayer
+imgProps
imgSz
imgW
immersive
@@ -2795,6 +2833,7 @@ intLim
intVal
integer
integrated
+intensity
interSp
interactiveSeq
intercept
@@ -3568,6 +3607,7 @@ numStyleLink
numTab
number
numberInDash
+numberOfShades
numberStoredAsText
numbering
numberingChange
@@ -3839,6 +3879,7 @@ pctPosVOffset
pctWidth
peachPuff
penClr
+pencilSize
pencils
pentagon
people
@@ -4002,6 +4043,7 @@ preserveSortFilterLayout
presetClass
presetID
presetSubtype
+pressure
prev
prevAc
prevCondLst
@@ -4710,6 +4752,7 @@ smartTags
smileyFace
smooth
smoothMarker
+smoothness
smtClean
smtId
snake