LCOV - code coverage report
Current view: top level - sw/source/ui/inc - num.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 7 0.0 %
Date: 2012-08-25 Functions: 0 2 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     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 _NUM_HXX
      20                 :            : #define _NUM_HXX
      21                 :            : 
      22                 :            : 
      23                 :            : #include <sfx2/tabdlg.hxx>
      24                 :            : #include <vcl/menubtn.hxx>
      25                 :            : #include <vcl/field.hxx>
      26                 :            : #include <vcl/fixed.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                 :            :         FixedLine       aLevelFL;
      54                 :            :     MultiListBox    aLevelLB;
      55                 :            : 
      56                 :            :     // former set of controls shown for numbering rules containing list level
      57                 :            :     // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
      58                 :            :     FixedLine       aPositionFL;
      59                 :            :     FixedText           aDistBorderFT;
      60                 :            :     MetricField         aDistBorderMF;
      61                 :            :     CheckBox            aRelativeCB;
      62                 :            :     FixedText           aIndentFT;
      63                 :            :     MetricField         aIndentMF;
      64                 :            :     FixedText           aDistNumFT;
      65                 :            :     MetricField         aDistNumMF;
      66                 :            :     FixedText           aAlignFT;
      67                 :            :     ListBox             aAlignLB;
      68                 :            : 
      69                 :            :     // new set of controls shown for numbering rules containing list level
      70                 :            :     // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
      71                 :            :     FixedText           aLabelFollowedByFT;
      72                 :            :     ListBox             aLabelFollowedByLB;
      73                 :            :     FixedText           aListtabFT;
      74                 :            :     MetricField         aListtabMF;
      75                 :            :     FixedText           aAlign2FT;
      76                 :            :     ListBox             aAlign2LB;
      77                 :            :     FixedText           aAlignedAtFT;
      78                 :            :     MetricField         aAlignedAtMF;
      79                 :            :     FixedText           aIndentAtFT;
      80                 :            :     MetricField         aIndentAtMF;
      81                 :            : 
      82                 :            :     PushButton          aStandardPB;
      83                 :            : 
      84                 :            :     NumberingPreview    aPreviewWIN;
      85                 :            : 
      86                 :            :     SwNumRule*          pActNum;
      87                 :            :     SwNumRule*          pSaveNum;
      88                 :            :     SwWrtShell*         pWrtSh;
      89                 :            : 
      90                 :            :     SwOutlineTabDialog* pOutlineDlg;
      91                 :            :     sal_uInt16              nActNumLvl;
      92                 :            : 
      93                 :            :     sal_Bool                bModified           : 1;
      94                 :            :     sal_Bool                bPreset             : 1;
      95                 :            :     sal_Bool                bInInintControl     : 1;  // work around modify-error; should be resolved from 391 on
      96                 :            :     bool                bLabelAlignmentPosAndSpaceModeActive;
      97                 :            : 
      98                 :            :     void                InitControls();
      99                 :            : 
     100                 :            :     DECL_LINK( LevelHdl, ListBox * );
     101                 :            :     DECL_LINK(EditModifyHdl, void *);
     102                 :            :     DECL_LINK( DistanceHdl, MetricField * );
     103                 :            :     DECL_LINK( RelativeHdl, CheckBox * );
     104                 :            :     DECL_LINK(StandardHdl, void *);
     105                 :            : 
     106                 :            :     void InitPosAndSpaceMode();
     107                 :            :     void ShowControlsDependingOnPosAndSpaceMode();
     108                 :            : 
     109                 :            :     DECL_LINK(LabelFollowedByHdl_Impl, void *);
     110                 :            :     DECL_LINK( ListtabPosHdl_Impl, MetricField* );
     111                 :            :     DECL_LINK( AlignAtHdl_Impl, MetricField* );
     112                 :            :     DECL_LINK( IndentAtHdl_Impl, MetricField* );
     113                 :            : 
     114                 :            :     using SfxTabPage::ActivatePage;
     115                 :            :     using SfxTabPage::DeactivatePage;
     116                 :            : 
     117                 :            : public:
     118                 :            : 
     119                 :            :     SwNumPositionTabPage(Window* pParent,
     120                 :            :                                const SfxItemSet& rSet);
     121                 :            :     ~SwNumPositionTabPage();
     122                 :            : 
     123                 :            :     virtual void        ActivatePage(const SfxItemSet& rSet);
     124                 :            :     virtual int         DeactivatePage(SfxItemSet *pSet);
     125                 :            :     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
     126                 :            :     virtual void        Reset( const SfxItemSet& rSet );
     127                 :            : 
     128                 :            :     static SfxTabPage*  Create( Window* pParent,
     129                 :            :                                 const SfxItemSet& rAttrSet);
     130                 :            : 
     131                 :          0 :     void                SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;}
     132                 :            :     void                SetWrtShell(SwWrtShell* pSh);
     133                 :            : #ifdef DBG_UTIL
     134                 :            :     void                SetModified(sal_Bool bRepaint = sal_True);
     135                 :            : #else
     136                 :          0 :     void                SetModified(sal_Bool bRepaint = sal_True)
     137                 :          0 :                             {   bModified = sal_True;
     138                 :          0 :                                 if(bRepaint)
     139                 :            :                                 {
     140                 :          0 :                                     aPreviewWIN.SetLevel(nActNumLvl);
     141                 :          0 :                                     aPreviewWIN.Invalidate();
     142                 :            :                                 }
     143                 :          0 :                             }
     144                 :            : #endif
     145                 :            : };
     146                 :            : 
     147                 :            : class SwSvxNumBulletTabDialog : public SfxTabDialog
     148                 :            : {
     149                 :            :     SwWrtShell&         rWrtSh;
     150                 :            : 
     151                 :            :     String              sRemoveText;
     152                 :            :     int                 nRetOptionsDialog;
     153                 :            : 
     154                 :            :     protected:
     155                 :            :         virtual short   Ok();
     156                 :            :         virtual void    PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage);
     157                 :            :         DECL_LINK(RemoveNumberingHdl, void *);
     158                 :            :     public:
     159                 :            :         SwSvxNumBulletTabDialog(Window* pParent,
     160                 :            :                     const SfxItemSet* pSwItemSet,
     161                 :            :                     SwWrtShell &);
     162                 :            :         ~SwSvxNumBulletTabDialog();
     163                 :            : };
     164                 :            : #endif // _NUM_HXX
     165                 :            : 
     166                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10