Kaydet (Commit) 29fe8b41 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

remove some whitespace shapepropertymap.hxx

Change-Id: I8e756b43606a32b95f6192f40a5f32d13a65eec1
Reviewed-on: https://gerrit.libreoffice.org/47522Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst 0189792b
...@@ -81,31 +81,32 @@ typedef o3tl::enumarray<ShapeProperty, sal_Int32> ShapePropertyIds; ...@@ -81,31 +81,32 @@ typedef o3tl::enumarray<ShapeProperty, sal_Int32> ShapePropertyIds;
struct OOX_DLLPUBLIC ShapePropertyInfo struct OOX_DLLPUBLIC ShapePropertyInfo
{ {
const ShapePropertyIds& mrPropertyIds; const ShapePropertyIds& mrPropertyIds;
bool mbNamedLineMarker; /// True = use named line marker instead of explicit line marker. bool mbNamedLineMarker; /// True = use named line marker instead of explicit line marker.
bool mbNamedLineDash; /// True = use named line dash instead of explicit line dash. bool mbNamedLineDash; /// True = use named line dash instead of explicit line dash.
bool mbNamedFillGradient; /// True = use named fill gradient instead of explicit fill gradient. bool mbNamedFillGradient; /// True = use named fill gradient instead of explicit fill gradient.
bool mbNamedFillBitmapUrl; /// True = use named fill bitmap URL instead of explicit fill bitmap URL. bool mbNamedFillBitmapUrl; /// True = use named fill bitmap URL instead of explicit fill bitmap URL.
static ShapePropertyInfo DEFAULT; /// Default property info (used as default parameter of other methods). static ShapePropertyInfo DEFAULT; /// Default property info (used as default parameter of other methods).
explicit ShapePropertyInfo( explicit ShapePropertyInfo(const ShapePropertyIds& rnPropertyIds,
const ShapePropertyIds& rnPropertyIds, bool bNamedLineMarker, bool bNamedLineDash,
bool bNamedLineMarker, bool bNamedFillGradient, bool bNamedFillBitmapUrl);
bool bNamedLineDash,
bool bNamedFillGradient, bool has(ShapeProperty ePropId) const
bool bNamedFillBitmapUrl ); {
return mrPropertyIds[ePropId] >= 0;
bool has( ShapeProperty ePropId ) const { return mrPropertyIds[ ePropId ] >= 0; } }
sal_Int32 operator[]( ShapeProperty ePropId ) const { return mrPropertyIds[ ePropId ]; } sal_Int32 operator[](ShapeProperty ePropId) const
{
return mrPropertyIds[ePropId];
}
}; };
class OOX_DLLPUBLIC ShapePropertyMap : public PropertyMap class OOX_DLLPUBLIC ShapePropertyMap : public PropertyMap
{ {
public: public:
explicit ShapePropertyMap( explicit ShapePropertyMap(ModelObjectHelper& rModelObjHelper,
ModelObjectHelper& rModelObjHelper, const ShapePropertyInfo& rShapePropInfo = ShapePropertyInfo::DEFAULT );
const ShapePropertyInfo& rShapePropInfo = ShapePropertyInfo::DEFAULT );
/** Returns true, if the specified property is supported. */ /** Returns true, if the specified property is supported. */
bool supportsProperty( ShapeProperty ePropId ) const; bool supportsProperty( ShapeProperty ePropId ) const;
...@@ -118,26 +119,28 @@ public: ...@@ -118,26 +119,28 @@ public:
bool setAnyProperty( ShapeProperty ePropId, const css::uno::Any& rValue ); bool setAnyProperty( ShapeProperty ePropId, const css::uno::Any& rValue );
/** Sets the specified shape property to the passed value. */ /** Sets the specified shape property to the passed value. */
template< typename Type > template<typename Type>
bool setProperty( ShapeProperty ePropId, const Type& rValue ) bool setProperty(ShapeProperty ePropId, const Type& rValue)
{ return setAnyProperty( ePropId, css::uno::Any( rValue ) ); } {
return setAnyProperty(ePropId, css::uno::Any(rValue));
}
using PropertyMap::setAnyProperty; using PropertyMap::setAnyProperty;
using PropertyMap::setProperty; using PropertyMap::setProperty;
private: private:
/** Sets an explicit line marker, or creates a named line marker. */ /** Sets an explicit line marker, or creates a named line marker. */
bool setLineMarker( sal_Int32 nPropId, const css::uno::Any& rValue ); bool setLineMarker( sal_Int32 nPropId, const css::uno::Any& rValue );
/** Sets an explicit line dash, or creates a named line dash. */ /** Sets an explicit line dash, or creates a named line dash. */
bool setLineDash( sal_Int32 nPropId, const css::uno::Any& rValue ); bool setLineDash( sal_Int32 nPropId, const css::uno::Any& rValue );
/** Sets an explicit fill gradient, or creates a named fill gradient. */ /** Sets an explicit fill gradient, or creates a named fill gradient. */
bool setFillGradient( sal_Int32 nPropId, const css::uno::Any& rValue ); bool setFillGradient( sal_Int32 nPropId, const css::uno::Any& rValue );
/** Creates a named transparency gradient. */ /** Creates a named transparency gradient. */
bool setGradientTrans( sal_Int32 nPropId, const css::uno::Any& rValue ); bool setGradientTrans( sal_Int32 nPropId, const css::uno::Any& rValue );
/** Sets an explicit fill bitmap URL, or creates a named fill bitmap URL. */ /** Sets an explicit fill bitmap URL, or creates a named fill bitmap URL. */
bool setFillBitmapUrl( sal_Int32 nPropId, const css::uno::Any& rValue ); bool setFillBitmapUrl( sal_Int32 nPropId, const css::uno::Any& rValue );
/** Sets an explicit fill bitmap URL and pushes the name to FillBitmapName */ /** Sets an explicit fill bitmap URL and pushes the name to FillBitmapName */
bool setFillBitmapNameFromUrl( const css::uno::Any& rValue ); bool setFillBitmapNameFromUrl( const css::uno::Any& rValue );
// not implemented, to prevent implicit conversion from enum to int // not implemented, to prevent implicit conversion from enum to int
css::uno::Any& operator[]( ShapeProperty ePropId ) = delete; css::uno::Any& operator[]( ShapeProperty ePropId ) = delete;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment