LCOV - code coverage report
Current view: top level - libreoffice/cui/source/inc - cuitabline.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 34 0.0 %
Date: 2012-12-27 Functions: 0 33 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef _CUI_TAB_LINE_HXX
      21             : #define _CUI_TAB_LINE_HXX
      22             : 
      23             : #include <vector>
      24             : #include <svx/tabline.hxx>
      25             : 
      26             : class SvxLineTabDialog : public SfxTabDialog
      27             : {
      28             : private:
      29             :     SdrModel*           pDrawModel;
      30             :     const SdrObject*    pObj;
      31             : 
      32             :     const SfxItemSet&   rOutAttrs;
      33             : 
      34             :     XColorListRef         pColorList;
      35             :     XColorListRef         mpNewColorList;
      36             :     XDashListRef          pDashList;
      37             :     XDashListRef          pNewDashList;
      38             :     XLineEndListRef       pLineEndList;
      39             :     XLineEndListRef       pNewLineEndList;
      40             :     sal_Bool            bObjSelected;
      41             : 
      42             :     ChangeType          nLineEndListState;
      43             :     ChangeType          nDashListState;
      44             :     ChangeType          mnColorListState;
      45             : 
      46             :     sal_uInt16          nPageType;
      47             :     sal_uInt16          nDlgType;
      48             :     sal_uInt16          nPosDashLb;
      49             :     sal_uInt16          nPosLineEndLb;
      50             :     sal_Bool            mbAreaTP;
      51             : 
      52             :     virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
      53             : 
      54             : protected:
      55             :     virtual short       Ok();
      56             : #ifdef _SVX_TABLINE_CXX
      57             :     DECL_LINK( CancelHdlImpl, void * );
      58             :     void                SavePalettes();
      59             : #endif
      60             : 
      61             : public:
      62             :     SvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr,
      63             :                       SdrModel* pModel, const SdrObject* pObj = NULL,
      64             :                       sal_Bool bHasObj = sal_True );
      65             :     ~SvxLineTabDialog();
      66             : 
      67           0 :     void                SetNewDashList( XDashListRef pInLst)
      68           0 :                         { pNewDashList = pInLst; }
      69           0 :     XDashListRef          GetNewDashList() const { return pNewDashList; }
      70             :     XDashListRef          GetDashList() const { return pDashList; }
      71             : 
      72           0 :     void                SetNewLineEndList( XLineEndListRef pInLst)
      73           0 :                         { pNewLineEndList = pInLst; }
      74           0 :     XLineEndListRef       GetNewLineEndList() const { return pNewLineEndList; }
      75             :     XLineEndListRef       GetLineEndList() const { return pLineEndList; }
      76             : 
      77           0 :     void                SetNewColorList( XColorListRef pColTab ) { mpNewColorList = pColTab; }
      78           0 :     XColorListRef       GetNewColorList() const { return mpNewColorList; }
      79           0 :     XColorListRef       GetColorList() const { return pColorList; }
      80             : };
      81             : 
      82             : /*************************************************************************/
      83             : 
      84             : struct SvxBmpItemInfo;
      85             : typedef ::std::vector< SvxBmpItemInfo* > SvxBmpItemInfoList;
      86             : 
      87             : class SvxLineTabPage : public SvxTabPage
      88             : {
      89             :     using TabPage::ActivatePage;
      90             :     using TabPage::DeactivatePage;
      91             : private:
      92             :     FixedLine           aFlLine;
      93             :     FixedText           aFtLineStyle;
      94             :     LineLB              aLbLineStyle;
      95             :     FixedText           aFtColor;
      96             :     ColorLB             aLbColor;
      97             :     FixedText           aFtLineWidth;
      98             :     MetricField         aMtrLineWidth;
      99             :     FixedText           aFtTransparent;
     100             :     MetricField         aMtrTransparent;
     101             :     FixedLine           aFlLineEnds;
     102             :     LineEndLB           aLbStartStyle;
     103             :     MetricField         aMtrStartWidth;
     104             :     TriStateBox         aTsbCenterStart;
     105             :     FixedText           aFtLineEndsStyle;
     106             :     LineEndLB           aLbEndStyle;
     107             :     FixedText           aFtLineEndsWidth;
     108             :     MetricField         aMtrEndWidth;
     109             :     TriStateBox         aTsbCenterEnd;
     110             :     CheckBox            aCbxSynchronize;
     111             :     FixedLine           aFLSeparator;
     112             :     SvxXLinePreview     aCtlPreview;
     113             : 
     114             :     // #116827#
     115             :     FixedLine           maFLEdgeStyle;
     116             :     FixedText           maFTEdgeStyle;
     117             :     LineEndLB           maLBEdgeStyle;
     118             : 
     119             :     // LineCaps
     120             :     FixedText           maFTCapStyle;
     121             :     LineEndLB           maLBCapStyle;
     122             : 
     123             :     //#58425# symbols on a line (e. g. StarChart) ->
     124             :     /** a list of symbols to be shown in menu. Symbol at position SID_ATTR_SYMBOLTYPE is to be shown in preview.
     125             :         The list position is to be used cyclic. */
     126             :     SdrObjList*         pSymbolList;
     127             :     bool                bNewSize;
     128             :     /// a graphic to be displayed in the preview in case that an automatic symbol is choosen
     129             :     Graphic             aAutoSymbolGraphic;
     130             :     long                nNumMenuGalleryItems;
     131             :     long                nSymbolType;
     132             :     /// attributes for the shown symbols; only necessary if not equal to line properties
     133             :     SfxItemSet*         pSymbolAttr;
     134             :     FixedLine           aFlSymbol;
     135             :     MenuButton          aSymbolMB;
     136             :     FixedText           aSymbolWidthFT;
     137             :     MetricField         aSymbolWidthMF;
     138             :     FixedText           aSymbolHeightFT;
     139             :     MetricField         aSymbolHeightMF;
     140             :     CheckBox            aSymbolRatioCB;
     141             :     std::vector<rtl::OUString> aGrfNames;
     142             :     SvxBmpItemInfoList  aGrfBrushItems;
     143             :     sal_Bool            bLastWidthModified;
     144             :     Size                aSymbolLastSize;
     145             :     Graphic             aSymbolGraphic;
     146             :     Size                aSymbolSize;
     147             :     sal_Bool            bSymbols;
     148             : 
     149             :     const SfxItemSet&   rOutAttrs;
     150             :     RECT_POINT          eRP;
     151             :     sal_Bool            bObjSelected;
     152             : 
     153             :     XOutdevItemPool*    pXPool;
     154             :     XLineStyleItem      aXLStyle;
     155             :     XLineWidthItem      aXWidth;
     156             :     XLineDashItem       aXDash;
     157             :     XLineColorItem      aXColor;
     158             :     XLineAttrSetItem    aXLineAttr;
     159             :     SfxItemSet&         rXLSet;
     160             : 
     161             :     XColorListRef         pColorList;
     162             :     XDashListRef          pDashList;
     163             :     XLineEndListRef       pLineEndList;
     164             : 
     165             :     ChangeType*         pnLineEndListState;
     166             :     ChangeType*         pnDashListState;
     167             :     ChangeType*         pnColorListState;
     168             :     sal_uInt16          nPageType;
     169             :     sal_uInt16          nDlgType;
     170             :     sal_uInt16*         pPosDashLb;
     171             :     sal_uInt16*         pPosLineEndLb;
     172             : 
     173             :     SfxMapUnit          ePoolUnit;
     174             : 
     175             :     // #63083#
     176             :     sal_Int32           nActLineWidth;
     177             : 
     178             :     // handler for gallery popup menu button + size
     179             :     DECL_LINK( GraphicHdl_Impl, MenuButton * );
     180             :     DECL_LINK( MenuCreateHdl_Impl, MenuButton * );
     181             :     DECL_STATIC_LINK( SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem* );
     182             :     DECL_LINK( SizeHdl_Impl, MetricField * );
     183             :     DECL_LINK( RatioHdl_Impl, CheckBox * );
     184             : 
     185             : #ifdef _SVX_TPLINE_CXX
     186             :     DECL_LINK( ClickInvisibleHdl_Impl, void * );
     187             :     DECL_LINK( ChangeStartHdl_Impl, void * );
     188             :     DECL_LINK( ChangeEndHdl_Impl, void * );
     189             :     DECL_LINK( ChangePreviewHdl_Impl, void * );
     190             :     DECL_LINK( ChangeTransparentHdl_Impl, void * );
     191             : 
     192             :     // #116827#
     193             :     DECL_LINK( ChangeEdgeStyleHdl_Impl, void * );
     194             : 
     195             :      // LineCaps
     196             :      DECL_LINK ( ChangeCapStyleHdl_Impl, void * );
     197             : 
     198             :     sal_Bool FillXLSet_Impl();
     199             : #endif
     200             : 
     201             :     void InitSymbols(MenuButton* pButton);
     202             :     void SymbolSelected(MenuButton* pButton);
     203             :     void FillListboxes();
     204             : public:
     205             : 
     206             :     void ShowSymbolControls(sal_Bool bOn);
     207             : 
     208             :     SvxLineTabPage( Window* pParent, const SfxItemSet& rInAttrs );
     209             :     virtual ~SvxLineTabPage();
     210             : 
     211             :     void    Construct();
     212             : 
     213             :     static  SfxTabPage* Create( Window*, const SfxItemSet& );
     214             :     static  sal_uInt16*    GetRanges();
     215             : 
     216             :     virtual sal_Bool FillItemSet( SfxItemSet& );
     217             :     virtual void Reset( const SfxItemSet& );
     218             : 
     219             :     virtual void ActivatePage( const SfxItemSet& rSet );
     220             :     virtual int  DeactivatePage( SfxItemSet* pSet );
     221             : 
     222             :     virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
     223             : 
     224             :     virtual void FillUserData();
     225             : 
     226           0 :     void    SetColorList( XColorListRef pColTab ) { pColorList = pColTab; }
     227           0 :     void    SetDashList( XDashListRef pDshLst ) { pDashList = pDshLst; }
     228           0 :     void    SetLineEndList( XLineEndListRef pLneEndLst) { pLineEndList = pLneEndLst; }
     229           0 :     void    SetObjSelected( sal_Bool bHasObj ) { bObjSelected = bHasObj; }
     230             : 
     231           0 :     void    SetPageType( sal_uInt16 nInType ) { nPageType = nInType; }
     232           0 :     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
     233           0 :     void    SetPosDashLb( sal_uInt16* pInPos ) { pPosDashLb = pInPos; }
     234           0 :     void    SetPosLineEndLb( sal_uInt16* pInPos ) { pPosLineEndLb = pInPos; }
     235             : 
     236           0 :     void    SetLineEndChgd( ChangeType* pIn ) { pnLineEndListState = pIn; }
     237           0 :     void    SetDashChgd( ChangeType* pIn ) { pnDashListState = pIn; }
     238           0 :     void    SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
     239             : 
     240             :     virtual void PageCreated (SfxAllItemSet aSet);
     241             :     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
     242             : };
     243             : 
     244             : /*************************************************************************/
     245             : 
     246           0 : class SvxLineDefTabPage : public SfxTabPage
     247             : {
     248             :     using TabPage::ActivatePage;
     249             :     using TabPage::DeactivatePage;
     250             : private:
     251             :     FixedLine           aFlDefinition;
     252             :     FixedText           aFTLinestyle;
     253             :     LineLB              aLbLineStyles;
     254             :     FixedText           aFtType;
     255             :     ListBox             aLbType1;
     256             :     ListBox             aLbType2;
     257             :     FixedText           aFtNumber;
     258             :     NumericField        aNumFldNumber1;
     259             :     NumericField        aNumFldNumber2;
     260             :     FixedText           aFtLength;
     261             :     MetricField         aMtrLength1;
     262             :     MetricField         aMtrLength2;
     263             :     FixedText           aFtDistance;
     264             :     MetricField         aMtrDistance;
     265             :     CheckBox            aCbxSynchronize;
     266             :     PushButton          aBtnAdd;
     267             :     PushButton          aBtnModify;
     268             :     PushButton          aBtnDelete;
     269             :     ImageButton         aBtnLoad;
     270             :     ImageButton         aBtnSave;
     271             :     SvxXLinePreview     aCtlPreview;
     272             : 
     273             :     const SfxItemSet&   rOutAttrs;
     274             :     XDash               aDash;
     275             :     sal_Bool            bObjSelected;
     276             : 
     277             :     XOutdevItemPool*    pXPool;
     278             :     XLineStyleItem      aXLStyle;
     279             :     XLineWidthItem      aXWidth;
     280             :     XLineDashItem       aXDash;
     281             :     XLineColorItem      aXColor;
     282             :     XLineAttrSetItem    aXLineAttr;
     283             :     SfxItemSet&         rXLSet;
     284             : 
     285             :     XDashListRef          pDashList;
     286             : 
     287             :     ChangeType*         pnDashListState;
     288             :     sal_uInt16*         pPageType;
     289             :     sal_uInt16*         pDlgType;
     290             :     sal_uInt16*         pPosDashLb;
     291             : 
     292             :     SfxMapUnit          ePoolUnit;
     293             :     FieldUnit           eFUnit;
     294             : 
     295             : #ifdef _SVX_TPLNEDEF_CXX
     296             :     void FillDash_Impl();
     297             :     void FillDialog_Impl();
     298             : 
     299             :     DECL_LINK( ClickAddHdl_Impl, void * );
     300             :     DECL_LINK( ClickModifyHdl_Impl, void * );
     301             :     DECL_LINK( ClickDeleteHdl_Impl, void * );
     302             :     DECL_LINK( SelectLinestyleHdl_Impl, void * );
     303             :     DECL_LINK( ChangePreviewHdl_Impl, void * );
     304             :     DECL_LINK( ChangeNumber1Hdl_Impl, void * );
     305             :     DECL_LINK( ChangeNumber2Hdl_Impl, void * );
     306             :     DECL_LINK( ClickLoadHdl_Impl, void * );
     307             :     DECL_LINK( ClickSaveHdl_Impl, void * );
     308             :     DECL_LINK( ChangeMetricHdl_Impl, void * );
     309             :     DECL_LINK( SelectTypeHdl_Impl, void * );
     310             : 
     311             :     void CheckChanges_Impl();
     312             : #endif
     313             : 
     314             : public:
     315             :     SvxLineDefTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
     316             : 
     317             :     void    Construct();
     318             : 
     319             :     static  SfxTabPage* Create( Window*, const SfxItemSet& );
     320             :     virtual sal_Bool FillItemSet( SfxItemSet& );
     321             :     virtual void Reset( const SfxItemSet & );
     322             : 
     323             :     virtual void ActivatePage( const SfxItemSet& rSet );
     324             :     virtual int  DeactivatePage( SfxItemSet* pSet );
     325             : 
     326           0 :     void    SetDashList( XDashListRef pDshLst ) { pDashList = pDshLst; }
     327           0 :     void    SetObjSelected( sal_Bool bHasObj ) { bObjSelected = bHasObj; }
     328             : 
     329           0 :     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     330           0 :     void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
     331           0 :     void    SetPosDashLb( sal_uInt16* pInPos ) { pPosDashLb = pInPos; }
     332             : 
     333           0 :     void    SetDashChgd( ChangeType* pIn ) { pnDashListState = pIn; }
     334             : 
     335             :     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
     336             : };
     337             : 
     338             : /*************************************************************************/
     339             : 
     340             : class SvxLineEndDefTabPage : public SfxTabPage
     341             : {
     342             :     using TabPage::ActivatePage;
     343             :     using TabPage::DeactivatePage;
     344             : 
     345             : private:
     346             :     FixedLine           aFlTip;
     347             :     FixedText           aFTTitle;
     348             :     Edit                aEdtName;
     349             :     FixedText           aFTLineEndStyle;
     350             :     LineEndLB           aLbLineEnds;
     351             :     PushButton          aBtnAdd;
     352             :     PushButton          aBtnModify;
     353             :     PushButton          aBtnDelete;
     354             :     ImageButton         aBtnLoad;
     355             :     ImageButton         aBtnSave;
     356             :     FixedInfo           aFiTip;
     357             :     SvxXLinePreview     aCtlPreview;
     358             : 
     359             :     const SfxItemSet&   rOutAttrs;
     360             :     const SdrObject*    pPolyObj;
     361             :     sal_Bool            bObjSelected;
     362             : 
     363             :     XOutdevItemPool*    pXPool;
     364             :     XLineStyleItem      aXLStyle;
     365             :     XLineWidthItem      aXWidth;
     366             :     XLineColorItem      aXColor;
     367             :     XLineAttrSetItem    aXLineAttr;
     368             :     SfxItemSet&         rXLSet;
     369             : 
     370             :     XLineEndListRef       pLineEndList;
     371             : 
     372             :     ChangeType*         pnLineEndListState;
     373             :     sal_uInt16*         pPageType;
     374             :     sal_uInt16*         pDlgType;
     375             :     sal_uInt16*             pPosLineEndLb;
     376             : 
     377             : #ifdef _SVX_TPLNEEND_CXX
     378             :     DECL_LINK( ClickAddHdl_Impl, void * );
     379             :     DECL_LINK( ClickModifyHdl_Impl, void * );
     380             :     DECL_LINK( ClickDeleteHdl_Impl, void * );
     381             :     DECL_LINK( ClickLoadHdl_Impl, void * );
     382             :     DECL_LINK( ClickSaveHdl_Impl, void * );
     383             :     DECL_LINK( SelectLineEndHdl_Impl, void * );
     384             :     long ChangePreviewHdl_Impl( void* p );
     385             : 
     386             :     void CheckChanges_Impl();
     387             : #endif
     388             : 
     389             : public:
     390             :     SvxLineEndDefTabPage( Window* pParent, const SfxItemSet& rInAttrs );
     391             :     ~SvxLineEndDefTabPage();
     392             : 
     393             :     void    Construct();
     394             : 
     395             :     static  SfxTabPage* Create( Window*, const SfxItemSet& );
     396             :     virtual sal_Bool FillItemSet( SfxItemSet& );
     397             :     virtual void Reset( const SfxItemSet & );
     398             : 
     399             :     virtual void ActivatePage( const SfxItemSet& rSet );
     400             :     virtual int  DeactivatePage( SfxItemSet* pSet );
     401             : 
     402           0 :     void    SetLineEndList( XLineEndListRef pInList ) { pLineEndList = pInList; }
     403           0 :     void    SetPolyObj( const SdrObject* pObj ) { pPolyObj = pObj; }
     404           0 :     void    SetObjSelected( sal_Bool bHasObj ) { bObjSelected = bHasObj; }
     405             : 
     406           0 :     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     407           0 :     void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
     408           0 :     void    SetPosLineEndLb( sal_uInt16* pInPos ) { pPosLineEndLb = pInPos; }
     409             : 
     410           0 :     void    SetLineEndChgd( ChangeType* pIn ) { pnLineEndListState = pIn; }
     411             : 
     412             :     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
     413             : };
     414             : 
     415             : #endif // _CUI_TAB_LINE_HXX
     416             : 
     417             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10