diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-03-06 20:02:05 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-03-07 04:41:39 +0100 |
commit | e092c72b44d99ea5c6c7f71cd717b20a4a86f5ac (patch) | |
tree | 2aabe11813c7b4d7adeeab1ec7fcdbe71964e095 /oox/source | |
parent | 2f061dad7f875f704e3744fc5780c1d145b22e9f (diff) |
oox: rename FillBitmapUrl to FillBitmap, remove obsolete methods
Change-Id: I597aaa280ef12e46cf2d060cef1b042413d838d4
Reviewed-on: https://gerrit.libreoffice.org/50851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/drawingml/fillproperties.cxx | 8 | ||||
-rw-r--r-- | oox/source/drawingml/shapepropertymap.cxx | 18 | ||||
-rw-r--r-- | oox/source/helper/modelobjecthelper.cxx | 15 |
3 files changed, 13 insertions, 28 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index c22654ebeb6f..9ba7e46ac215 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -598,7 +598,7 @@ 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::FillBitmapUrl ) ) + if (maBlipProps.mxGraphic.is() && rPropMap.supportsProperty(ShapeProperty::FillBitmap)) { Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, nPhClr ); uno::Reference<awt::XBitmap> xBitmap(xGraphic, uno::UNO_QUERY); @@ -606,12 +606,12 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, if (xGraphic.is()) { - if (rPropMap.supportsProperty(ShapeProperty::FillBitmapNameFromUrl) && - rPropMap.setProperty(ShapeProperty::FillBitmapNameFromUrl, xGraphic)) + if (rPropMap.supportsProperty(ShapeProperty::FillBitmapName) && + rPropMap.setProperty(ShapeProperty::FillBitmapName, xGraphic)) { eFillStyle = FillStyle_BITMAP; } - else if (rPropMap.setProperty(ShapeProperty::FillBitmapUrl, xGraphic)) + else if (rPropMap.setProperty(ShapeProperty::FillBitmap, xGraphic)) { eFillStyle = FillStyle_BITMAP; } diff --git a/oox/source/drawingml/shapepropertymap.cxx b/oox/source/drawingml/shapepropertymap.cxx index 6d487f51c2ed..fcb154901c2b 100644 --- a/oox/source/drawingml/shapepropertymap.cxx +++ b/oox/source/drawingml/shapepropertymap.cxx @@ -56,12 +56,12 @@ static const ShapePropertyIds spnDefaultShapeIds = ShapePropertyInfo ShapePropertyInfo::DEFAULT( spnDefaultShapeIds, true, false, false, false ); ShapePropertyInfo::ShapePropertyInfo( const ShapePropertyIds& rnPropertyIds, - bool bNamedLineMarker, bool bNamedLineDash, bool bNamedFillGradient, bool bNamedFillBitmapUrl ) : + bool bNamedLineMarker, bool bNamedLineDash, bool bNamedFillGradient, bool bNamedFillBitmap ) : mrPropertyIds(rnPropertyIds), mbNamedLineMarker( bNamedLineMarker ), mbNamedLineDash( bNamedLineDash ), mbNamedFillGradient( bNamedFillGradient ), - mbNamedFillBitmapUrl( bNamedFillBitmapUrl ) + mbNamedFillBitmap( bNamedFillBitmap ) { } @@ -103,11 +103,11 @@ bool ShapePropertyMap::setAnyProperty( ShapeProperty ePropId, const Any& rValue case ShapeProperty::GradientTransparency: return setGradientTrans( nPropId, rValue ); - case ShapeProperty::FillBitmapUrl: - return setFillBitmapUrl( nPropId, rValue ); + case ShapeProperty::FillBitmap: + return setFillBitmap(nPropId, rValue); - case ShapeProperty::FillBitmapNameFromUrl: - return setFillBitmapNameFromUrl( rValue ); + case ShapeProperty::FillBitmapName: + return setFillBitmapName(rValue); default:; // suppress compiler warnings } @@ -180,10 +180,10 @@ bool ShapePropertyMap::setGradientTrans( sal_Int32 nPropId, const Any& rValue ) return false; } -bool ShapePropertyMap::setFillBitmapUrl(sal_Int32 nPropId, const Any& rValue) +bool ShapePropertyMap::setFillBitmap(sal_Int32 nPropId, const Any& rValue) { // push bitmap explicitly - if (!maShapePropInfo.mbNamedFillBitmapUrl) + if (!maShapePropInfo.mbNamedFillBitmap) { return setAnyProperty(nPropId, rValue); } @@ -199,7 +199,7 @@ bool ShapePropertyMap::setFillBitmapUrl(sal_Int32 nPropId, const Any& rValue) return false; } -bool ShapePropertyMap::setFillBitmapNameFromUrl(const Any& rValue) +bool ShapePropertyMap::setFillBitmapName(const Any& rValue) { if (rValue.has<uno::Reference<graphic::XGraphic>>()) { diff --git a/oox/source/helper/modelobjecthelper.cxx b/oox/source/helper/modelobjecthelper.cxx index 95c466f48a89..4929dc26749f 100644 --- a/oox/source/helper/modelobjecthelper.cxx +++ b/oox/source/helper/modelobjecthelper.cxx @@ -129,13 +129,6 @@ OUString ModelObjectHelper::insertTransGrandient( const awt::Gradient& rGradient return maTransGradContainer.insertObject( maTransGradNameBase, Any( rGradient ), true ); } -OUString ModelObjectHelper::insertFillBitmapUrl( const OUString& rGraphicUrl ) -{ - if( !rGraphicUrl.isEmpty() ) - return maBitmapUrlContainer.insertObject( maBitmapUrlNameBase, Any( rGraphicUrl ), true ); - return OUString(); -} - OUString ModelObjectHelper::insertFillBitmapXGraphic(uno::Reference<graphic::XGraphic> const & rxGraphic) { uno::Reference<awt::XBitmap> xBitmap(rxGraphic, uno::UNO_QUERY); @@ -144,14 +137,6 @@ OUString ModelObjectHelper::insertFillBitmapXGraphic(uno::Reference<graphic::XGr return OUString(); } -OUString ModelObjectHelper::getFillBitmapUrl( const OUString &rGraphicName ) -{ - Any aAny = maBitmapUrlContainer.getObject( rGraphicName ); - if( aAny.hasValue() ) - return aAny.get<OUString>(); - return OUString(); -} - uno::Reference<awt::XBitmap> ModelObjectHelper::getFillBitmap(OUString const & rGraphicName) { uno::Reference<awt::XBitmap> xBitmap; |