diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-27 10:55:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-27 18:41:57 +0200 |
commit | bbd500e14fce92b27cfc09e7cffd346e36eb5fb0 (patch) | |
tree | 40f3766253cb9ef505d4113ee3c5f4d9d3823052 /include | |
parent | 97710225f015c8716c80e55ecdb78832f2edc731 (diff) |
use SdrCircKind enum more widely
and make it a scoped enum
Change-Id: I6325ff86ff8566135f6d01a576c659539dcb3ed9
Reviewed-on: https://gerrit.libreoffice.org/78176
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/svdocirc.hxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx index 5785a725584f..b628811bdba3 100644 --- a/include/svx/svdocirc.hxx +++ b/include/svx/svdocirc.hxx @@ -36,6 +36,10 @@ public: long nEndAngle; }; +enum class SdrCircKind { Full, Section, Cut, Arc }; + +extern SVX_DLLPUBLIC SdrCircKind ToSdrCircKind(SdrObjKind); + // class SdrCircObj class SVX_DLLPUBLIC SdrCircObj final : public SdrRectObj @@ -44,17 +48,14 @@ private: // to allow sdr::properties::CircleProperties access to ImpSetAttrToCircInfo() friend class sdr::properties::CircleProperties; - // only for SdrCircleAttributes - SdrObjKind GetCircleKind() const { return meCircleKind; } - virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override; virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override; - SdrObjKind meCircleKind; + SdrCircKind meCircleKind; long nStartAngle; long nEndAngle; - SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrObjKind eKind, const tools::Rectangle& rRect1, long nStart, long nEnd) const; + SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrCircKind eKind, const tools::Rectangle& rRect1, long nStart, long nEnd) const; SVX_DLLPRIVATE static void ImpSetCreateParams(SdrDragStat& rStat); SVX_DLLPRIVATE void ImpSetAttrToCircInfo(); // copy values from pool SVX_DLLPRIVATE void ImpSetCircInfoToAttr(); // copy values into pool @@ -72,10 +73,10 @@ private: public: SdrCircObj( SdrModel& rSdrModel, - SdrObjKind eNewKind); // Circ, CArc, Sect or CCut + SdrCircKind eNewKind); SdrCircObj( SdrModel& rSdrModel, - SdrObjKind eNewKind, + SdrCircKind eNewKind, const tools::Rectangle& rRect); // 0=0.00Deg=3h 9000=90.00Deg=12h 18000=180.00Deg=9h 27000=270.00Deg=6h @@ -84,11 +85,13 @@ public: // If nNewStartAngle+36000==nNewEndWink, then the arc has angle of 360 degrees. SdrCircObj( SdrModel& rSdrModel, - SdrObjKind eNewKind, + SdrCircKind eNewKind, const tools::Rectangle& rRect, long nNewStartAngle, long nNewEndWink); + SdrCircKind GetCircleKind() const { return meCircleKind; } + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual sal_uInt16 GetObjIdentifier() const override; virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; |