LibreOffice Module svx (master)  1
svdpoev.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_SVX_SVDPOEV_HXX
21 #define INCLUDED_SVX_SVDPOEV_HXX
22 
23 #include <svx/svxdllapi.h>
24 #include <svx/svdedtv.hxx>
25 
27 
29 {
30  friend class SdrEditView;
31 
32  bool bSetMarkedPointsSmoothPossible : 1;
33  bool bSetMarkedSegmentsKindPossible : 1;
34 
37 
38 private:
39  SVX_DLLPRIVATE void ImpResetPolyPossibilityFlags();
40  SVX_DLLPRIVATE void ImpCheckPolyPossibilities();
41 
42  typedef void (*PPolyTrFunc)(Point&, Point*, Point*, const void*, const void*, const void*, const void*);
43  SVX_DLLPRIVATE void ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr);
44 
45 protected:
46  // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
48  SdrModel& rSdrModel,
49  OutputDevice* pOut);
50 
51  virtual ~SdrPolyEditView() override;
52 
53 public:
54  bool IsSetMarkedPointsSmoothPossible() const override;
56  void SetMarkedPointsSmooth(SdrPathSmoothKind eKind) override;
57 
58  // A PolySegment can either be a segment or a Bézier curve
59  bool IsSetMarkedSegmentsKindPossible() const override;
61  void SetMarkedSegmentsKind(SdrPathSegmentKind eKind) override;
62 
63  // Probably Obj has been deleted afterwards
64  void DeleteMarkedPoints() override;
65  bool IsDeleteMarkedPointsPossible() const override;
66 
67  void MoveMarkedPoints(const Size& rSiz);
68  void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
69  void RotateMarkedPoints(const Point& rRef, tools::Long nAngle);
70 
71  // This probably creates an arbitrary amount of new objects
72  void RipUpAtMarkedPoints() override;
73  bool IsRipUpAtMarkedPointsPossible() const override;
74 
75  // All marked Polylines are turned into polygons
76  // All open Bézier curves are turned into closed ones
77  bool IsOpenCloseMarkedObjectsPossible() const override;
79 
80  void CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmooth, bool& b1stSegm, bool& bCurve, bool& bSmoothFuz, bool& bSegmFuz, basegfx::B2VectorContinuity& eSmooth );
81 };
82 
83 #endif // INCLUDED_SVX_SVDPOEV_HXX
84 
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool IsDeleteMarkedPointsPossible() const =0
long Long
virtual bool IsRipUpAtMarkedPointsPossible() const =0
virtual void RipUpAtMarkedPoints()=0
SdrPathSmoothKind eMarkedPointsSmooth
Definition: svdpoev.hxx:35
B2VectorContinuity
Everything a View needs to know about a selected object.
Definition: svdmark.hxx:44
SdrPathSegmentKind eMarkedSegmentsKind
Definition: svdpoev.hxx:36
virtual bool IsOpenCloseMarkedObjectsPossible() const =0
virtual SdrPathSmoothKind GetMarkedPointsSmooth() const =0
virtual void DeleteMarkedPoints()=0
virtual bool IsSetMarkedPointsSmoothPossible() const =0
virtual SdrObjClosedKind GetMarkedObjectsClosedState() const =0
virtual void SetMarkedPointsSmooth(SdrPathSmoothKind eKind)=0
virtual void SetMarkedSegmentsKind(SdrPathSegmentKind eKind)=0
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
virtual bool IsSetMarkedSegmentsKindPossible() const =0
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
virtual SdrPathSegmentKind GetMarkedSegmentsKind() const =0
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo