summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Machalkova <kmachalkova@suse.cz>2010-10-19 16:42:12 +0200
committerKatarina Machalkova <kmachalkova@suse.cz>2010-10-19 16:42:12 +0200
commit4ed22ff72fb2edfd690f30b60ec46b3e7d5524d5 (patch)
tree11d270ac9fea7d5b05b0dbafc5ef7f578bcdb251
parentd0712d61e5ef42da165f6db1927efc9004083fcf (diff)
Merged oox-pptx-export-blip-luminance.diff from ooo-build
-rw-r--r--oox/inc/oox/export/drawingml.hxx2
-rw-r--r--oox/source/export/drawingml.cxx22
-rw-r--r--oox/source/export/shapes.cxx2
3 files changed, 19 insertions, 7 deletions
diff --git a/oox/inc/oox/export/drawingml.hxx b/oox/inc/oox/export/drawingml.hxx
index 5e5b1baf36b6..10397a54c68a 100644
--- a/oox/inc/oox/export/drawingml.hxx
+++ b/oox/inc/oox/export/drawingml.hxx
@@ -81,7 +81,7 @@ public:
void WriteStretch();
void WriteLinespacing( ::com::sun::star::style::LineSpacing& rLineSpacing );
- ::rtl::OUString WriteBlip( ::rtl::OUString& rURL );
+ ::rtl::OUString WriteBlip( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet, ::rtl::OUString& rURL );
void WriteBlipMode( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet );
void WriteShapeTransformation( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > rXShape,
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 10815de67bc7..ed96c7db77ee 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -568,13 +568,25 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic )
return sRelId;
}
-OUString DrawingML::WriteBlip( OUString& rURL )
+OUString DrawingML::WriteBlip( Reference< XPropertySet > rXPropSet, OUString& rURL )
{
OUString sRelId = WriteImage( rURL );
+ sal_Int16 nBright = 0;
+ sal_Int32 nContrast = 0;
+
+ GET( nBright, AdjustLuminance );
+ GET( nContrast, AdjustContrast );
+
+ mpFS->startElementNS( XML_a, XML_blip,
+ FSNS( XML_r, XML_embed), OUStringToOString( sRelId, RTL_TEXTENCODING_UTF8 ).getStr(),
+ FSEND );
+ if( nBright || nContrast )
+ mpFS->singleElementNS( XML_a, XML_lum,
+ XML_bright, nBright ? I32S( nBright*1000 ) : NULL,
+ XML_contrast, nContrast ? I32S( nContrast*1000 ) : NULL,
+ FSEND );
- mpFS->singleElementNS( XML_a, XML_blip,
- FSNS( XML_r, XML_embed), OUStringToOString( sRelId, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ mpFS->endElementNS( XML_a, XML_blip );
return sRelId;
}
@@ -614,7 +626,7 @@ void DrawingML::WriteBlipFill( Reference< XPropertySet > rXPropSet, String sURLP
mpFS->startElementNS( nXmlNamespace , XML_blipFill, FSEND );
- WriteBlip( aURL );
+ WriteBlip( rXPropSet, aURL );
if( sURLPropName == S( "FillBitmapURL" ) )
WriteBlipMode( rXPropSet );
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 1275cab9d36d..9cdf4e5ad7a5 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -650,7 +650,7 @@ ShapeExport& ShapeExport::WriteGraphicObjectShape( Reference< XShape > xShape )
pFS->startElementNS( mnXmlNamespace, XML_blipFill, FSEND );
- WriteBlip( sGraphicURL );
+ WriteBlip( xShapeProps, sGraphicURL );
bool bStretch = false;
if( ( xShapeProps->getPropertyValue( S( "FillBitmapStretch" ) ) >>= bStretch ) && bStretch )