Kaydet (Commit) 9886a69c authored tarafından Armin Le Grand's avatar Armin Le Grand

OperationSmiley: Remove brightness from SdrPathObj

There was a member at SdrPathObj called mdBrightness only for
holding a blend value during creation of SdrPathObjs for
CustomShape visualization. This has nothing to do on the
model data, move it to where it belongs

Change-Id: Iee101f90a1275ce1ed97e8e8d0ccf7084c83d4f6
üst 823ef9ef
......@@ -123,14 +123,22 @@ class SVX_DLLPUBLIC EnhancedCustomShape2d : public SfxItemSet
SAL_DLLPRIVATE bool SetAdjustValueAsDouble( const double& rValue, const sal_Int32 nIndex );
SAL_DLLPRIVATE sal_Int32 GetLuminanceChange( sal_uInt32 nIndex ) const;
SAL_DLLPRIVATE Color GetColorData( const Color& rFillColor, sal_uInt32 nIndex, double dBrightness ) const;
SAL_DLLPRIVATE void AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rCustomShapeSet,
sal_uInt32& nColorIndex, sal_uInt32 nColorCount);
SAL_DLLPRIVATE void AdaptObjColor(
SdrPathObj& rObj,
double dBrightness,
const SfxItemSet& rCustomShapeSet,
sal_uInt32& nColorIndex,
sal_uInt32 nColorCount);
SAL_DLLPRIVATE Point GetPoint( const css::drawing::EnhancedCustomShapeParameterPair&,
const bool bScale = true, const bool bReplaceGeoSize = false ) const;
SAL_DLLPRIVATE void CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmentInd, std::vector< SdrPathObj* >& rObjectList,
bool bLineGeometryNeededOnly, bool bSortFilledObjectsToBack,
sal_Int32 nIndex );
SAL_DLLPRIVATE void CreateSubPath(
sal_Int32& rSrcPt,
sal_Int32& rSegmentInd,
std::vector< std::pair< SdrPathObj*, double> >& rObjectList,
bool bLineGeometryNeededOnly,
bool bSortFilledObjectsToBack,
sal_Int32 nIndex);
SAL_DLLPRIVATE SdrObject* CreatePathObj( bool bLineGeometryNeededOnly );
SAL_DLLPRIVATE void ApplyShapeAttributes( const SdrCustomShapeGeometryItem& rItem );
......
......@@ -55,9 +55,6 @@ private:
// for isolation of old Drag/Create code
std::unique_ptr<ImpPathForDragAndCreate> mpDAC;
// brightness - used in EnhancedCustomShapes2d.cxx for DARKEN[LESS] and LIGHTEN[LESS] segments implementation
double mdBrightness;
// helper functions for GET, SET, INS etc. PNT
void ImpSetClosed(bool bClose);
void ImpForceKind();
......@@ -65,8 +62,6 @@ private:
ImpPathForDragAndCreate& impGetDAC() const;
public:
double GetBrightness() { return mdBrightness; }
SdrPathObj(SdrObjKind eNewKind);
SdrPathObj(SdrObjKind eNewKind, const basegfx::B2DPolyPolygon& rPathPoly, double dBrightness = 0.0);
virtual ~SdrPathObj() override;
......
......@@ -1629,16 +1629,14 @@ sdr::contact::ViewContact* SdrPathObj::CreateObjectSpecificViewContact()
SdrPathObj::SdrPathObj(SdrObjKind eNewKind)
: meKind(eNewKind),
mdBrightness(0.0)
: meKind(eNewKind)
{
bClosedObj = IsClosed();
}
SdrPathObj::SdrPathObj(SdrObjKind eNewKind, const basegfx::B2DPolyPolygon& rPathPoly, double dBrightness)
: maPathPolygon(rPathPoly),
meKind(eNewKind),
mdBrightness(dBrightness)
meKind(eNewKind)
{
bClosedObj = IsClosed();
ImpForceKind();
......
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