LCOV - code coverage report
Current view: top level - sw/source/uibase/inc - num.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 7 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 2 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             : #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_NUM_HXX
      20             : #define INCLUDED_SW_SOURCE_UIBASE_INC_NUM_HXX
      21             : 
      22             : #include <sfx2/tabdlg.hxx>
      23             : #include <vcl/menubtn.hxx>
      24             : #include <vcl/field.hxx>
      25             : #include <vcl/fixed.hxx>
      26             : #include <vcl/layout.hxx>
      27             : #include <svtools/stdctrl.hxx>
      28             : #include <vcl/button.hxx>
      29             : #include <vcl/lstbox.hxx>
      30             : #include <vcl/edit.hxx>
      31             : #include <svx/stddlg.hxx>
      32             : #include <numprevw.hxx>
      33             : #include "numrule.hxx"
      34             : 
      35             : class SwWrtShell;
      36             : class SvxBrushItem;
      37             : class SwOutlineTabDialog;
      38             : 
      39             : struct SwBmpItemInfo
      40             : {
      41             :     SvxBrushItem*   pBrushItem;
      42             :     sal_uInt16          nItemId;
      43             : };
      44             : 
      45             : #define NUM_PAGETYPE_BULLET         0
      46             : #define NUM_PAGETYPE_SINGLENUM      1
      47             : #define NUM_PAGETYPE_NUM            2
      48             : #define NUM_PAGETYPE_BMP            3
      49             : 
      50             : class SwNumPositionTabPage : public SfxTabPage
      51             : {
      52             :     VclPtr<ListBox> m_pLevelLB;
      53             :     VclPtr<VclFrame> m_pPositionFrame;
      54             : 
      55             :     // former set of controls shown for numbering rules containing list level
      56             :     // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
      57             :     VclPtr<FixedText>          m_pDistBorderFT;
      58             :     VclPtr<MetricField>        m_pDistBorderMF;
      59             :     VclPtr<CheckBox>           m_pRelativeCB;
      60             :     VclPtr<FixedText>          m_pIndentFT;
      61             :     VclPtr<MetricField>        m_pIndentMF;
      62             :     VclPtr<FixedText>          m_pDistNumFT;
      63             :     VclPtr<MetricField>        m_pDistNumMF;
      64             :     VclPtr<FixedText>          m_pAlignFT;
      65             :     VclPtr<ListBox>            m_pAlignLB;
      66             : 
      67             :     // new set of controls shown for numbering rules containing list level
      68             :     // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
      69             :     VclPtr<FixedText>          m_pLabelFollowedByFT;
      70             :     VclPtr<ListBox>            m_pLabelFollowedByLB;
      71             :     VclPtr<FixedText>          m_pListtabFT;
      72             :     VclPtr<MetricField>        m_pListtabMF;
      73             :     VclPtr<FixedText>          m_pAlign2FT;
      74             :     VclPtr<ListBox>            m_pAlign2LB;
      75             :     VclPtr<FixedText>          m_pAlignedAtFT;
      76             :     VclPtr<MetricField>        m_pAlignedAtMF;
      77             :     VclPtr<FixedText>          m_pIndentAtFT;
      78             :     VclPtr<MetricField>        m_pIndentAtMF;
      79             : 
      80             :     VclPtr<PushButton>         m_pStandardPB;
      81             : 
      82             :     VclPtr<NumberingPreview>   m_pPreviewWIN;
      83             : 
      84             :     SwNumRule*          pActNum;
      85             :     SwNumRule*          pSaveNum;
      86             :     SwWrtShell*         pWrtSh;
      87             : 
      88             :     VclPtr<SwOutlineTabDialog> pOutlineDlg;
      89             :     sal_uInt16              nActNumLvl;
      90             : 
      91             :     bool                bModified           : 1;
      92             :     bool                bPreset             : 1;
      93             :     bool                bInInintControl     : 1;  // work around modify-error; should be resolved from 391 on
      94             :     bool                bLabelAlignmentPosAndSpaceModeActive;
      95             : 
      96             :     void                InitControls();
      97             : 
      98             :     DECL_LINK( LevelHdl, ListBox * );
      99             :     DECL_LINK(EditModifyHdl, void *);
     100             :     DECL_LINK( DistanceHdl, MetricField * );
     101             :     DECL_LINK( RelativeHdl, CheckBox * );
     102             :     DECL_LINK(StandardHdl, void *);
     103             : 
     104             :     void InitPosAndSpaceMode();
     105             :     void ShowControlsDependingOnPosAndSpaceMode();
     106             : 
     107             :     DECL_LINK(LabelFollowedByHdl_Impl, void *);
     108             :     DECL_LINK( ListtabPosHdl_Impl, MetricField* );
     109             :     DECL_LINK( AlignAtHdl_Impl, MetricField* );
     110             :     DECL_LINK( IndentAtHdl_Impl, MetricField* );
     111             : 
     112             :     using SfxTabPage::ActivatePage;
     113             :     using SfxTabPage::DeactivatePage;
     114             : 
     115             : public:
     116             : 
     117             :     SwNumPositionTabPage(vcl::Window* pParent,
     118             :                                const SfxItemSet& rSet);
     119             :     virtual ~SwNumPositionTabPage();
     120             :     virtual void        dispose() SAL_OVERRIDE;
     121             : 
     122             :     virtual void        ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
     123             :     virtual sfxpg       DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
     124             :     virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
     125             :     virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
     126             : 
     127             :     static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
     128             :                                       const SfxItemSet* rAttrSet);
     129             : 
     130           0 :     void                SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;}
     131             :     void                SetWrtShell(SwWrtShell* pSh);
     132             : #ifdef DBG_UTIL
     133             :     void                SetModified(bool bRepaint = true);
     134             : #else
     135           0 :     void                SetModified(bool bRepaint = true)
     136           0 :                             {   bModified = true;
     137           0 :                                 if(bRepaint)
     138             :                                 {
     139           0 :                                     m_pPreviewWIN->SetLevel(nActNumLvl);
     140           0 :                                     m_pPreviewWIN->Invalidate();
     141             :                                 }
     142           0 :                             }
     143             : #endif
     144             : };
     145             : 
     146             : class SwSvxNumBulletTabDialog : public SfxTabDialog
     147             : {
     148             :     SwWrtShell&         rWrtSh;
     149             :     sal_uInt16 m_nSingleNumPageId;
     150             :     sal_uInt16 m_nBulletPageId;
     151             :     sal_uInt16 m_nOptionsPageId;
     152             :     sal_uInt16 m_nPositionPageId;
     153             : 
     154             :     protected:
     155             :         virtual short   Ok() SAL_OVERRIDE;
     156             :         virtual void    PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) SAL_OVERRIDE;
     157             :         DECL_LINK(RemoveNumberingHdl, void *);
     158             :     public:
     159             :         SwSvxNumBulletTabDialog(vcl::Window* pParent,
     160             :                     const SfxItemSet* pSwItemSet,
     161             :                     SwWrtShell &);
     162             :         virtual ~SwSvxNumBulletTabDialog();
     163             : };
     164             : #endif // INCLUDED_SW_SOURCE_UIBASE_INC_NUM_HXX
     165             : 
     166             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11