LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/svx - optgrid.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 20 23 87.0 %
Date: 2013-07-09 Functions: 20 25 80.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             : #ifndef _SVX_OPTGRID_HXX
      20             : #define _SVX_OPTGRID_HXX
      21             : 
      22             : #include <sfx2/tabdlg.hxx>
      23             : #include <svl/eitem.hxx>
      24             : #include <vcl/group.hxx>
      25             : #include <vcl/fixed.hxx>
      26             : #include <vcl/field.hxx>
      27             : #include "svx/svxdllapi.h"
      28             : 
      29             : class SvxGridTabPage;
      30             : 
      31             : // class SvxOptionsGrid --------------------------------------------------
      32             : 
      33             : class SVX_DLLPUBLIC SvxOptionsGrid
      34             : {
      35             : protected:
      36             :     sal_uInt32  nFldDrawX;
      37             :     sal_uInt32  nFldDivisionX;
      38             :     sal_uInt32  nFldDrawY;
      39             :     sal_uInt32  nFldDivisionY;
      40             :     sal_uInt32  nFldSnapX;
      41             :     sal_uInt32  nFldSnapY;
      42             :     sal_Bool    bUseGridsnap:1;
      43             :     sal_Bool    bSynchronize:1;
      44             :     sal_Bool    bGridVisible:1;
      45             :     sal_Bool    bEqualGrid:  1;
      46             : 
      47             : public:
      48             :     SvxOptionsGrid();
      49             :     ~SvxOptionsGrid();
      50             : 
      51         338 :     void    SetFldDrawX(    sal_uInt32 nSet){nFldDrawX      = nSet;}
      52         338 :     void    SetFldDivisionX(sal_uInt32 nSet){nFldDivisionX  = nSet;}
      53         338 :     void    SetFldDrawY   ( sal_uInt32 nSet){nFldDrawY      = nSet;}
      54         338 :     void    SetFldDivisionY(sal_uInt32 nSet){nFldDivisionY  = nSet;}
      55          59 :     void    SetFldSnapX(    sal_uInt32 nSet){nFldSnapX      = nSet;}
      56          59 :     void    SetFldSnapY   ( sal_uInt32 nSet){nFldSnapY      = nSet;}
      57         323 :     void    SetUseGridSnap( sal_Bool bSet ) {bUseGridsnap   = bSet;}
      58         323 :     void    SetSynchronize( sal_Bool bSet ) {bSynchronize   = bSet;}
      59         309 :     void    SetGridVisible( sal_Bool bSet ) {bGridVisible   = bSet;}
      60          30 :     void    SetEqualGrid( sal_Bool bSet )   {bEqualGrid     = bSet;}
      61             : 
      62        1491 :     sal_uInt32  GetFldDrawX(    ) const {  return nFldDrawX;    }
      63        1217 :     sal_uInt32  GetFldDivisionX() const {  return nFldDivisionX;}
      64        1491 :     sal_uInt32  GetFldDrawY   ( ) const {  return nFldDrawY;    }
      65        1217 :     sal_uInt32  GetFldDivisionY() const {  return nFldDivisionY;}
      66          29 :     sal_uInt32  GetFldSnapX(    ) const {  return nFldSnapX;    }
      67          29 :     sal_uInt32  GetFldSnapY   ( ) const {  return nFldSnapY;    }
      68         911 :     sal_Bool    GetUseGridSnap( ) const {  return bUseGridsnap; }
      69         238 :     sal_Bool    GetSynchronize( ) const {  return bSynchronize; }
      70         813 :     sal_Bool    GetGridVisible( ) const {  return bGridVisible; }
      71          29 :     sal_Bool    GetEqualGrid()    const {  return bEqualGrid;   }
      72             : };
      73             : 
      74             : // class SvxGridItem -----------------------------------------------------
      75             : 
      76           0 : class SVX_DLLPUBLIC SvxGridItem : public SvxOptionsGrid, public SfxPoolItem
      77             : {
      78             :     // #i9076#
      79             :     friend class SvxGridTabPage;
      80             : 
      81             : public:
      82           0 :     SvxGridItem( sal_uInt16 _nWhich) : SfxPoolItem(_nWhich){};
      83             :     SvxGridItem( const SvxGridItem& pTestItem );
      84             : 
      85             :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
      86             :     virtual int             operator==( const SfxPoolItem& ) const;
      87             : 
      88             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      89             :                                     SfxMapUnit eCoreMetric,
      90             :                                     SfxMapUnit ePresMetric,
      91             :                                     OUString &rText, const IntlWrapper * = 0 ) const;
      92             : 
      93             : };
      94             : 
      95             : // class SvxGridTabPage --------------------------------------------------
      96             : 
      97           0 : class SVX_DLLPUBLIC SvxGridTabPage : public SfxTabPage
      98             : {
      99             :     using TabPage::ActivatePage;
     100             :     using TabPage::DeactivatePage;
     101             : 
     102             : public:
     103             :     SvxGridTabPage( Window* pParent, const SfxItemSet& rSet );
     104             : 
     105             :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rAttrSet );
     106             : 
     107             :     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
     108             :     virtual void        Reset( const SfxItemSet& rSet );
     109             : 
     110             :     virtual void        ActivatePage( const SfxItemSet& rSet );
     111             :     virtual int         DeactivatePage( SfxItemSet* pSet );
     112             : 
     113             : private:
     114             :     CheckBox            aCbxUseGridsnap;
     115             :     CheckBox            aCbxGridVisible;
     116             : 
     117             :     FixedLine           aFlResolution;
     118             :     FixedText           aFtDrawX;
     119             :     MetricField         aMtrFldDrawX;
     120             :     FixedText           aFtDrawY;
     121             :     MetricField         aMtrFldDrawY;
     122             : 
     123             :     FixedLine           aFlDivision;
     124             :     FixedText           aFtDivisionX;
     125             :     NumericField        aNumFldDivisionX;
     126             :     FixedText           aDivisionPointX;
     127             : 
     128             :     FixedText           aFtDivisionY;
     129             :     NumericField        aNumFldDivisionY;
     130             :     FixedText           aDivisionPointY;
     131             : 
     132             :     CheckBox            aCbxSynchronize;
     133             :     FixedLine           aGrpDrawGrid;
     134             : 
     135             : protected:
     136             :     //these controls are used in draw and impress
     137             :     FixedLine       aGrpSnap;
     138             :     CheckBox        aCbxSnapHelplines;
     139             :     CheckBox        aCbxSnapBorder;
     140             :     CheckBox        aCbxSnapFrame;
     141             :     CheckBox        aCbxSnapPoints;
     142             :     FixedText       aFtSnapArea;
     143             :     MetricField     aMtrFldSnapArea;
     144             : 
     145             :     FixedLine       aSeparatorFL;
     146             : 
     147             :     FixedLine       aGrpOrtho;
     148             :     CheckBox        aCbxOrtho;
     149             :     CheckBox        aCbxBigOrtho;
     150             :     CheckBox        aCbxRotate;
     151             :     MetricField     aMtrFldAngle;
     152             :     FixedText       aFtBezAngle;
     153             :     MetricField     aMtrFldBezAngle;
     154             : 
     155             : private:
     156             :     sal_Bool                bAttrModified;
     157             : 
     158             :     DECL_LINK( ClickRotateHdl_Impl, void * );
     159             :     DECL_LINK( ChangeDrawHdl_Impl, MetricField * );
     160             :     DECL_LINK( ChangeGridsnapHdl_Impl, void * );
     161             :     DECL_LINK( ChangeDivisionHdl_Impl, NumericField * );
     162             : };
     163             : 
     164             : #endif
     165             : 
     166             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10