LCOV - code coverage report
Current view: top level - cui/source/inc - cuitabarea.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 85 0.0 %
Date: 2012-08-25 Functions: 0 75 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 290 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 _CUI_TAB_AREA_HXX
      29                 :            : #define _CUI_TAB_AREA_HXX
      30                 :            : 
      31                 :            : #include <svtools/valueset.hxx>
      32                 :            : #include <vcl/button.hxx>
      33                 :            : #include <vcl/fixed.hxx>
      34                 :            : #include <svx/dlgctrl.hxx>
      35                 :            : #include <svx/xsetit.hxx>
      36                 :            : #include <svx/xfillit0.hxx>
      37                 :            : #include <svx/xfillit.hxx>
      38                 :            : #include <svx/tabarea.hxx>
      39                 :            : 
      40                 :            : class SdrModel;
      41                 :            : class SdrView;
      42                 :            : 
      43                 :            : /************************************************************************/
      44                 :            : 
      45                 :            : class SvxAreaTabDialog : public SfxTabDialog
      46                 :            : {
      47                 :            : private:
      48                 :            :     SdrModel*           mpDrawModel;
      49                 :            : 
      50                 :            :     XColorListRef         mpColorList;
      51                 :            :     XColorListRef         mpNewColorList;
      52                 :            :     XGradientListRef      mpGradientList;
      53                 :            :     XGradientListRef      mpNewGradientList;
      54                 :            :     XHatchListRef         mpHatchingList;
      55                 :            :     XHatchListRef         mpNewHatchingList;
      56                 :            :     XBitmapListRef        mpBitmapList;
      57                 :            :     XBitmapListRef        mpNewBitmapList;
      58                 :            : 
      59                 :            :     const SfxItemSet&   mrOutAttrs;
      60                 :            : 
      61                 :            :     ChangeType          mnColorListState;
      62                 :            :     ChangeType          mnBitmapListState;
      63                 :            :     ChangeType          mnGradientListState;
      64                 :            :     ChangeType          mnHatchingListState;
      65                 :            : 
      66                 :            :     sal_uInt16              mnPageType;
      67                 :            :     sal_uInt16              mnDlgType;
      68                 :            :     sal_uInt16              mnPos;
      69                 :            :     sal_Bool                mbAreaTP;
      70                 :            : 
      71                 :            :     virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
      72                 :            : 
      73                 :            : protected:
      74                 :            :     virtual short       Ok();
      75                 :            : #ifdef _SVX_TABAREA_CXX
      76                 :            :     DECL_LINK( CancelHdlImpl, void * );
      77                 :            :     void                SavePalettes();
      78                 :            : #endif
      79                 :            : 
      80                 :            : public:
      81                 :            :     SvxAreaTabDialog( Window* pParent,
      82                 :            :                       const SfxItemSet* pAttr, SdrModel* pModel,
      83                 :            :                       const SdrView* pSdrView = NULL );
      84                 :            :     ~SvxAreaTabDialog();
      85                 :            : 
      86                 :          0 :     void                SetNewColorList( XColorListRef pColTab )
      87                 :          0 :                             { mpNewColorList = pColTab; }
      88                 :          0 :     XColorListRef         GetNewColorList() const { return mpNewColorList; }
      89                 :          0 :     const XColorListRef   GetColorList() const { return mpColorList; }
      90                 :            : 
      91                 :          0 :     void                SetNewGradientList( XGradientListRef pGrdLst)
      92                 :          0 :                             { mpNewGradientList = pGrdLst; }
      93                 :          0 :     XGradientListRef       GetNewGradientList() const
      94                 :          0 :                             { return mpNewGradientList; }
      95                 :            :     const XGradientListRef GetGradientList() const { return mpGradientList; }
      96                 :            : 
      97                 :          0 :     void                 SetNewHatchingList( XHatchListRef pHtchLst)
      98                 :          0 :                             { mpNewHatchingList = pHtchLst; }
      99                 :          0 :     XHatchListRef          GetNewHatchingList() const
     100                 :          0 :                             { return mpNewHatchingList; }
     101                 :            :     const XHatchListRef    GetHatchingList() const { return mpHatchingList; }
     102                 :            : 
     103                 :          0 :     void                 SetNewBitmapList( XBitmapListRef pBmpLst)
     104                 :          0 :                             { mpNewBitmapList = pBmpLst; }
     105                 :          0 :     XBitmapListRef         GetNewBitmapList() const { return mpNewBitmapList; }
     106                 :            :     const XBitmapListRef   GetBitmapList() const { return mpBitmapList; }
     107                 :            : };
     108                 :            : 
     109                 :            : /************************************************************************/
     110                 :            : 
     111 [ #  # ][ #  # ]:          0 : class SvxTransparenceTabPage : public SvxTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     112                 :            : {
     113                 :            :     using TabPage::ActivatePage;
     114                 :            :     using TabPage::DeactivatePage;
     115                 :            : 
     116                 :            :     const SfxItemSet&   rOutAttrs;
     117                 :            :     RECT_POINT          eRP;
     118                 :            : 
     119                 :            :     sal_uInt16          nPageType;
     120                 :            :     sal_uInt16          nDlgType;
     121                 :            : 
     122                 :            :     // main selection
     123                 :            :     FixedLine           aFlProp;
     124                 :            :     RadioButton         aRbtTransOff;
     125                 :            :     RadioButton         aRbtTransLinear;
     126                 :            :     RadioButton         aRbtTransGradient;
     127                 :            : 
     128                 :            :     /// linear transparency
     129                 :            :     MetricField         aMtrTransparent;
     130                 :            : 
     131                 :            :     // gradient transparency
     132                 :            :     FixedText           aFtTrgrType;
     133                 :            :     ListBox             aLbTrgrGradientType;
     134                 :            :     FixedText           aFtTrgrCenterX;
     135                 :            :     MetricField         aMtrTrgrCenterX;
     136                 :            :     FixedText           aFtTrgrCenterY;
     137                 :            :     MetricField         aMtrTrgrCenterY;
     138                 :            :     FixedText           aFtTrgrAngle;
     139                 :            :     MetricField         aMtrTrgrAngle;
     140                 :            :     FixedText           aFtTrgrBorder;
     141                 :            :     MetricField         aMtrTrgrBorder;
     142                 :            :     FixedText           aFtTrgrStartValue;
     143                 :            :     MetricField         aMtrTrgrStartValue;
     144                 :            :     FixedText           aFtTrgrEndValue;
     145                 :            :     MetricField         aMtrTrgrEndValue;
     146                 :            : 
     147                 :            :     // preview
     148                 :            :     SvxXRectPreview     aCtlBitmapPreview;
     149                 :            :     SvxXRectPreview     aCtlXRectPreview;
     150                 :            :     sal_Bool                bBitmap;
     151                 :            : 
     152                 :            :     XOutdevItemPool*    pXPool;
     153                 :            :     XFillAttrSetItem    aXFillAttr;
     154                 :            :     SfxItemSet&         rXFSet;
     155                 :            : 
     156                 :            : #ifdef _SVX_TPAREA_CXX
     157                 :            :     DECL_LINK(ClickTransOffHdl_Impl, void * );
     158                 :            :     DECL_LINK(ClickTransLinearHdl_Impl, void * );
     159                 :            :     DECL_LINK(ClickTransGradientHdl_Impl, void * );
     160                 :            :     DECL_LINK(ModifyTransparentHdl_Impl, void*);
     161                 :            :     DECL_LINK(ChangeTrgrTypeHdl_Impl, void*);
     162                 :            :     DECL_LINK(ModifiedTrgrHdl_Impl, void*);
     163                 :            : #endif
     164                 :            : 
     165                 :            :     void ActivateLinear(sal_Bool bActivate);
     166                 :            :     void ActivateGradient(sal_Bool bActivate);
     167                 :            :     void SetControlState_Impl(XGradientStyle eXGS);
     168                 :            : 
     169                 :            :     sal_Bool InitPreview ( const SfxItemSet& rSet );
     170                 :            :     void InvalidatePreview (sal_Bool bEnable = sal_True );
     171                 :            : 
     172                 :            : public:
     173                 :            :     SvxTransparenceTabPage(Window* pParent, const SfxItemSet& rInAttrs);
     174                 :            :     void Construct();
     175                 :            : 
     176                 :            :     static SfxTabPage* Create(Window*, const SfxItemSet&);
     177                 :            :     static sal_uInt16* GetRanges();
     178                 :            : 
     179                 :            :     virtual sal_Bool FillItemSet(SfxItemSet&);
     180                 :            :     virtual void Reset(const SfxItemSet&);
     181                 :            :     virtual void ActivatePage(const SfxItemSet& rSet);
     182                 :            :     virtual int  DeactivatePage(SfxItemSet* pSet);
     183                 :            :     virtual void PointChanged(Window* pWindow, RECT_POINT eRP);
     184                 :            : 
     185                 :          0 :     void SetPageType(sal_uInt16 nInType) { nPageType = nInType; }
     186                 :          0 :     void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; }
     187                 :            :     virtual void PageCreated (SfxAllItemSet aSet);
     188                 :            : };
     189                 :            : 
     190                 :            : /************************************************************************/
     191                 :            : 
     192 [ #  # ][ #  # ]:          0 : class SvxAreaTabPage : public SvxTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     193                 :            : {
     194                 :            :     using TabPage::ActivatePage;
     195                 :            :     using TabPage::DeactivatePage;
     196                 :            : 
     197                 :            : private:
     198                 :            :     FixedLine           aFlProp;
     199                 :            :     ListBox             aTypeLB;
     200                 :            : 
     201                 :            :     ColorLB             aLbColor;
     202                 :            :     GradientLB          aLbGradient;
     203                 :            :     HatchingLB          aLbHatching;
     204                 :            :     BitmapLB            aLbBitmap;
     205                 :            :     SvxXRectPreview     aCtlBitmapPreview;
     206                 :            : 
     207                 :            :     TriStateBox         aTsbStepCount;
     208                 :            :     FixedLine           aFlStepCount;
     209                 :            :     NumericField        aNumFldStepCount;
     210                 :            : 
     211                 :            :     CheckBox            aCbxHatchBckgrd;
     212                 :            :     ColorLB             aLbHatchBckgrdColor;
     213                 :            : 
     214                 :            :     FixedLine           aFlSize;
     215                 :            :     TriStateBox         aTsbOriginal;
     216                 :            :     TriStateBox         aTsbScale;
     217                 :            :     FixedText           aFtXSize;
     218                 :            :     MetricField         aMtrFldXSize;
     219                 :            :     FixedText           aFtYSize;
     220                 :            :     MetricField         aMtrFldYSize;
     221                 :            :     FixedLine           aFlPosition;
     222                 :            :     SvxRectCtl          aCtlPosition;
     223                 :            :     FixedText           aFtXOffset;
     224                 :            :     MetricField         aMtrFldXOffset;
     225                 :            :     FixedText           aFtYOffset;
     226                 :            :     MetricField         aMtrFldYOffset;
     227                 :            :     TriStateBox         aTsbTile;
     228                 :            :     TriStateBox         aTsbStretch;
     229                 :            :     FixedLine           aFlOffset;
     230                 :            :     RadioButton         aRbtRow;
     231                 :            :     RadioButton         aRbtColumn;
     232                 :            :     MetricField         aMtrFldOffset;
     233                 :            : 
     234                 :            :     SvxXRectPreview     aCtlXRectPreview;
     235                 :            : 
     236                 :            :     const SfxItemSet&   rOutAttrs;
     237                 :            :     RECT_POINT          eRP;
     238                 :            : 
     239                 :            :     XColorListRef         pColorList;
     240                 :            :     XGradientListRef      pGradientList;
     241                 :            :     XHatchListRef         pHatchingList;
     242                 :            :     XBitmapListRef        pBitmapList;
     243                 :            : 
     244                 :            :     ChangeType*         pnColorListState;
     245                 :            :     ChangeType*         pnBitmapListState;
     246                 :            :     ChangeType*         pnGradientListState;
     247                 :            :     ChangeType*         pnHatchingListState;
     248                 :            : 
     249                 :            :     sal_uInt16 nPageType;
     250                 :            :     sal_uInt16 nDlgType;
     251                 :            :     sal_uInt16 nPos;
     252                 :            : 
     253                 :            :     sal_Bool*               pbAreaTP;
     254                 :            : 
     255                 :            :     XOutdevItemPool*    pXPool;
     256                 :            :     XFillAttrSetItem    aXFillAttr;
     257                 :            :     SfxItemSet&         rXFSet;
     258                 :            : 
     259                 :            :     SfxMapUnit          ePoolUnit;
     260                 :            :     FieldUnit           eFUnit;
     261                 :            : 
     262                 :            : #ifdef _SVX_TPAREA_CXX
     263                 :            :     DECL_LINK(SelectDialogTypeHdl_Impl, void *);
     264                 :            :     DECL_LINK( ModifyColorHdl_Impl, void * );
     265                 :            :     DECL_LINK( ModifyHatchBckgrdColorHdl_Impl, void * );
     266                 :            :     DECL_LINK( ModifyGradientHdl_Impl, void * );
     267                 :            :     DECL_LINK( ModifyHatchingHdl_Impl, void * );
     268                 :            :     DECL_LINK( ToggleHatchBckgrdColorHdl_Impl, void * );
     269                 :            :     DECL_LINK( ModifyBitmapHdl_Impl, void * );
     270                 :            :     DECL_LINK( ModifyStepCountHdl_Impl, void * );
     271                 :            :     DECL_LINK( ModifyTileHdl_Impl, void * );
     272                 :            :     DECL_LINK( ClickScaleHdl_Impl, void * );
     273                 :            :     void ClickInvisibleHdl_Impl();
     274                 :            :     void ClickHatchingHdl_Impl();
     275                 :            :     void ClickGradientHdl_Impl();
     276                 :            :     void ClickColorHdl_Impl();
     277                 :            :     void ClickBitmapHdl_Impl();
     278                 :            : #endif
     279                 :            : 
     280                 :            : public:
     281                 :            :     SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
     282                 :            : 
     283                 :            :     void    Construct();
     284                 :            : 
     285                 :            :     static  SfxTabPage* Create( Window*, const SfxItemSet& );
     286                 :            :     static  sal_uInt16*     GetRanges();
     287                 :            : 
     288                 :            :     virtual sal_Bool FillItemSet( SfxItemSet& );
     289                 :            :     virtual void Reset( const SfxItemSet & );
     290                 :            :     virtual void ActivatePage( const SfxItemSet& rSet );
     291                 :            :     virtual int  DeactivatePage( SfxItemSet* pSet );
     292                 :            :     virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
     293                 :            : 
     294                 :          0 :     void    SetColorList( XColorListRef pColTab ) { pColorList = pColTab; }
     295                 :          0 :     void    SetGradientList( XGradientListRef pGrdLst)
     296                 :          0 :                 { pGradientList = pGrdLst; }
     297                 :          0 :     void    SetHatchingList( XHatchListRef pHtchLst)
     298                 :          0 :                 { pHatchingList = pHtchLst; }
     299                 :          0 :     void    SetBitmapList( XBitmapListRef pBmpLst) { pBitmapList = pBmpLst; }
     300                 :            : 
     301                 :          0 :     void    SetPageType( sal_uInt16 nInType ) { nPageType = nInType; }
     302                 :          0 :     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
     303                 :          0 :     void    SetPos( sal_uInt16 nInPos ) { nPos = nInPos; }
     304                 :          0 :     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
     305                 :            :     virtual void PageCreated (SfxAllItemSet aSet);
     306                 :          0 :     void    SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
     307                 :          0 :     void    SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; }
     308                 :          0 :     void    SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; }
     309                 :          0 :     void    SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; }
     310                 :            : };
     311                 :            : 
     312                 :            : 
     313 [ #  # ][ #  # ]:          0 : class SvxShadowTabPage : public SvxTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     314                 :            : {
     315                 :            :     using TabPage::ActivatePage;
     316                 :            :     using TabPage::DeactivatePage;
     317                 :            : 
     318                 :            : private:
     319                 :            :     FixedLine           aFlProp;
     320                 :            :     TriStateBox         aTsbShowShadow;
     321                 :            :     FixedText           aFtPosition;
     322                 :            :     SvxRectCtl          aCtlPosition;
     323                 :            :     FixedText           aFtDistance;
     324                 :            :     MetricField         aMtrDistance;
     325                 :            :     FixedText           aFtShadowColor;
     326                 :            :     ColorLB             aLbShadowColor;
     327                 :            :     FixedText           aFtTransparent;
     328                 :            :     MetricField         aMtrTransparent;
     329                 :            :     SvxXShadowPreview   aCtlXRectPreview;
     330                 :            : 
     331                 :            :     const SfxItemSet&   rOutAttrs;
     332                 :            :     RECT_POINT          eRP;
     333                 :            : 
     334                 :            :     XColorListRef         pColorList;
     335                 :            :     ChangeType*         pnColorListState;
     336                 :            :     sal_uInt16              nPageType;
     337                 :            :     sal_uInt16              nDlgType;
     338                 :            :     sal_uInt16*             pPos;
     339                 :            :     sal_Bool*               pbAreaTP;
     340                 :            : 
     341                 :            :     sal_Bool                bDisable;
     342                 :            : 
     343                 :            :     XOutdevItemPool*    pXPool;
     344                 :            :     XFillAttrSetItem    aXFillAttr;
     345                 :            :     SfxItemSet&         rXFSet;
     346                 :            :     SfxMapUnit          ePoolUnit;
     347                 :            : 
     348                 :            : #ifdef _SVX_TPSHADOW_CXX
     349                 :            :     DECL_LINK( ClickShadowHdl_Impl, void * );
     350                 :            :     DECL_LINK( ModifyShadowHdl_Impl, void * );
     351                 :            : #endif
     352                 :            : 
     353                 :            : public:
     354                 :            :     SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
     355                 :            : 
     356                 :            :     void    Construct();
     357                 :            :     static  SfxTabPage* Create( Window*, const SfxItemSet& );
     358                 :            :     static  sal_uInt16*     GetRanges();
     359                 :            : 
     360                 :            :     virtual sal_Bool FillItemSet( SfxItemSet& );
     361                 :            :     virtual void Reset( const SfxItemSet & );
     362                 :            :     virtual void ActivatePage( const SfxItemSet& rSet );
     363                 :            :     virtual int  DeactivatePage( SfxItemSet* pSet );
     364                 :            :     virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
     365                 :            : 
     366                 :          0 :     void    SetColorList( XColorListRef pColTab ) { pColorList = pColTab; }
     367                 :          0 :     void    SetPageType( sal_uInt16 nInType ) { nPageType = nInType; }
     368                 :          0 :     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
     369                 :          0 :     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
     370                 :          0 :     void    SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
     371                 :            :     virtual void PageCreated (SfxAllItemSet aSet);
     372                 :            :     void    DisablePage( sal_Bool bIn ) { bDisable = bIn; }
     373                 :            : };
     374                 :            : 
     375                 :            : /************************************************************************/
     376                 :            : 
     377 [ #  # ][ #  # ]:          0 : class SvxGradientTabPage : public SfxTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     378                 :            : {
     379                 :            :     using TabPage::ActivatePage;
     380                 :            :     using TabPage::DeactivatePage;
     381                 :            : 
     382                 :            : private:
     383                 :            :     FixedLine           aFlProp;
     384                 :            :     FixedText           aFtType;
     385                 :            :     ListBox             aLbGradientType;
     386                 :            :     FixedText           aFtCenterX;
     387                 :            :     MetricField         aMtrCenterX;
     388                 :            :     FixedText           aFtCenterY;
     389                 :            :     MetricField         aMtrCenterY;
     390                 :            :     FixedText           aFtAngle;
     391                 :            :     MetricField         aMtrAngle;
     392                 :            :     FixedText           aFtBorder;
     393                 :            :     MetricField         aMtrBorder;
     394                 :            :     FixedText           aFtColorFrom;
     395                 :            :     ColorLB             aLbColorFrom;
     396                 :            :     MetricField         aMtrColorFrom;
     397                 :            :     FixedText           aFtColorTo;
     398                 :            :     ColorLB             aLbColorTo;
     399                 :            :     MetricField         aMtrColorTo;
     400                 :            :     GradientLB          aLbGradients;
     401                 :            :     SvxXRectPreview     aCtlPreview;
     402                 :            :     PushButton          aBtnAdd;
     403                 :            :     PushButton          aBtnModify;
     404                 :            :     PushButton          aBtnDelete;
     405                 :            :     ImageButton         aBtnLoad;
     406                 :            :     ImageButton         aBtnSave;
     407                 :            : 
     408                 :            :     const SfxItemSet&   rOutAttrs;
     409                 :            : 
     410                 :            :     XColorListRef         pColorList;
     411                 :            :     XGradientListRef      pGradientList;
     412                 :            : 
     413                 :            :     ChangeType*         pnGradientListState;
     414                 :            :     ChangeType*         pnColorListState;
     415                 :            :     sal_uInt16*             pPageType;
     416                 :            :     sal_uInt16*             pDlgType;
     417                 :            :     sal_uInt16*             pPos;
     418                 :            :     sal_Bool*               pbAreaTP;
     419                 :            : 
     420                 :            :     XOutdevItemPool*    pXPool;
     421                 :            :     XFillStyleItem      aXFStyleItem;
     422                 :            :     XFillGradientItem   aXGradientItem;
     423                 :            :     XFillAttrSetItem    aXFillAttr;
     424                 :            :     SfxItemSet&         rXFSet;
     425                 :            : 
     426                 :            : #ifdef _SVX_TPGRADNT_CXX
     427                 :            :     DECL_LINK( ClickAddHdl_Impl, void * );
     428                 :            :     DECL_LINK( ClickModifyHdl_Impl, void * );
     429                 :            :     DECL_LINK( ClickDeleteHdl_Impl, void * );
     430                 :            :     DECL_LINK( ChangeGradientHdl_Impl, void * );
     431                 :            :     DECL_LINK( ModifiedHdl_Impl, void * );
     432                 :            :     DECL_LINK( ClickLoadHdl_Impl, void * );
     433                 :            :     DECL_LINK( ClickSaveHdl_Impl, void * );
     434                 :            : 
     435                 :            :     long CheckChanges_Impl();
     436                 :            :     void SetControlState_Impl( XGradientStyle eXGS );
     437                 :            : #endif
     438                 :            : 
     439                 :            : public:
     440                 :            :     SvxGradientTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
     441                 :            : 
     442                 :            :     void    Construct();
     443                 :            : 
     444                 :            :     static  SfxTabPage* Create( Window*, const SfxItemSet& );
     445                 :            :     virtual sal_Bool FillItemSet( SfxItemSet& );
     446                 :            :     virtual void Reset( const SfxItemSet & );
     447                 :            : 
     448                 :            :     virtual void ActivatePage( const SfxItemSet& rSet );
     449                 :            :     virtual int  DeactivatePage( SfxItemSet* pSet );
     450                 :            : 
     451                 :          0 :     void    SetColorList( XColorListRef pColTab ) { pColorList = pColTab; }
     452                 :          0 :     void    SetGradientList( XGradientListRef pGrdLst)
     453                 :          0 :                 { pGradientList = pGrdLst; }
     454                 :            : 
     455                 :          0 :     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     456                 :          0 :     void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
     457                 :          0 :     void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
     458                 :          0 :     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
     459                 :            : 
     460                 :          0 :     void    SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; }
     461                 :          0 :     void    SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
     462                 :            : };
     463                 :            : 
     464                 :            : /************************************************************************/
     465                 :            : 
     466 [ #  # ][ #  # ]:          0 : class SvxHatchTabPage : public SvxTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     467                 :            : {
     468                 :            :     using TabPage::ActivatePage;
     469                 :            :     using TabPage::DeactivatePage;
     470                 :            : 
     471                 :            : private:
     472                 :            :     FixedText           aFtDistance;
     473                 :            :     MetricField         aMtrDistance;
     474                 :            :     FixedText           aFtAngle;
     475                 :            :     MetricField         aMtrAngle;
     476                 :            :     SvxRectCtl          aCtlAngle;
     477                 :            :     FixedLine           aFlProp;
     478                 :            :     FixedText           aFtLineType;
     479                 :            :     ListBox             aLbLineType;
     480                 :            :     FixedText           aFtLineColor;
     481                 :            :     ColorLB             aLbLineColor;
     482                 :            :     HatchingLB          aLbHatchings;
     483                 :            :     SvxXRectPreview     aCtlPreview;
     484                 :            :     PushButton          aBtnAdd;
     485                 :            :     PushButton          aBtnModify;
     486                 :            :     PushButton          aBtnDelete;
     487                 :            :     ImageButton         aBtnLoad;
     488                 :            :     ImageButton         aBtnSave;
     489                 :            : 
     490                 :            :     const SfxItemSet&   rOutAttrs;
     491                 :            :     RECT_POINT          eRP;
     492                 :            : 
     493                 :            :     XColorListRef         pColorList;
     494                 :            :     XHatchListRef         pHatchingList;
     495                 :            : 
     496                 :            :     ChangeType*         pnHatchingListState;
     497                 :            :     ChangeType*         pnColorListState;
     498                 :            :     sal_uInt16*             pPageType;
     499                 :            :     sal_uInt16*             pDlgType;
     500                 :            :     sal_uInt16*             pPos;
     501                 :            :     sal_Bool*               pbAreaTP;
     502                 :            : 
     503                 :            :     XOutdevItemPool*    pXPool;
     504                 :            :     XFillStyleItem      aXFStyleItem;
     505                 :            :     XFillHatchItem      aXHatchItem;
     506                 :            :     XFillAttrSetItem    aXFillAttr;
     507                 :            :     SfxItemSet&         rXFSet;
     508                 :            : 
     509                 :            :     SfxMapUnit          ePoolUnit;
     510                 :            : 
     511                 :            : #ifdef _SVX_TPHATCH_CXX
     512                 :            :     DECL_LINK( ChangeHatchHdl_Impl, void * );
     513                 :            :     DECL_LINK( ModifiedHdl_Impl, void * );
     514                 :            :     DECL_LINK( ClickAddHdl_Impl, void * );
     515                 :            :     DECL_LINK( ClickModifyHdl_Impl, void * );
     516                 :            :     DECL_LINK( ClickDeleteHdl_Impl, void * );
     517                 :            :     DECL_LINK( ClickLoadHdl_Impl, void * );
     518                 :            :     DECL_LINK( ClickSaveHdl_Impl, void * );
     519                 :            : 
     520                 :            :     long CheckChanges_Impl();
     521                 :            : #endif
     522                 :            : 
     523                 :            : public:
     524                 :            :     SvxHatchTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
     525                 :            : 
     526                 :            :     void    Construct();
     527                 :            : 
     528                 :            :     static  SfxTabPage* Create( Window*, const SfxItemSet& );
     529                 :            :     virtual sal_Bool FillItemSet( SfxItemSet& );
     530                 :            :     virtual void Reset( const SfxItemSet & );
     531                 :            : 
     532                 :            :     virtual void ActivatePage( const SfxItemSet& rSet );
     533                 :            :     virtual int  DeactivatePage( SfxItemSet* pSet );
     534                 :            : 
     535                 :            :     virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
     536                 :            : 
     537                 :          0 :     void    SetColorList( XColorListRef pColTab ) { pColorList = pColTab; }
     538                 :          0 :     void    SetHatchingList( XHatchListRef pHtchLst)
     539                 :          0 :                 { pHatchingList = pHtchLst; }
     540                 :            : 
     541                 :          0 :     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     542                 :          0 :     void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
     543                 :          0 :     void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
     544                 :          0 :     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
     545                 :            : 
     546                 :          0 :     void    SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; }
     547                 :          0 :     void    SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
     548                 :            : 
     549                 :            :     virtual void        DataChanged( const DataChangedEvent& rDCEvt );
     550                 :            : };
     551                 :            : 
     552                 :            : /************************************************************************/
     553                 :            : 
     554 [ #  # ][ #  # ]:          0 : class SvxBitmapTabPage : public SvxTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     555                 :            : {
     556                 :            :     using TabPage::ActivatePage;
     557                 :            :     using TabPage::DeactivatePage;
     558                 :            : 
     559                 :            : private:
     560                 :            :     SvxPixelCtl         aCtlPixel;
     561                 :            :     FixedText           aFtPixelEdit;
     562                 :            :     FixedText           aFtColor;
     563                 :            :     ColorLB             aLbColor;
     564                 :            :     FixedText           aFtBackgroundColor;
     565                 :            :     ColorLB             aLbBackgroundColor;
     566                 :            :     FixedText           aLbBitmapsHidden;
     567                 :            :     BitmapLB            aLbBitmaps;
     568                 :            :     FixedLine           aFlProp;
     569                 :            :     SvxXRectPreview     aCtlPreview;
     570                 :            :     PushButton          aBtnAdd;
     571                 :            :     PushButton          aBtnModify;
     572                 :            :     PushButton          aBtnImport;
     573                 :            :     PushButton          aBtnDelete;
     574                 :            :     ImageButton         aBtnLoad;
     575                 :            :     ImageButton         aBtnSave;
     576                 :            : 
     577                 :            :     SvxBitmapCtl        aBitmapCtl;
     578                 :            : 
     579                 :            :     const SfxItemSet&   rOutAttrs;
     580                 :            : 
     581                 :            :     XColorListRef         pColorList;
     582                 :            :     XBitmapListRef        pBitmapList;
     583                 :            : 
     584                 :            :     ChangeType*         pnBitmapListState;
     585                 :            :     ChangeType*         pnColorListState;
     586                 :            :     sal_uInt16*             pPageType;
     587                 :            :     sal_uInt16*             pDlgType;
     588                 :            :     sal_uInt16*             pPos;
     589                 :            :     sal_Bool*               pbAreaTP;
     590                 :            : 
     591                 :            :     sal_Bool                bBmpChanged;
     592                 :            : 
     593                 :            :     XOutdevItemPool*    pXPool;
     594                 :            :     XFillStyleItem      aXFStyleItem;
     595                 :            :     XFillBitmapItem     aXBitmapItem;
     596                 :            :     XFillAttrSetItem    aXFillAttr;
     597                 :            :     SfxItemSet&         rXFSet;
     598                 :            : 
     599                 :            : #ifdef _SVX_TPBITMAP_CXX
     600                 :            :     DECL_LINK( ClickAddHdl_Impl, void * );
     601                 :            :     DECL_LINK( ClickImportHdl_Impl, void * );
     602                 :            :     DECL_LINK( ClickModifyHdl_Impl, void * );
     603                 :            :     DECL_LINK( ClickDeleteHdl_Impl, void * );
     604                 :            :     DECL_LINK( ChangeBitmapHdl_Impl, void * );
     605                 :            :     DECL_LINK( ChangePixelColorHdl_Impl, void * );
     606                 :            :     DECL_LINK( ChangeBackgrndColorHdl_Impl, void * );
     607                 :            :     DECL_LINK( ClickLoadHdl_Impl, void * );
     608                 :            :     DECL_LINK( ClickSaveHdl_Impl, void * );
     609                 :            : 
     610                 :            :     long CheckChanges_Impl();
     611                 :            : #endif
     612                 :            : 
     613                 :            : public:
     614                 :            :     SvxBitmapTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
     615                 :            : 
     616                 :            :     void    Construct();
     617                 :            : 
     618                 :            :     static  SfxTabPage* Create( Window*, const SfxItemSet& );
     619                 :            :     virtual sal_Bool FillItemSet( SfxItemSet& );
     620                 :            :     virtual void Reset( const SfxItemSet & );
     621                 :            : 
     622                 :            :     virtual void ActivatePage( const SfxItemSet& rSet );
     623                 :            :     virtual int  DeactivatePage( SfxItemSet* pSet );
     624                 :            : 
     625                 :            :     virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
     626                 :            : 
     627                 :          0 :     void    SetColorList( XColorListRef pColTab ) { pColorList = pColTab; }
     628                 :          0 :     void    SetBitmapList( XBitmapListRef pBmpLst) { pBitmapList = pBmpLst; }
     629                 :            : 
     630                 :          0 :     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     631                 :          0 :     void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
     632                 :          0 :     void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
     633                 :          0 :     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
     634                 :            : 
     635                 :          0 :     void    SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; }
     636                 :          0 :     void    SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
     637                 :            : 
     638                 :            :     /** Return a label that is associated with the given control.  This
     639                 :            :         label is used to the determine the name for the control.
     640                 :            :         @param pLabeled
     641                 :            :             The control for which to return a label.
     642                 :            :         @return
     643                 :            :             Return a label control that provides a name for the specified
     644                 :            :             control.
     645                 :            :     */
     646                 :            :     virtual Window* GetParentLabeledBy( const Window* pLabeled ) const;
     647                 :            : };
     648                 :            : 
     649                 :            : /// Load save embed functionality
     650                 :            : class SvxLoadSaveEmbed {
     651                 :            :     XPropertyListType   meType;
     652                 :            :     XOutdevItemPool*    mpXPool;
     653                 :            : 
     654                 :            :     Window             *mpTopDlg;
     655                 :            :     CheckBox            maBoxEmbed;
     656                 :            :     ImageButton         maBtnLoad;
     657                 :            :     ImageButton         maBtnSave;
     658                 :            :     FixedText           maTableName;
     659                 :            : 
     660                 :            :     DECL_LINK( EmbedToggleHdl_Impl, void * );
     661                 :            :     DECL_LINK( ClickLoadHdl_Impl, void * );
     662                 :            :     DECL_LINK( ClickSaveHdl_Impl, void * );
     663                 :            : public:
     664                 :            :     SvxLoadSaveEmbed( Window *pParent, Window *pDialog,
     665                 :            :                       const ResId &aLoad, const ResId &aSave,
     666                 :            :                       const ResId &aEmbed, const ResId &aTableName,
     667                 :            :                       XPropertyListType t, XOutdevItemPool* mpXPool );
     668 [ #  # ][ #  # ]:          0 :     virtual ~SvxLoadSaveEmbed() {};
         [ #  # ][ #  # ]
     669                 :            :     XPropertyListRef GetList();
     670                 :            :     void HideLoadSaveEmbed();
     671                 :            :     bool GetEmbed();
     672                 :            :     void SetEmbed( bool bEmbed );
     673                 :            :     void UpdateTableName();
     674                 :            :     void EnableSave( bool bCanSave );
     675                 :            : 
     676                 :            :     virtual bool IsModified() = 0;
     677                 :            :     virtual void SetModified(bool bIsModified) = 0;
     678                 :            :     virtual void AddState(ChangeType nState) = 0;
     679                 :            :     virtual void Update(bool bLoaded) = 0;
     680                 :            : };
     681                 :            : 
     682                 :            : /************************************************************************/
     683                 :            : 
     684                 :            : struct SvxColorTabPageShadow;
     685                 :            : class SvxColorTabPage : public SfxTabPage, public SvxLoadSaveEmbed
     686                 :            : {
     687                 :            :     using TabPage::ActivatePage;
     688                 :            :     using TabPage::DeactivatePage;
     689                 :            : 
     690                 :            : private:
     691                 :            :     SvxColorTabPageShadow *pShadow;
     692                 :            :     FixedLine           aFlProp;
     693                 :            :     FixedText           aFtName;
     694                 :            :     Edit                aEdtName;
     695                 :            :     FixedText           aFtColor;
     696                 :            :     ColorLB             aLbColor;
     697                 :            : 
     698                 :            :     ValueSet            aValSetColorList;
     699                 :            : 
     700                 :            :     SvxXRectPreview     aCtlPreviewOld;
     701                 :            :     SvxXRectPreview     aCtlPreviewNew;
     702                 :            : 
     703                 :            :     ListBox             aLbColorModel;
     704                 :            :     FixedText           aFtColorModel1;
     705                 :            :     MetricField         aMtrFldColorModel1;
     706                 :            :     FixedText           aFtColorModel2;
     707                 :            :     MetricField         aMtrFldColorModel2;
     708                 :            :     FixedText           aFtColorModel3;
     709                 :            :     MetricField         aMtrFldColorModel3;
     710                 :            : 
     711                 :            :     FixedText           aFtColorModel4;
     712                 :            :     MetricField         aMtrFldColorModel4;
     713                 :            : 
     714                 :            :     PushButton          aBtnAdd;
     715                 :            :     PushButton          aBtnModify;
     716                 :            :     PushButton          aBtnWorkOn;
     717                 :            :     PushButton          aBtnDelete;
     718                 :            : 
     719                 :            :     const SfxItemSet&   rOutAttrs;
     720                 :            : 
     721                 :            :     XColorListRef         pColorList;
     722                 :            : 
     723                 :            :     ChangeType*         pnColorListState;
     724                 :            :     sal_uInt16*             pPageType;
     725                 :            :     sal_uInt16*             pDlgType;
     726                 :            :     sal_uInt16*             pPos;
     727                 :            :     sal_Bool*               pbAreaTP;
     728                 :            : 
     729                 :            :     XFillStyleItem      aXFStyleItem;
     730                 :            :     XFillColorItem      aXFillColorItem;
     731                 :            :     XFillAttrSetItem    aXFillAttr;
     732                 :            :     SfxItemSet&         rXFSet;
     733                 :            : 
     734                 :            :     ColorModel          eCM;
     735                 :            : 
     736                 :            :     Color               aAktuellColor;
     737                 :            : 
     738                 :            : #ifdef _SVX_TPCOLOR_CXX
     739                 :            :     void    ConvertColorValues (Color& rColor, ColorModel eModell);
     740                 :            :     void    RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK );
     741                 :            :     void    CmykToRgb_Impl( Color& rColor, const sal_uInt16 nKey );
     742                 :            :     sal_uInt16  ColorToPercent_Impl( sal_uInt16 nColor );
     743                 :            :     sal_uInt16  PercentToColor_Impl( sal_uInt16 nPercent );
     744                 :            : 
     745                 :            :     void    FillValueSet_Impl( ValueSet& rVs );
     746                 :            :     //-----------------------------------------------------------------------------------------------------
     747                 :            :     DECL_LINK( ClickAddHdl_Impl, void * );
     748                 :            :     DECL_LINK( ClickModifyHdl_Impl, void * );
     749                 :            :     DECL_LINK( ClickDeleteHdl_Impl, void * );
     750                 :            :     DECL_LINK( ClickWorkOnHdl_Impl, void * );
     751                 :            : 
     752                 :            :     DECL_LINK( SelectColorLBHdl_Impl, void * );
     753                 :            :     DECL_LINK( SelectValSetHdl_Impl, void * );
     754                 :            :     DECL_LINK( SelectColorModelHdl_Impl, void * );
     755                 :            :     long ChangeColorHdl_Impl( void* p );
     756                 :            :     DECL_LINK( ModifiedHdl_Impl, void * );
     757                 :            :     DECL_LINK( ClickLoadHdl_Impl, void * );
     758                 :            :     DECL_LINK( ClickSaveHdl_Impl, void * );
     759                 :            : 
     760                 :            :     long CheckChanges_Impl();
     761                 :            : #endif
     762                 :            : 
     763                 :            :     void UpdateModified();
     764                 :            : public:
     765                 :            :     SvxColorTabPage( Window* pParent, const SfxItemSet& rInAttrs );
     766                 :            :     ~SvxColorTabPage();
     767                 :            : 
     768                 :            :     void    Construct();
     769                 :            : 
     770                 :            :     static  SfxTabPage* Create( Window*, const SfxItemSet& );
     771                 :            :     virtual sal_Bool FillItemSet( SfxItemSet& );
     772                 :            :     virtual void Reset( const SfxItemSet & );
     773                 :            : 
     774                 :            :     virtual void ActivatePage( const SfxItemSet& rSet );
     775                 :            :     virtual int  DeactivatePage( SfxItemSet* pSet );
     776                 :            : 
     777                 :            :     virtual XPropertyListRef GetPropertyList( XPropertyListType t );
     778                 :            :     virtual void             SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef );
     779                 :            : 
     780                 :            :     void    SetColorList( XColorListRef pColList );
     781                 :          0 :     XColorListRef GetColorList() { return pColorList; }
     782                 :            :     void    SaveToViewFrame( SfxViewFrame *pViewFrame );
     783                 :            :     void    SetupForViewFrame( SfxViewFrame *pViewFrame );
     784                 :            : 
     785                 :          0 :     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     786                 :          0 :     void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
     787                 :          0 :     void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
     788                 :          0 :     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
     789                 :            : 
     790                 :          0 :     void    SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
     791                 :            : 
     792                 :            :     virtual void FillUserData();
     793                 :            : 
     794                 :          0 :     virtual bool IsModified()
     795                 :            :     {
     796                 :          0 :         return *pnColorListState & CT_MODIFIED;
     797                 :            :     }
     798                 :          0 :     virtual void SetModified(bool bIsModified)
     799                 :            :     {
     800         [ #  # ]:          0 :         if (bIsModified)
     801                 :          0 :             *pnColorListState |= CT_MODIFIED;
     802                 :            :         else
     803                 :          0 :             *pnColorListState &= ~CT_MODIFIED;
     804                 :          0 :     }
     805                 :          0 :     virtual void AddState(ChangeType nState)
     806                 :            :     {
     807                 :          0 :         *pnColorListState |= nState;
     808                 :          0 :     }
     809                 :            :     virtual void Update(bool bLoaded);
     810                 :            : };
     811                 :            : 
     812                 :            : #endif // _CUI_TAB_AREA_HXX
     813                 :            : 
     814                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10