LCOV - code coverage report
Current view: top level - libreoffice/svx/inc/svx - svdocirc.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 5 20.0 %
Date: 2012-12-17 Functions: 1 7 14.3 %
Legend: Lines: hit not hit

          Line data    Source code
       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 _SVDOCIRC_HXX
      21             : #define _SVDOCIRC_HXX
      22             : 
      23             : #include <svx/svdorect.hxx>
      24             : #include "svx/svxdllapi.h"
      25             : 
      26             : //************************************************************
      27             : //   Vorausdeklarationen
      28             : //************************************************************
      29             : 
      30             : namespace sdr { namespace properties {
      31             :     class CircleProperties;
      32             : }}
      33             : 
      34             : //************************************************************
      35             : //   Hilfsklasse SdrCircObjGeoData
      36             : //************************************************************
      37             : 
      38             : // #109872#
      39           0 : class SdrCircObjGeoData : public SdrTextObjGeoData
      40             : {
      41             : public:
      42             :     long                        nStartWink;
      43             :     long                        nEndWink;
      44             : };
      45             : 
      46             : //************************************************************
      47             : //   SdrCircObj
      48             : //************************************************************
      49             : 
      50           0 : class SVX_DLLPUBLIC SdrCircObj : public SdrRectObj
      51             : {
      52             : private:
      53             :     // to allow sdr::properties::CircleProperties access to ImpSetAttrToCircInfo()
      54             :     friend class sdr::properties::CircleProperties;
      55             : 
      56             :     // only for SdrCircleAttributes
      57           8 :     SdrObjKind GetCircleKind() const { return meCircleKind; }
      58             : 
      59             : protected:
      60             :     virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
      61             :     virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
      62             : 
      63             :     SdrObjKind                  meCircleKind;
      64             :     long                        nStartWink;
      65             :     long                        nEndWink;
      66             : 
      67             :     // bitfield
      68             :     unsigned                    mbPolygonIsLine : 1;
      69             : 
      70             : private:
      71             :      SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrObjKind eKind, const Rectangle& rRect1, long nStart, long nEnd) const;
      72             :     SVX_DLLPRIVATE void ImpSetCreateParams(SdrDragStat& rStat) const;
      73             :     SVX_DLLPRIVATE void ImpSetAttrToCircInfo(); // Werte vom Pool kopieren
      74             :     SVX_DLLPRIVATE void ImpSetCircInfoToAttr(); // Werte in den Pool kopieren
      75             : 
      76             :     // Liefert sal_True, wenn das Painten ein XPolygon erfordert.
      77             :     SVX_DLLPRIVATE bool PaintNeedsXPolyCirc() const; // PaintNeedsXPoly-> PaintNeedsXPolyCirc
      78             :     SVX_DLLPRIVATE virtual void RecalcXPoly();
      79             : 
      80             : protected:
      81             :     virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
      82             : 
      83             : public:
      84             :     TYPEINFO();
      85             :     SdrCircObj(SdrObjKind eNewKind); // Circ, CArc, Sect oder CCut
      86             :     SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect);
      87             : 
      88             :     // 0=0.00Deg=3h 9000=90.00Deg=12h 18000=180.00Deg=9h 27000=270.00Deg=6h
      89             :     // Der Verlauf des Kreises von StartWink nach EndWink ist immer entgegen
      90             :     // dem Uhrzeigersinn.
      91             :     // Wenn nNewStartWink==nNewEndWink hat der Kreisbogen einen Verlaufswinkel
      92             :     // von 0 Grad. Bei nNewStartWink+36000==nNewEndWink ist der Verlaufswinkel
      93             :     // 360.00 Grad.
      94             :     SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect, long nNewStartWink, long nNewEndWink);
      95             :     virtual ~SdrCircObj();
      96             : 
      97             :     virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
      98             :     virtual sal_uInt16 GetObjIdentifier() const;
      99             :     virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const;
     100             : 
     101             :     virtual void TakeObjNameSingul(String& rName) const;
     102             :     virtual void TakeObjNamePlural(String& rName) const;
     103             : 
     104             :     virtual SdrCircObj* Clone() const;
     105             :     virtual void RecalcSnapRect();
     106             :     virtual void NbcSetSnapRect(const Rectangle& rRect);
     107             :     virtual basegfx::B2DPolyPolygon TakeXorPoly() const;
     108             : 
     109             :     virtual sal_uInt32 GetSnapPointCount() const;
     110             :     virtual Point GetSnapPoint(sal_uInt32 i) const;
     111             : 
     112             :     virtual sal_uInt32 GetHdlCount() const;
     113             :     virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const;
     114             : 
     115             :     // special drag methods
     116             :     virtual bool hasSpecialDrag() const;
     117             :     virtual bool beginSpecialDrag(SdrDragStat& rDrag) const;
     118             :     virtual bool applySpecialDrag(SdrDragStat& rDrag);
     119             :     virtual String getSpecialDragComment(const SdrDragStat& rDrag) const;
     120             : 
     121             :     virtual bool BegCreate(SdrDragStat& rStat);
     122             :     virtual bool MovCreate(SdrDragStat& rStat);
     123             :     virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
     124             :     virtual bool BckCreate(SdrDragStat& rStat);
     125             :     virtual void BrkCreate(SdrDragStat& rStat);
     126             :     virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const;
     127             :     virtual Pointer GetCreatePointer() const;
     128             :     virtual void NbcMove(const Size& aSiz);
     129             :     virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
     130             :     virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
     131             :     virtual void NbcShear (const Point& rRef, long nWink, double tn, bool bVShear);
     132             :     virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
     133             : 
     134             : protected:
     135             :     virtual SdrObjGeoData* NewGeoData() const;
     136             :     virtual void SaveGeoData(SdrObjGeoData& rGeo) const;
     137             :     virtual void RestGeoData(const SdrObjGeoData& rGeo);
     138             : public:
     139           0 :     long GetStartWink() const { return nStartWink; }
     140           0 :     long GetEndWink() const { return nEndWink; }
     141             : 
     142             : };
     143             : 
     144             : #endif //_SVDOCIRC_HXX
     145             : 
     146             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10