summaryrefslogtreecommitdiff
path: root/oox/source/drawingml
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-03-07 16:37:26 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-03-07 11:05:30 +0100
commit584454cedc57efc98a386dffa2ebae30c0625b8a (patch)
treee48760426ac37a2f3553c992748b1313d4ba430f /oox/source/drawingml
parent19b6b8f8946a6fb720806a3f51a06760047d2ffc (diff)
oox: BlipFillProperties rename mxGraphic to mxFillGraphic
Change-Id: Iea4b48e79c7c727bbd7dafd816538f6c1dd25bf8 Reviewed-on: https://gerrit.libreoffice.org/50868 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r--oox/source/drawingml/fillproperties.cxx19
-rw-r--r--oox/source/drawingml/misccontexts.cxx6
-rw-r--r--oox/source/drawingml/textparagraphpropertiescontext.cxx4
3 files changed, 14 insertions, 15 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 9ba7e46ac215..e7b16553c622 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -68,7 +68,7 @@ Reference< XGraphic > lclCheckAndApplyDuotoneTransform( const BlipFillProperties
::Color nColor2 = aBlipProps.maDuotoneColors[1].getColor( rGraphicHelper, nPhClr );
try
{
- Reference< XGraphicTransformer > xTransformer( aBlipProps.mxGraphic, UNO_QUERY_THROW );
+ Reference< XGraphicTransformer > xTransformer( aBlipProps.mxFillGraphic, UNO_QUERY_THROW );
return xTransformer->applyDuotone( xGraphic, sal_Int32(nColor1), sal_Int32(nColor2) );
}
catch( Exception& )
@@ -89,7 +89,7 @@ Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const BlipFillProper
{
sal_Int16 nToTransparence = aBlipProps.maColorChangeTo.getTransparency();
sal_Int8 nToAlpha = static_cast< sal_Int8 >( (100 - nToTransparence) * 2.55 );
- Reference< XGraphicTransformer > xTransformer( aBlipProps.mxGraphic, UNO_QUERY_THROW );
+ Reference< XGraphicTransformer > xTransformer( aBlipProps.mxFillGraphic, UNO_QUERY_THROW );
return xTransformer->colorChange( xGraphic, sal_Int32(nFromColor), 9, sal_Int32(nToColor), nToAlpha );
}
catch( Exception& )
@@ -187,8 +187,8 @@ void PatternFillProperties::assignUsed( const PatternFillProperties& rSourceProp
void BlipFillProperties::assignUsed( const BlipFillProperties& rSourceProps )
{
- if( rSourceProps.mxGraphic.is() )
- mxGraphic = rSourceProps.mxGraphic;
+ if(rSourceProps.mxFillGraphic.is())
+ mxFillGraphic = rSourceProps.mxFillGraphic;
moBitmapMode.assignIfUsed( rSourceProps.moBitmapMode );
moFillRect.assignIfUsed( rSourceProps.moFillRect );
moTileOffsetX.assignIfUsed( rSourceProps.moTileOffsetX );
@@ -598,10 +598,9 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
case XML_blipFill:
// do not start complex graphic transformation if property is not supported...
- if (maBlipProps.mxGraphic.is() && rPropMap.supportsProperty(ShapeProperty::FillBitmap))
+ if (maBlipProps.mxFillGraphic.is() && rPropMap.supportsProperty(ShapeProperty::FillBitmap))
{
- Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, nPhClr );
- uno::Reference<awt::XBitmap> xBitmap(xGraphic, uno::UNO_QUERY);
+ uno::Reference<graphic::XGraphic> xGraphic = lclCheckAndApplyDuotoneTransform(maBlipProps, maBlipProps.mxFillGraphic, rGraphicHelper, nPhClr);
// TODO: "rotate with shape" is not possible with our current core
if (xGraphic.is())
@@ -631,7 +630,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
RectanglePoint eRectPoint = lclGetRectanglePoint( maBlipProps.moTileAlign.get( XML_tl ) );
rPropMap.setProperty( ShapeProperty::FillBitmapRectanglePoint, eRectPoint );
- awt::Size aOriginalSize = lclGetOriginalSize( rGraphicHelper, maBlipProps.mxGraphic );
+ awt::Size aOriginalSize = lclGetOriginalSize(rGraphicHelper, maBlipProps.mxFillGraphic);
if( (aOriginalSize.Width > 0) && (aOriginalSize.Height > 0) )
{
// size of one bitmap tile (given as 1/1000 percent of bitmap size), convert to 1/100 mm
@@ -726,10 +725,10 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
case XML_grayscl: eColorMode = ColorMode_GREYS; break;
}
- if( maBlipProps.mxGraphic.is() )
+ if (maBlipProps.mxFillGraphic.is())
{
// created transformed graphic
- Reference< XGraphic > xGraphic = lclCheckAndApplyChangeColorTransform(maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, API_RGB_TRANSPARENT);
+ uno::Reference<graphic::XGraphic> xGraphic = lclCheckAndApplyChangeColorTransform(maBlipProps, maBlipProps.mxFillGraphic, rGraphicHelper, API_RGB_TRANSPARENT);
xGraphic = lclCheckAndApplyDuotoneTransform(maBlipProps, xGraphic, rGraphicHelper, API_RGB_TRANSPARENT);
if (eColorMode == ColorMode_STANDARD && nBrightness == 70 && nContrast == -70)
diff --git a/oox/source/drawingml/misccontexts.cxx b/oox/source/drawingml/misccontexts.cxx
index 87c7fd5c5b86..a3ab1140a804 100644
--- a/oox/source/drawingml/misccontexts.cxx
+++ b/oox/source/drawingml/misccontexts.cxx
@@ -148,8 +148,8 @@ BlipContext::BlipContext( ContextHandler2Helper const & rParent,
{
// internal picture URL
OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( embed ), OUString() ) );
- if( !aFragmentPath.isEmpty() )
- mrBlipProps.mxGraphic = getFilter().getGraphicHelper().importEmbeddedGraphic( aFragmentPath );
+ if (!aFragmentPath.isEmpty())
+ mrBlipProps.mxFillGraphic = getFilter().getGraphicHelper().importEmbeddedGraphic( aFragmentPath );
}
else if( rAttribs.hasAttribute( R_TOKEN( link ) ) )
{
@@ -164,7 +164,7 @@ BlipContext::BlipContext( ContextHandler2Helper const & rParent,
aMed.Download();
Reference< io::XInputStream > xInStrm = aMed.GetInputStream();
if ( xInStrm.is() )
- mrBlipProps.mxGraphic = getFilter().getGraphicHelper().importGraphic( xInStrm );
+ mrBlipProps.mxFillGraphic = getFilter().getGraphicHelper().importGraphic( xInStrm );
}
}
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 5cf1750dec4e..8b7cdae07805 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -148,8 +148,8 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
rPropertyMap.setProperty( PROP_ParaTabStops, aSeq);
}
- if ( mxBlipProps.get() && mxBlipProps->mxGraphic.is() )
- mrBulletList.setGraphic( mxBlipProps->mxGraphic );
+ if (mxBlipProps.get() && mxBlipProps->mxFillGraphic.is())
+ mrBulletList.setGraphic(mxBlipProps->mxFillGraphic);
if( mrBulletList.is() )
rPropertyMap.setProperty( PROP_IsNumbering, true);