LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/source/ui/inc - regionsw.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 1 0.0 %
Date: 2013-07-09 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 _REGIONSW_HXX
      20             : #define _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             : 
     106             :     Image  BuildBitmap(sal_Bool bProtect,sal_Bool bHidden);
     107             : 
     108             :     void    RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pEntry);
     109             :     sal_uInt16  FindArrPos(const SwSectionFmt* pFmt);
     110             : 
     111             :     DECL_LINK( GetFirstEntryHdl, SvTreeListBox * );
     112             :     DECL_LINK( DeselectHdl, SvTreeListBox * );
     113             : 
     114             :     DECL_LINK(OkHdl, void *);
     115             :     DECL_LINK(NameEditHdl, void *);
     116             :     DECL_LINK( ConditionEditHdl, Edit * );
     117             : 
     118             :     DECL_LINK( ChangePasswdHdl, Button * );
     119             :     DECL_LINK( ChangeProtectHdl, TriStateBox * );
     120             :     DECL_LINK( ChangeHideHdl, TriStateBox * );
     121             :     // #114856# edit in readonly sections
     122             :     DECL_LINK( ChangeEditInReadonlyHdl, TriStateBox * );
     123             :     DECL_LINK(ChangeDismissHdl, void *);
     124             :     DECL_LINK( UseFileHdl, CheckBox* );
     125             :     DECL_LINK(FileSearchHdl, void *);
     126             :     DECL_LINK(OptionsHdl, void *);
     127             :     DECL_LINK( FileNameHdl, Edit* );
     128             :     DECL_LINK( DDEHdl, CheckBox* );
     129             :     DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
     130             :     DECL_LINK( SubRegionEventHdl, VclWindowEvent * );
     131             : 
     132             :     sal_Bool CheckPasswd(CheckBox* pBox = 0);
     133             : 
     134             : public:
     135             :     SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh );
     136             :     virtual ~SwEditRegionDlg();
     137             : 
     138             :     void    SelectSection(const String& rSectionName);
     139             : 
     140             : };
     141             : 
     142             : /*************************************************************************
     143             :     dialog "insert region"
     144             : *************************************************************************/
     145             : class SwInsertSectionTabPage : public SfxTabPage
     146             : {
     147             :     FixedLine       aNameFL;
     148             :     ComboBox        aCurName;
     149             : 
     150             :     FixedLine       aLinkFL;
     151             :     CheckBox        aFileCB;
     152             :     CheckBox        aDDECB;
     153             :     FixedText       aDDECommandFT;
     154             :     FixedText       aFileNameFT;
     155             :     Edit            aFileNameED;
     156             :     PushButton      aFilePB;
     157             :     FixedText       aSubRegionFT;
     158             :     ComboBox        aSubRegionED;
     159             : 
     160             :     FixedLine       aProtectFL;
     161             :     CheckBox        aProtectCB;
     162             :     CheckBox        aPasswdCB;
     163             :     PushButton      aPasswdPB;
     164             : 
     165             :     FixedLine       aHideFL;
     166             :     CheckBox        aHideCB;
     167             :     FixedText       aConditionFT;
     168             :     ConditionEdit   aConditionED;
     169             : 
     170             :     // #114856# edit in readonly sections
     171             :     FixedLine       aPropertiesFL;
     172             :     CheckBox        aEditInReadonlyCB;
     173             : 
     174             :     String          m_sFileName;
     175             :     String          m_sFilterName;
     176             :     String          m_sFilePasswd;
     177             : 
     178             : //  SwFmtCol*       pCols;
     179             :     ::com::sun::star::uno::Sequence <sal_Int8 > m_aNewPasswd;
     180             :     SwWrtShell*             m_pWrtSh;
     181             :     sfx2::DocumentInserter* m_pDocInserter;
     182             :     Window*                 m_pOldDefDlgParent;
     183             : 
     184             :     DECL_LINK( ChangeHideHdl, CheckBox * );
     185             :     // #114856# edit in readonly sections
     186             :     DECL_LINK(ChangeEditInReadonlyHdl, void *);
     187             :     DECL_LINK( ChangeProtectHdl, CheckBox * );
     188             :     DECL_LINK( ChangePasswdHdl, Button * );
     189             :     DECL_LINK(NameEditHdl, void *);
     190             :     DECL_LINK( UseFileHdl, CheckBox* );
     191             :     DECL_LINK(FileSearchHdl, void *);
     192             :     DECL_LINK( DDEHdl, CheckBox* );
     193             :     DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
     194             : 
     195             : public:
     196             :     SwInsertSectionTabPage(Window *pParent, const SfxItemSet &rAttrSet);
     197             :     virtual ~SwInsertSectionTabPage();
     198             : 
     199             :     void    SetWrtShell(SwWrtShell& rSh);
     200             : 
     201             :     virtual sal_Bool        FillItemSet( SfxItemSet& );
     202             :     virtual void        Reset( const SfxItemSet& );
     203             : 
     204             :     static SfxTabPage*  Create( Window* pParent,
     205             :                                 const SfxItemSet& rAttrSet);
     206             : };
     207             : 
     208             : class SwSectionFtnEndTabPage : public SfxTabPage
     209             : {
     210             :     FixedLine       aFtnFL;
     211             :     CheckBox        aFtnNtAtTextEndCB;
     212             : 
     213             :     CheckBox        aFtnNtNumCB;
     214             :     FixedText       aFtnOffsetLbl;
     215             :     NumericField    aFtnOffsetFld;
     216             : 
     217             :     CheckBox        aFtnNtNumFmtCB;
     218             :     FixedText       aFtnPrefixFT;
     219             :     Edit            aFtnPrefixED;
     220             :     SwNumberingTypeListBox   aFtnNumViewBox;
     221             :     FixedText       aFtnSuffixFT;
     222             :     Edit            aFtnSuffixED;
     223             : 
     224             :     FixedLine       aEndFL;
     225             :     CheckBox        aEndNtAtTextEndCB;
     226             : 
     227             :     CheckBox        aEndNtNumCB;
     228             :     FixedText       aEndOffsetLbl;
     229             :     NumericField    aEndOffsetFld;
     230             : 
     231             :     CheckBox        aEndNtNumFmtCB;
     232             :     FixedText       aEndPrefixFT;
     233             :     Edit            aEndPrefixED;
     234             :     SwNumberingTypeListBox   aEndNumViewBox;
     235             :     FixedText       aEndSuffixFT;
     236             :     Edit            aEndSuffixED;
     237             : 
     238             : 
     239             :     DECL_LINK( FootEndHdl, CheckBox * );
     240             :     void ResetState( sal_Bool bFtn, const SwFmtFtnEndAtTxtEnd& );
     241             : 
     242             : public:
     243             :     SwSectionFtnEndTabPage( Window *pParent, const SfxItemSet &rAttrSet );
     244             :     virtual ~SwSectionFtnEndTabPage();
     245             : 
     246             :     virtual sal_Bool        FillItemSet( SfxItemSet& );
     247             :     virtual void        Reset( const SfxItemSet& );
     248             : 
     249             :     static SfxTabPage*  Create( Window* pParent,
     250             :                                 const SfxItemSet& rAttrSet);
     251             : };
     252             : 
     253             : class SwSectionIndentTabPage : public SfxTabPage
     254             : {
     255             :     FixedLine           aIndentFL;
     256             :     FixedText           aBeforeFT;
     257             :     MetricField         aBeforeMF;
     258             :     FixedText           aAfterFT;
     259             :     MetricField         aAfterMF;
     260             : 
     261             :     SvxParaPrevWindow   aPreviewWin;
     262             : 
     263             :     DECL_LINK(IndentModifyHdl, void *);
     264             : public:
     265             :     SwSectionIndentTabPage( Window *pParent, const SfxItemSet &rAttrSet );
     266             :     virtual ~SwSectionIndentTabPage();
     267             : 
     268             :     virtual sal_Bool        FillItemSet( SfxItemSet& );
     269             :     virtual void        Reset( const SfxItemSet& );
     270             : 
     271             :     static SfxTabPage*  Create( Window* pParent,
     272             :                                 const SfxItemSet& rAttrSet);
     273             : 
     274             :     void    SetWrtShell(SwWrtShell& rSh);
     275             : };
     276             : 
     277             : class SwInsertSectionTabDialog : public SfxTabDialog
     278             : {
     279             :     SwWrtShell&     rWrtSh;
     280             :     ::std::auto_ptr<SwSectionData> m_pSectionData;
     281             : 
     282             : protected:
     283             :     virtual void    PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
     284             :     virtual short   Ok();
     285             : public:
     286             :     SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
     287             :     virtual ~SwInsertSectionTabDialog();
     288             : 
     289             :     void        SetSectionData(SwSectionData const& rSect);
     290           0 :     SwSectionData * GetSectionData() { return m_pSectionData.get(); }
     291             : };
     292             : 
     293             : class SwSectionPropertyTabDialog : public SfxTabDialog
     294             : {
     295             :     SwWrtShell& rWrtSh;
     296             : protected:
     297             :     virtual void    PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
     298             : public:
     299             :     SwSectionPropertyTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
     300             :     virtual ~SwSectionPropertyTabDialog();
     301             : };
     302             : 
     303             : #endif
     304             : 
     305             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10