LCOV - code coverage report
Current view: top level - sw/source/core/uibase/inc - regionsw.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 1 0.0 %
Date: 2014-04-11 Functions: 0 1 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_UI_INC_REGIONSW_HXX
      20             : #define INCLUDED_SW_SOURCE_UI_INC_REGIONSW_HXX
      21             : 
      22             : #include <hintids.hxx>
      23             : #include <vcl/field.hxx>
      24             : #include <vcl/lstbox.hxx>
      25             : #include <vcl/edit.hxx>
      26             : #include <vcl/button.hxx>
      27             : #include <vcl/fixed.hxx>
      28             : #include <vcl/combobox.hxx>
      29             : #include <vcl/group.hxx>
      30             : #include <vcl/layout.hxx>
      31             : #include <svtools/treelistbox.hxx>
      32             : #include <sfx2/basedlgs.hxx>
      33             : #include <sfx2/tabdlg.hxx>
      34             : #include <editeng/brushitem.hxx>
      35             : 
      36             : #include <condedit.hxx>
      37             : #include <section.hxx>
      38             : #include <fmtclds.hxx>
      39             : #include <fmtftntx.hxx>
      40             : #include <fmtclbl.hxx>
      41             : #include <numberingtypelistbox.hxx>
      42             : #include <editeng/frmdiritem.hxx>
      43             : #include <vcl/image.hxx>
      44             : #include <svx/paraprev.hxx>
      45             : #include <editeng/lrspitem.hxx>
      46             : 
      47             : #include <boost/ptr_container/ptr_set.hpp>
      48             : 
      49             : class SwWrtShell;
      50             : 
      51             : namespace sfx2
      52             : {
      53             :     class DocumentInserter;
      54             :     class FileDialogHelper;
      55             : }
      56             : 
      57             : /*************************************************************************
      58             :     dialog "edit regions"
      59             : *************************************************************************/
      60             : class SectRepr;
      61             : typedef SectRepr* SectReprPtr;
      62             : typedef boost::ptr_set<SectRepr> SectReprArr;
      63             : 
      64             : class SwEditRegionDlg : public SfxModalDialog
      65             : {
      66             :     Edit*           m_pCurName;
      67             :     SvTreeListBox*  m_pTree;
      68             : 
      69             :     TriStateBox*    m_pFileCB;
      70             :     CheckBox*       m_pDDECB;
      71             :     VclContainer*   m_pDDEFrame;
      72             :     FixedText*      m_pFileNameFT;
      73             :     FixedText*      m_pDDECommandFT;
      74             :     Edit*           m_pFileNameED;
      75             :     PushButton*     m_pFilePB;
      76             :     FixedText*      m_pSubRegionFT;
      77             :     ComboBox*       m_pSubRegionED;
      78             :     bool            m_bSubRegionsFilled;
      79             : 
      80             :     TriStateBox*    m_pProtectCB;
      81             :     CheckBox*       m_pPasswdCB;
      82             :     PushButton*     m_pPasswdPB;
      83             : 
      84             :     TriStateBox*    m_pHideCB;
      85             :     FixedText*      m_pConditionFT;
      86             :     ConditionEdit*  m_pConditionED;
      87             : 
      88             :     // #114856# edit in readonly sections
      89             :     TriStateBox*    m_pEditInReadonlyCB;
      90             : 
      91             :     OKButton*       m_pOK;
      92             :     PushButton*     m_pOptionsPB;
      93             :     PushButton*     m_pDismiss;
      94             :     ImageList       aImageIL;
      95             : 
      96             :     SwWrtShell&             rSh;
      97             :     SectReprArr             aSectReprArr;
      98             :     const SwSection*        pCurrSect;
      99             :     sfx2::DocumentInserter* m_pDocInserter;
     100             :     Window*                 m_pOldDefDlgParent;
     101             : 
     102             :     sal_Bool            bDontCheckPasswd :1;
     103             :     sal_Bool            bWeb            :1;
     104             : 
     105             :     Image  BuildBitmap(sal_Bool bProtect,sal_Bool bHidden);
     106             : 
     107             :     void    RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pEntry);
     108             :     sal_uInt16  FindArrPos(const SwSectionFmt* pFmt);
     109             : 
     110             :     DECL_LINK( GetFirstEntryHdl, SvTreeListBox * );
     111             :     DECL_LINK( DeselectHdl, SvTreeListBox * );
     112             : 
     113             :     DECL_LINK(OkHdl, void *);
     114             :     DECL_LINK(NameEditHdl, void *);
     115             :     DECL_LINK( ConditionEditHdl, Edit * );
     116             : 
     117             :     DECL_LINK( ChangePasswdHdl, Button * );
     118             :     DECL_LINK( ChangeProtectHdl, TriStateBox * );
     119             :     DECL_LINK( ChangeHideHdl, TriStateBox * );
     120             :     // #114856# edit in readonly sections
     121             :     DECL_LINK( ChangeEditInReadonlyHdl, TriStateBox * );
     122             :     DECL_LINK(ChangeDismissHdl, void *);
     123             :     DECL_LINK( UseFileHdl, CheckBox* );
     124             :     DECL_LINK(FileSearchHdl, void *);
     125             :     DECL_LINK(OptionsHdl, void *);
     126             :     DECL_LINK( FileNameHdl, Edit* );
     127             :     DECL_LINK( DDEHdl, CheckBox* );
     128             :     DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
     129             :     DECL_LINK( SubRegionEventHdl, VclWindowEvent * );
     130             : 
     131             :     sal_Bool CheckPasswd(CheckBox* pBox = 0);
     132             : 
     133             : public:
     134             :     SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh );
     135             :     virtual ~SwEditRegionDlg();
     136             : 
     137             :     void    SelectSection(const OUString& rSectionName);
     138             : 
     139             : };
     140             : 
     141             : /*************************************************************************
     142             :     dialog "insert region"
     143             : *************************************************************************/
     144             : class SwInsertSectionTabPage : public SfxTabPage
     145             : {
     146             :     ComboBox*       m_pCurName;
     147             : 
     148             :     CheckBox*       m_pFileCB;
     149             :     CheckBox*       m_pDDECB;
     150             :     FixedText*      m_pDDECommandFT;
     151             :     FixedText*      m_pFileNameFT;
     152             :     Edit*           m_pFileNameED;
     153             :     PushButton*     m_pFilePB;
     154             :     FixedText*      m_pSubRegionFT;
     155             :     ComboBox*       m_pSubRegionED;
     156             : 
     157             :     CheckBox*       m_pProtectCB;
     158             :     CheckBox*       m_pPasswdCB;
     159             :     PushButton*     m_pPasswdPB;
     160             : 
     161             :     CheckBox*       m_pHideCB;
     162             :     FixedText*      m_pConditionFT;
     163             :     ConditionEdit*  m_pConditionED;
     164             : 
     165             :     // #114856# edit in readonly sections
     166             :     CheckBox*       m_pEditInReadonlyCB;
     167             : 
     168             :     OUString        m_sFileName;
     169             :     OUString        m_sFilterName;
     170             :     OUString        m_sFilePasswd;
     171             : 
     172             :     ::com::sun::star::uno::Sequence <sal_Int8 > m_aNewPasswd;
     173             :     SwWrtShell*             m_pWrtSh;
     174             :     sfx2::DocumentInserter* m_pDocInserter;
     175             :     Window*                 m_pOldDefDlgParent;
     176             : 
     177             :     DECL_LINK( ChangeHideHdl, CheckBox * );
     178             :     // #114856# edit in readonly sections
     179             :     DECL_LINK(ChangeEditInReadonlyHdl, void *);
     180             :     DECL_LINK( ChangeProtectHdl, CheckBox * );
     181             :     DECL_LINK( ChangePasswdHdl, Button * );
     182             :     DECL_LINK(NameEditHdl, void *);
     183             :     DECL_LINK( UseFileHdl, CheckBox* );
     184             :     DECL_LINK(FileSearchHdl, void *);
     185             :     DECL_LINK( DDEHdl, CheckBox* );
     186             :     DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
     187             : 
     188             : public:
     189             :     SwInsertSectionTabPage(Window *pParent, const SfxItemSet &rAttrSet);
     190             :     virtual ~SwInsertSectionTabPage();
     191             : 
     192             :     void    SetWrtShell(SwWrtShell& rSh);
     193             : 
     194             :     virtual bool        FillItemSet( SfxItemSet& ) SAL_OVERRIDE;
     195             :     virtual void        Reset( const SfxItemSet& ) SAL_OVERRIDE;
     196             : 
     197             :     static SfxTabPage*  Create( Window* pParent,
     198             :                                 const SfxItemSet& rAttrSet);
     199             : };
     200             : 
     201             : class SwSectionFtnEndTabPage : public SfxTabPage
     202             : {
     203             :     CheckBox*        pFtnNtAtTextEndCB;
     204             : 
     205             :     CheckBox*        pFtnNtNumCB;
     206             :     FixedText*       pFtnOffsetLbl;
     207             :     NumericField*    pFtnOffsetFld;
     208             : 
     209             :     CheckBox*        pFtnNtNumFmtCB;
     210             :     FixedText*       pFtnPrefixFT;
     211             :     Edit*            pFtnPrefixED;
     212             :     SwNumberingTypeListBox*   pFtnNumViewBox;
     213             :     FixedText*       pFtnSuffixFT;
     214             :     Edit*            pFtnSuffixED;
     215             : 
     216             :     CheckBox*        pEndNtAtTextEndCB;
     217             : 
     218             :     CheckBox*        pEndNtNumCB;
     219             :     FixedText*       pEndOffsetLbl;
     220             :     NumericField*    pEndOffsetFld;
     221             : 
     222             :     CheckBox*        pEndNtNumFmtCB;
     223             :     FixedText*       pEndPrefixFT;
     224             :     Edit*            pEndPrefixED;
     225             :     SwNumberingTypeListBox*   pEndNumViewBox;
     226             :     FixedText*       pEndSuffixFT;
     227             :     Edit*            pEndSuffixED;
     228             : 
     229             :     DECL_LINK( FootEndHdl, CheckBox * );
     230             :     void ResetState( sal_Bool bFtn, const SwFmtFtnEndAtTxtEnd& );
     231             : 
     232             : public:
     233             :     SwSectionFtnEndTabPage( Window *pParent, const SfxItemSet &rAttrSet );
     234             :     virtual ~SwSectionFtnEndTabPage();
     235             : 
     236             :     virtual bool        FillItemSet( SfxItemSet& ) SAL_OVERRIDE;
     237             :     virtual void        Reset( const SfxItemSet& ) SAL_OVERRIDE;
     238             : 
     239             :     static SfxTabPage*  Create( Window* pParent,
     240             :                                 const SfxItemSet& rAttrSet);
     241             : };
     242             : 
     243             : class SwSectionIndentTabPage : public SfxTabPage
     244             : {
     245             :     MetricField*       m_pBeforeMF;
     246             :     MetricField*       m_pAfterMF;
     247             :     SvxParaPrevWindow* m_pPreviewWin;
     248             : 
     249             :     DECL_LINK(IndentModifyHdl, void *);
     250             : public:
     251             :     SwSectionIndentTabPage( Window *pParent, const SfxItemSet &rAttrSet );
     252             :     virtual ~SwSectionIndentTabPage();
     253             : 
     254             :     virtual bool        FillItemSet( SfxItemSet& ) SAL_OVERRIDE;
     255             :     virtual void        Reset( const SfxItemSet& ) SAL_OVERRIDE;
     256             : 
     257             :     static SfxTabPage*  Create( Window* pParent,
     258             :                                 const SfxItemSet& rAttrSet);
     259             : 
     260             :     void    SetWrtShell(SwWrtShell& rSh);
     261             : };
     262             : 
     263             : class SwInsertSectionTabDialog : public SfxTabDialog
     264             : {
     265             :     SwWrtShell&     rWrtSh;
     266             :     ::std::auto_ptr<SwSectionData> m_pSectionData;
     267             : 
     268             :     sal_uInt16 m_nSectionPageId;
     269             :     sal_uInt16 m_nColumnPageId;
     270             :     sal_uInt16 m_nBackPageId;
     271             :     sal_uInt16 m_nNotePageId;
     272             :     sal_uInt16 m_nIndentPage;
     273             : 
     274             : protected:
     275             :     virtual void    PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE;
     276             :     virtual short   Ok() SAL_OVERRIDE;
     277             : public:
     278             :     SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
     279             :     virtual ~SwInsertSectionTabDialog();
     280             : 
     281             :     void        SetSectionData(SwSectionData const& rSect);
     282           0 :     SwSectionData * GetSectionData() { return m_pSectionData.get(); }
     283             : };
     284             : 
     285             : class SwSectionPropertyTabDialog : public SfxTabDialog
     286             : {
     287             :     SwWrtShell& rWrtSh;
     288             : 
     289             :     sal_uInt16 m_nColumnPageId;
     290             :     sal_uInt16 m_nBackPageId;
     291             :     sal_uInt16 m_nNotePageId;
     292             :     sal_uInt16 m_nIndentPage;
     293             : 
     294             : protected:
     295             :     virtual void    PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE;
     296             : public:
     297             :     SwSectionPropertyTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
     298             :     virtual ~SwSectionPropertyTabDialog();
     299             : };
     300             : 
     301             : #endif
     302             : 
     303             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10