LCOV - code coverage report
Current view: top level - svx/source/svdraw - svddrgm1.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 9 0.0 %
Date: 2014-04-14 Functions: 0 17 0.0 %
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 INCLUDED_SVX_SOURCE_SVDRAW_SVDDRGM1_HXX
      21             : #define INCLUDED_SVX_SOURCE_SVDRAW_SVDDRGM1_HXX
      22             : 
      23             : #include <svx/xpoly.hxx>
      24             : #include <svx/svdhdl.hxx>
      25             : #include <svx/svddrgv.hxx>
      26             : #include <svx/svddrgmt.hxx>
      27             : 
      28             : 
      29             : // predeclarations
      30             : 
      31             : class SdrDragView;
      32             : 
      33             : 
      34             : //   SdrDragMovHdl
      35             : 
      36           0 : class SdrDragMovHdl : public SdrDragMethod
      37             : {
      38             : protected:
      39             :     // define nothing, overload to do so
      40             :     virtual void createSdrDragEntries() SAL_OVERRIDE;
      41             : 
      42             : public:
      43             :     TYPEINFO_OVERRIDE();
      44             :     SdrDragMovHdl(SdrDragView& rNewView);
      45             : 
      46             :     virtual void TakeSdrDragComment(OUString& rStr) const SAL_OVERRIDE;
      47             :     virtual bool BeginSdrDrag() SAL_OVERRIDE;
      48             :     virtual void MoveSdrDrag(const Point& rPnt) SAL_OVERRIDE;
      49             :     virtual bool EndSdrDrag(bool bCopy) SAL_OVERRIDE;
      50             :     virtual void CancelSdrDrag() SAL_OVERRIDE;
      51             :     virtual Pointer GetSdrDragPointer() const SAL_OVERRIDE;
      52             : };
      53             : 
      54             : 
      55             : //   SdrDragRotate
      56             : 
      57           0 : class SdrDragRotate : public SdrDragMethod
      58             : {
      59             : private:
      60             :     double                      nSin;
      61             :     double                      nCos;
      62             :     long                        nWink0;
      63             :     long                        nWink;
      64             :     bool                        bRight;
      65             : 
      66             : public:
      67             :     TYPEINFO_OVERRIDE();
      68             :     SdrDragRotate(SdrDragView& rNewView);
      69             : 
      70             :     virtual void TakeSdrDragComment(OUString& rStr) const SAL_OVERRIDE;
      71             :     virtual bool BeginSdrDrag() SAL_OVERRIDE;
      72             :     virtual void MoveSdrDrag(const Point& rPnt) SAL_OVERRIDE;
      73             :     virtual bool EndSdrDrag(bool bCopy) SAL_OVERRIDE;
      74             :     virtual Pointer GetSdrDragPointer() const SAL_OVERRIDE;
      75             : 
      76             :     virtual basegfx::B2DHomMatrix getCurrentTransformation() SAL_OVERRIDE;
      77             :     virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget) SAL_OVERRIDE;
      78             : };
      79             : 
      80             : 
      81             : //   SdrDragShear
      82             : 
      83           0 : class SdrDragShear : public SdrDragMethod
      84             : {
      85             : private:
      86             :     Fraction                    aFact;
      87             :     long                        nWink0;
      88             :     long                        nWink;
      89             :     double                      nTan;
      90             :     bool                        bVertical;   // contort vertically
      91             :     bool                        bResize;     // shear and resize
      92             :     bool                        bUpSideDown; // mirror and shear/slant
      93             :     bool                        bSlant;
      94             : 
      95             : public:
      96             :     TYPEINFO_OVERRIDE();
      97             :     SdrDragShear(SdrDragView& rNewView,bool bSlant1);
      98             : 
      99             :     virtual void TakeSdrDragComment(OUString& rStr) const SAL_OVERRIDE;
     100             :     virtual bool BeginSdrDrag() SAL_OVERRIDE;
     101             :     virtual void MoveSdrDrag(const Point& rPnt) SAL_OVERRIDE;
     102             :     virtual bool EndSdrDrag(bool bCopy) SAL_OVERRIDE;
     103             :     virtual Pointer GetSdrDragPointer() const SAL_OVERRIDE;
     104             : 
     105             :     virtual basegfx::B2DHomMatrix getCurrentTransformation() SAL_OVERRIDE;
     106             :     virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget) SAL_OVERRIDE;
     107             : };
     108             : 
     109             : 
     110             : //   SdrDragMirror
     111             : 
     112           0 : class SdrDragMirror : public SdrDragMethod
     113             : {
     114             : private:
     115             :     Point                       aDif;
     116             :     long                        nWink;
     117             :     bool                        bMirrored;
     118             :     bool                        bSide0;
     119             : 
     120             :     bool ImpCheckSide(const Point& rPnt) const;
     121             : 
     122             : public:
     123             :     TYPEINFO_OVERRIDE();
     124             :     SdrDragMirror(SdrDragView& rNewView);
     125             : 
     126             :     virtual void TakeSdrDragComment(OUString& rStr) const SAL_OVERRIDE;
     127             :     virtual bool BeginSdrDrag() SAL_OVERRIDE;
     128             :     virtual void MoveSdrDrag(const Point& rPnt) SAL_OVERRIDE;
     129             :     virtual bool EndSdrDrag(bool bCopy) SAL_OVERRIDE;
     130             :     virtual Pointer GetSdrDragPointer() const SAL_OVERRIDE;
     131             : 
     132             :     virtual basegfx::B2DHomMatrix getCurrentTransformation() SAL_OVERRIDE;
     133             :     virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget) SAL_OVERRIDE;
     134             : };
     135             : 
     136             : 
     137             : //   SdrDragGradient
     138             : 
     139           0 : class SdrDragGradient : public SdrDragMethod
     140             : {
     141             : private:
     142             :     // Handles to work on
     143             :     SdrHdlGradient*             pIAOHandle;
     144             : 
     145             :     // is this for gradient (or for transparency)?
     146             :     bool                        bIsGradient : 1;
     147             : 
     148             : public:
     149             :     TYPEINFO_OVERRIDE();
     150             :     SdrDragGradient(SdrDragView& rNewView, bool bGrad = true);
     151             : 
     152           0 :     bool IsGradient() const { return bIsGradient; }
     153             : 
     154             :     virtual void TakeSdrDragComment(OUString& rStr) const SAL_OVERRIDE;
     155             :     virtual bool BeginSdrDrag() SAL_OVERRIDE;
     156             :     virtual void MoveSdrDrag(const Point& rPnt) SAL_OVERRIDE;
     157             :     virtual bool EndSdrDrag(bool bCopy) SAL_OVERRIDE;
     158             :     virtual Pointer GetSdrDragPointer() const SAL_OVERRIDE;
     159             :     virtual void CancelSdrDrag() SAL_OVERRIDE;
     160             : };
     161             : 
     162             : 
     163             : //   SdrDragCrook
     164             : 
     165           0 : class SdrDragCrook : public SdrDragMethod
     166             : {
     167             : private:
     168             :     Rectangle                   aMarkRect;
     169             :     Point                       aMarkCenter;
     170             :     Point                       aCenter;
     171             :     Point                       aStart;
     172             :     Fraction                    aFact;
     173             :     Point                       aRad;
     174             :     bool                        bContortionAllowed;
     175             :     bool                        bNoContortionAllowed;
     176             :     bool                        bContortion;
     177             :     bool                        bResizeAllowed;
     178             :     bool                        bResize;
     179             :     bool                        bRotateAllowed;
     180             :     bool                        bRotate;
     181             :     bool                        bVertical;
     182             :     bool                        bValid;
     183             :     bool                        bLft;
     184             :     bool                        bRgt;
     185             :     bool                        bUpr;
     186             :     bool                        bLwr;
     187             :     bool                        bAtCenter;
     188             :     long                        nWink;
     189             :     long                        nMarkSize;
     190             :     SdrCrookMode                eMode;
     191             : 
     192             :     // helpers for applyCurrentTransformationToPolyPolygon
     193             :     void _MovAllPoints(basegfx::B2DPolyPolygon& rTarget);
     194             :     void _MovCrookPoint(Point& rPnt, Point* pC1, Point* pC2);
     195             : 
     196             : protected:
     197             :     // needs to add drag geometry to the default
     198             :     virtual void createSdrDragEntries() SAL_OVERRIDE;
     199             : 
     200             : public:
     201             :     TYPEINFO_OVERRIDE();
     202             :     SdrDragCrook(SdrDragView& rNewView);
     203             : 
     204             :     virtual void TakeSdrDragComment(OUString& rStr) const SAL_OVERRIDE;
     205             :     virtual bool BeginSdrDrag() SAL_OVERRIDE;
     206             :     virtual void MoveSdrDrag(const Point& rPnt) SAL_OVERRIDE;
     207             :     virtual bool EndSdrDrag(bool bCopy) SAL_OVERRIDE;
     208             :     virtual Pointer GetSdrDragPointer() const SAL_OVERRIDE;
     209             : 
     210             :     virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget) SAL_OVERRIDE;
     211             :     virtual void applyCurrentTransformationToPolyPolygon(basegfx::B2DPolyPolygon& rTarget) SAL_OVERRIDE;
     212             : };
     213             : 
     214             : 
     215             : //   SdrDragDistort
     216             : 
     217           0 : class SdrDragDistort : public SdrDragMethod
     218             : {
     219             : private:
     220             :     Rectangle                   aMarkRect;
     221             :     XPolygon                    aDistortedRect;
     222             :     sal_uInt16                  nPolyPt;
     223             :     bool                        bContortionAllowed;
     224             :     bool                        bNoContortionAllowed;
     225             :     bool                        bContortion;
     226             : 
     227             :     // helper for applyCurrentTransformationToPolyPolygon
     228             :     void _MovAllPoints(basegfx::B2DPolyPolygon& rTarget);
     229             : 
     230             : protected:
     231             :     // needs to add drag geometry to the default
     232             :     virtual void createSdrDragEntries() SAL_OVERRIDE;
     233             : 
     234             : public:
     235             :     TYPEINFO_OVERRIDE();
     236             :     SdrDragDistort(SdrDragView& rNewView);
     237             : 
     238             :     virtual void TakeSdrDragComment(OUString& rStr) const SAL_OVERRIDE;
     239             :     virtual bool BeginSdrDrag() SAL_OVERRIDE;
     240             :     virtual void MoveSdrDrag(const Point& rPnt) SAL_OVERRIDE;
     241             :     virtual bool EndSdrDrag(bool bCopy) SAL_OVERRIDE;
     242             :     virtual Pointer GetSdrDragPointer() const SAL_OVERRIDE;
     243             : 
     244             :     virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget) SAL_OVERRIDE;
     245             :     virtual void applyCurrentTransformationToPolyPolygon(basegfx::B2DPolyPolygon& rTarget) SAL_OVERRIDE;
     246             : };
     247             : 
     248             : 
     249             : //   SdrDragCrop
     250             : 
     251             : // derive from SdrDragObjOwn to have handles aligned to object when it
     252             : // is sheared or rotated
     253           0 : class SdrDragCrop : public SdrDragObjOwn
     254             : {
     255             : public:
     256             :     TYPEINFO_OVERRIDE();
     257             :     SdrDragCrop(SdrDragView& rNewView);
     258             : 
     259             :     virtual void TakeSdrDragComment(OUString& rStr) const SAL_OVERRIDE;
     260             :     virtual bool BeginSdrDrag() SAL_OVERRIDE;
     261             :     virtual bool EndSdrDrag(bool bCopy) SAL_OVERRIDE;
     262             :     virtual Pointer GetSdrDragPointer() const SAL_OVERRIDE;
     263             : };
     264             : 
     265             : 
     266             : #endif // INCLUDED_SVX_SOURCE_SVDRAW_SVDDRGM1_HXX
     267             : 
     268             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10