LCOV - code coverage report
Current view: top level - svx/inc/svx - svdocapt.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 4 50.0 %
Date: 2012-08-25 Functions: 2 6 33.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 6 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _SVDCAPT_HXX
      30                 :            : #define _SVDCAPT_HXX
      31                 :            : 
      32                 :            : #include <svx/svdorect.hxx>
      33                 :            : #include "svx/svxdllapi.h"
      34                 :            : 
      35                 :            : //************************************************************
      36                 :            : //   Vorausdeklarationen
      37                 :            : //************************************************************
      38                 :            : 
      39                 :            : class ImpCaptParams;
      40                 :            : 
      41                 :            : namespace sdr { namespace properties {
      42                 :            :     class CaptionProperties;
      43                 :            : }}
      44                 :            : 
      45                 :            : //************************************************************
      46                 :            : //   Hilfsklasse SdrCaptObjGeoData
      47                 :            : //************************************************************
      48                 :            : 
      49                 :            : // #109872#
      50 [ #  # ][ #  # ]:          0 : class SdrCaptObjGeoData : public SdrTextObjGeoData
                 [ #  # ]
      51                 :            : {
      52                 :            : public:
      53                 :            :     Polygon                     aTailPoly;
      54                 :            : };
      55                 :            : 
      56                 :            : //************************************************************
      57                 :            : //   SdrCaptionObj
      58                 :            : //************************************************************
      59                 :            : 
      60                 :          0 : class SVX_DLLPUBLIC SdrCaptionObj : public SdrRectObj
      61                 :            : {
      62                 :            : private:
      63                 :            :     // to allow sdr::properties::CaptionProperties access to ImpRecalcTail()
      64                 :            :     friend class sdr::properties::CaptionProperties;
      65                 :            :     friend class                SdrTextObj; // fuer ImpRecalcTail() bei AutoGrow
      66                 :            : 
      67                 :            : protected:
      68                 :            :     virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
      69                 :            :     virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
      70                 :            : 
      71                 :            : private:
      72                 :            :     Polygon                     aTailPoly;  // das ganze Polygon des Schwanzes
      73                 :            :     sal_Bool                    mbSpecialTextBoxShadow; // for calc special shadow, default FALSE
      74                 :            :     sal_Bool                    mbFixedTail; // for calc note box fixed tail, default FALSE
      75                 :            :     Point                       maFixedTailPos; // for calc note box fixed tail position.
      76                 :            : 
      77                 :            : private:
      78                 :            :     SVX_DLLPRIVATE void ImpGetCaptParams(ImpCaptParams& rPara) const;
      79                 :            :     SVX_DLLPRIVATE void ImpCalcTail1(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
      80                 :            :     SVX_DLLPRIVATE void ImpCalcTail2(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
      81                 :            :     SVX_DLLPRIVATE void ImpCalcTail3(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
      82                 :            :     SVX_DLLPRIVATE void ImpCalcTail4(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
      83                 :            :     SVX_DLLPRIVATE void ImpCalcTail (const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
      84                 :            :     SVX_DLLPRIVATE void ImpRecalcTail();
      85                 :            : 
      86                 :            : public:
      87                 :            :     TYPEINFO();
      88                 :            :     SdrCaptionObj();
      89                 :            :     SdrCaptionObj(const Rectangle& rRect, const Point& rTail);
      90                 :            :     virtual ~SdrCaptionObj();
      91                 :            : 
      92                 :            :     virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
      93                 :            :     virtual sal_uInt16 GetObjIdentifier() const;
      94                 :            :     virtual SdrCaptionObj* Clone() const;
      95                 :            : 
      96                 :            :     // for calc: special shadow only for text box
      97                 :            :     void SetSpecialTextBoxShadow() { mbSpecialTextBoxShadow = sal_True; }
      98                 :         20 :     sal_Bool GetSpecialTextBoxShadow() const { return mbSpecialTextBoxShadow; }
      99                 :            : 
     100                 :            :     // for calc: fixed note tail position.
     101                 :            :     void SetFixedTail() { mbFixedTail = sal_True; }
     102                 :            : 
     103                 :            :     virtual void TakeObjNameSingul(String& rName) const;
     104                 :            :     virtual void TakeObjNamePlural(String& rName) const;
     105                 :            : 
     106                 :            :     virtual basegfx::B2DPolyPolygon TakeXorPoly() const;
     107                 :            :     virtual void SetModel(SdrModel* pNewModel);
     108                 :            :     virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
     109                 :            : 
     110                 :            :     virtual sal_uInt32 GetHdlCount() const;
     111                 :            :     virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const;
     112                 :            : 
     113                 :            :     // special drag methods
     114                 :            :     virtual bool hasSpecialDrag() const;
     115                 :            :     virtual bool beginSpecialDrag(SdrDragStat& rDrag) const;
     116                 :            :     virtual bool applySpecialDrag(SdrDragStat& rDrag);
     117                 :            :     virtual String getSpecialDragComment(const SdrDragStat& rDrag) const;
     118                 :            : 
     119                 :            :     virtual bool BegCreate(SdrDragStat& rStat);
     120                 :            :     virtual bool MovCreate(SdrDragStat& rStat);
     121                 :            :     virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
     122                 :            :     virtual bool BckCreate(SdrDragStat& rStat);
     123                 :            :     virtual void BrkCreate(SdrDragStat& rStat);
     124                 :            :     virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const;
     125                 :            :     virtual Pointer GetCreatePointer() const;
     126                 :            : 
     127                 :            :     virtual void NbcMove(const Size& rSiz);
     128                 :            :     virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
     129                 :            : 
     130                 :            :     virtual void NbcSetRelativePos(const Point& rPnt);
     131                 :            :     virtual Point GetRelativePos() const;
     132                 :            :     virtual void NbcSetAnchorPos(const Point& rPnt);
     133                 :            :     virtual const Point& GetAnchorPos() const;
     134                 :            : 
     135                 :            :     virtual void RecalcSnapRect();
     136                 :            :     virtual const Rectangle& GetSnapRect() const;
     137                 :            :     virtual void NbcSetSnapRect(const Rectangle& rRect);
     138                 :            :     virtual const Rectangle& GetLogicRect() const;
     139                 :            :     virtual void NbcSetLogicRect(const Rectangle& rRect);
     140                 :            : 
     141                 :            :     virtual sal_uInt32 GetSnapPointCount() const;
     142                 :            :     virtual Point GetSnapPoint(sal_uInt32 i) const;
     143                 :            : 
     144                 :            : protected:
     145                 :            :     virtual SdrObjGeoData* NewGeoData() const;
     146                 :            :     virtual void SaveGeoData(SdrObjGeoData& rGeo) const;
     147                 :            :     virtual void RestGeoData(const SdrObjGeoData& rGeo);
     148                 :            : 
     149                 :            : public:
     150                 :            :     virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier) const;
     151                 :            : 
     152                 :            :     const Point& GetTailPos() const;
     153                 :            :     void SetTailPos(const Point& rPos);
     154                 :            :     void NbcSetTailPos(const Point& rPos);
     155                 :            : 
     156                 :            :     // #i32599#
     157                 :            :     // Add own implementation for TRSetBaseGeometry to handle TailPos over changes
     158                 :            :     virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon);
     159                 :            : 
     160                 :          3 :     inline const Point& GetFixedTailPos() const  {return maFixedTailPos;}
     161                 :            : 
     162                 :            :     // geometry access
     163                 :            :     ::basegfx::B2DPolygon getTailPolygon() const;
     164                 :            : };
     165                 :            : 
     166                 :            : ////////////////////////////////////////////////////////////////////////////////////////////////////
     167                 :            : 
     168                 :            : #endif //_SVDOCAPT_HXX
     169                 :            : 
     170                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10