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