LCOV - code coverage report
Current view: top level - svx/inc/svx - bmpmask.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2012-08-25 Functions: 0 4 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 4 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 _BMPMASK_HXX_
      29                 :            : #define _BMPMASK_HXX_
      30                 :            : 
      31                 :            : #include <sfx2/ctrlitem.hxx>
      32                 :            : #include <sfx2/dockwin.hxx>
      33                 :            : #include <vcl/toolbox.hxx>
      34                 :            : #include <vcl/fixed.hxx>
      35                 :            : #include <vcl/group.hxx>
      36                 :            : #include <vcl/graph.hxx>
      37                 :            : #include "svx/svxdllapi.h"
      38                 :            : 
      39                 :            : #include <svx/dlgctrl.hxx>
      40                 :            : 
      41                 :            : /*************************************************************************
      42                 :            : |*
      43                 :            : |*  class SvxBmpMaskSelectItem
      44                 :            : |*
      45                 :            : \************************************************************************/
      46                 :            : class SvxBmpMask;
      47                 :            : 
      48         [ #  # ]:          0 : class SvxBmpMaskSelectItem : public SfxControllerItem
      49                 :            : {
      50                 :            : private:
      51                 :            :     SvxBmpMask  &rBmpMask;
      52                 :            : 
      53                 :            : protected:
      54                 :            :     virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
      55                 :            :                                const SfxPoolItem* pState );
      56                 :            : 
      57                 :            : public:
      58                 :            :     SvxBmpMaskSelectItem( sal_uInt16 nId, SvxBmpMask& rMask,
      59                 :            :                           SfxBindings& rBindings );
      60                 :            : };
      61                 :            : 
      62                 :            : /*************************************************************************
      63                 :            : |*
      64                 :            : |* Derivative from SfxChildWindow as 'container' for Float
      65                 :            : |*
      66                 :            : \************************************************************************/
      67                 :            : 
      68         [ #  # ]:          0 : class SVX_DLLPUBLIC SvxBmpMaskChildWindow : public SfxChildWindow
      69                 :            : {
      70                 :            :  public:
      71                 :            :                             SvxBmpMaskChildWindow( Window*,
      72                 :            :                                                    sal_uInt16, SfxBindings*,
      73                 :            :                                                    SfxChildWinInfo* );
      74                 :            : 
      75                 :            :     SFX_DECL_CHILDWINDOW_WITHID(SvxBmpMaskChildWindow);
      76                 :            : };
      77                 :            : 
      78                 :            : /*************************************************************************
      79                 :            : |*
      80                 :            : |*  class SvxBmpMask
      81                 :            : |*
      82                 :            : \************************************************************************/
      83                 :            : 
      84                 :            : class MaskData;
      85                 :            : class MaskSet;
      86                 :            : class ColorWindow;
      87                 :            : 
      88                 :            : class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
      89                 :            : {
      90                 :            :     friend class MaskData;
      91                 :            :     friend class MaskSet;
      92                 :            : 
      93                 :            :     Size                aLastSize;
      94                 :            :     ToolBox             aTbxPipette;
      95                 :            :     ColorWindow*        pCtlPipette;
      96                 :            :     PushButton          aBtnExec;
      97                 :            :     FixedLine           aGrpQ;
      98                 :            : 
      99                 :            :     FixedText           aFt1;
     100                 :            :     FixedText           aFt2;
     101                 :            :     FixedText           aFt3;
     102                 :            :     CheckBox            aCbx1;
     103                 :            :     MaskSet*            pQSet1;
     104                 :            :     MetricField         aSp1;
     105                 :            :     ColorLB             aLbColor1;
     106                 :            : 
     107                 :            :     CheckBox            aCbx2;
     108                 :            :     MaskSet*            pQSet2;
     109                 :            :     MetricField         aSp2;
     110                 :            :     ColorLB             aLbColor2;
     111                 :            : 
     112                 :            :     CheckBox            aCbx3;
     113                 :            :     MaskSet*            pQSet3;
     114                 :            :     MetricField         aSp3;
     115                 :            :     ColorLB             aLbColor3;
     116                 :            : 
     117                 :            :     CheckBox            aCbx4;
     118                 :            :     MaskSet*            pQSet4;
     119                 :            :     MetricField         aSp4;
     120                 :            :     ColorLB             aLbColor4;
     121                 :            : 
     122                 :            :     MaskData*           pData;
     123                 :            :     CheckBox            aCbxTrans;
     124                 :            :     ColorLB             aLbColorTrans;
     125                 :            : 
     126                 :            :     XColorListRef       pColLst;
     127                 :            :     Color               aPipetteColor;
     128                 :            :     SvxBmpMaskSelectItem aSelItem;
     129                 :            : 
     130                 :            :     Image               maImgPipette;
     131                 :            : 
     132                 :            :     virtual sal_Bool        Close();
     133                 :            : 
     134                 :            : #ifdef BMPMASK_PRIVATE
     135                 :            : 
     136                 :            :     sal_uInt16              InitColorArrays( Color* pSrcCols, Color* pDstCols,
     137                 :            :                                          sal_uIntPtr* pTols );
     138                 :            : 
     139                 :            :     Bitmap              ImpMask( const Bitmap& rBitmap );
     140                 :            :     GDIMetaFile         ImpMask( const GDIMetaFile& rMtf );
     141                 :            :     Animation           ImpMask( const Animation& rAnimation );
     142                 :            :     BitmapEx            ImpMaskTransparent( const BitmapEx& rBitmapEx,
     143                 :            :                                             const Color& rColor,
     144                 :            :                                             const long nTol );
     145                 :            :     BitmapEx            ImpReplaceTransparency( const BitmapEx& rBmpEx,
     146                 :            :                                                 const Color& rColor );
     147                 :            :     Animation           ImpReplaceTransparency( const Animation& rAnim,
     148                 :            :                                                 const Color& rColor );
     149                 :            :     GDIMetaFile         ImpReplaceTransparency( const GDIMetaFile& rMtf,
     150                 :            :                                                 const Color& rColor );
     151                 :            : 
     152                 :            : #endif // BMPMASK_PRIVATE
     153                 :            : 
     154                 :            : public:
     155                 :            : 
     156                 :            :                         SvxBmpMask( SfxBindings *pBindinx,
     157                 :            :                                     SfxChildWindow *pCW,
     158                 :            :                                     Window* pParent,
     159                 :            :                                     const ResId& rResId );
     160                 :            :                         ~SvxBmpMask();
     161                 :            : 
     162                 :            :     void                SetColor( const Color& rColor );
     163                 :            :     void                PipetteClicked();
     164                 :            : 
     165                 :            :     sal_Bool            NeedsColorList() const;
     166                 :            :     void                SetColorList( const XColorListRef &pColorList );
     167                 :            : 
     168                 :            :     void                SetExecState( sal_Bool bEnable );
     169                 :            : 
     170                 :            :     Graphic             Mask( const Graphic& rGraphic );
     171                 :            : 
     172                 :            :     sal_Bool                IsEyedropping() const;
     173                 :            : 
     174                 :            :     void                onSelect( MaskSet* pSet );
     175                 :            : 
     176                 :            :     virtual void DataChanged( const DataChangedEvent& rDCEvt );
     177                 :            :     void ApplyStyle();
     178                 :            : 
     179                 :            : private:
     180                 :            : 
     181                 :            :     /** Set names for accessible objects.  This is necessary for objects
     182                 :            :         like the source color checkboxes which initially have no name and
     183                 :            :         for which the description would be read by AT.
     184                 :            :     */
     185                 :            :     SVX_DLLPRIVATE void SetAccessibleNames (void);
     186                 :            : };
     187                 :            : 
     188                 :            : #endif // _BMPMASK_HXX_
     189                 :            : 
     190                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10