LibreOffice Module oox (master)  1
fillproperties.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_OOX_INC_DRAWINGML_FILLPROPERTIES_HXX
21 #define INCLUDED_OOX_INC_DRAWINGML_FILLPROPERTIES_HXX
22 
23 #include <map>
24 
25 #include <com/sun/star/beans/PropertyValue.hpp>
26 #include <com/sun/star/geometry/IntegerRectangle2D.hpp>
27 #include <com/sun/star/uno/Any.hxx>
28 #include <com/sun/star/uno/Reference.hxx>
29 #include <oox/drawingml/color.hxx>
30 #include <oox/helper/helper.hxx>
32 #include <rtl/ustring.hxx>
33 #include <sal/types.h>
34 
35 namespace com::sun::star {
36  namespace graphic { class XGraphic; }
37 }
38 
39 namespace oox {
40  class GraphicHelper;
41 }
42 
43 namespace oox::drawingml {
44 
45 class ShapePropertyMap;
46 
48 {
49  typedef ::std::multimap< double, Color > GradientStopMap;
50 
51  GradientStopMap maGradientStops;
59 
61  void assignUsed( const GradientFillProperties& rSourceProps );
62 };
63 
65 {
69 
71  void assignUsed( const PatternFillProperties& rSourceProps );
72 };
73 
75 {
76  OUString msName;
77  std::map< OUString, css::uno::Any >
80 
81  bool isEmpty() const;
82 
85  css::beans::PropertyValue getEffect();
86 
88  void assignUsed( const ArtisticEffectProperties& rSourceProps );
89 
91  static OUString getEffectString( sal_Int32 nToken );
92 
94  static sal_Int32 getEffectToken( const OUString& sName );
95 };
96 
98 {
99  css::uno::Reference<css::graphic::XGraphic> mxFillGraphic;
112  // effects
119 
122 
124  void assignUsed( const BlipFillProperties& rSourceProps );
125 };
126 
128 {
134 
136  void assignUsed( const FillProperties& rSourceProps );
137 
140  Color getBestSolidColor() const;
141 
143  void pushToPropMap(
144  ShapePropertyMap& rPropMap,
145  const GraphicHelper& rGraphicHelper,
146  sal_Int32 nShapeRotation = 0,
147  ::Color nPhClr = API_RGB_TRANSPARENT,
148  bool bFlipH = false,
149  bool bFlipV = false,
150  bool bIsCustomShape = false ) const;
151 };
152 
153 } // namespace oox::drawingml
154 
155 #endif
156 
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
ArtisticEffectProperties maEffect
Duotone Colors.
OptValue< bool > moShadeScaled
Flip mode of gradient, if not stretched to shape.
OptValue< sal_Int32 > moAlphaModFix
Artistic effect, not supported by core.
const char * sName
Definition: olehelper.cxx:92
const ::Color API_RGB_TRANSPARENT(ColorTransparency, 0xffffffff)
Transparent color for API calls.
BlipFillProperties maBlipProps
Properties for pattern fills.
Color maDuotoneColors[2]
Destination color of color transformation.
static sal_Int32 getEffectToken(const OUString &sName)
Translate effect strings to tokens.
OptValue< css::geometry::IntegerRectangle2D > moFillToRect
Gradient stops (colors/transparence).
OptValue< sal_Int32 > moTileAlign
Vertical scaling of bitmap tiles (1/1000 percent).
OptValue< bool > moRotateWithShape
True = scale gradient into shape.
OptValue< sal_Int32 > moFillType
void assignUsed(const GradientFillProperties &rSourceProps)
True = rotate gradient with shape.
void assignUsed(const PatternFillProperties &rSourceProps)
Preset pattern type.
OptValue< css::geometry::IntegerRectangle2D > moClipRect
Stretch fill offsets.
exports com.sun.star. graphic
std::map< OUString, css::uno::Any > maAttribs
Color getBestSolidColor() const
Tries to resolve current settings to a solid color, e.g.
void assignUsed(const ArtisticEffectProperties &rSourceProps)
Overwrites all members that are explicitly set in rSourceProps.
css::beans::PropertyValue getEffect()
Returns the struct as a PropertyValue with Name = msName and Value = maAttribs as a Sequence< Propert...
OptValue< sal_Int32 > moBitmapMode
The fill graphic.
OptValue< css::geometry::IntegerRectangle2D > moTileRect
OptValue< sal_Int32 > moBrightness
XML token for a color effect.
OptValue< sal_Int32 > moTileFlip
Anchor point inside bitmap.
OptValue< bool > moRotateWithShape
Flip mode of bitmap tiles.
OptValue< sal_Int32 > moTileOffsetY
Width of bitmap tiles (EMUs).
void assignUsed(const BlipFillProperties &rSourceProps)
Overwrites all members that are explicitly set in rSourceProps.
OptValue< sal_Int32 > moContrast
Brightness in the range [-100000,100000].
OptValue< css::geometry::IntegerRectangle2D > moFillRect
Bitmap tile or stretch.
GradientFillProperties maGradientProps
Solid fill color and transparence.
Color maColorChangeTo
Start color of color transformation.
static OUString getEffectString(sal_Int32 nToken)
Translate effect tokens to strings.
Contains generic information about an OLE object.
Color maColorChangeFrom
Contrast in the range [-100000,100000].
void pushToPropMap(ShapePropertyMap &rPropMap, const GraphicHelper &rGraphicHelper, sal_Int32 nShapeRotation=0,::Color nPhClr=API_RGB_TRANSPARENT, bool bFlipH=false, bool bFlipV=false, bool bIsCustomShape=false) const
Writes the properties to the passed property map.
OptValue< sal_Int32 > moShadeAngle
If set, gradient follows rectangle, circle, or shape.
Color maPattBgColor
Pattern foreground color.
::oox::ole::OleObjectInfo mrOleObjectInfo
OptValue< sal_Int32 > moTileScaleX
Height of bitmap tiles (EMUs).
void assignUsed(const FillProperties &rSourceProps)
Properties for bitmap fills.
OptValue< sal_Int32 > moColorEffect
True = rotate bitmap with shape.
bool isEmpty() const
The original graphic as embedded object.
PatternFillProperties maPatternProps
Properties for gradient fills.
OptValue< sal_Int32 > moShadeFlip
Rotation angle of linear gradients.
Color maFillColor
Fill type (OOXML token).
css::uno::Reference< css::graphic::XGraphic > mxFillGraphic
OptValue< sal_Int32 > moTileScaleY
Horizontal scaling of bitmap tiles (1/1000 percent).
OptValue< sal_Int32 > moPattPreset
Pattern background color.
::std::multimap< double, Color > GradientStopMap