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