LCOV - code coverage report
Current view: top level - sw/source/uibase/inc - num.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 7 0.0 %
Date: 2014-11-03 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             : #define PAGETYPE_USER_START         10
      50             : 
      51             : class SwNumPositionTabPage : public SfxTabPage
      52             : {
      53             :     ListBox* m_pLevelLB;
      54             :     VclFrame* m_pPositionFrame;
      55             : 
      56             :     // former set of controls shown for numbering rules containing list level
      57             :     // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
      58             :     FixedText*          m_pDistBorderFT;
      59             :     MetricField*        m_pDistBorderMF;
      60             :     CheckBox*           m_pRelativeCB;
      61             :     FixedText*          m_pIndentFT;
      62             :     MetricField*        m_pIndentMF;
      63             :     FixedText*          m_pDistNumFT;
      64             :     MetricField*        m_pDistNumMF;
      65             :     FixedText*          m_pAlignFT;
      66             :     ListBox*            m_pAlignLB;
      67             : 
      68             :     // new set of controls shown for numbering rules containing list level
      69             :     // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
      70             :     FixedText*          m_pLabelFollowedByFT;
      71             :     ListBox*            m_pLabelFollowedByLB;
      72             :     FixedText*          m_pListtabFT;
      73             :     MetricField*        m_pListtabMF;
      74             :     FixedText*          m_pAlign2FT;
      75             :     ListBox*            m_pAlign2LB;
      76             :     FixedText*          m_pAlignedAtFT;
      77             :     MetricField*        m_pAlignedAtMF;
      78             :     FixedText*          m_pIndentAtFT;
      79             :     MetricField*        m_pIndentAtMF;
      80             : 
      81             :     PushButton*         m_pStandardPB;
      82             : 
      83             :     NumberingPreview*   m_pPreviewWIN;
      84             : 
      85             :     SwNumRule*          pActNum;
      86             :     SwNumRule*          pSaveNum;
      87             :     SwWrtShell*         pWrtSh;
      88             : 
      89             :     SwOutlineTabDialog* pOutlineDlg;
      90             :     sal_uInt16              nActNumLvl;
      91             : 
      92             :     bool                bModified           : 1;
      93             :     bool                bPreset             : 1;
      94             :     bool                bInInintControl     : 1;  // work around modify-error; should be resolved from 391 on
      95             :     bool                bLabelAlignmentPosAndSpaceModeActive;
      96             : 
      97             :     void                InitControls();
      98             : 
      99             :     DECL_LINK( LevelHdl, ListBox * );
     100             :     DECL_LINK(EditModifyHdl, void *);
     101             :     DECL_LINK( DistanceHdl, MetricField * );
     102             :     DECL_LINK( RelativeHdl, CheckBox * );
     103             :     DECL_LINK(StandardHdl, void *);
     104             : 
     105             :     void InitPosAndSpaceMode();
     106             :     void ShowControlsDependingOnPosAndSpaceMode();
     107             : 
     108             :     DECL_LINK(LabelFollowedByHdl_Impl, void *);
     109             :     DECL_LINK( ListtabPosHdl_Impl, MetricField* );
     110             :     DECL_LINK( AlignAtHdl_Impl, MetricField* );
     111             :     DECL_LINK( IndentAtHdl_Impl, MetricField* );
     112             : 
     113             :     using SfxTabPage::ActivatePage;
     114             :     using SfxTabPage::DeactivatePage;
     115             : 
     116             : public:
     117             : 
     118             :     SwNumPositionTabPage(vcl::Window* pParent,
     119             :                                const SfxItemSet& rSet);
     120             :     virtual ~SwNumPositionTabPage();
     121             : 
     122             :     virtual void        ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
     123             :     virtual int         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 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.10