LCOV - code coverage report
Current view: top level - cui/source/inc - transfrm.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 6 0.0 %
Date: 2012-08-25 Functions: 0 9 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 86 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                 :            : #ifndef _SVX_TRANSFRM_HXX
      29                 :            : #define _SVX_TRANSFRM_HXX
      30                 :            : 
      31                 :            : #include <svx/dlgctrl.hxx>
      32                 :            : 
      33                 :            : #include <vcl/fixed.hxx>
      34                 :            : 
      35                 :            : // #i75273#
      36                 :            : #include <basegfx/range/b2drange.hxx>
      37                 :            : 
      38                 :            : // predefines
      39                 :            : class SdrView;
      40                 :            : 
      41                 :            : /*************************************************************************
      42                 :            : |*
      43                 :            : |* Transform-Tab-Dialog
      44                 :            : |*
      45                 :            : \************************************************************************/
      46                 :            : 
      47                 :            : /** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor
      48                 :            :     to disable the size controls */
      49                 :            : const sal_uInt16 SVX_OBJ_NORESIZE = 0x0100;
      50                 :            : 
      51                 :            : /** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor
      52                 :            :     to disable the protect controls */
      53                 :            : const sal_uInt16 SVX_OBJ_NOPROTECT = 0x0200;
      54                 :            : 
      55                 :            : class SvxTransformTabDialog : public SfxTabDialog
      56                 :            : {
      57                 :            : private:
      58                 :            :     const SdrView*      pView;
      59                 :            : 
      60                 :            :     sal_uInt16              nAnchorCtrls;
      61                 :            :     Link                aValidateLink;
      62                 :            : 
      63                 :            :     virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
      64                 :            : 
      65                 :            : public:
      66                 :            : 
      67                 :            :             SvxTransformTabDialog( Window* pParent, const SfxItemSet* pAttr,
      68                 :            :                             const SdrView* pView,
      69                 :            :                             sal_uInt16 nAnchorTypes = 0);
      70                 :            :             ~SvxTransformTabDialog();
      71                 :            : 
      72                 :            :             //link for the Writer to validate positions
      73                 :            :             void SetValidateFramePosLink( const Link& rLink );
      74                 :            : };
      75                 :            : 
      76                 :            : /*************************************************************************
      77                 :            : |*
      78                 :            : |* position and size tab page
      79                 :            : |*
      80                 :            : \************************************************************************/
      81                 :            : 
      82 [ #  # ][ #  # ]:          0 : class SvxPositionSizeTabPage : public SvxTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
      83                 :            : {
      84                 :            :     using TabPage::ActivatePage;
      85                 :            :     using TabPage::DeactivatePage;
      86                 :            : 
      87                 :            : private:
      88                 :            :     // position
      89                 :            :     FixedLine           maFlPosition;
      90                 :            :     FixedText           maFtPosX;
      91                 :            :     MetricField         maMtrPosX;
      92                 :            :     FixedText           maFtPosY;
      93                 :            :     MetricField         maMtrPosY;
      94                 :            :     FixedText           maFtPosReference;
      95                 :            :     SvxRectCtl          maCtlPos;
      96                 :            : 
      97                 :            :     // size
      98                 :            :     FixedLine           maFlSize;
      99                 :            :     FixedText           maFtWidth;
     100                 :            :     MetricField         maMtrWidth;
     101                 :            :     FixedText           maFtHeight;
     102                 :            :     MetricField         maMtrHeight;
     103                 :            :     CheckBox            maCbxScale;
     104                 :            :     FixedText           maFtSizeReference;
     105                 :            :     SvxRectCtl          maCtlSize;
     106                 :            : 
     107                 :            :     // protect
     108                 :            :     FixedLine           maFlProtect;
     109                 :            :     TriStateBox         maTsbPosProtect;
     110                 :            :     TriStateBox         maTsbSizeProtect;
     111                 :            : 
     112                 :            :     // adjust
     113                 :            :     FixedLine           maFlAdjust;
     114                 :            :     TriStateBox         maTsbAutoGrowWidth;
     115                 :            :     TriStateBox         maTsbAutoGrowHeight;
     116                 :            : 
     117                 :            :     FixedLine           maFlDivider;
     118                 :            : 
     119                 :            : private:
     120                 :            :     const SfxItemSet&   mrOutAttrs;
     121                 :            : 
     122                 :            :     const SdrView*      mpView;
     123                 :            : 
     124                 :            :     // #i75273#
     125                 :            :     basegfx::B2DRange   maRange;
     126                 :            :     basegfx::B2DRange   maWorkRange;
     127                 :            :     basegfx::B2DPoint   maAnchor;
     128                 :            : 
     129                 :            :     SfxMapUnit          mePoolUnit;
     130                 :            :     FieldUnit           meDlgUnit;
     131                 :            :     MapUnit             meMapUnit;
     132                 :            :     TriState            mnProtectSizeState;
     133                 :            :     bool                mbPageDisabled;
     134                 :            :     bool                mbProtectDisabled;
     135                 :            :     bool                mbSizeDisabled;
     136                 :            :     bool                mbAdjustDisabled;
     137                 :            : 
     138                 :            :     // frome size
     139                 :            :     // #i75273#
     140                 :            :     double              mfOldWidth;
     141                 :            :     double              mfOldHeight;
     142                 :            :     RECT_POINT          meRP;
     143                 :            : 
     144                 :            :     //------------------------------------
     145                 :            : #if _SOLAR__PRIVATE
     146                 :            :     DECL_LINK( ChangePosProtectHdl, void * );
     147                 :            :     DECL_LINK( ChangeSizeProtectHdl, void * );
     148                 :            : 
     149                 :            :     void SetMinMaxPosition();
     150                 :            :     void GetTopLeftPosition(double& rfX, double& rfY, const basegfx::B2DRange& rRange);
     151                 :            : #endif
     152                 :            : 
     153                 :            : #if _SOLAR__PRIVATE
     154                 :            :     DECL_LINK( ChangeWidthHdl, void * );
     155                 :            :     DECL_LINK( ChangeHeightHdl, void * );
     156                 :            :     DECL_LINK( ClickSizeProtectHdl, void * );
     157                 :            :     DECL_LINK( ClickAutoHdl, void * );
     158                 :            : 
     159                 :            :     void        SetMaxSize( Rectangle aRect );
     160                 :            : #endif
     161                 :            : 
     162                 :            : public:
     163                 :            :     SvxPositionSizeTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
     164                 :            : 
     165                 :            :     static SfxTabPage* Create( Window*, const SfxItemSet& );
     166                 :            :     static sal_uInt16*     GetRanges();
     167                 :            : 
     168                 :            :     virtual sal_Bool FillItemSet( SfxItemSet& );
     169                 :            :     virtual void Reset( const SfxItemSet & );
     170                 :            : 
     171                 :            :     virtual void ActivatePage( const SfxItemSet& rSet );
     172                 :            :     virtual int  DeactivatePage( SfxItemSet* pSet );
     173                 :            : 
     174                 :            :     virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
     175                 :            : 
     176                 :            :     void         Construct();
     177                 :          0 :     void         SetView( const SdrView* pSdrView ) { mpView = pSdrView; }
     178                 :            : 
     179                 :            :     virtual void FillUserData();
     180                 :            : 
     181                 :            :     void        DisableResize();
     182                 :            :     void        DisableProtect();
     183                 :            : 
     184                 :            :     void        UpdateControlStates();
     185                 :            : };
     186                 :            : 
     187                 :            : /*************************************************************************
     188                 :            : |*
     189                 :            : |* rotation angle tab page
     190                 :            : |*
     191                 :            : \************************************************************************/
     192 [ #  # ][ #  # ]:          0 : class SvxAngleTabPage : public SvxTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     193                 :            : {
     194                 :            :     using TabPage::ActivatePage;
     195                 :            :     using TabPage::DeactivatePage;
     196                 :            : 
     197                 :            : private:
     198                 :            :     FixedLine           aFlPosition;
     199                 :            :     FixedText           aFtPosX;
     200                 :            :     MetricField         aMtrPosX;
     201                 :            :     FixedText           aFtPosY;
     202                 :            :     MetricField         aMtrPosY;
     203                 :            :     FixedText           aFtPosPresets;
     204                 :            :     SvxRectCtl          aCtlRect;
     205                 :            : 
     206                 :            :     FixedLine           aFlAngle;
     207                 :            :     FixedText           aFtAngle;
     208                 :            :     MetricField         aMtrAngle;
     209                 :            :     FixedText           aFtAnglePresets;
     210                 :            :     SvxRectCtl          aCtlAngle;
     211                 :            : 
     212                 :            :     const SfxItemSet&   rOutAttrs;
     213                 :            :     const SdrView*      pView;
     214                 :            : 
     215                 :            :     // #i75273#
     216                 :            :     basegfx::B2DRange   maRange;
     217                 :            :     basegfx::B2DPoint   maAnchor;
     218                 :            : 
     219                 :            :     SfxMapUnit          ePoolUnit;
     220                 :            :     FieldUnit           eDlgUnit;
     221                 :            :     MapUnit             eMapUnit;
     222                 :            :     //------------------------------------
     223                 :            : #if _SOLAR__PRIVATE
     224                 :            :     DECL_LINK( ModifiedHdl, void * );
     225                 :            : #endif
     226                 :            : public:
     227                 :            :          SvxAngleTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
     228                 :            : 
     229                 :            :     static SfxTabPage* Create( Window*, const SfxItemSet& );
     230                 :            :     static sal_uInt16*     GetRanges();
     231                 :            : 
     232                 :            :     virtual sal_Bool FillItemSet( SfxItemSet& );
     233                 :            :     virtual void Reset( const SfxItemSet & );
     234                 :            : 
     235                 :            :     virtual void ActivatePage( const SfxItemSet& rSet );
     236                 :            :     virtual int  DeactivatePage( SfxItemSet* pSet );
     237                 :            : 
     238                 :            :     virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
     239                 :            : 
     240                 :            :     void         Construct();
     241                 :          0 :     void         SetView( const SdrView* pSdrView ) { pView = pSdrView; }
     242                 :            : };
     243                 :            : 
     244                 :            : /*************************************************************************
     245                 :            : |*
     246                 :            : |* slant/corner radius tab page
     247                 :            : |*
     248                 :            : \************************************************************************/
     249 [ #  # ][ #  # ]:          0 : class SvxSlantTabPage : public SvxTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     250                 :            : {
     251                 :            :     using TabPage::ActivatePage;
     252                 :            :     using TabPage::DeactivatePage;
     253                 :            : 
     254                 :            : private:
     255                 :            :     FixedLine           aFlRadius;
     256                 :            :     FixedText           aFtRadius;
     257                 :            :     MetricField         aMtrRadius;
     258                 :            :     FixedLine           aFlAngle;
     259                 :            :     FixedText           aFtAngle;
     260                 :            :     MetricField         aMtrAngle;
     261                 :            : 
     262                 :            :     const SfxItemSet&   rOutAttrs;
     263                 :            : 
     264                 :            :     const SdrView*      pView;
     265                 :            : 
     266                 :            :     // #i75273#
     267                 :            :     basegfx::B2DRange   maRange;
     268                 :            : 
     269                 :            :     SfxMapUnit          ePoolUnit;
     270                 :            :     FieldUnit           eDlgUnit;
     271                 :            :     MapUnit             eMapUnit;
     272                 :            :     //------------------------------------
     273                 :            : public:
     274                 :            :          SvxSlantTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
     275                 :            : 
     276                 :            :     static SfxTabPage* Create( Window*, const SfxItemSet& );
     277                 :            :     static sal_uInt16*     GetRanges();
     278                 :            : 
     279                 :            :     virtual sal_Bool FillItemSet( SfxItemSet& );
     280                 :            :     virtual void Reset( const SfxItemSet & );
     281                 :            : 
     282                 :            :     virtual void ActivatePage( const SfxItemSet& rSet );
     283                 :            :     virtual int  DeactivatePage( SfxItemSet* pSet );
     284                 :            : 
     285                 :            :     virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
     286                 :            : 
     287                 :            :     void         Construct();
     288                 :          0 :     void         SetView( const SdrView* pSdrView ) { pView = pSdrView; }
     289                 :            : };
     290                 :            : 
     291                 :            : 
     292                 :            : 
     293                 :            : #endif // _SVX_TRANSFRM_HXX
     294                 :            : 
     295                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10