1*b1cdbd2cSJim Jagielski /**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim Jagielski // MARKER(update_precomp.py): autogen include statement, do not remove
25*b1cdbd2cSJim Jagielski #include "precompiled_sw.hxx"
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski #ifdef SW_DLLIMPLEMENTATION
28*b1cdbd2cSJim Jagielski #undef SW_DLLIMPLEMENTATION
29*b1cdbd2cSJim Jagielski #endif
30*b1cdbd2cSJim Jagielski
31*b1cdbd2cSJim Jagielski
32*b1cdbd2cSJim Jagielski
33*b1cdbd2cSJim Jagielski #include "cmdid.h"
34*b1cdbd2cSJim Jagielski #include "swtypes.hxx"
35*b1cdbd2cSJim Jagielski #include "hintids.hxx"
36*b1cdbd2cSJim Jagielski #include "globals.hrc"
37*b1cdbd2cSJim Jagielski #include "helpid.h"
38*b1cdbd2cSJim Jagielski #include <sfx2/objsh.hxx>
39*b1cdbd2cSJim Jagielski #include <svx/htmlmode.hxx>
40*b1cdbd2cSJim Jagielski #ifndef _SVX_SVXIDS_HRC
41*b1cdbd2cSJim Jagielski #include <svx/svxids.hrc>
42*b1cdbd2cSJim Jagielski #endif
43*b1cdbd2cSJim Jagielski #include <svl/eitem.hxx>
44*b1cdbd2cSJim Jagielski #include <svl/stritem.hxx>
45*b1cdbd2cSJim Jagielski #include <svl/intitem.hxx>
46*b1cdbd2cSJim Jagielski #include <fmtline.hxx>
47*b1cdbd2cSJim Jagielski #include <numpara.hxx>
48*b1cdbd2cSJim Jagielski #include <numpara.hrc>
49*b1cdbd2cSJim Jagielski // --> OD 2008-04-14 #outlinelevel#
50*b1cdbd2cSJim Jagielski #include <app.hrc>
51*b1cdbd2cSJim Jagielski // <--
52*b1cdbd2cSJim Jagielski
53*b1cdbd2cSJim Jagielski // Globals ******************************************************************
54*b1cdbd2cSJim Jagielski
55*b1cdbd2cSJim Jagielski static sal_uInt16 __FAR_DATA aPageRg[] = {
56*b1cdbd2cSJim Jagielski FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT,
57*b1cdbd2cSJim Jagielski 0
58*b1cdbd2cSJim Jagielski };
59*b1cdbd2cSJim Jagielski /*-----------------31.01.98 08:34-------------------
60*b1cdbd2cSJim Jagielski
61*b1cdbd2cSJim Jagielski --------------------------------------------------*/
SwParagraphNumTabPage(Window * pParent,const SfxItemSet & rAttr)62*b1cdbd2cSJim Jagielski SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
63*b1cdbd2cSJim Jagielski const SfxItemSet& rAttr ) :
64*b1cdbd2cSJim Jagielski SfxTabPage(pParent, SW_RES(TP_NUMPARA), rAttr),
65*b1cdbd2cSJim Jagielski aOutlineStartFL ( this, SW_RES( FL_OUTLINE_START )),
66*b1cdbd2cSJim Jagielski aOutlineLvFT ( this, SW_RES( FT_OUTLINE_LEVEL )),
67*b1cdbd2cSJim Jagielski aOutlineLvLB ( this, SW_RES( LB_OUTLINE_LEVEL )),
68*b1cdbd2cSJim Jagielski aNewStartFL ( this, SW_RES( FL_NEW_START ) ),
69*b1cdbd2cSJim Jagielski aNumberStyleFT ( this, SW_RES( FT_NUMBER_STYLE ) ),
70*b1cdbd2cSJim Jagielski aNumberStyleLB ( this, SW_RES( LB_NUMBER_STYLE ) ),
71*b1cdbd2cSJim Jagielski aNewStartCB ( this, SW_RES( CB_NEW_START ) ),
72*b1cdbd2cSJim Jagielski aNewStartNumberCB ( this, SW_RES( CB_NUMBER_NEW_START ) ),
73*b1cdbd2cSJim Jagielski aNewStartNF ( this, SW_RES( NF_NEW_START ) ),
74*b1cdbd2cSJim Jagielski aCountParaFL ( this, SW_RES( FL_COUNT_PARA ) ),
75*b1cdbd2cSJim Jagielski aCountParaCB ( this, SW_RES( CB_COUNT_PARA ) ),
76*b1cdbd2cSJim Jagielski aRestartParaCountCB ( this, SW_RES( CB_RESTART_PARACOUNT ) ),
77*b1cdbd2cSJim Jagielski aRestartFT ( this, SW_RES( FT_RESTART_NO ) ),
78*b1cdbd2cSJim Jagielski aRestartNF ( this, SW_RES( NF_RESTART_PARA ) ),
79*b1cdbd2cSJim Jagielski // --> OD 2008-04-14 #outlinelevel#
80*b1cdbd2cSJim Jagielski msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ),
81*b1cdbd2cSJim Jagielski // <--
82*b1cdbd2cSJim Jagielski bModified(sal_False),
83*b1cdbd2cSJim Jagielski bCurNumrule(sal_False)
84*b1cdbd2cSJim Jagielski {
85*b1cdbd2cSJim Jagielski FreeResource();
86*b1cdbd2cSJim Jagielski
87*b1cdbd2cSJim Jagielski const SfxPoolItem* pItem;
88*b1cdbd2cSJim Jagielski SfxObjectShell* pObjSh;
89*b1cdbd2cSJim Jagielski if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, sal_False, &pItem) ||
90*b1cdbd2cSJim Jagielski ( 0 != ( pObjSh = SfxObjectShell::Current()) &&
91*b1cdbd2cSJim Jagielski 0 != (pItem = pObjSh->GetItem(SID_HTML_MODE))))
92*b1cdbd2cSJim Jagielski {
93*b1cdbd2cSJim Jagielski sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
94*b1cdbd2cSJim Jagielski if(HTMLMODE_ON & nHtmlMode)
95*b1cdbd2cSJim Jagielski {
96*b1cdbd2cSJim Jagielski aCountParaFL .Hide();
97*b1cdbd2cSJim Jagielski aCountParaCB .Hide();
98*b1cdbd2cSJim Jagielski aRestartParaCountCB .Hide();
99*b1cdbd2cSJim Jagielski aRestartFT .Hide();
100*b1cdbd2cSJim Jagielski aRestartNF .Hide();
101*b1cdbd2cSJim Jagielski }
102*b1cdbd2cSJim Jagielski }
103*b1cdbd2cSJim Jagielski aNewStartCB.SetClickHdl(LINK(this, SwParagraphNumTabPage, NewStartHdl_Impl));
104*b1cdbd2cSJim Jagielski aNewStartNumberCB.SetClickHdl(LINK(this, SwParagraphNumTabPage, NewStartHdl_Impl));
105*b1cdbd2cSJim Jagielski aNumberStyleLB.SetSelectHdl(LINK(this, SwParagraphNumTabPage, StyleHdl_Impl));
106*b1cdbd2cSJim Jagielski aCountParaCB.SetClickHdl(LINK(this,
107*b1cdbd2cSJim Jagielski SwParagraphNumTabPage, LineCountHdl_Impl));
108*b1cdbd2cSJim Jagielski aRestartParaCountCB.SetClickHdl(
109*b1cdbd2cSJim Jagielski LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl));
110*b1cdbd2cSJim Jagielski aNewStartNF.SetAccessibleName(aNewStartNumberCB.GetText());
111*b1cdbd2cSJim Jagielski aNewStartNF.SetAccessibleRelationLabeledBy(&aNewStartNumberCB);
112*b1cdbd2cSJim Jagielski }
113*b1cdbd2cSJim Jagielski /*-----------------31.01.98 08:34-------------------
114*b1cdbd2cSJim Jagielski
115*b1cdbd2cSJim Jagielski --------------------------------------------------*/
~SwParagraphNumTabPage()116*b1cdbd2cSJim Jagielski SwParagraphNumTabPage::~SwParagraphNumTabPage()
117*b1cdbd2cSJim Jagielski {
118*b1cdbd2cSJim Jagielski }
119*b1cdbd2cSJim Jagielski
120*b1cdbd2cSJim Jagielski /*-----------------31.01.98 08:38-------------------
121*b1cdbd2cSJim Jagielski
122*b1cdbd2cSJim Jagielski --------------------------------------------------*/
Create(Window * pParent,const SfxItemSet & rSet)123*b1cdbd2cSJim Jagielski SfxTabPage* SwParagraphNumTabPage::Create( Window* pParent,
124*b1cdbd2cSJim Jagielski const SfxItemSet& rSet )
125*b1cdbd2cSJim Jagielski {
126*b1cdbd2cSJim Jagielski return new SwParagraphNumTabPage(pParent, rSet);
127*b1cdbd2cSJim Jagielski }
128*b1cdbd2cSJim Jagielski
129*b1cdbd2cSJim Jagielski /*-----------------31.01.98 08:38-------------------
130*b1cdbd2cSJim Jagielski
131*b1cdbd2cSJim Jagielski --------------------------------------------------*/
GetRanges()132*b1cdbd2cSJim Jagielski sal_uInt16* SwParagraphNumTabPage::GetRanges()
133*b1cdbd2cSJim Jagielski {
134*b1cdbd2cSJim Jagielski return aPageRg;
135*b1cdbd2cSJim Jagielski }
136*b1cdbd2cSJim Jagielski
137*b1cdbd2cSJim Jagielski /*-----------------31.01.98 08:38-------------------
138*b1cdbd2cSJim Jagielski
139*b1cdbd2cSJim Jagielski --------------------------------------------------*/
FillItemSet(SfxItemSet & rSet)140*b1cdbd2cSJim Jagielski sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
141*b1cdbd2cSJim Jagielski {
142*b1cdbd2cSJim Jagielski //<-#outline level, added by zhaojianwei
143*b1cdbd2cSJim Jagielski if( aOutlineLvLB.GetSelectEntryPos() != aOutlineLvLB.GetSavedValue())
144*b1cdbd2cSJim Jagielski {
145*b1cdbd2cSJim Jagielski sal_uInt16 aOutlineLv = aOutlineLvLB.GetSelectEntryPos();
146*b1cdbd2cSJim Jagielski const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL);
147*b1cdbd2cSJim Jagielski SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone();
148*b1cdbd2cSJim Jagielski pOutlineLv->SetValue( aOutlineLv );
149*b1cdbd2cSJim Jagielski rSet.Put(*pOutlineLv);
150*b1cdbd2cSJim Jagielski delete pOutlineLv;
151*b1cdbd2cSJim Jagielski bModified = sal_True;
152*b1cdbd2cSJim Jagielski }
153*b1cdbd2cSJim Jagielski //<-end
154*b1cdbd2cSJim Jagielski if( aNumberStyleLB.GetSelectEntryPos() != aNumberStyleLB.GetSavedValue())
155*b1cdbd2cSJim Jagielski {
156*b1cdbd2cSJim Jagielski String aStyle;
157*b1cdbd2cSJim Jagielski if(aNumberStyleLB.GetSelectEntryPos())
158*b1cdbd2cSJim Jagielski aStyle = aNumberStyleLB.GetSelectEntry();
159*b1cdbd2cSJim Jagielski const SfxStringItem* pOldRule = (const SfxStringItem*)GetOldItem( rSet, SID_ATTR_PARA_NUMRULE);
160*b1cdbd2cSJim Jagielski SfxStringItem* pRule = (SfxStringItem*)pOldRule->Clone();
161*b1cdbd2cSJim Jagielski pRule->SetValue(aStyle);
162*b1cdbd2cSJim Jagielski rSet.Put(*pRule);
163*b1cdbd2cSJim Jagielski delete pRule;
164*b1cdbd2cSJim Jagielski bModified = sal_True;
165*b1cdbd2cSJim Jagielski }
166*b1cdbd2cSJim Jagielski if(aNewStartCB.GetState() != aNewStartCB.GetSavedValue() ||
167*b1cdbd2cSJim Jagielski aNewStartNumberCB.GetState() != aNewStartNumberCB.GetSavedValue()||
168*b1cdbd2cSJim Jagielski aNewStartNF.GetText() != aNewStartNF.GetSavedValue())
169*b1cdbd2cSJim Jagielski {
170*b1cdbd2cSJim Jagielski bModified = sal_True;
171*b1cdbd2cSJim Jagielski sal_Bool bNewStartChecked = STATE_CHECK == aNewStartCB.GetState();
172*b1cdbd2cSJim Jagielski sal_Bool bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState();
173*b1cdbd2cSJim Jagielski rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, bNewStartChecked));
174*b1cdbd2cSJim Jagielski rSet.Put(SfxUInt16Item(FN_NUMBER_NEWSTART_AT,
175*b1cdbd2cSJim Jagielski bNumberNewStartChecked && bNewStartChecked ? (sal_uInt16)aNewStartNF.GetValue() : USHRT_MAX));
176*b1cdbd2cSJim Jagielski }
177*b1cdbd2cSJim Jagielski
178*b1cdbd2cSJim Jagielski if(aCountParaCB.GetSavedValue() != aCountParaCB.GetState() ||
179*b1cdbd2cSJim Jagielski aRestartParaCountCB.GetSavedValue() != aRestartParaCountCB.GetState() ||
180*b1cdbd2cSJim Jagielski aRestartNF.GetSavedValue() != aRestartNF.GetText() )
181*b1cdbd2cSJim Jagielski {
182*b1cdbd2cSJim Jagielski SwFmtLineNumber aFmt;
183*b1cdbd2cSJim Jagielski aFmt.SetStartValue( static_cast< sal_uLong >(aRestartParaCountCB.GetState() == STATE_CHECK ?
184*b1cdbd2cSJim Jagielski aRestartNF.GetValue() : 0 ));
185*b1cdbd2cSJim Jagielski aFmt.SetCountLines( aCountParaCB.IsChecked() );
186*b1cdbd2cSJim Jagielski rSet.Put(aFmt);
187*b1cdbd2cSJim Jagielski bModified = sal_True;
188*b1cdbd2cSJim Jagielski }
189*b1cdbd2cSJim Jagielski return bModified;
190*b1cdbd2cSJim Jagielski }
191*b1cdbd2cSJim Jagielski
192*b1cdbd2cSJim Jagielski /*-----------------31.01.98 08:38-------------------
193*b1cdbd2cSJim Jagielski
194*b1cdbd2cSJim Jagielski --------------------------------------------------*/
Reset(const SfxItemSet & rSet)195*b1cdbd2cSJim Jagielski void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
196*b1cdbd2cSJim Jagielski {
197*b1cdbd2cSJim Jagielski sal_Bool bHasNumberStyle = sal_False;
198*b1cdbd2cSJim Jagielski
199*b1cdbd2cSJim Jagielski SfxItemState eItemState = rSet.GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) );
200*b1cdbd2cSJim Jagielski
201*b1cdbd2cSJim Jagielski sal_Int16 nOutlineLv;
202*b1cdbd2cSJim Jagielski if( eItemState >= SFX_ITEM_AVAILABLE )
203*b1cdbd2cSJim Jagielski {
204*b1cdbd2cSJim Jagielski nOutlineLv = ((const SfxUInt16Item &)rSet.Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) )).GetValue();
205*b1cdbd2cSJim Jagielski aOutlineLvLB.SelectEntryPos( nOutlineLv ) ;
206*b1cdbd2cSJim Jagielski }
207*b1cdbd2cSJim Jagielski else
208*b1cdbd2cSJim Jagielski {
209*b1cdbd2cSJim Jagielski aOutlineLvLB.SetNoSelection();
210*b1cdbd2cSJim Jagielski }
211*b1cdbd2cSJim Jagielski aOutlineLvLB.SaveValue();
212*b1cdbd2cSJim Jagielski
213*b1cdbd2cSJim Jagielski eItemState = rSet.GetItemState( GetWhich(SID_ATTR_PARA_NUMRULE) );
214*b1cdbd2cSJim Jagielski
215*b1cdbd2cSJim Jagielski String aStyle;
216*b1cdbd2cSJim Jagielski if( eItemState >= SFX_ITEM_AVAILABLE )
217*b1cdbd2cSJim Jagielski {
218*b1cdbd2cSJim Jagielski aStyle = ((const SfxStringItem &)rSet.Get( GetWhich(SID_ATTR_PARA_NUMRULE) )).GetValue();
219*b1cdbd2cSJim Jagielski if(!aStyle.Len())
220*b1cdbd2cSJim Jagielski aStyle = aNumberStyleLB.GetEntry(0);
221*b1cdbd2cSJim Jagielski
222*b1cdbd2cSJim Jagielski if( aStyle.EqualsAscii("Outline"))// == String::CreateFromAscii("Outline")) //maybe need modify,zhaojianwei
223*b1cdbd2cSJim Jagielski {
224*b1cdbd2cSJim Jagielski aNumberStyleLB.InsertEntry( msOutlineNumbering );
225*b1cdbd2cSJim Jagielski aNumberStyleLB.SelectEntry( msOutlineNumbering );
226*b1cdbd2cSJim Jagielski aNumberStyleLB.RemoveEntry(msOutlineNumbering);
227*b1cdbd2cSJim Jagielski aNumberStyleLB.SaveValue();
228*b1cdbd2cSJim Jagielski }
229*b1cdbd2cSJim Jagielski else
230*b1cdbd2cSJim Jagielski aNumberStyleLB.SelectEntry( aStyle );
231*b1cdbd2cSJim Jagielski
232*b1cdbd2cSJim Jagielski bHasNumberStyle = sal_True;
233*b1cdbd2cSJim Jagielski }
234*b1cdbd2cSJim Jagielski else
235*b1cdbd2cSJim Jagielski {
236*b1cdbd2cSJim Jagielski aNumberStyleLB.SetNoSelection();
237*b1cdbd2cSJim Jagielski }
238*b1cdbd2cSJim Jagielski
239*b1cdbd2cSJim Jagielski aNumberStyleLB.SaveValue();
240*b1cdbd2cSJim Jagielski
241*b1cdbd2cSJim Jagielski eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART );
242*b1cdbd2cSJim Jagielski if(eItemState > SFX_ITEM_AVAILABLE )
243*b1cdbd2cSJim Jagielski {
244*b1cdbd2cSJim Jagielski bCurNumrule = sal_True;
245*b1cdbd2cSJim Jagielski const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(FN_NUMBER_NEWSTART);
246*b1cdbd2cSJim Jagielski aNewStartCB.SetState(
247*b1cdbd2cSJim Jagielski rStart.GetValue() ?
248*b1cdbd2cSJim Jagielski STATE_CHECK : STATE_NOCHECK );
249*b1cdbd2cSJim Jagielski aNewStartCB.EnableTriState(sal_False);
250*b1cdbd2cSJim Jagielski }
251*b1cdbd2cSJim Jagielski else
252*b1cdbd2cSJim Jagielski aNewStartCB.SetState(bHasNumberStyle ? STATE_NOCHECK : STATE_DONTKNOW);
253*b1cdbd2cSJim Jagielski aNewStartCB.SaveValue();
254*b1cdbd2cSJim Jagielski
255*b1cdbd2cSJim Jagielski eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART_AT);
256*b1cdbd2cSJim Jagielski if( eItemState > SFX_ITEM_AVAILABLE )
257*b1cdbd2cSJim Jagielski {
258*b1cdbd2cSJim Jagielski sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue();
259*b1cdbd2cSJim Jagielski aNewStartNumberCB.Check(USHRT_MAX != nNewStart);
260*b1cdbd2cSJim Jagielski if(USHRT_MAX == nNewStart)
261*b1cdbd2cSJim Jagielski nNewStart = 1;
262*b1cdbd2cSJim Jagielski
263*b1cdbd2cSJim Jagielski aNewStartNF.SetValue(nNewStart);
264*b1cdbd2cSJim Jagielski aNewStartNumberCB.EnableTriState(sal_False);
265*b1cdbd2cSJim Jagielski }
266*b1cdbd2cSJim Jagielski else
267*b1cdbd2cSJim Jagielski aNewStartCB.SetState(STATE_DONTKNOW);
268*b1cdbd2cSJim Jagielski NewStartHdl_Impl(&aNewStartCB);
269*b1cdbd2cSJim Jagielski aNewStartNF.SaveValue();
270*b1cdbd2cSJim Jagielski aNewStartNumberCB.SaveValue();
271*b1cdbd2cSJim Jagielski StyleHdl_Impl(&aNumberStyleLB);
272*b1cdbd2cSJim Jagielski if( SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_LINENUMBER))
273*b1cdbd2cSJim Jagielski {
274*b1cdbd2cSJim Jagielski SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet.Get(RES_LINENUMBER);
275*b1cdbd2cSJim Jagielski sal_uLong nStartValue = rNum.GetStartValue();
276*b1cdbd2cSJim Jagielski sal_Bool bCount = rNum.IsCount();
277*b1cdbd2cSJim Jagielski aCountParaCB.SetState( bCount ? STATE_CHECK : STATE_NOCHECK );
278*b1cdbd2cSJim Jagielski aRestartParaCountCB.SetState( 0 != nStartValue ? STATE_CHECK : STATE_NOCHECK );
279*b1cdbd2cSJim Jagielski aRestartNF.SetValue(nStartValue == 0 ? 1 : nStartValue);
280*b1cdbd2cSJim Jagielski LineCountHdl_Impl(&aCountParaCB);
281*b1cdbd2cSJim Jagielski aCountParaCB.EnableTriState(sal_False);
282*b1cdbd2cSJim Jagielski aRestartParaCountCB.EnableTriState(sal_False);
283*b1cdbd2cSJim Jagielski }
284*b1cdbd2cSJim Jagielski else
285*b1cdbd2cSJim Jagielski {
286*b1cdbd2cSJim Jagielski aCountParaCB.SetState(STATE_DONTKNOW);
287*b1cdbd2cSJim Jagielski aRestartParaCountCB.SetState(STATE_DONTKNOW);
288*b1cdbd2cSJim Jagielski }
289*b1cdbd2cSJim Jagielski aCountParaCB.SaveValue();
290*b1cdbd2cSJim Jagielski aRestartParaCountCB.SaveValue();
291*b1cdbd2cSJim Jagielski aRestartNF.SaveValue();
292*b1cdbd2cSJim Jagielski
293*b1cdbd2cSJim Jagielski bModified = sal_False;
294*b1cdbd2cSJim Jagielski }
295*b1cdbd2cSJim Jagielski
296*b1cdbd2cSJim Jagielski /*-----------------31.01.98 08:38-------------------
297*b1cdbd2cSJim Jagielski
298*b1cdbd2cSJim Jagielski --------------------------------------------------*/
DisableOutline()299*b1cdbd2cSJim Jagielski void SwParagraphNumTabPage::DisableOutline()
300*b1cdbd2cSJim Jagielski {
301*b1cdbd2cSJim Jagielski aOutlineLvFT.Disable();
302*b1cdbd2cSJim Jagielski aOutlineLvLB.Disable();
303*b1cdbd2cSJim Jagielski }
DisableNumbering()304*b1cdbd2cSJim Jagielski void SwParagraphNumTabPage::DisableNumbering()
305*b1cdbd2cSJim Jagielski {
306*b1cdbd2cSJim Jagielski aNumberStyleFT.Disable();
307*b1cdbd2cSJim Jagielski aNumberStyleLB.Disable();
308*b1cdbd2cSJim Jagielski }
309*b1cdbd2cSJim Jagielski
310*b1cdbd2cSJim Jagielski /*-----------------31.01.98 08:38-------------------
311*b1cdbd2cSJim Jagielski
312*b1cdbd2cSJim Jagielski --------------------------------------------------*/
EnableNewStart()313*b1cdbd2cSJim Jagielski void SwParagraphNumTabPage::EnableNewStart()
314*b1cdbd2cSJim Jagielski {
315*b1cdbd2cSJim Jagielski aNewStartCB.Show();
316*b1cdbd2cSJim Jagielski aNewStartNumberCB.Show();
317*b1cdbd2cSJim Jagielski aNewStartNF.Show();
318*b1cdbd2cSJim Jagielski }
319*b1cdbd2cSJim Jagielski
320*b1cdbd2cSJim Jagielski /*-----------------31.01.98 08:56-------------------
321*b1cdbd2cSJim Jagielski
322*b1cdbd2cSJim Jagielski --------------------------------------------------*/
IMPL_LINK(SwParagraphNumTabPage,NewStartHdl_Impl,CheckBox *,EMPTYARG)323*b1cdbd2cSJim Jagielski IMPL_LINK( SwParagraphNumTabPage, NewStartHdl_Impl, CheckBox*, EMPTYARG )
324*b1cdbd2cSJim Jagielski {
325*b1cdbd2cSJim Jagielski sal_Bool bEnable = aNewStartCB.IsChecked();
326*b1cdbd2cSJim Jagielski aNewStartNumberCB.Enable(bEnable);
327*b1cdbd2cSJim Jagielski aNewStartNF.Enable(bEnable && aNewStartNumberCB.IsChecked());
328*b1cdbd2cSJim Jagielski return 0;
329*b1cdbd2cSJim Jagielski }
330*b1cdbd2cSJim Jagielski
331*b1cdbd2cSJim Jagielski /*-----------------05.02.98 10:01-------------------
332*b1cdbd2cSJim Jagielski
333*b1cdbd2cSJim Jagielski --------------------------------------------------*/
IMPL_LINK(SwParagraphNumTabPage,LineCountHdl_Impl,CheckBox *,EMPTYARG)334*b1cdbd2cSJim Jagielski IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG)
335*b1cdbd2cSJim Jagielski {
336*b1cdbd2cSJim Jagielski aRestartParaCountCB.Enable(aCountParaCB.IsChecked());
337*b1cdbd2cSJim Jagielski
338*b1cdbd2cSJim Jagielski sal_Bool bEnableRestartValue = aRestartParaCountCB.IsEnabled() &&
339*b1cdbd2cSJim Jagielski aRestartParaCountCB.IsChecked();
340*b1cdbd2cSJim Jagielski aRestartFT.Enable(bEnableRestartValue);
341*b1cdbd2cSJim Jagielski aRestartNF.Enable(bEnableRestartValue);
342*b1cdbd2cSJim Jagielski
343*b1cdbd2cSJim Jagielski return 0;
344*b1cdbd2cSJim Jagielski }
345*b1cdbd2cSJim Jagielski
346*b1cdbd2cSJim Jagielski /*-----------------05.02.98 13:39-------------------
347*b1cdbd2cSJim Jagielski
348*b1cdbd2cSJim Jagielski --------------------------------------------------*/
IMPL_LINK(SwParagraphNumTabPage,StyleHdl_Impl,ListBox *,pBox)349*b1cdbd2cSJim Jagielski IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox )
350*b1cdbd2cSJim Jagielski {
351*b1cdbd2cSJim Jagielski // String dd=aNumberStyleLB.GetSavedValue();
352*b1cdbd2cSJim Jagielski // if( msOutlineNumbering == dd)
353*b1cdbd2cSJim Jagielski {
354*b1cdbd2cSJim Jagielski }
355*b1cdbd2cSJim Jagielski sal_Bool bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0;
356*b1cdbd2cSJim Jagielski aNewStartCB.Enable(bEnable);
357*b1cdbd2cSJim Jagielski NewStartHdl_Impl(&aNewStartCB);
358*b1cdbd2cSJim Jagielski
359*b1cdbd2cSJim Jagielski return 0;
360*b1cdbd2cSJim Jagielski }
361*b1cdbd2cSJim Jagielski
362*b1cdbd2cSJim Jagielski
363