xref: /trunk/main/sc/source/ui/attrdlg/scdlgfact.cxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_sc.hxx"
30 
31 #if ! ENABLE_LAYOUT_EXPERIMENTAL
32 #undef ENABLE_LAYOUT
33 #endif
34 
35 #undef SC_DLLIMPLEMENTATION
36 
37 #include "scdlgfact.hxx"
38 
39 #include "sc.hrc" //CHINA001
40 #include "scuiasciiopt.hxx" //add for ScImportAsciiDlg
41 #include "scuiautofmt.hxx" //add for ScAutoFormatDlg
42 #include "corodlg.hxx" //add for ScColRowLabelDlg
43 #include "crdlg.hxx" //add for ScColOrRowDlg
44 #include "dapidata.hxx" //add for ScDataPilotDatabaseDlg
45 #include "dapitype.hxx" //add for ScDataPilotSourceTypeDlg, ScDataPilotServiceDlg
46 #include "delcldlg.hxx" //add for ScDeleteCellDlg
47 #include "delcodlg.hxx" //add for ScDeleteContentsDlg
48 #include "filldlg.hxx" //add for ScFillSeriesDlg
49 #include "groupdlg.hxx" //add for ScGroupDlg
50 #include "inscldlg.hxx" //add for ScInsertCellDlg
51 #include "inscodlg.hxx" //add for ScInsertContentsDlg
52 #include "instbdlg.hxx" //add for ScInsertTableDlg
53 #include "lbseldlg.hxx" //add for ScSelEntryDlg
54 #include "linkarea.hxx" //add for ScLinkedAreaDlg
55 #include "mtrindlg.hxx" //add for ScMetricInputDlg
56 #include "mvtabdlg.hxx" //add for ScMoveTableDlg
57 #include "namecrea.hxx" //add for ScNameCreateDlg
58 #include "namepast.hxx" //add for ScNamePasteDlg
59 #include "pfiltdlg.hxx" //add for ScPivotFilterDlg
60 #include "pvfundlg.hxx" //add for ScDPFunctionDlg
61 #include "dpgroupdlg.hxx"
62 #include "scendlg.hxx" //add for ScNewScenarioDlg
63 #include "shtabdlg.hxx" //add for ScShowTabDlg
64 #include "strindlg.hxx" //add for ScStringInputDlg
65 #include "tabbgcolordlg.hxx"//add for ScTabBgColorDlg
66 #include "scuiimoptdlg.hxx" //add for ScImportOptionsDlg
67 #include "attrdlg.hxx" //add for ScAttrDlg
68 #include "hfedtdlg.hxx" //add for ScHFEditDlg
69 #include "styledlg.hxx" //add for ScStyleDlg
70 #include "subtdlg.hxx" //add for ScSubTotalDlg
71 #include "textdlgs.hxx" //add for ScCharDlg, ScParagraphDlg
72 #include "validate.hxx" //add for ScValidationDlg
73 #include "validate.hrc" //add for ScValidationDlg
74 #include "sortdlg.hxx" //add for ScSortDlg
75 #include "textimportoptions.hxx"
76 #include "opredlin.hxx" //add for  ScRedlineOptionsTabPage
77 #include "tpcalc.hxx" //add for ScTpCalcOptions
78 #include "tpprint.hxx" //add for ScTpPrintOptions
79 #include "tpstat.hxx" //add for ScDocStatPage
80 #include "tpusrlst.hxx" //add for ScTpUserLists
81 #include "tpview.hxx" //add for ScTpContentOptions
82 
83 // ause
84 #include "editutil.hxx"
85 #include <sfx2/layout.hxx>
86 
87 IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl); //add for ScColOrRowDlg
88 IMPL_ABSTDLG_BASE(AbstractScImportAsciiDlg_Impl);//CHINA001 add for ScImportAsciiDlg
89 IMPL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl); //CHINA001 add for ScAutoFormatDlg
90 IMPL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl); //add for ScColRowLabelDlg
91 IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl); //add for ScDataPilotDatabaseDlg
92 IMPL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl); //add for ScDataPilotSourceTypeDlg
93 IMPL_ABSTDLG_BASE(AbstractScDataPilotServiceDlg_Impl); //add for ScDataPilotServiceDlg
94 IMPL_ABSTDLG_BASE(AbstractScDeleteCellDlg_Impl); //add for ScDeleteCellDlg
95 IMPL_ABSTDLG_BASE(AbstractScDeleteContentsDlg_Impl); //add for ScDeleteContentsDlg
96 IMPL_ABSTDLG_BASE(AbstractScFillSeriesDlg_Impl); //add for ScFillSeriesDlg
97 IMPL_ABSTDLG_BASE(AbstractScGroupDlg_Impl); //add for ScGroupDlg
98 IMPL_ABSTDLG_BASE(AbstractScInsertCellDlg_Impl); //add for ScInsertCellDlg
99 IMPL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl); //add for ScInsertContentsDlg
100 IMPL_ABSTDLG_BASE(AbstractScInsertTableDlg_Impl); //add for ScInsertTableDlg
101 IMPL_ABSTDLG_BASE(AbstractScSelEntryDlg_Impl); //add for ScSelEntryDlg
102 IMPL_ABSTDLG2_BASE(AbstractScLinkedAreaDlg_Impl); //add for ScLinkedAreaDlg
103 IMPL_ABSTDLG_BASE(AbstractScMetricInputDlg_Impl); //add for ScMetricInputDlg
104 IMPL_ABSTDLG_BASE(AbstractScMoveTableDlg_Impl); //add for ScMoveTableDlg
105 IMPL_ABSTDLG_BASE(AbstractScNameCreateDlg_Impl); //add for ScNameCreateDlg
106 IMPL_ABSTDLG_BASE(AbstractScNamePasteDlg_Impl); //add for ScNamePasteDlg
107 IMPL_ABSTDLG_BASE(AbstractScPivotFilterDlg_Impl); //add for ScPivotFilterDlg
108 IMPL_ABSTDLG_BASE(AbstractScDPFunctionDlg_Impl); //add for ScDPFunctionDlg
109 IMPL_ABSTDLG_BASE(AbstractScDPSubtotalDlg_Impl); //add for ScDPSubtotalDlg
110 IMPL_ABSTDLG_BASE(AbstractScDPNumGroupDlg_Impl);
111 IMPL_ABSTDLG_BASE(AbstractScDPDateGroupDlg_Impl);
112 IMPL_ABSTDLG_BASE(AbstractScDPShowDetailDlg_Impl); //add for ScDPShowDetailDlg
113 IMPL_ABSTDLG_BASE(AbstractScNewScenarioDlg_Impl); //add for ScNewScenarioDlg
114 IMPL_ABSTDLG_BASE(AbstractScShowTabDlg_Impl); //add for ScShowTabDlg
115 IMPL_ABSTDLG_BASE(AbstractScStringInputDlg_Impl); //add for ScStringInputDlg
116 IMPL_ABSTDLG_BASE(AbstractScTabBgColorDlg_Impl); //add for ScTabBgColorDlg
117 IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl); //add for ScImportOptionsDlg
118 IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl);
119 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg
120 
121 // AbstractTabDialog_Impl begin
122 void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
123 {
124 	pDlg->SetCurPageId( nId );
125 }
126 
127 const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
128 {
129 	return pDlg->GetOutputItemSet();
130 }
131 //add by CHINA001
132 const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
133 {
134 	return pDlg->GetInputRanges( pItem );
135 }
136 //add by CHINA001
137 void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
138 {
139 	 pDlg->SetInputSet( pInSet );
140 }
141 //From class Window.
142 void AbstractTabDialog_Impl::SetText( const XubString& rStr )
143 {
144 	pDlg->SetText( rStr );
145 }
146 String AbstractTabDialog_Impl::GetText() const
147 {
148 	return pDlg->GetText();
149 }
150 
151 #if ENABLE_LAYOUT
152 namespace layout
153 {
154 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg
155 
156 // AbstractTabDialog_Impl begin
157 void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
158 {
159 	pDlg->SetCurPageId( nId );
160 }
161 
162 const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
163 {
164 	return pDlg->GetOutputItemSet();
165 }
166 //add by CHINA001
167 const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
168 {
169 	return pDlg->GetInputRanges( pItem );
170 }
171 //add by CHINA001
172 void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
173 {
174 	 pDlg->SetInputSet( pInSet );
175 }
176 //From class Window.
177 void AbstractTabDialog_Impl::SetText( const XubString& rStr )
178 {
179 	pDlg->SetText( rStr );
180 }
181 String AbstractTabDialog_Impl::GetText() const
182 {
183 	return pDlg->GetText();
184 }
185 }
186 #endif /* ENABLE_LAYOUT */
187 
188 //add for AbstractTabDialog_Impl end
189 // AbstractScImportAsciiDlg_Impl begin
190 void AbstractScImportAsciiDlg_Impl::GetOptions( ScAsciiOptions& rOpt )
191 {
192 	pDlg->GetOptions( rOpt );
193 }
194 
195 void AbstractScImportAsciiDlg_Impl::SetTextToColumnsMode()
196 {
197     pDlg->SetTextToColumnsMode();
198 }
199 
200 void AbstractScImportAsciiDlg_Impl::SaveParameters()
201 {
202     pDlg->SaveParameters();
203 }
204 
205 // AbstractScImportAsciiDlg_Impl end
206 
207 //AbstractScAutoFormatDlg_Impl begin
208 sal_uInt16 AbstractScAutoFormatDlg_Impl::GetIndex() const
209 {
210 	return pDlg->GetIndex();
211 }
212 
213 String AbstractScAutoFormatDlg_Impl::GetCurrFormatName()
214 {
215 	return pDlg->GetCurrFormatName();
216 }
217 
218 //AbstractScAutoFormatDlg_Impl end
219 
220 
221 
222 //AbstractScColRowLabelDlg_Impl begin
223 sal_Bool  AbstractScColRowLabelDlg_Impl::IsCol()
224 {
225 	return  pDlg->IsCol();
226 }
227 sal_Bool AbstractScColRowLabelDlg_Impl::IsRow()
228 {
229 	return pDlg->IsRow();
230 }
231 
232 //AbstractScColRowLabelDlg_Impl end
233 
234 
235 //AbstractScDataPilotDatabaseDlg_Impl begin
236 
237 
238 void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc )
239 {
240 	pDlg->GetValues(rDesc);
241 }
242 
243 //AbstractScDataPilotDatabaseDlg_Impl end
244 
245 //AbstractScDataPilotSourceTypeDlg_Impl begin
246 
247 sal_Bool AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const
248 {
249 	return pDlg->IsDatabase();
250 }
251 
252 sal_Bool AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const
253 {
254 	return pDlg->IsExternal();
255 }
256 
257 //AbstractScDataPilotSourceTypeDlg_Impl end
258 
259 
260 // AbstractScDataPilotServiceDlg_Impl begin
261 String AbstractScDataPilotServiceDlg_Impl::GetServiceName() const
262 {
263 	return pDlg->GetServiceName();
264 }
265 
266 String AbstractScDataPilotServiceDlg_Impl::GetParSource() const
267 {
268 	return pDlg->GetParSource();
269 }
270 String AbstractScDataPilotServiceDlg_Impl::GetParName() const
271 {
272 	return pDlg->GetParName();
273 }
274 String AbstractScDataPilotServiceDlg_Impl::GetParUser() const
275 {
276 	return pDlg->GetParUser();
277 }
278 String AbstractScDataPilotServiceDlg_Impl::GetParPass() const
279 {
280 	return pDlg->GetParPass();
281 }
282 
283 //AbstractScDataPilotServiceDlg_Impl end
284 
285 //AbstractScDeleteCellDlg_Impl begin
286 DelCellCmd AbstractScDeleteCellDlg_Impl::GetDelCellCmd() const  //add for ScDeleteCellDlg
287 {
288 	return pDlg->GetDelCellCmd();
289 }
290 //AbstractScDeleteCellDlg_Impl end
291 
292 //add for AbstractScDeleteContentsDlg_Impl begin
293 void AbstractScDeleteContentsDlg_Impl::DisableObjects()
294 {
295 	pDlg->DisableObjects();
296 }
297 sal_uInt16	 AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
298 {
299 	return pDlg->GetDelContentsCmdBits();
300 }
301 //add for AbstractScDeleteContentsDlg_Impl end
302 
303 //add for AbstractScFillSeriesDlg_Impl begin
304 FillDir AbstractScFillSeriesDlg_Impl::GetFillDir() const
305 {
306 	return pDlg->GetFillDir();
307 }
308 
309 FillCmd	AbstractScFillSeriesDlg_Impl::GetFillCmd() const
310 {
311 	return pDlg->GetFillCmd();
312 }
313 
314 FillDateCmd AbstractScFillSeriesDlg_Impl::GetFillDateCmd() const
315 {
316 	return pDlg->GetFillDateCmd();
317 }
318 
319 double	AbstractScFillSeriesDlg_Impl::GetStart() const
320 {
321 	return pDlg->GetStart();
322 }
323 double	AbstractScFillSeriesDlg_Impl::GetStep() const
324 {
325 	return pDlg->GetStep();
326 }
327 double	AbstractScFillSeriesDlg_Impl::GetMax() const
328 {
329 	return pDlg->GetMax();
330 }
331 String	AbstractScFillSeriesDlg_Impl::GetStartStr() const
332 {
333 	return pDlg->GetStartStr();
334 }
335 void	AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(sal_Bool bFlag)
336 {
337 	pDlg->SetEdStartValEnabled(bFlag);
338 }
339 //add for AbstractScFillSeriesDlg_Impl end
340 
341 //add for AbstractScGroupDlg_Impl begin
342 sal_Bool AbstractScGroupDlg_Impl::GetColsChecked() const
343 {
344 	return pDlg->GetColsChecked();
345 }
346 //add for AbstractScGroupDlg_Impl end
347 
348 
349 //add for AbstractScInsertCellDlg_Impl begin
350 InsCellCmd  AbstractScInsertCellDlg_Impl::GetInsCellCmd() const
351 {
352 	return pDlg->GetInsCellCmd();
353 }
354 
355 //add for AbstractScInsertCellDlg_Impl end
356 
357 
358 //add for AbstractScInsertContentsDlg_Impl begin
359 sal_uInt16 AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
360 {
361 	return pDlg->GetInsContentsCmdBits();
362 }
363 
364 
365 sal_uInt16	AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const
366 {
367 	return pDlg->GetFormulaCmdBits();
368 }
369 sal_Bool	AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const
370 {
371 	return pDlg->IsSkipEmptyCells();
372 }
373 sal_Bool 	AbstractScInsertContentsDlg_Impl::IsLink() const
374 {
375 	return pDlg->IsLink();
376 }
377 void	AbstractScInsertContentsDlg_Impl::SetFillMode( sal_Bool bSet )
378 {
379 	pDlg->SetFillMode( bSet );
380 }
381 
382 void	AbstractScInsertContentsDlg_Impl::SetOtherDoc( sal_Bool bSet )
383 {
384 	pDlg->SetOtherDoc( bSet );
385 }
386 
387 sal_Bool 	AbstractScInsertContentsDlg_Impl::IsTranspose() const
388 {
389 	return pDlg->IsTranspose();
390 }
391 void	AbstractScInsertContentsDlg_Impl::SetChangeTrack( sal_Bool bSet )
392 {
393 	pDlg->SetChangeTrack( bSet );
394 }
395 void	AbstractScInsertContentsDlg_Impl::SetCellShiftDisabled( int nDisable )
396 {
397 	pDlg->SetCellShiftDisabled( nDisable );
398 }
399 
400 InsCellCmd	AbstractScInsertContentsDlg_Impl::GetMoveMode()
401 {
402 	return pDlg->GetMoveMode();
403 }
404 //add for AbstractScInsertContentsDlg_Impl end
405 
406 
407 //add for AbstractScInsertTableDlg_Impl begin
408 sal_Bool AbstractScInsertTableDlg_Impl::GetTablesFromFile()
409 {
410 	return pDlg->GetTablesFromFile();
411 }
412 
413 sal_Bool	AbstractScInsertTableDlg_Impl::GetTablesAsLink()
414 {
415 	return pDlg->GetTablesAsLink();
416 }
417 const String*	AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN )
418 {
419 	return pDlg->GetFirstTable( pN );
420 }
421 ScDocShell*		AbstractScInsertTableDlg_Impl::GetDocShellTables()
422 {
423 	return pDlg->GetDocShellTables();
424 }
425 sal_Bool	AbstractScInsertTableDlg_Impl::IsTableBefore()
426 {
427 	return pDlg->IsTableBefore();
428 }
429 sal_uInt16	AbstractScInsertTableDlg_Impl::GetTableCount()
430 {
431 	return pDlg->GetTableCount();
432 }
433 const String*	AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN )
434 {
435 	return pDlg->GetNextTable( pN );
436 }
437 //add for AbstractScInsertTableDlg_Impl end
438 
439 //add for AbstractScSelEntryDlg_Impl begin
440 String AbstractScSelEntryDlg_Impl::GetSelectEntry() const
441 {
442 	return pDlg->GetSelectEntry();
443 }
444 //add for AbstractScSelEntryDlg_Impl end
445 
446 //add for AbstractScLinkedAreaDlg_Impl begin
447 void AbstractScLinkedAreaDlg_Impl::InitFromOldLink( const String& rFile, const String& rFilter,
448 										const String& rOptions, const String& rSource,
449 										sal_uLong nRefresh )
450 {
451 	pDlg->InitFromOldLink( rFile, rFilter, rOptions, rSource, nRefresh);
452 }
453 
454 String	AbstractScLinkedAreaDlg_Impl::GetURL()
455 {
456 	return pDlg->GetURL();
457 }
458 String	AbstractScLinkedAreaDlg_Impl::GetFilter()
459 {
460 	return pDlg->GetFilter();
461 }
462 String	AbstractScLinkedAreaDlg_Impl::GetOptions()
463 {
464 	return pDlg->GetOptions();
465 }
466 String	AbstractScLinkedAreaDlg_Impl::GetSource()
467 {
468 	return pDlg->GetSource();
469 }
470 sal_uLong	AbstractScLinkedAreaDlg_Impl::GetRefresh()
471 {
472 	return pDlg->GetRefresh();
473 }
474 //add for AbstractScLinkedAreaDlg_Impl end
475 
476 
477 //add for AbstractScMetricInputDlg_Impl begin
478 long AbstractScMetricInputDlg_Impl::GetInputValue( FieldUnit eUnit ) const
479 {
480 
481 	return pDlg->GetInputValue( eUnit );
482 }
483 //add for AbstractScMetricInputDlg_Impl end
484 
485 //add for AbstractScMoveTableDlg_Impl begin
486 sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedDocument() const //add for ScMoveTableDlg
487 {
488 	return pDlg->GetSelectedDocument();
489 }
490 
491 sal_uInt16	AbstractScMoveTableDlg_Impl::GetSelectedTable() const
492 {
493 	return pDlg->GetSelectedTable();
494 }
495 sal_Bool	AbstractScMoveTableDlg_Impl::GetCopyTable() const
496 {
497 	return pDlg->GetCopyTable();
498 }
499 void	AbstractScMoveTableDlg_Impl::SetCopyTable(sal_Bool bFla)
500 {
501 	return pDlg->SetCopyTable( bFla );
502 }
503 void	AbstractScMoveTableDlg_Impl::EnableCopyTable(sal_Bool bFlag)
504 {
505 	return pDlg->EnableCopyTable( bFlag);
506 }
507 //add for AbstractScMoveTableDlg_Impl end
508 
509 //add for AbstractScNameCreateDlg_Impl begin
510 sal_uInt16 AbstractScNameCreateDlg_Impl::GetFlags() const  //add for ScNameCreateDlg
511 {
512 	return pDlg->GetFlags();
513 }
514 //add for AbstractScNameCreateDlg_Impl end
515 
516 //add for AbstractScNamePasteDlg_Impl begin
517 String AbstractScNamePasteDlg_Impl::GetSelectedName() const  //add for ScNamePasteDlg
518 {
519 	return pDlg->GetSelectedName();
520 }
521 
522 //add for AbstractScNamePasteDlg_Impl end
523 
524 //add for AbstractScPivotFilterDlg_Impl begin
525 const ScQueryItem&	 AbstractScPivotFilterDlg_Impl::GetOutputItem()  //add for ScPivotFilterDlg
526 {
527 	return pDlg->GetOutputItem();
528 }
529 //add for AbstractScPivotFilterDlg_Impl end
530 
531 //add for AbstractScDPFunctionDlg_Impl begin
532 sal_uInt16 AbstractScDPFunctionDlg_Impl::GetFuncMask() const //add for ScDPFunctionDlg
533 {
534 	 return pDlg->GetFuncMask();
535 }
536 ::com::sun::star::sheet::DataPilotFieldReference AbstractScDPFunctionDlg_Impl::GetFieldRef() const
537 {
538     return pDlg->GetFieldRef();
539 }
540 //add for AbstractScDPFunctionDlg_Impl end
541 
542 //add for AbstractScDPSubtotalDlg_Impl begin
543 sal_uInt16 AbstractScDPSubtotalDlg_Impl::GetFuncMask() const //add for ScDPSubtotalDlg
544 {
545      return pDlg->GetFuncMask();
546 }
547 void AbstractScDPSubtotalDlg_Impl::FillLabelData( ScDPLabelData& rLabelData ) const
548 {
549     pDlg->FillLabelData( rLabelData );
550 }
551 //add for AbstractScDPSubtotalDlg_Impl end
552 
553 ScDPNumGroupInfo AbstractScDPNumGroupDlg_Impl::GetGroupInfo() const
554 {
555     return pDlg->GetGroupInfo();
556 }
557 
558 ScDPNumGroupInfo AbstractScDPDateGroupDlg_Impl::GetGroupInfo() const
559 {
560     return pDlg->GetGroupInfo();
561 }
562 
563 sal_Int32 AbstractScDPDateGroupDlg_Impl::GetDatePart() const
564 {
565     return pDlg->GetDatePart();
566 }
567 
568 //add for AbstractScDPShowDetailDlg_Impl begin
569 String AbstractScDPShowDetailDlg_Impl::GetDimensionName() const
570 {
571      return pDlg->GetDimensionName();
572 }
573 //add for AbstractScDPShowDetailDlg_Impl end
574 
575 //add for AbstractScNewScenarioDlg_Impl begin
576 void AbstractScNewScenarioDlg_Impl::SetScenarioData( const String& rName, const String& rComment,
577 							const Color& rColor, sal_uInt16 nFlags )
578 {
579 	pDlg->SetScenarioData(rName,rComment, rColor,nFlags);
580 }
581 
582 void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rComment,
583 							Color& rColor, sal_uInt16& rFlags ) const
584 {
585 	pDlg->GetScenarioData( rName,rComment,rColor,rFlags);
586 }
587 
588 //add for AbstractScNewScenarioDlg_Impl end
589 
590 //add for  AbstractScShowTabDlg_Impl begin
591 void AbstractScShowTabDlg_Impl::Insert( const String& rString, sal_Bool bSelected )  //add for ScShowTabDlg
592 {
593 	pDlg->Insert( rString, bSelected);
594 }
595 
596 sal_uInt16	AbstractScShowTabDlg_Impl::GetSelectEntryCount() const
597 {
598 	return pDlg->GetSelectEntryCount();
599 }
600 void	AbstractScShowTabDlg_Impl::SetDescription(
601                 const String& rTitle, const String& rFixedText,
602                 const rtl::OString& sDlgHelpId, const rtl::OString& sLbHelpId )
603 {
604 	pDlg->SetDescription( rTitle, rFixedText, sDlgHelpId, sLbHelpId );
605 }
606 sal_uInt16  AbstractScShowTabDlg_Impl::GetSelectEntryPos(sal_uInt16 nPos) const
607 {
608 	return pDlg->GetSelectEntryPos( nPos);
609 }
610 String	 AbstractScShowTabDlg_Impl::GetSelectEntry(sal_uInt16 nPos) const
611 {
612 		return pDlg->GetSelectEntry(nPos);
613 }
614 //add for AbstractScShowTabDlg_Impl end
615 
616 //add for AbstractScStringInputDlg_Impl begin
617 void AbstractScStringInputDlg_Impl::GetInputString( String& rString ) const  //add for ScStringInputDlg
618 {
619 	pDlg->GetInputString( rString );
620 }
621 //add for AbstractScStringInputDlg_Impl end
622 
623 //add for AbstractScTabBgColorDlg_Impl begin
624 void AbstractScTabBgColorDlg_Impl::GetSelectedColor( Color& rColor ) const  //add for ScTabBgColorDlg
625 {
626     pDlg->GetSelectedColor( rColor );
627 }
628 //add for AbstractScTabBgColorDlg_Impl end
629 
630 
631 //add for AbstractScImportOptionsDlg_Impl begin
632 void AbstractScImportOptionsDlg_Impl::GetImportOptions( ScImportOptions& rOptions ) const  //add for ScImportOptionsDlg
633 {
634 	pDlg->GetImportOptions(rOptions);
635 }
636 // add for AbstractScImportOptionsDlg_Impl end
637 
638 //add for AbstractScLangChooserDlg_Impl begin
639 LanguageType AbstractScTextImportOptionsDlg_Impl::GetLanguageType() const
640 {
641     return pDlg->getLanguageType();
642 }
643 
644 bool AbstractScTextImportOptionsDlg_Impl::IsDateConversionSet() const
645 {
646     return pDlg->isDateConversionSet();
647 }
648 
649 //add for AbstractScLangChooserDlg_Impl end
650 
651 // =========================Factories  for createdialog ===================
652 
653 //add for ScImportAsciiDlg begin
654 AbstractScImportAsciiDlg * ScAbstractDialogFactory_Impl::CreateScImportAsciiDlg ( Window* pParent, String aDatName,
655 													SvStream* pInStream, int nId, sal_Unicode cSep )
656 {
657 	ScImportAsciiDlg* pDlg=NULL;
658 	switch ( nId )
659 	{
660 		case RID_SCDLG_ASCII :
661 			pDlg = new ScImportAsciiDlg( pParent, aDatName,pInStream, cSep );
662 			break;
663 		default:
664 			break;
665 	}
666 
667 	if ( pDlg )
668 		return new AbstractScImportAsciiDlg_Impl( pDlg );
669 	return 0;
670 }
671 // ScImportAsciiDlg end
672 
673 AbstractScTextImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScTextImportOptionsDlg( Window* pParent, int nId )
674 {
675     ScTextImportOptionsDlg* pDlg = NULL;
676     switch (nId)
677     {
678         case RID_SCDLG_TEXT_IMPORT_OPTIONS:
679             pDlg = new ScTextImportOptionsDlg(pParent);
680         break;
681         default:
682             ;
683     }
684 
685     return pDlg ? new AbstractScTextImportOptionsDlg_Impl(pDlg) : NULL;
686 }
687 
688 //add for ScAutoFormatDlg begin
689 
690 AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( Window*					pParent, //add for ScAutoFormatDlg
691 																ScAutoFormat*				pAutoFormat,
692 																const ScAutoFormatData*    pSelFormatData,
693 																ScDocument*                pDoc,
694 																int nId)
695 {
696 	ScAutoFormatDlg* pDlg=NULL;
697 	switch ( nId )
698 	{
699 		case RID_SCDLG_AUTOFORMAT :
700 			pDlg = new ScAutoFormatDlg( pParent, pAutoFormat,pSelFormatData, pDoc );
701 			break;
702 		default:
703 			break;
704 	}
705 
706 	if ( pDlg )
707 		return new AbstractScAutoFormatDlg_Impl( pDlg );
708 	return 0;
709 }
710 //add for ScAutoFormatDlg end
711 
712 //add for ScColRowLabelDlg begin
713 
714 AbstractScColRowLabelDlg *  ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent, //add for ScColRowLabelDlg
715 																int nId,
716 																sal_Bool bCol ,
717 																sal_Bool bRow)
718 {
719 	ScColRowLabelDlg* pDlg=NULL;
720 	switch ( nId )
721 	{
722 		case RID_SCDLG_CHARTCOLROW :
723 			pDlg = new ScColRowLabelDlg( pParent, bCol,bRow );
724 			break;
725 		default:
726 			break;
727 	}
728 
729 	if ( pDlg )
730 		return new AbstractScColRowLabelDlg_Impl( pDlg );
731 	return 0;
732 }
733 //add for ScColRowLabelDlg end
734 
735 
736 //add for ScColOrRowDlg begin
737 
738 VclAbstractDialog *  ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window*			pParent,
739 													const String&	rStrTitle,
740 													const String&	rStrLabel,
741 													int nId,
742 													sal_Bool				bColDefault)
743 {
744 	Dialog * pDlg=NULL;
745 	switch ( nId )
746 	{
747 		case RID_SCDLG_COLORROW :
748 			pDlg = new ScColOrRowDlg( pParent, rStrTitle,rStrLabel,bColDefault );
749 			break;
750 		default:
751 			break;
752 	}
753 
754 	if ( pDlg )
755 		return new VclAbstractDialog_Impl( pDlg );
756 	return 0;
757 }
758 //add for ScColOrRowDlg end
759 
760 //add for ScSortWarningDlg begin
761 VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( Window* pParent, const String& rExtendText,
762                                                                           const String& rCurrentText, int nId )
763 {
764     Dialog * pDlg=NULL;
765     switch ( nId )
766     {
767     case RID_SCDLG_SORT_WARNING:
768         pDlg = new ScSortWarningDlg( pParent, rExtendText, rCurrentText );
769         break;
770     default:
771         break;
772     }
773     if( pDlg )
774         return new VclAbstractDialog_Impl( pDlg );
775     return 0;
776 }
777 //add for ScSortWarningDlg end
778 
779 //add for ScDataPilotDatabaseDlg begin
780 
781 AbstractScDataPilotDatabaseDlg *  ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg (Window* pParent ,
782 																							  int nId )  //add for ScDataPilotDatabaseDlg
783 {
784 	ScDataPilotDatabaseDlg * pDlg=NULL;
785 	switch ( nId )
786 	{
787 		case RID_SCDLG_DAPIDATA :
788 			pDlg = new ScDataPilotDatabaseDlg( pParent );
789 			break;
790 		default:
791 			break;
792 	}
793 
794 	if ( pDlg )
795 		return new AbstractScDataPilotDatabaseDlg_Impl( pDlg );
796 	return 0;
797 }
798 //add for ScDataPilotDatabaseDlg end
799 
800 //add for ScDataPilotSourceTypeDlg begin
801 AbstractScDataPilotSourceTypeDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg( Window* pParent,
802 																							   sal_Bool bEnableExternal,
803 																							   int nId )
804 {
805 	ScDataPilotSourceTypeDlg * pDlg=NULL;
806 	switch ( nId )
807 	{
808 		case RID_SCDLG_DAPITYPE :
809 			pDlg = new ScDataPilotSourceTypeDlg( pParent, bEnableExternal );
810 			break;
811 		default:
812 			break;
813 	}
814 
815 	if ( pDlg )
816 		return new AbstractScDataPilotSourceTypeDlg_Impl( pDlg );
817 	return 0;
818 }
819 
820 // add for ScDataPilotSourceTypeDlg end
821 
822 
823 //add for ScDataPilotServiceDlg begin
824 AbstractScDataPilotServiceDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg( Window* pParent,
825 																		const com::sun::star::uno::Sequence<rtl::OUString>& rServices,
826 															int nId )
827 {
828 	ScDataPilotServiceDlg * pDlg=NULL;
829 	switch ( nId )
830 	{
831 		case RID_SCDLG_DAPISERVICE :
832 			pDlg = new ScDataPilotServiceDlg( pParent, rServices );
833 			break;
834 		default:
835 			break;
836 	}
837 
838 	if ( pDlg )
839 		return new AbstractScDataPilotServiceDlg_Impl( pDlg );
840 	return 0;
841 }
842 
843 // add for ScDataPilotServiceDlg end
844 
845 //add for ScDeleteCellDlg begin
846 AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg( Window* pParent, int nId,
847 																			 sal_Bool bDisallowCellMove )
848 {
849 	ScDeleteCellDlg * pDlg=NULL;
850 	switch ( nId )
851 	{
852 		case RID_SCDLG_DELCELL :
853 			pDlg = new ScDeleteCellDlg( pParent, bDisallowCellMove );
854 			break;
855 		default:
856 			break;
857 	}
858 
859 	if ( pDlg )
860 		return new AbstractScDeleteCellDlg_Impl( pDlg );
861 	return 0;
862 }
863 
864 //add for ScDeleteCellDlg  end
865 
866 //add for ScDeleteContentsDlg begin
867 AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
868 																 sal_uInt16  nCheckDefaults )
869 {
870 	ScDeleteContentsDlg * pDlg=NULL;
871 	switch ( nId )
872 	{
873 		case RID_SCDLG_DELCONT :
874 			pDlg = new ScDeleteContentsDlg( pParent, nCheckDefaults );
875 			break;
876 		default:
877 			break;
878 	}
879 
880 	if ( pDlg )
881 		return new AbstractScDeleteContentsDlg_Impl( pDlg );
882 	return 0;
883 }
884 
885 //add for ScDeleteContentsDlg  end
886 
887 //add for ScFillSeriesDlg begin
888 AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Window*		pParent, //add for ScFillSeriesDlg
889 															ScDocument&	rDocument,
890 															FillDir		eFillDir,
891 															FillCmd		eFillCmd,
892 															FillDateCmd	eFillDateCmd,
893 															String			aStartStr,
894 															double			fStep,
895 															double			fMax,
896 															sal_uInt16			nPossDir,
897 															int nId)
898 {
899 	ScFillSeriesDlg * pDlg=NULL;
900 	switch ( nId )
901 	{
902 		case RID_SCDLG_FILLSERIES :
903 			pDlg = new ScFillSeriesDlg( pParent, rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nPossDir);
904 			break;
905 		default:
906 			break;
907 	}
908 
909 	if ( pDlg )
910 		return new AbstractScFillSeriesDlg_Impl( pDlg );
911 	return 0;
912 }
913 
914 //add for ScFillSeriesDlg  end
915 
916 //add for ScGroupDlg begin
917 AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Window* pParent,
918 															sal_uInt16	nResId,
919 															int nId,
920 															sal_Bool	bUnGroup ,
921 															sal_Bool	bRows   )
922 {
923 	ScGroupDlg * pDlg=NULL;
924 	switch ( nId )
925 	{
926 		case RID_SCDLG_GRP_KILL :
927 		case RID_SCDLG_GRP_MAKE :
928 			pDlg = new ScGroupDlg( pParent, nResId,bUnGroup, bRows);
929 			break;
930 		default:
931 			break;
932 	}
933 
934 	if ( pDlg )
935 		return new AbstractScGroupDlg_Impl( pDlg );
936 	return 0;
937 }
938 
939 //add for ScGroupDlg  end
940 
941 
942 //add for ScInsertCellDlg begin
943 AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg
944 																int nId,
945 															sal_Bool bDisallowCellMove )
946 {
947 	ScInsertCellDlg * pDlg=NULL;
948 	switch ( nId )
949 	{
950 		case RID_SCDLG_INSCELL :
951 			pDlg = new ScInsertCellDlg( pParent, bDisallowCellMove);
952 			break;
953 		default:
954 			break;
955 	}
956 
957 	if ( pDlg )
958 		return new AbstractScInsertCellDlg_Impl( pDlg );
959 	return 0;
960 }
961 
962 //add for ScInsertCellDlg end
963 
964 //add for ScInsertContentsDlg begin
965 AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window*		pParent,
966 																					int nId,
967 																					sal_uInt16  		nCheckDefaults,
968 																					const String*	pStrTitle )
969 {
970 	ScInsertContentsDlg * pDlg=NULL;
971 	switch ( nId )
972 	{
973 		case RID_SCDLG_INSCONT :
974 			pDlg = new ScInsertContentsDlg( pParent, nCheckDefaults,pStrTitle );
975 			break;
976 		default:
977 			break;
978 	}
979 
980 	if ( pDlg )
981 		return new AbstractScInsertContentsDlg_Impl( pDlg );
982 	return 0;
983 }
984 //add for ScInsertContentsDlg end
985 
986 //add for ScInsertTableDlg begin
987 AbstractScInsertTableDlg * ScAbstractDialogFactory_Impl::CreateScInsertTableDlg ( Window* pParent, ScViewData& rViewData,
988                                                                 SCTAB nTabCount, bool bFromFile, int nId)
989 {
990 	ScInsertTableDlg * pDlg=NULL;
991 	switch ( nId )
992 	{
993 		case RID_SCDLG_INSERT_TABLE :
994             pDlg = new ScInsertTableDlg( pParent, rViewData,nTabCount, bFromFile );
995 			break;
996 		default:
997 			break;
998 	}
999 
1000 	if ( pDlg )
1001 		return new AbstractScInsertTableDlg_Impl( pDlg );
1002 	return 0;
1003 }
1004 //add for ScInsertTableDlg end
1005 
1006 // add for ScSelEntryDlg begin
1007 AbstractScSelEntryDlg * ScAbstractDialogFactory_Impl::CreateScSelEntryDlg ( Window* pParent,
1008 															sal_uInt16	nResId,
1009 														const String& aTitle,
1010 														const String& aLbTitle,
1011 																List& 	aEntryList,
1012 															int nId )
1013 {
1014 	ScSelEntryDlg * pDlg=NULL;
1015 	switch ( nId )
1016 	{
1017 		case RID_SCDLG_SELECTDB :
1018 			pDlg = new ScSelEntryDlg( pParent, nResId,aTitle, aLbTitle, aEntryList );
1019 			break;
1020 		default:
1021 			break;
1022 	}
1023 
1024 	if ( pDlg )
1025 		return new AbstractScSelEntryDlg_Impl( pDlg );
1026 	return 0;
1027 }
1028 // add for ScSelEntryDlg end
1029 
1030 //add for ScLinkedAreaDlg begin
1031 AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg (  Window* pParent,
1032 																int nId)
1033 {
1034 	ScLinkedAreaDlg * pDlg=NULL;
1035 	switch ( nId )
1036 	{
1037 		case RID_SCDLG_LINKAREA :
1038 			pDlg = new ScLinkedAreaDlg( pParent );
1039 			break;
1040 		default:
1041 			break;
1042 	}
1043 
1044 	if ( pDlg )
1045 		return new AbstractScLinkedAreaDlg_Impl( pDlg );
1046 	return 0;
1047 }
1048 //add for ScLinkedAreaDlg end
1049 
1050 //add for ScMetricInputDlg begin
1051 AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg (  Window*		pParent,
1052 																sal_uInt16		nResId,		// Ableitung fuer jeden Dialog!
1053 																long			nCurrent,
1054 																long			nDefault,
1055 																int nId ,
1056 																FieldUnit		eFUnit,
1057 																sal_uInt16		nDecimals,
1058 																long			nMaximum ,
1059 																long			nMinimum,
1060 																long			nFirst,
1061 																long          nLast )
1062 {
1063 	ScMetricInputDlg * pDlg=NULL;
1064 	switch ( nId )
1065 	{
1066 		case RID_SCDLG_ROW_MAN :
1067 		case RID_SCDLG_ROW_OPT :
1068 		case RID_SCDLG_COL_MAN :
1069 		case RID_SCDLG_COL_OPT :
1070 			pDlg = new ScMetricInputDlg( pParent , nResId,nCurrent ,nDefault, eFUnit,
1071 										nDecimals, nMaximum , nMinimum , nFirst, nLast);
1072 			break;
1073 		default:
1074 			break;
1075 	}
1076 
1077 	if ( pDlg )
1078 		return new AbstractScMetricInputDlg_Impl( pDlg );
1079 	return 0;
1080 }
1081 //add for ScMetricInputDlg end
1082 
1083 
1084 //add for  ScMoveTableDlg  begin
1085 AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(  Window* pParent, int nId )
1086 {
1087 	ScMoveTableDlg * pDlg=NULL;
1088 	switch ( nId )
1089 	{
1090 		case RID_SCDLG_MOVETAB :
1091 			pDlg = new ScMoveTableDlg( pParent );
1092 			break;
1093 		default:
1094 			break;
1095 	}
1096 
1097 	if ( pDlg )
1098 		return new AbstractScMoveTableDlg_Impl( pDlg );
1099 	return 0;
1100 }
1101 //add for  ScMoveTableDlg  end
1102 
1103 
1104 //add for ScNameCreateDlg begin
1105 AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId )
1106 {
1107 	ScNameCreateDlg * pDlg=NULL;
1108 	switch ( nId )
1109 	{
1110 		case RID_SCDLG_NAMES_CREATE :
1111 			pDlg = new ScNameCreateDlg( pParent, nFlags );
1112 			break;
1113 		default:
1114 			break;
1115 	}
1116 
1117 	if ( pDlg )
1118 		return new AbstractScNameCreateDlg_Impl( pDlg );
1119 	return 0;
1120 }
1121 //add for ScNameCreateDlg end
1122 
1123 
1124 //add for ScNamePasteDlg begin
1125  AbstractScNamePasteDlg * ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList,
1126 															int nId , sal_Bool bInsList )
1127 {
1128 	ScNamePasteDlg * pDlg=NULL;
1129 	switch ( nId )
1130 	{
1131 		case RID_SCDLG_NAMES_PASTE :
1132 			pDlg = new ScNamePasteDlg( pParent, pList, bInsList );
1133 			break;
1134 		default:
1135 			break;
1136 	}
1137 
1138 	if ( pDlg )
1139 		return new AbstractScNamePasteDlg_Impl( pDlg );
1140 	return 0;
1141 }
1142 //add for ScNamePasteDlg end
1143 
1144 //add for ScPivotFilterDlg begin
1145 AbstractScPivotFilterDlg * ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg ( Window* pParent,
1146 																const SfxItemSet&	rArgSet, sal_uInt16 nSourceTab , int nId )
1147 {
1148 	ScPivotFilterDlg * pDlg=NULL;
1149 	switch ( nId )
1150 	{
1151 		case RID_SCDLG_PIVOTFILTER :
1152 			pDlg = new ScPivotFilterDlg( pParent, rArgSet, nSourceTab );
1153 			break;
1154 		default:
1155 			break;
1156 	}
1157 
1158 	if ( pDlg )
1159 		return new AbstractScPivotFilterDlg_Impl( pDlg );
1160 	return 0;
1161 }
1162 //add for ScPivotFilterDlg end
1163 
1164 
1165 //add for ScDPFunctionDlg begin
1166 AbstractScDPFunctionDlg * ScAbstractDialogFactory_Impl::CreateScDPFunctionDlg ( Window* pParent,
1167                                                                 int nId,
1168                                                                 const ScDPLabelDataVector& rLabelVec,
1169                                                                 const ScDPLabelData& rLabelData,
1170                                                                 const ScPivotFuncData& rFuncData )
1171 {
1172 	ScDPFunctionDlg * pDlg=NULL;
1173 	switch ( nId )
1174 	{
1175         case RID_SCDLG_DPDATAFIELD :
1176             pDlg = new ScDPFunctionDlg( pParent, rLabelVec, rLabelData, rFuncData );
1177 			break;
1178 		default:
1179 			break;
1180 	}
1181 
1182 	if ( pDlg )
1183 		return new AbstractScDPFunctionDlg_Impl( pDlg );
1184 	return 0;
1185 }
1186 //add for ScDPFunctionDlg end
1187 
1188 //add for ScDPSubtotalDlg begin
1189 AbstractScDPSubtotalDlg * ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg ( Window* pParent,
1190                                                                 int nId,
1191                                                                 ScDPObject& rDPObj,
1192                                                                 const ScDPLabelData& rLabelData,
1193                                                                 const ScPivotFuncData& rFuncData,
1194                                                                 const ScDPNameVec& rDataFields,
1195                                                                 bool bEnableLayout )
1196 {
1197     ScDPSubtotalDlg * pDlg=NULL;
1198     switch ( nId )
1199     {
1200         case RID_SCDLG_PIVOTSUBT :
1201             pDlg = new ScDPSubtotalDlg( pParent, rDPObj, rLabelData, rFuncData, rDataFields, bEnableLayout );
1202             break;
1203         default:
1204             break;
1205     }
1206 
1207     if ( pDlg )
1208         return new AbstractScDPSubtotalDlg_Impl( pDlg );
1209     return 0;
1210 }
1211 //add for ScDPSubtotalDlg end
1212 
1213 AbstractScDPNumGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPNumGroupDlg(
1214         Window* pParent, int nId, const ScDPNumGroupInfo& rInfo )
1215 {
1216     if( nId == RID_SCDLG_DPNUMGROUP )
1217         return new AbstractScDPNumGroupDlg_Impl( new ScDPNumGroupDlg( pParent, rInfo ) );
1218     return 0;
1219 }
1220 
1221 AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg(
1222         Window* pParent, int nId,
1223         const ScDPNumGroupInfo& rInfo, sal_Int32 nDatePart, const Date& rNullDate )
1224 {
1225     if( nId == RID_SCDLG_DPDATEGROUP )
1226         return new AbstractScDPDateGroupDlg_Impl( new ScDPDateGroupDlg( pParent, rInfo, nDatePart, rNullDate ) );
1227     return 0;
1228 }
1229 
1230 //add for ScDPShowDetailDlg begin
1231 AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg (
1232         Window* pParent, int nId, ScDPObject& rDPObj, sal_uInt16 nOrient )
1233 {
1234     if( nId == RID_SCDLG_DPSHOWDETAIL )
1235         return new AbstractScDPShowDetailDlg_Impl( new ScDPShowDetailDlg( pParent, rDPObj, nOrient ) );
1236     return 0;
1237 }
1238 //add for ScDPShowDetailDlg end
1239 
1240 //add for ScNewScenarioDlg begin
1241 AbstractScNewScenarioDlg * ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg ( Window* pParent, const String& rName,
1242 																int nId,
1243 																sal_Bool bEdit , sal_Bool bSheetProtected )
1244 {
1245 	ScNewScenarioDlg * pDlg=NULL;
1246 	switch ( nId )
1247 	{
1248 		case RID_SCDLG_NEWSCENARIO :
1249 			pDlg = new ScNewScenarioDlg( pParent, rName, bEdit,bSheetProtected );
1250 			break;
1251 		default:
1252 			break;
1253 	}
1254 
1255 	if ( pDlg )
1256 		return new AbstractScNewScenarioDlg_Impl( pDlg );
1257 	return 0;
1258 }
1259 //add for ScNewScenarioDlg end
1260 
1261 //add for ScShowTabDlg begin
1262 AbstractScShowTabDlg * ScAbstractDialogFactory_Impl::CreateScShowTabDlg ( Window* pParent, int nId )
1263 {
1264 	ScShowTabDlg * pDlg=NULL;
1265 	switch ( nId )
1266 	{
1267 		case RID_SCDLG_SHOW_TAB :
1268 			pDlg = new ScShowTabDlg( pParent);
1269 			break;
1270 		default:
1271 			break;
1272 	}
1273 
1274 	if ( pDlg )
1275 		return new AbstractScShowTabDlg_Impl( pDlg );
1276 	return 0;
1277 }
1278 
1279 //add for ScShowTabDlg end
1280 
1281 
1282 //add for ScStringInputDlg begin
1283  AbstractScStringInputDlg * ScAbstractDialogFactory_Impl::CreateScStringInputDlg (  Window* pParent,
1284 																const String& rTitle,
1285 																const String& rEditTitle,
1286 																const String& rDefault,
1287 																const rtl::OString& sHelpId, const rtl::OString& sEditHelpId,
1288 																int nId )
1289 {
1290 	ScStringInputDlg * pDlg=NULL;
1291 	switch ( nId )
1292 	{
1293 		case RID_SCDLG_STRINPUT :
1294 			pDlg = new ScStringInputDlg( pParent, rTitle, rEditTitle, rDefault, sHelpId, sEditHelpId );
1295 			break;
1296 		default:
1297 			break;
1298 	}
1299 
1300 	if ( pDlg )
1301 		return new AbstractScStringInputDlg_Impl( pDlg );
1302 	return 0;
1303 }
1304  //add for ScStringInputDlg end
1305 
1306 //add for ScTabBgColorDlg begin
1307 AbstractScTabBgColorDlg * ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg (
1308                                                             Window* pParent,
1309                                                             const String& rTitle,
1310                                                             const String& rTabBgColorNoColorText,
1311                                                             const Color& rDefaultColor,
1312                                                             const rtl::OString& sHelpId ,
1313                                                             int nId )
1314 {
1315 ScTabBgColorDlg * pDlg=NULL;
1316 switch ( nId )
1317 {
1318     case RID_SCDLG_TAB_BG_COLOR :
1319         pDlg = new ScTabBgColorDlg( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, sHelpId );
1320         break;
1321     default:
1322         break;
1323 }
1324 
1325 if ( pDlg )
1326     return new AbstractScTabBgColorDlg_Impl( pDlg );
1327 return 0;
1328 }
1329 //add for ScTabBgColorDlg end
1330 
1331 //add for ScImportOptionsDlg begin
1332 AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg ( Window* 				pParent,
1333 																	int nId,
1334 																	sal_Bool                    bAscii,
1335 																	const ScImportOptions*	pOptions,
1336 																	const String*			pStrTitle,
1337 																	sal_Bool                    bMultiByte,
1338 																	sal_Bool                    bOnlyDbtoolsEncodings,
1339 																	sal_Bool                    bImport )
1340 {
1341 	ScImportOptionsDlg * pDlg=NULL;
1342 	switch ( nId )
1343 	{
1344 		case RID_SCDLG_IMPORTOPT :
1345 			pDlg = new ScImportOptionsDlg( pParent, bAscii, pOptions,pStrTitle, bMultiByte,bOnlyDbtoolsEncodings, bImport );
1346 			break;
1347 		default:
1348 			break;
1349 	}
1350 
1351 	if ( pDlg )
1352 		return new AbstractScImportOptionsDlg_Impl( pDlg );
1353 	return 0;
1354 }
1355 //add for ScImportOptionsDlg end
1356 
1357 #if ENABLE_LAYOUT && !LAYOUT_SFX_TABDIALOG_BROKEN
1358 #define SfxTabDialog layout::SfxTabDialog
1359 #define AbstractTabDialog_Impl layout::AbstractTabDialog_Impl
1360 #endif /* ENABLE_LAYOUT */
1361 //add for ScAttrDlg begin
1362 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScAttrDlg( SfxViewFrame*	 pFrame,
1363 																		Window*			 pParent,
1364 																		const SfxItemSet* pCellAttrs,
1365 																		int nId)
1366 {
1367 	SfxTabDialog* pDlg=NULL;
1368 	switch ( nId )
1369 	{
1370 		case RID_SCDLG_ATTR :
1371 			pDlg = new ScAttrDlg( pFrame, pParent, pCellAttrs );
1372 			break;
1373 		default:
1374 			break;
1375 	}
1376 
1377 	if ( pDlg )
1378 		return new AbstractTabDialog_Impl( pDlg );
1379 	return 0;
1380 
1381 }
1382 //add for ScAttrDlg end
1383 #undef SfxTabDialog
1384 #undef AbstractTabDialog_Impl
1385 
1386 //add for ScHFEditDlg begin
1387 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewFrame*		pFrame,
1388 																		Window*			pParent,
1389 																		const SfxItemSet&	rCoreSet,
1390 																		const String&		rPageStyle,
1391 																		int nId,
1392 																		sal_uInt16				nResId )
1393 {
1394 	SfxTabDialog* pDlg=NULL;
1395 	switch ( nId )
1396 	{
1397 		case RID_SCDLG_HFEDIT :
1398 			pDlg = new ScHFEditDlg( pFrame, pParent, rCoreSet,rPageStyle, nResId );
1399 			break;
1400 		default:
1401 			break;
1402 	}
1403 
1404 	if ( pDlg )
1405 		return new AbstractTabDialog_Impl( pDlg );
1406 	return 0;
1407 }
1408 //add for ScHFEditDlg end
1409 
1410 //add for ScStyleDlg begin
1411 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScStyleDlg( Window*				pParent,
1412 																		SfxStyleSheetBase&	rStyleBase,
1413 																		sal_uInt16				nRscId,
1414 																		int nId)
1415 {
1416 	SfxTabDialog* pDlg=NULL;
1417 	switch ( nId )
1418 	{
1419 		case RID_SCDLG_STYLES_PAGE :
1420 		case RID_SCDLG_STYLES_PAR :
1421 			pDlg = new ScStyleDlg( pParent, rStyleBase, nRscId );
1422 			break;
1423 		default:
1424 			break;
1425 	}
1426 
1427 	if ( pDlg )
1428 		return new AbstractTabDialog_Impl( pDlg );
1429 	return 0;
1430 }
1431 //add for ScStyleDlg end
1432 
1433 //add for ScSubTotalDlg begin
1434 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSubTotalDlg( Window*				pParent,
1435 																		const SfxItemSet*	pArgSet,
1436 																		int nId)
1437 {
1438 	SfxTabDialog* pDlg=NULL;
1439 	switch ( nId )
1440 	{
1441 		case RID_SCDLG_SUBTOTALS :
1442 			pDlg = new ScSubTotalDlg( pParent, pArgSet );
1443 			break;
1444 		default:
1445 			break;
1446 	}
1447 
1448 	if ( pDlg )
1449 		return new AbstractTabDialog_Impl( pDlg );
1450 	return 0;
1451 }
1452 //add for ScSubTotalDlg end
1453 
1454 //add for ScCharDlg begin
1455 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScCharDlg( Window* pParent, const SfxItemSet* pAttr,
1456 													const SfxObjectShell* pDocShell, int nId )
1457 {
1458 	SfxTabDialog* pDlg=NULL;
1459 	switch ( nId )
1460 	{
1461 		case RID_SCDLG_CHAR :
1462 			pDlg = new ScCharDlg( pParent, pAttr, pDocShell );
1463 			break;
1464 		default:
1465 			break;
1466 	}
1467 
1468 	if ( pDlg )
1469 		return new AbstractTabDialog_Impl( pDlg );
1470 	return 0;
1471 }
1472 //add for ScCharDlg end
1473 
1474 //add for ScParagraphDlg begin
1475 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ,
1476 																			int nId )
1477 {
1478 	SfxTabDialog* pDlg=NULL;
1479 	switch ( nId )
1480 	{
1481 		case RID_SCDLG_PARAGRAPH :
1482 			pDlg = new ScParagraphDlg( pParent, pAttr );
1483 			break;
1484 		default:
1485 			break;
1486 	}
1487 
1488 	if ( pDlg )
1489 		return new AbstractTabDialog_Impl( pDlg );
1490 	return 0;
1491 }
1492 //add for ScParagraphDlg end
1493 
1494 //add for ScValidationDlg begin
1495 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScValidationDlg( Window* pParent,
1496 //<!--Modified by PengYunQuan for Validity Cell Range Picker
1497 //														const SfxItemSet* pArgSet,int nId  )
1498 														const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh  )
1499 //-->Modified by PengYunQuan for Validity Cell Range Picke
1500 {
1501 	SfxTabDialog* pDlg=NULL;
1502 	switch ( nId )
1503 	{
1504 		case TAB_DLG_VALIDATION :
1505 			//<!--Modified by PengYunQuan for Validity Cell Range Picker
1506 			//pDlg = new ScValidationDlg( pParent, pArgSet );
1507 			pDlg = new ScValidationDlg( pParent, pArgSet, pTabVwSh );
1508 			//-->Modified by PengYunQuan for Validity Cell Range Picker
1509 			break;
1510 		default:
1511 			break;
1512 	}
1513 
1514 	if ( pDlg )
1515 		return new AbstractTabDialog_Impl( pDlg );
1516 	return 0;
1517 }
1518 //add for ScValidationDlg end
1519 
1520 #if ENABLE_LAYOUT && !LAYOUT_SFX_TABDIALOG_BROKEN
1521 #define SfxTabDialog layout::SfxTabDialog
1522 #define AbstractTabDialog_Impl layout::AbstractTabDialog_Impl
1523 #endif /* ENABLE_LAYOUT */
1524 //add for ScSortDlg begin
1525 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window*			 pParent,
1526 													const SfxItemSet* pArgSet,int nId )
1527 {
1528 	SfxTabDialog* pDlg=NULL;
1529 	switch ( nId )
1530 	{
1531 		case RID_SCDLG_SORT :
1532 			pDlg = new ScSortDlg( pParent, pArgSet );
1533 			break;
1534 		default:
1535 			break;
1536 	}
1537 
1538 	if ( pDlg )
1539 		return new AbstractTabDialog_Impl( pDlg );
1540 	return 0;
1541 }
1542 #undef SfxTabDialog
1543 #undef AbstractTabDialog_Impl
1544 
1545 //add for ScSortDlg end
1546 //------------------ Factories for TabPages--------------------
1547 CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
1548 {
1549 	switch ( nId )
1550 	{
1551 		case RID_SCPAGE_OPREDLINE :
1552 			return ScRedlineOptionsTabPage::Create;
1553             //break;
1554 		case	RID_SCPAGE_CALC :
1555 			return ScTpCalcOptions::Create;
1556             //break;
1557 		case	RID_SCPAGE_PRINT :
1558 			return ScTpPrintOptions::Create;
1559             //break;
1560 		case 	RID_SCPAGE_STAT :
1561 			return ScDocStatPage::Create;
1562             //break;
1563 		case RID_SCPAGE_USERLISTS :
1564 			 return ScTpUserLists::Create;
1565             //break;
1566 		case RID_SCPAGE_CONTENT :
1567 			return ScTpContentOptions::Create;
1568             //break;
1569 		case RID_SCPAGE_LAYOUT :
1570 			return ScTpLayoutOptions::Create;
1571             //break;
1572 
1573 		default:
1574 			break;
1575 	}
1576 
1577 	return 0;
1578 }
1579 
1580 GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
1581 {
1582 	switch ( nId )
1583 	{
1584 	case TP_VALIDATION_VALUES :
1585 			return ScTPValidationValue::GetRanges;
1586             //break;
1587 		default:
1588 			break;
1589 	}
1590 
1591 	return 0;
1592 }
1593 
1594 void ScDPFunctionDlg_Dummy()
1595 {
1596     // use ScDPListBoxWrapper to avoid warning (this isn't called)
1597     ListBox* pListBox = NULL;
1598     ScDPListBoxWrapper aWrapper( *pListBox );
1599 }
1600 
1601