LCOV - code coverage report
Current view: top level - sw/source/ui/inc - regionsw.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 1 0.0 %
Date: 2012-08-25 Functions: 0 1 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                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _REGIONSW_HXX
      29                 :            : #define _REGIONSW_HXX
      30                 :            : 
      31                 :            : #include <hintids.hxx>
      32                 :            : #include <vcl/field.hxx>
      33                 :            : #include <vcl/lstbox.hxx>
      34                 :            : #include <vcl/edit.hxx>
      35                 :            : #include <vcl/button.hxx>
      36                 :            : #include <vcl/fixed.hxx>
      37                 :            : #include <vcl/combobox.hxx>
      38                 :            : #include <vcl/group.hxx>
      39                 :            : #include <svtools/svtreebx.hxx>
      40                 :            : #include <sfx2/basedlgs.hxx>
      41                 :            : #include <sfx2/tabdlg.hxx>
      42                 :            : #include <editeng/brshitem.hxx>
      43                 :            : 
      44                 :            : #include <condedit.hxx>
      45                 :            : #include <section.hxx>
      46                 :            : #include <fmtclds.hxx>
      47                 :            : #include <fmtftntx.hxx>
      48                 :            : #include <fmtclbl.hxx>
      49                 :            : #include <numberingtypelistbox.hxx>
      50                 :            : #include <editeng/frmdiritem.hxx>
      51                 :            : #include <vcl/image.hxx>
      52                 :            : #include <svx/paraprev.hxx>
      53                 :            : #include <editeng/lrspitem.hxx>
      54                 :            : 
      55                 :            : #include <boost/ptr_container/ptr_set.hpp>
      56                 :            : 
      57                 :            : class SwWrtShell;
      58                 :            : 
      59                 :            : namespace sfx2
      60                 :            : {
      61                 :            :     class DocumentInserter;
      62                 :            :     class FileDialogHelper;
      63                 :            : }
      64                 :            : 
      65                 :            : /*************************************************************************
      66                 :            :     dialog "edit regions"
      67                 :            : *************************************************************************/
      68                 :            : class SectRepr;
      69                 :            : typedef SectRepr* SectReprPtr;
      70                 :            : typedef boost::ptr_set<SectRepr> SectReprArr;
      71                 :            : 
      72                 :            : class SwEditRegionDlg : public SfxModalDialog
      73                 :            : {
      74                 :            :     FixedLine       aNameFL;
      75                 :            :     Edit            aCurName;
      76                 :            :     SvTreeListBox   aTree;
      77                 :            : 
      78                 :            :     FixedLine       aLinkFL;
      79                 :            :     TriStateBox     aFileCB;
      80                 :            :     CheckBox        aDDECB;
      81                 :            :     FixedText       aFileNameFT;
      82                 :            :     FixedText       aDDECommandFT;
      83                 :            :     Edit            aFileNameED;
      84                 :            :     PushButton      aFilePB;
      85                 :            :     FixedText       aSubRegionFT;
      86                 :            :     ComboBox        aSubRegionED;
      87                 :            :     bool            bSubRegionsFilled;
      88                 :            : 
      89                 :            :     FixedLine       aProtectFL;
      90                 :            :     TriStateBox     aProtectCB;
      91                 :            :     CheckBox        aPasswdCB;
      92                 :            :     PushButton      aPasswdPB;
      93                 :            : 
      94                 :            :     FixedLine       aHideFL;
      95                 :            :     TriStateBox     aHideCB;
      96                 :            :     FixedText       aConditionFT;
      97                 :            :     ConditionEdit   aConditionED;
      98                 :            : 
      99                 :            :     // #114856# edit in readonly sections
     100                 :            :     FixedLine       aPropertiesFL;
     101                 :            :     TriStateBox     aEditInReadonlyCB;
     102                 :            : 
     103                 :            :     OKButton        aOK;
     104                 :            :     CancelButton    aCancel;
     105                 :            :     PushButton      aOptionsPB;
     106                 :            :     PushButton      aDismiss;
     107                 :            :     HelpButton      aHelp;
     108                 :            :     ImageList       aImageIL;
     109                 :            : 
     110                 :            :     SwWrtShell&             rSh;
     111                 :            :     SectReprArr             aSectReprArr;
     112                 :            :     SvLBoxEntry*            pAktEntry;
     113                 :            :     const SwSection*        pCurrSect;
     114                 :            :     sfx2::DocumentInserter* m_pDocInserter;
     115                 :            :     Window*                 m_pOldDefDlgParent;
     116                 :            : 
     117                 :            :     sal_Bool            bDontCheckPasswd :1;
     118                 :            :     sal_Bool            bWeb            :1;
     119                 :            : 
     120                 :            : 
     121                 :            :     Image  BuildBitmap(sal_Bool bProtect,sal_Bool bHidden);
     122                 :            : 
     123                 :            :     void    RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry);
     124                 :            :     sal_uInt16  FindArrPos(const SwSectionFmt* pFmt);
     125                 :            : 
     126                 :            :     DECL_LINK( GetFirstEntryHdl, SvTreeListBox * );
     127                 :            :     DECL_LINK( DeselectHdl, SvTreeListBox * );
     128                 :            : 
     129                 :            :     DECL_LINK(OkHdl, void *);
     130                 :            :     DECL_LINK(NameEditHdl, void *);
     131                 :            :     DECL_LINK( ConditionEditHdl, Edit * );
     132                 :            : 
     133                 :            :     DECL_LINK( ChangePasswdHdl, Button * );
     134                 :            :     DECL_LINK( ChangeProtectHdl, TriStateBox * );
     135                 :            :     DECL_LINK( ChangeHideHdl, TriStateBox * );
     136                 :            :     // #114856# edit in readonly sections
     137                 :            :     DECL_LINK( ChangeEditInReadonlyHdl, TriStateBox * );
     138                 :            :     DECL_LINK(ChangeDismissHdl, void *);
     139                 :            :     DECL_LINK( UseFileHdl, CheckBox* );
     140                 :            :     DECL_LINK(FileSearchHdl, void *);
     141                 :            :     DECL_LINK(OptionsHdl, void *);
     142                 :            :     DECL_LINK( FileNameHdl, Edit* );
     143                 :            :     DECL_LINK( DDEHdl, CheckBox* );
     144                 :            :     DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
     145                 :            :     DECL_LINK( SubRegionEventHdl, VclWindowEvent * );
     146                 :            : 
     147                 :            :     sal_Bool CheckPasswd(CheckBox* pBox = 0);
     148                 :            : 
     149                 :            : public:
     150                 :            :     SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh );
     151                 :            :     virtual ~SwEditRegionDlg();
     152                 :            : 
     153                 :            :     void    SelectSection(const String& rSectionName);
     154                 :            : 
     155                 :            : };
     156                 :            : 
     157                 :            : /*************************************************************************
     158                 :            :     dialog "insert region"
     159                 :            : *************************************************************************/
     160                 :            : class SwInsertSectionTabPage : public SfxTabPage
     161                 :            : {
     162                 :            :     FixedLine       aNameFL;
     163                 :            :     ComboBox        aCurName;
     164                 :            : 
     165                 :            :     FixedLine       aLinkFL;
     166                 :            :     CheckBox        aFileCB;
     167                 :            :     CheckBox        aDDECB;
     168                 :            :     FixedText       aDDECommandFT;
     169                 :            :     FixedText       aFileNameFT;
     170                 :            :     Edit            aFileNameED;
     171                 :            :     PushButton      aFilePB;
     172                 :            :     FixedText       aSubRegionFT;
     173                 :            :     ComboBox        aSubRegionED;
     174                 :            : 
     175                 :            :     FixedLine       aProtectFL;
     176                 :            :     CheckBox        aProtectCB;
     177                 :            :     CheckBox        aPasswdCB;
     178                 :            :     PushButton      aPasswdPB;
     179                 :            : 
     180                 :            :     FixedLine       aHideFL;
     181                 :            :     CheckBox        aHideCB;
     182                 :            :     FixedText       aConditionFT;
     183                 :            :     ConditionEdit   aConditionED;
     184                 :            : 
     185                 :            :     // #114856# edit in readonly sections
     186                 :            :     FixedLine       aPropertiesFL;
     187                 :            :     CheckBox        aEditInReadonlyCB;
     188                 :            : 
     189                 :            :     String          m_sFileName;
     190                 :            :     String          m_sFilterName;
     191                 :            :     String          m_sFilePasswd;
     192                 :            : 
     193                 :            : //  SwFmtCol*       pCols;
     194                 :            :     ::com::sun::star::uno::Sequence <sal_Int8 > m_aNewPasswd;
     195                 :            :     SwWrtShell*             m_pWrtSh;
     196                 :            :     sfx2::DocumentInserter* m_pDocInserter;
     197                 :            :     Window*                 m_pOldDefDlgParent;
     198                 :            : 
     199                 :            :     DECL_LINK( ChangeHideHdl, CheckBox * );
     200                 :            :     // #114856# edit in readonly sections
     201                 :            :     DECL_LINK(ChangeEditInReadonlyHdl, void *);
     202                 :            :     DECL_LINK( ChangeProtectHdl, CheckBox * );
     203                 :            :     DECL_LINK( ChangePasswdHdl, Button * );
     204                 :            :     DECL_LINK(NameEditHdl, void *);
     205                 :            :     DECL_LINK( UseFileHdl, CheckBox* );
     206                 :            :     DECL_LINK(FileSearchHdl, void *);
     207                 :            :     DECL_LINK( DDEHdl, CheckBox* );
     208                 :            :     DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
     209                 :            : 
     210                 :            : public:
     211                 :            :     SwInsertSectionTabPage(Window *pParent, const SfxItemSet &rAttrSet);
     212                 :            :     virtual ~SwInsertSectionTabPage();
     213                 :            : 
     214                 :            :     void    SetWrtShell(SwWrtShell& rSh);
     215                 :            : 
     216                 :            :     virtual sal_Bool        FillItemSet( SfxItemSet& );
     217                 :            :     virtual void        Reset( const SfxItemSet& );
     218                 :            : 
     219                 :            :     static SfxTabPage*  Create( Window* pParent,
     220                 :            :                                 const SfxItemSet& rAttrSet);
     221                 :            : };
     222                 :            : 
     223                 :            : class SwSectionFtnEndTabPage : public SfxTabPage
     224                 :            : {
     225                 :            :     FixedLine       aFtnFL;
     226                 :            :     CheckBox        aFtnNtAtTextEndCB;
     227                 :            : 
     228                 :            :     CheckBox        aFtnNtNumCB;
     229                 :            :     FixedText       aFtnOffsetLbl;
     230                 :            :     NumericField    aFtnOffsetFld;
     231                 :            : 
     232                 :            :     CheckBox        aFtnNtNumFmtCB;
     233                 :            :     FixedText       aFtnPrefixFT;
     234                 :            :     Edit            aFtnPrefixED;
     235                 :            :     SwNumberingTypeListBox   aFtnNumViewBox;
     236                 :            :     FixedText       aFtnSuffixFT;
     237                 :            :     Edit            aFtnSuffixED;
     238                 :            : 
     239                 :            :     FixedLine       aEndFL;
     240                 :            :     CheckBox        aEndNtAtTextEndCB;
     241                 :            : 
     242                 :            :     CheckBox        aEndNtNumCB;
     243                 :            :     FixedText       aEndOffsetLbl;
     244                 :            :     NumericField    aEndOffsetFld;
     245                 :            : 
     246                 :            :     CheckBox        aEndNtNumFmtCB;
     247                 :            :     FixedText       aEndPrefixFT;
     248                 :            :     Edit            aEndPrefixED;
     249                 :            :     SwNumberingTypeListBox   aEndNumViewBox;
     250                 :            :     FixedText       aEndSuffixFT;
     251                 :            :     Edit            aEndSuffixED;
     252                 :            : 
     253                 :            : 
     254                 :            :     DECL_LINK( FootEndHdl, CheckBox * );
     255                 :            :     void ResetState( sal_Bool bFtn, const SwFmtFtnEndAtTxtEnd& );
     256                 :            : 
     257                 :            : public:
     258                 :            :     SwSectionFtnEndTabPage( Window *pParent, const SfxItemSet &rAttrSet );
     259                 :            :     virtual ~SwSectionFtnEndTabPage();
     260                 :            : 
     261                 :            :     virtual sal_Bool        FillItemSet( SfxItemSet& );
     262                 :            :     virtual void        Reset( const SfxItemSet& );
     263                 :            : 
     264                 :            :     static SfxTabPage*  Create( Window* pParent,
     265                 :            :                                 const SfxItemSet& rAttrSet);
     266                 :            : };
     267                 :            : 
     268                 :            : class SwSectionIndentTabPage : public SfxTabPage
     269                 :            : {
     270                 :            :     FixedLine           aIndentFL;
     271                 :            :     FixedText           aBeforeFT;
     272                 :            :     MetricField         aBeforeMF;
     273                 :            :     FixedText           aAfterFT;
     274                 :            :     MetricField         aAfterMF;
     275                 :            : 
     276                 :            :     SvxParaPrevWindow   aPreviewWin;
     277                 :            : 
     278                 :            :     DECL_LINK(IndentModifyHdl, void *);
     279                 :            : public:
     280                 :            :     SwSectionIndentTabPage( Window *pParent, const SfxItemSet &rAttrSet );
     281                 :            :     virtual ~SwSectionIndentTabPage();
     282                 :            : 
     283                 :            :     virtual sal_Bool        FillItemSet( SfxItemSet& );
     284                 :            :     virtual void        Reset( const SfxItemSet& );
     285                 :            : 
     286                 :            :     static SfxTabPage*  Create( Window* pParent,
     287                 :            :                                 const SfxItemSet& rAttrSet);
     288                 :            : 
     289                 :            :     void    SetWrtShell(SwWrtShell& rSh);
     290                 :            : };
     291                 :            : 
     292                 :            : class SwInsertSectionTabDialog : public SfxTabDialog
     293                 :            : {
     294                 :            :     SwWrtShell&     rWrtSh;
     295                 :            :     ::std::auto_ptr<SwSectionData> m_pSectionData;
     296                 :            : 
     297                 :            : protected:
     298                 :            :     virtual void    PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
     299                 :            :     virtual short   Ok();
     300                 :            : public:
     301                 :            :     SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
     302                 :            :     virtual ~SwInsertSectionTabDialog();
     303                 :            : 
     304                 :            :     void        SetSectionData(SwSectionData const& rSect);
     305                 :          0 :     SwSectionData * GetSectionData() { return m_pSectionData.get(); }
     306                 :            : };
     307                 :            : 
     308                 :            : class SwSectionPropertyTabDialog : public SfxTabDialog
     309                 :            : {
     310                 :            :     SwWrtShell& rWrtSh;
     311                 :            : protected:
     312                 :            :     virtual void    PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
     313                 :            : public:
     314                 :            :     SwSectionPropertyTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
     315                 :            :     virtual ~SwSectionPropertyTabDialog();
     316                 :            : };
     317                 :            : 
     318                 :            : #endif
     319                 :            : 
     320                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10