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 _SWTABLEPG_HXX 28*cdf0e10cSrcweir #define _SWTABLEPG_HXX 29*cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 30*cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen 31*cdf0e10cSrcweir #include <vcl/fixed.hxx> 32*cdf0e10cSrcweir #endif 33*cdf0e10cSrcweir #ifndef _IMAGEBTN_HXX //autogen 34*cdf0e10cSrcweir #include <vcl/button.hxx> 35*cdf0e10cSrcweir #endif 36*cdf0e10cSrcweir #ifndef _LSTBOX_HXX //autogen 37*cdf0e10cSrcweir #include <vcl/lstbox.hxx> 38*cdf0e10cSrcweir #endif 39*cdf0e10cSrcweir #include <actctrl.hxx> 40*cdf0e10cSrcweir #include "prcntfld.hxx" 41*cdf0e10cSrcweir #include "swtypes.hxx" 42*cdf0e10cSrcweir #include "textcontrolcombo.hxx" 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir class SwWrtShell; 45*cdf0e10cSrcweir class SwTableRep; 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir struct TColumn 48*cdf0e10cSrcweir { 49*cdf0e10cSrcweir SwTwips nWidth; 50*cdf0e10cSrcweir sal_Bool bVisible; 51*cdf0e10cSrcweir }; 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir class SwFormatTablePage : public SfxTabPage 54*cdf0e10cSrcweir { 55*cdf0e10cSrcweir FixedLine aOptionsFL; 56*cdf0e10cSrcweir FixedText aNameFT; 57*cdf0e10cSrcweir TableNameEdit aNameED; 58*cdf0e10cSrcweir FixedText aWidthFT; 59*cdf0e10cSrcweir PercentField aWidthMF; 60*cdf0e10cSrcweir CheckBox aRelWidthCB; 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir FixedLine aPosFL; 63*cdf0e10cSrcweir RadioButton aFullBtn; 64*cdf0e10cSrcweir RadioButton aLeftBtn; 65*cdf0e10cSrcweir RadioButton aFromLeftBtn; 66*cdf0e10cSrcweir RadioButton aRightBtn; 67*cdf0e10cSrcweir RadioButton aCenterBtn; 68*cdf0e10cSrcweir RadioButton aFreeBtn; 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir FixedLine aDistFL; 71*cdf0e10cSrcweir FixedText aLeftFT; 72*cdf0e10cSrcweir PercentField aLeftMF; 73*cdf0e10cSrcweir FixedText aRightFT; 74*cdf0e10cSrcweir PercentField aRightMF; 75*cdf0e10cSrcweir FixedText aTopFT; 76*cdf0e10cSrcweir MetricField aTopMF; 77*cdf0e10cSrcweir FixedText aBottomFT; 78*cdf0e10cSrcweir MetricField aBottomMF; 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir FixedLine aPropertiesFL; 81*cdf0e10cSrcweir FixedText aTextDirectionFT; 82*cdf0e10cSrcweir ListBox aTextDirectionLB; 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir SwTableRep* pTblData; 85*cdf0e10cSrcweir SwTwips nSaveWidth; 86*cdf0e10cSrcweir SwTwips nMinTableWidth; 87*cdf0e10cSrcweir sal_uInt16 nOldAlign; 88*cdf0e10cSrcweir sal_Bool bModified; 89*cdf0e10cSrcweir sal_Bool bFull:1; 90*cdf0e10cSrcweir sal_Bool bHtmlMode : 1; 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir void Init(); 93*cdf0e10cSrcweir void ModifyHdl( Edit* pEdit ); 94*cdf0e10cSrcweir 95*cdf0e10cSrcweir DECL_LINK( AutoClickHdl, CheckBox * ); 96*cdf0e10cSrcweir DECL_LINK( RelWidthClickHdl, CheckBox * ); 97*cdf0e10cSrcweir DECL_LINK( RightModifyHdl, MetricField * ); 98*cdf0e10cSrcweir DECL_LINK( UpDownLoseFocusHdl, MetricField * ); 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir using TabPage::ActivatePage; 101*cdf0e10cSrcweir using TabPage::DeactivatePage; 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir public: 104*cdf0e10cSrcweir SwFormatTablePage( Window* pParent, const SfxItemSet& rSet ); 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); 107*cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 108*cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 109*cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& rSet ); 110*cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 111*cdf0e10cSrcweir }; 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir /*------------------------------------------------------- 114*cdf0e10cSrcweir TabPage Format/Tabelle/Spalten 115*cdf0e10cSrcweir --------------------------------------------------------- */ 116*cdf0e10cSrcweir #define MET_FIELDS 6 //Anzahl der verwendeten MetricFields 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir class SwTableColumnPage : public SfxTabPage 119*cdf0e10cSrcweir { 120*cdf0e10cSrcweir CheckBox aModifyTableCB; 121*cdf0e10cSrcweir CheckBox aProportionalCB; 122*cdf0e10cSrcweir FixedText aSpaceFT; 123*cdf0e10cSrcweir MetricField aSpaceED; 124*cdf0e10cSrcweir FixedLine aColFL; 125*cdf0e10cSrcweir ImageButton aUpBtn; 126*cdf0e10cSrcweir FixedText aFT1; 127*cdf0e10cSrcweir PercentField aMF1; 128*cdf0e10cSrcweir FixedText aFT2; 129*cdf0e10cSrcweir PercentField aMF2; 130*cdf0e10cSrcweir FixedText aFT3; 131*cdf0e10cSrcweir PercentField aMF3; 132*cdf0e10cSrcweir FixedText aFT4; 133*cdf0e10cSrcweir PercentField aMF4; 134*cdf0e10cSrcweir FixedText aFT5; 135*cdf0e10cSrcweir PercentField aMF5; 136*cdf0e10cSrcweir FixedText aFT6; 137*cdf0e10cSrcweir PercentField aMF6; 138*cdf0e10cSrcweir ImageButton aDownBtn; 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir SwTableRep* pTblData; 141*cdf0e10cSrcweir PercentField* pFieldArr[MET_FIELDS]; 142*cdf0e10cSrcweir FixedText* pTextArr[MET_FIELDS]; 143*cdf0e10cSrcweir SwTwips nTableWidth; 144*cdf0e10cSrcweir SwTwips nMinWidth; 145*cdf0e10cSrcweir sal_uInt16 nNoOfCols; 146*cdf0e10cSrcweir sal_uInt16 nNoOfVisibleCols; 147*cdf0e10cSrcweir //Breite merken, wenn auf autom. Ausrichtung gestellt wird 148*cdf0e10cSrcweir sal_uInt16 aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields 149*cdf0e10cSrcweir sal_Bool bModified:1; 150*cdf0e10cSrcweir sal_Bool bModifyTbl:1; 151*cdf0e10cSrcweir sal_Bool bPercentMode:1; 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir void Init(sal_Bool bWeb); 154*cdf0e10cSrcweir DECL_LINK( AutoClickHdl, CheckBox * ); 155*cdf0e10cSrcweir void ModifyHdl( PercentField* pEdit ); 156*cdf0e10cSrcweir DECL_LINK( UpHdl, PercentField * ); 157*cdf0e10cSrcweir DECL_LINK( DownHdl, PercentField * ); 158*cdf0e10cSrcweir DECL_LINK( LoseFocusHdl, PercentField * ); 159*cdf0e10cSrcweir DECL_LINK( ModeHdl, CheckBox * ); 160*cdf0e10cSrcweir void UpdateCols( sal_uInt16 nAktPos ); 161*cdf0e10cSrcweir SwTwips GetVisibleWidth(sal_uInt16 nPos); 162*cdf0e10cSrcweir void SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth); 163*cdf0e10cSrcweir 164*cdf0e10cSrcweir using TabPage::ActivatePage; 165*cdf0e10cSrcweir using TabPage::DeactivatePage; 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir public: 168*cdf0e10cSrcweir SwTableColumnPage( Window* pParent, const SfxItemSet& rSet ); 169*cdf0e10cSrcweir ~SwTableColumnPage(); 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); 172*cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 173*cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 174*cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& rSet ); 175*cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 176*cdf0e10cSrcweir 177*cdf0e10cSrcweir }; 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir /*-----------------12.12.96 11.48------------------- 180*cdf0e10cSrcweir Textfluss 181*cdf0e10cSrcweir --------------------------------------------------*/ 182*cdf0e10cSrcweir class SwTextFlowPage : public SfxTabPage 183*cdf0e10cSrcweir { 184*cdf0e10cSrcweir FixedLine aFlowFL; 185*cdf0e10cSrcweir CheckBox aPgBrkCB; 186*cdf0e10cSrcweir RadioButton aPgBrkRB; 187*cdf0e10cSrcweir RadioButton aColBrkRB; 188*cdf0e10cSrcweir RadioButton aPgBrkBeforeRB; 189*cdf0e10cSrcweir RadioButton aPgBrkAfterRB; 190*cdf0e10cSrcweir CheckBox aPageCollCB; 191*cdf0e10cSrcweir ListBox aPageCollLB; 192*cdf0e10cSrcweir FixedText aPageNoFT; 193*cdf0e10cSrcweir NumericField aPageNoNF; 194*cdf0e10cSrcweir CheckBox aSplitCB; 195*cdf0e10cSrcweir TriStateBox aSplitRowCB; 196*cdf0e10cSrcweir CheckBox aKeepCB; 197*cdf0e10cSrcweir CheckBox aHeadLineCB; 198*cdf0e10cSrcweir FixedText aRepeatHeaderFT; // "dummy" to build before and after FT 199*cdf0e10cSrcweir FixedText aRepeatHeaderBeforeFT; 200*cdf0e10cSrcweir NumericField aRepeatHeaderNF; 201*cdf0e10cSrcweir FixedText aRepeatHeaderAfterFT; 202*cdf0e10cSrcweir TextControlCombo aRepeatHeaderCombo; 203*cdf0e10cSrcweir FixedText aTextDirectionFT; 204*cdf0e10cSrcweir ListBox aTextDirectionLB; 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir FixedLine aVertOrientFL; 207*cdf0e10cSrcweir FixedText aVertOrientFT; 208*cdf0e10cSrcweir ListBox aVertOrientLB; 209*cdf0e10cSrcweir 210*cdf0e10cSrcweir SwWrtShell* pShell; 211*cdf0e10cSrcweir 212*cdf0e10cSrcweir sal_Bool bPageBreak; 213*cdf0e10cSrcweir sal_Bool bHtmlMode; 214*cdf0e10cSrcweir 215*cdf0e10cSrcweir 216*cdf0e10cSrcweir DECL_LINK( PageBreakHdl_Impl, CheckBox* ); 217*cdf0e10cSrcweir DECL_LINK( ApplyCollClickHdl_Impl, CheckBox* ); 218*cdf0e10cSrcweir DECL_LINK( PageBreakPosHdl_Impl, RadioButton* ); 219*cdf0e10cSrcweir DECL_LINK( PageBreakTypeHdl_Impl, RadioButton* ); 220*cdf0e10cSrcweir DECL_LINK( SplitHdl_Impl, CheckBox* ); 221*cdf0e10cSrcweir DECL_LINK( SplitRowHdl_Impl, TriStateBox* ); 222*cdf0e10cSrcweir DECL_LINK( HeadLineCBClickHdl, void* p = 0 ); 223*cdf0e10cSrcweir 224*cdf0e10cSrcweir 225*cdf0e10cSrcweir SwTextFlowPage( Window* pParent, const SfxItemSet& rSet ); 226*cdf0e10cSrcweir ~SwTextFlowPage(); 227*cdf0e10cSrcweir 228*cdf0e10cSrcweir public: 229*cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); 230*cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 231*cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir void SetShell(SwWrtShell* pSh); 234*cdf0e10cSrcweir 235*cdf0e10cSrcweir void DisablePageBreak(); 236*cdf0e10cSrcweir }; 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir #endif 239