bump product version to 4.1.6.2
[LibreOffice.git] / sc / source / ui / attrdlg / scdlgfact.cxx
blob4a8b9bea542d4c4b6a2bcce9b73e158201e0d0c9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #undef SC_DLLIMPLEMENTATION
23 #include "scdlgfact.hxx"
25 #include "sc.hrc"
26 #include "scuiasciiopt.hxx"
27 #include "scuiautofmt.hxx"
28 #include "corodlg.hxx"
29 #include "crdlg.hxx"
30 #include "dapidata.hxx"
31 #include "dapitype.hxx"
32 #include "delcldlg.hxx"
33 #include "delcodlg.hxx"
34 #include "filldlg.hxx"
35 #include "groupdlg.hxx"
36 #include "inscldlg.hxx"
37 #include "inscodlg.hxx"
38 #include "instbdlg.hxx"
39 #include "lbseldlg.hxx"
40 #include "linkarea.hxx"
41 #include "mtrindlg.hxx"
42 #include "mvtabdlg.hxx"
43 #include "namecrea.hxx"
44 #include "namepast.hxx"
45 #include "namedefdlg.hxx"
46 #include "pfiltdlg.hxx"
47 #include "pvfundlg.hxx"
48 #include "dpgroupdlg.hxx"
49 #include "scendlg.hxx"
50 #include "shtabdlg.hxx"
51 #include "strindlg.hxx"
52 #include "tabbgcolordlg.hxx"
53 #include "scuiimoptdlg.hxx"
54 #include "attrdlg.hxx"
55 #include "hfedtdlg.hxx"
56 #include "styledlg.hxx"
57 #include "subtdlg.hxx"
58 #include "textdlgs.hxx"
59 #include "validate.hxx"
60 #include "validate.hrc"
61 #include "sortdlg.hxx"
62 #include "textimportoptions.hxx"
63 #include "opredlin.hxx"
64 #include "tpcalc.hxx"
65 #include "tpprint.hxx"
66 #include "tpstat.hxx"
67 #include "tpusrlst.hxx"
68 #include "tpview.hxx"
69 #include "tpformula.hxx"
70 #include "datafdlg.hxx"
71 #include "tpcompatibility.hxx"
72 #include "tpdefaults.hxx"
73 #include "colorformat.hxx"
74 #include "condformatdlg.hxx"
75 #include "condformatmgr.hxx"
76 #include "xmlsourcedlg.hxx"
78 // ause
79 #include "editutil.hxx"
81 IMPL_ABSTDLG_BASE(ScVclAbstractDialog_Impl);
82 IMPL_ABSTDLG_BASE(AbstractScImportAsciiDlg_Impl);
83 IMPL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl);
84 IMPL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl);
85 IMPL_ABSTDLG_BASE(AbstractScCondFormatManagerDlg_Impl);
86 IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl);
87 IMPL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl);
88 IMPL_ABSTDLG_BASE(AbstractScDataPilotServiceDlg_Impl);
89 IMPL_ABSTDLG_BASE(AbstractScDeleteCellDlg_Impl);
90 //for dataform
91 IMPL_ABSTDLG_BASE(AbstractScDataFormDlg_Impl);
92 IMPL_ABSTDLG_BASE(AbstractScDeleteContentsDlg_Impl);
93 IMPL_ABSTDLG_BASE(AbstractScFillSeriesDlg_Impl);
94 IMPL_ABSTDLG_BASE(AbstractScGroupDlg_Impl);
95 IMPL_ABSTDLG_BASE(AbstractScInsertCellDlg_Impl);
96 IMPL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl);
97 IMPL_ABSTDLG_BASE(AbstractScInsertTableDlg_Impl);
98 IMPL_ABSTDLG_BASE(AbstractScSelEntryDlg_Impl);
99 IMPL_ABSTDLG2_BASE(AbstractScLinkedAreaDlg_Impl);
100 IMPL_ABSTDLG_BASE(AbstractScMetricInputDlg_Impl);
101 IMPL_ABSTDLG_BASE(AbstractScMoveTableDlg_Impl);
102 IMPL_ABSTDLG_BASE(AbstractScNameCreateDlg_Impl);
103 IMPL_ABSTDLG_BASE(AbstractScNamePasteDlg_Impl);
104 IMPL_ABSTDLG_BASE(AbstractScPivotFilterDlg_Impl);
105 IMPL_ABSTDLG_BASE(AbstractScDPFunctionDlg_Impl);
106 IMPL_ABSTDLG_BASE(AbstractScDPSubtotalDlg_Impl);
107 IMPL_ABSTDLG_BASE(AbstractScDPNumGroupDlg_Impl);
108 IMPL_ABSTDLG_BASE(AbstractScDPDateGroupDlg_Impl);
109 IMPL_ABSTDLG_BASE(AbstractScDPShowDetailDlg_Impl);
110 IMPL_ABSTDLG_BASE(AbstractScNewScenarioDlg_Impl);
111 IMPL_ABSTDLG_BASE(AbstractScShowTabDlg_Impl);
112 IMPL_ABSTDLG_BASE(AbstractScSortWarningDlg_Impl);
113 IMPL_ABSTDLG_BASE(AbstractScStringInputDlg_Impl);
114 IMPL_ABSTDLG_BASE(AbstractScTabBgColorDlg_Impl);
115 IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl);
116 IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl);
117 IMPL_ABSTDLG_BASE(ScAbstractTabDialog_Impl);
119 // ScAbstractTabDialog_Impl begin
120 void ScAbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
122 pDlg->SetCurPageId( nId );
125 void ScAbstractTabDialog_Impl::SetCurPageId( const OString& rName )
127 pDlg->SetCurPageId( rName );
130 const SfxItemSet* ScAbstractTabDialog_Impl::GetOutputItemSet() const
132 return pDlg->GetOutputItemSet();
135 const sal_uInt16* ScAbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
137 return pDlg->GetInputRanges( pItem );
140 void ScAbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
142 pDlg->SetInputSet( pInSet );
144 //From class Window.
145 void ScAbstractTabDialog_Impl::SetText( const OUString& rStr )
147 pDlg->SetText( rStr );
149 OUString ScAbstractTabDialog_Impl::GetText() const
151 return pDlg->GetText();
154 // AbstractScImportAsciiDlg_Impl begin
155 void AbstractScImportAsciiDlg_Impl::GetOptions( ScAsciiOptions& rOpt )
157 pDlg->GetOptions( rOpt );
160 void AbstractScImportAsciiDlg_Impl::SaveParameters()
162 pDlg->SaveParameters();
165 // AbstractScImportAsciiDlg_Impl end
167 //AbstractScAutoFormatDlg_Impl begin
168 sal_uInt16 AbstractScAutoFormatDlg_Impl::GetIndex() const
170 return pDlg->GetIndex();
173 String AbstractScAutoFormatDlg_Impl::GetCurrFormatName()
175 return pDlg->GetCurrFormatName();
178 //AbstractScAutoFormatDlg_Impl end
182 //AbstractScColRowLabelDlg_Impl begin
183 sal_Bool AbstractScColRowLabelDlg_Impl::IsCol()
185 return pDlg->IsCol();
187 sal_Bool AbstractScColRowLabelDlg_Impl::IsRow()
189 return pDlg->IsRow();
192 //AbstractScColRowLabelDlg_Impl end
195 //AbstractScDataPilotDatabaseDlg_Impl begin
198 void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc )
200 pDlg->GetValues(rDesc);
203 //AbstractScDataPilotDatabaseDlg_Impl end
205 //AbstractScDataPilotSourceTypeDlg_Impl begin
207 bool AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const
209 return pDlg->IsDatabase();
212 bool AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const
214 return pDlg->IsExternal();
217 bool AbstractScDataPilotSourceTypeDlg_Impl::IsNamedRange() const
219 return pDlg->IsNamedRange();
222 OUString AbstractScDataPilotSourceTypeDlg_Impl::GetSelectedNamedRange() const
224 return pDlg->GetSelectedNamedRange();
227 void AbstractScDataPilotSourceTypeDlg_Impl::AppendNamedRange(const OUString& rName)
229 pDlg->AppendNamedRange(rName);
232 //AbstractScDataPilotSourceTypeDlg_Impl end
235 // AbstractScDataPilotServiceDlg_Impl begin
236 String AbstractScDataPilotServiceDlg_Impl::GetServiceName() const
238 return pDlg->GetServiceName();
241 String AbstractScDataPilotServiceDlg_Impl::GetParSource() const
243 return pDlg->GetParSource();
245 String AbstractScDataPilotServiceDlg_Impl::GetParName() const
247 return pDlg->GetParName();
249 String AbstractScDataPilotServiceDlg_Impl::GetParUser() const
251 return pDlg->GetParUser();
253 String AbstractScDataPilotServiceDlg_Impl::GetParPass() const
255 return pDlg->GetParPass();
258 //AbstractScDataPilotServiceDlg_Impl end
260 //AbstractScDeleteCellDlg_Impl begin
261 DelCellCmd AbstractScDeleteCellDlg_Impl::GetDelCellCmd() const
263 return pDlg->GetDelCellCmd();
265 //AbstractScDeleteCellDlg_Impl end
268 void AbstractScDeleteContentsDlg_Impl::DisableObjects()
270 pDlg->DisableObjects();
272 sal_uInt16 AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
274 return pDlg->GetDelContentsCmdBits();
279 FillDir AbstractScFillSeriesDlg_Impl::GetFillDir() const
281 return pDlg->GetFillDir();
284 FillCmd AbstractScFillSeriesDlg_Impl::GetFillCmd() const
286 return pDlg->GetFillCmd();
289 FillDateCmd AbstractScFillSeriesDlg_Impl::GetFillDateCmd() const
291 return pDlg->GetFillDateCmd();
294 double AbstractScFillSeriesDlg_Impl::GetStart() const
296 return pDlg->GetStart();
298 double AbstractScFillSeriesDlg_Impl::GetStep() const
300 return pDlg->GetStep();
302 double AbstractScFillSeriesDlg_Impl::GetMax() const
304 return pDlg->GetMax();
306 String AbstractScFillSeriesDlg_Impl::GetStartStr() const
308 return pDlg->GetStartStr();
310 void AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(sal_Bool bFlag)
312 pDlg->SetEdStartValEnabled(bFlag);
317 sal_Bool AbstractScGroupDlg_Impl::GetColsChecked() const
319 return pDlg->GetColsChecked();
325 InsCellCmd AbstractScInsertCellDlg_Impl::GetInsCellCmd() const
327 return pDlg->GetInsCellCmd();
334 sal_uInt16 AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
336 return pDlg->GetInsContentsCmdBits();
340 sal_uInt16 AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const
342 return pDlg->GetFormulaCmdBits();
344 sal_Bool AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const
346 return pDlg->IsSkipEmptyCells();
348 sal_Bool AbstractScInsertContentsDlg_Impl::IsLink() const
350 return pDlg->IsLink();
352 void AbstractScInsertContentsDlg_Impl::SetFillMode( sal_Bool bSet )
354 pDlg->SetFillMode( bSet );
357 void AbstractScInsertContentsDlg_Impl::SetOtherDoc( sal_Bool bSet )
359 pDlg->SetOtherDoc( bSet );
362 sal_Bool AbstractScInsertContentsDlg_Impl::IsTranspose() const
364 return pDlg->IsTranspose();
366 void AbstractScInsertContentsDlg_Impl::SetChangeTrack( sal_Bool bSet )
368 pDlg->SetChangeTrack( bSet );
370 void AbstractScInsertContentsDlg_Impl::SetCellShiftDisabled( int nDisable )
372 pDlg->SetCellShiftDisabled( nDisable );
375 InsCellCmd AbstractScInsertContentsDlg_Impl::GetMoveMode()
377 return pDlg->GetMoveMode();
383 sal_Bool AbstractScInsertTableDlg_Impl::GetTablesFromFile()
385 return pDlg->GetTablesFromFile();
388 sal_Bool AbstractScInsertTableDlg_Impl::GetTablesAsLink()
390 return pDlg->GetTablesAsLink();
392 const String* AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN )
394 return pDlg->GetFirstTable( pN );
396 ScDocShell* AbstractScInsertTableDlg_Impl::GetDocShellTables()
398 return pDlg->GetDocShellTables();
400 sal_Bool AbstractScInsertTableDlg_Impl::IsTableBefore()
402 return pDlg->IsTableBefore();
404 sal_uInt16 AbstractScInsertTableDlg_Impl::GetTableCount()
406 return pDlg->GetTableCount();
408 const String* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN )
410 return pDlg->GetNextTable( pN );
415 String AbstractScSelEntryDlg_Impl::GetSelectEntry() const
417 return pDlg->GetSelectEntry();
422 void AbstractScLinkedAreaDlg_Impl::InitFromOldLink( const String& rFile, const String& rFilter,
423 const String& rOptions, const String& rSource,
424 sal_uLong nRefresh )
426 pDlg->InitFromOldLink( rFile, rFilter, rOptions, rSource, nRefresh);
429 String AbstractScLinkedAreaDlg_Impl::GetURL()
431 return pDlg->GetURL();
433 String AbstractScLinkedAreaDlg_Impl::GetFilter()
435 return pDlg->GetFilter();
437 String AbstractScLinkedAreaDlg_Impl::GetOptions()
439 return pDlg->GetOptions();
441 String AbstractScLinkedAreaDlg_Impl::GetSource()
443 return pDlg->GetSource();
445 sal_uLong AbstractScLinkedAreaDlg_Impl::GetRefresh()
447 return pDlg->GetRefresh();
451 ScConditionalFormatList* AbstractScCondFormatManagerDlg_Impl::GetConditionalFormatList()
453 return pDlg->GetConditionalFormatList();
456 bool AbstractScCondFormatManagerDlg_Impl::CondFormatsChanged()
458 return pDlg->CondFormatsChanged();
462 long AbstractScMetricInputDlg_Impl::GetInputValue( FieldUnit eUnit ) const
465 return pDlg->GetInputValue( eUnit );
470 sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedDocument() const
472 return pDlg->GetSelectedDocument();
475 sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedTable() const
477 return pDlg->GetSelectedTable();
479 bool AbstractScMoveTableDlg_Impl::GetCopyTable() const
481 return pDlg->GetCopyTable();
483 bool AbstractScMoveTableDlg_Impl::GetRenameTable() const
485 return pDlg->GetRenameTable();
487 void AbstractScMoveTableDlg_Impl::GetTabNameString( OUString& rString ) const
489 pDlg->GetTabNameString( rString );
491 void AbstractScMoveTableDlg_Impl::SetForceCopyTable()
493 return pDlg->SetForceCopyTable();
495 void AbstractScMoveTableDlg_Impl::EnableCopyTable(sal_Bool bFlag)
497 return pDlg->EnableCopyTable( bFlag);
499 void AbstractScMoveTableDlg_Impl::EnableRenameTable(sal_Bool bFlag)
501 return pDlg->EnableRenameTable( bFlag);
507 sal_uInt16 AbstractScNameCreateDlg_Impl::GetFlags() const
509 return pDlg->GetFlags();
514 std::vector<OUString> AbstractScNamePasteDlg_Impl::GetSelectedNames() const
516 return pDlg->GetSelectedNames();
520 bool AbstractScNamePasteDlg_Impl::IsAllSelected() const
522 return pDlg->IsAllSelected();
526 const ScQueryItem& AbstractScPivotFilterDlg_Impl::GetOutputItem()
528 return pDlg->GetOutputItem();
533 sal_uInt16 AbstractScDPFunctionDlg_Impl::GetFuncMask() const
535 return pDlg->GetFuncMask();
537 ::com::sun::star::sheet::DataPilotFieldReference AbstractScDPFunctionDlg_Impl::GetFieldRef() const
539 return pDlg->GetFieldRef();
544 sal_uInt16 AbstractScDPSubtotalDlg_Impl::GetFuncMask() const
546 return pDlg->GetFuncMask();
548 void AbstractScDPSubtotalDlg_Impl::FillLabelData( ScDPLabelData& rLabelData ) const
550 pDlg->FillLabelData( rLabelData );
554 ScDPNumGroupInfo AbstractScDPNumGroupDlg_Impl::GetGroupInfo() const
556 return pDlg->GetGroupInfo();
559 ScDPNumGroupInfo AbstractScDPDateGroupDlg_Impl::GetGroupInfo() const
561 return pDlg->GetGroupInfo();
564 sal_Int32 AbstractScDPDateGroupDlg_Impl::GetDatePart() const
566 return pDlg->GetDatePart();
570 String AbstractScDPShowDetailDlg_Impl::GetDimensionName() const
572 return pDlg->GetDimensionName();
575 void AbstractScNewScenarioDlg_Impl::SetScenarioData(
576 const OUString& rName, const OUString& rComment, const Color& rColor, sal_uInt16 nFlags )
578 pDlg->SetScenarioData(rName, rComment, rColor, nFlags);
581 void AbstractScNewScenarioDlg_Impl::GetScenarioData(
582 OUString& rName, OUString& rComment, Color& rColor, sal_uInt16& rFlags ) const
584 pDlg->GetScenarioData(rName, rComment, rColor, rFlags);
587 void AbstractScShowTabDlg_Impl::Insert( const String& rString, sal_Bool bSelected )
589 pDlg->Insert( rString, bSelected);
592 sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryCount() const
594 return pDlg->GetSelectEntryCount();
596 void AbstractScShowTabDlg_Impl::SetDescription(
597 const String& rTitle, const String& rFixedText,
598 const OString& sDlgHelpId, const OString& sLbHelpId )
600 pDlg->SetDescription( rTitle, rFixedText, sDlgHelpId, sLbHelpId );
602 sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryPos(sal_uInt16 nPos) const
604 return pDlg->GetSelectEntryPos( nPos);
606 String AbstractScShowTabDlg_Impl::GetSelectEntry(sal_uInt16 nPos) const
608 return pDlg->GetSelectEntry(nPos);
613 void AbstractScStringInputDlg_Impl::GetInputString( OUString& rString ) const
615 pDlg->GetInputString( rString );
620 void AbstractScTabBgColorDlg_Impl::GetSelectedColor( Color& rColor ) const
622 pDlg->GetSelectedColor( rColor );
628 void AbstractScImportOptionsDlg_Impl::GetImportOptions( ScImportOptions& rOptions ) const
630 pDlg->GetImportOptions(rOptions);
632 // add for AbstractScImportOptionsDlg_Impl end
635 LanguageType AbstractScTextImportOptionsDlg_Impl::GetLanguageType() const
637 return pDlg->getLanguageType();
640 bool AbstractScTextImportOptionsDlg_Impl::IsDateConversionSet() const
642 return pDlg->isDateConversionSet();
647 // =========================Factories for createdialog ===================
650 AbstractScImportAsciiDlg * ScAbstractDialogFactory_Impl::CreateScImportAsciiDlg ( Window* pParent, String aDatName,
651 SvStream* pInStream, ScImportAsciiCall eCall )
653 ScImportAsciiDlg* pDlg = new ScImportAsciiDlg( pParent, aDatName,pInStream, eCall );
654 return new AbstractScImportAsciiDlg_Impl( pDlg );
656 // ScImportAsciiDlg end
658 AbstractScTextImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScTextImportOptionsDlg(Window* pParent)
660 ScTextImportOptionsDlg* pDlg = new ScTextImportOptionsDlg(pParent);
661 return new AbstractScTextImportOptionsDlg_Impl(pDlg);
664 AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( Window* pParent,
665 ScAutoFormat* pAutoFormat,
666 const ScAutoFormatData* pSelFormatData,
667 ScDocument* pDoc,
668 int nId)
670 ScAutoFormatDlg* pDlg=NULL;
671 switch ( nId )
673 case RID_SCDLG_AUTOFORMAT :
674 pDlg = new ScAutoFormatDlg( pParent, pAutoFormat,pSelFormatData, pDoc );
675 break;
676 default:
677 break;
680 if ( pDlg )
681 return new AbstractScAutoFormatDlg_Impl( pDlg );
682 return 0;
688 AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent,
689 int nId,
690 sal_Bool bCol ,
691 sal_Bool bRow)
693 ScColRowLabelDlg* pDlg=NULL;
694 switch ( nId )
696 case RID_SCDLG_CHARTCOLROW :
697 pDlg = new ScColRowLabelDlg( pParent, bCol,bRow );
698 break;
699 default:
700 break;
703 if ( pDlg )
704 return new AbstractScColRowLabelDlg_Impl( pDlg );
705 return 0;
712 VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window* pParent,
713 const String& rStrTitle,
714 const String& rStrLabel,
715 int nId,
716 sal_Bool bColDefault)
718 Dialog * pDlg=NULL;
719 switch ( nId )
721 case RID_SCDLG_COLORROW :
722 pDlg = new ScColOrRowDlg( pParent, rStrTitle,rStrLabel,bColDefault );
723 break;
724 default:
725 break;
728 if ( pDlg )
729 return new ScVclAbstractDialog_Impl( pDlg );
730 return 0;
733 AbstractScSortWarningDlg* ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( Window* pParent, const String& rExtendText, const String& rCurrentText )
735 ScSortWarningDlg* pDlg = new ScSortWarningDlg(pParent, rExtendText, rCurrentText );
736 return new AbstractScSortWarningDlg_Impl( pDlg );
740 AbstractScCondFormatManagerDlg* ScAbstractDialogFactory_Impl::CreateScCondFormatMgrDlg(Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList,
741 const ScAddress& rPos, int nId )
743 ScCondFormatManagerDlg* pDlg = NULL;
744 switch( nId )
746 case RID_SCDLG_COND_FORMAT_MANAGER:
747 pDlg = new ScCondFormatManagerDlg( pParent, pDoc, pFormatList, rPos );
748 break;
749 default:
750 break;
752 if(pDlg)
753 return new AbstractScCondFormatManagerDlg_Impl( pDlg );
755 return NULL;
758 AbstractScDataPilotDatabaseDlg * ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg (Window* pParent ,
759 int nId )
761 ScDataPilotDatabaseDlg * pDlg=NULL;
762 switch ( nId )
764 case RID_SCDLG_DAPIDATA :
765 pDlg = new ScDataPilotDatabaseDlg( pParent );
766 break;
767 default:
768 break;
771 if ( pDlg )
772 return new AbstractScDataPilotDatabaseDlg_Impl( pDlg );
773 return 0;
776 AbstractScDataPilotSourceTypeDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg(
777 Window* pParent, bool bEnableExternal)
779 ScDataPilotSourceTypeDlg* pDlg = new ScDataPilotSourceTypeDlg(pParent, bEnableExternal);
780 return new AbstractScDataPilotSourceTypeDlg_Impl(pDlg);
783 AbstractScDataPilotServiceDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg( Window* pParent,
784 const com::sun::star::uno::Sequence<OUString>& rServices,
785 int nId )
787 ScDataPilotServiceDlg * pDlg=NULL;
788 switch ( nId )
790 case RID_SCDLG_DAPISERVICE :
791 pDlg = new ScDataPilotServiceDlg( pParent, rServices );
792 break;
793 default:
794 break;
797 if ( pDlg )
798 return new AbstractScDataPilotServiceDlg_Impl( pDlg );
799 return 0;
802 // add for ScDataPilotServiceDlg end
805 AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(Window* pParent,
806 bool bDisallowCellMove)
808 ScDeleteCellDlg * pDlg = new ScDeleteCellDlg(pParent, bDisallowCellMove);
809 return new AbstractScDeleteCellDlg_Impl( pDlg );
812 AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg(Window* pParent,
813 ScTabViewShell* pTabViewShell)
815 ScDataFormDlg* pDlg = new ScDataFormDlg(pParent, pTabViewShell);
816 return new AbstractScDataFormDlg_Impl(pDlg);
819 AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,
820 sal_uInt16 nCheckDefaults)
822 ScDeleteContentsDlg* pDlg = new ScDeleteContentsDlg(pParent, nCheckDefaults);
823 return new AbstractScDeleteContentsDlg_Impl( pDlg );
829 AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Window* pParent,
830 ScDocument& rDocument,
831 FillDir eFillDir,
832 FillCmd eFillCmd,
833 FillDateCmd eFillDateCmd,
834 String aStartStr,
835 double fStep,
836 double fMax,
837 sal_uInt16 nPossDir,
838 int nId)
840 ScFillSeriesDlg * pDlg=NULL;
841 switch ( nId )
843 case RID_SCDLG_FILLSERIES :
844 pDlg = new ScFillSeriesDlg( pParent, rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nPossDir);
845 break;
846 default:
847 break;
850 if ( pDlg )
851 return new AbstractScFillSeriesDlg_Impl( pDlg );
852 return 0;
858 AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Window* pParent,
859 sal_uInt16 nResId,
860 int nId,
861 sal_Bool bUnGroup ,
862 sal_Bool bRows )
864 ScGroupDlg * pDlg=NULL;
865 switch ( nId )
867 case RID_SCDLG_GRP_KILL :
868 case RID_SCDLG_GRP_MAKE :
869 pDlg = new ScGroupDlg( pParent, nResId,bUnGroup, bRows);
870 break;
871 default:
872 break;
875 if ( pDlg )
876 return new AbstractScGroupDlg_Impl( pDlg );
877 return 0;
884 AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( Window* pParent,
885 int nId,
886 sal_Bool bDisallowCellMove )
888 ScInsertCellDlg * pDlg=NULL;
889 switch ( nId )
891 case RID_SCDLG_INSCELL :
892 pDlg = new ScInsertCellDlg( pParent, bDisallowCellMove);
893 break;
894 default:
895 break;
898 if ( pDlg )
899 return new AbstractScInsertCellDlg_Impl( pDlg );
900 return 0;
906 AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent,
907 int nId,
908 sal_uInt16 nCheckDefaults,
909 const OUString* pStrTitle )
911 ScInsertContentsDlg * pDlg=NULL;
912 switch ( nId )
914 case RID_SCDLG_INSCONT :
915 pDlg = new ScInsertContentsDlg( pParent, nCheckDefaults,pStrTitle );
916 break;
917 default:
918 break;
921 if ( pDlg )
922 return new AbstractScInsertContentsDlg_Impl( pDlg );
923 return 0;
926 AbstractScInsertTableDlg * ScAbstractDialogFactory_Impl::CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
927 SCTAB nTabCount, bool bFromFile)
929 ScInsertTableDlg* pDlg = new ScInsertTableDlg( pParent, rViewData,nTabCount, bFromFile );
930 return new AbstractScInsertTableDlg_Impl( pDlg );
933 // add for ScSelEntryDlg begin
934 AbstractScSelEntryDlg * ScAbstractDialogFactory_Impl::CreateScSelEntryDlg ( Window* pParent,
935 const std::vector<String> &rEntryList )
937 ScSelEntryDlg * pDlg = new ScSelEntryDlg( pParent, rEntryList );
938 return new AbstractScSelEntryDlg_Impl( pDlg );
940 // add for ScSelEntryDlg end
942 AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg(Window* pParent)
944 ScLinkedAreaDlg* pDlg = new ScLinkedAreaDlg( pParent );
945 return new AbstractScLinkedAreaDlg_Impl( pDlg );
948 AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg ( Window* pParent,
949 sal_uInt16 nResId, // Ableitung fuer jeden Dialog!
950 long nCurrent,
951 long nDefault,
952 int nId ,
953 FieldUnit eFUnit,
954 sal_uInt16 nDecimals,
955 long nMaximum ,
956 long nMinimum,
957 long nFirst,
958 long nLast )
960 ScMetricInputDlg * pDlg=NULL;
961 switch ( nId )
963 case RID_SCDLG_ROW_MAN :
964 case RID_SCDLG_ROW_OPT :
965 case RID_SCDLG_COL_MAN :
966 case RID_SCDLG_COL_OPT :
967 pDlg = new ScMetricInputDlg( pParent , nResId,nCurrent ,nDefault, eFUnit,
968 nDecimals, nMaximum , nMinimum , nFirst, nLast);
969 break;
970 default:
971 break;
974 if ( pDlg )
975 return new AbstractScMetricInputDlg_Impl( pDlg );
976 return 0;
982 AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg( Window* pParent,
983 const String& rDefault,
984 int nId )
986 ScMoveTableDlg * pDlg=NULL;
987 switch ( nId )
989 case RID_SCDLG_MOVETAB :
990 pDlg = new ScMoveTableDlg( pParent, rDefault );
991 break;
992 default:
993 break;
996 if ( pDlg )
997 return new AbstractScMoveTableDlg_Impl( pDlg );
998 return 0;
1001 AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(Window * pParent, sal_uInt16 nFlags)
1003 ScNameCreateDlg * pDlg = new ScNameCreateDlg( pParent, nFlags );
1004 return new AbstractScNameCreateDlg_Impl( pDlg );
1007 AbstractScNamePasteDlg * ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( Window * pParent, ScDocShell* pShell, bool bInsList )
1009 ScNamePasteDlg * pDlg = new ScNamePasteDlg( pParent, pShell, bInsList );
1010 return new AbstractScNamePasteDlg_Impl( pDlg );
1014 AbstractScPivotFilterDlg * ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg ( Window* pParent,
1015 const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId )
1017 ScPivotFilterDlg * pDlg=NULL;
1018 switch ( nId )
1020 case RID_SCDLG_PIVOTFILTER :
1021 pDlg = new ScPivotFilterDlg( pParent, rArgSet, nSourceTab );
1022 break;
1023 default:
1024 break;
1027 if ( pDlg )
1028 return new AbstractScPivotFilterDlg_Impl( pDlg );
1029 return 0;
1035 AbstractScDPFunctionDlg * ScAbstractDialogFactory_Impl::CreateScDPFunctionDlg ( Window* pParent,
1036 int nId,
1037 const ScDPLabelDataVector& rLabelVec,
1038 const ScDPLabelData& rLabelData,
1039 const ScPivotFuncData& rFuncData )
1041 ScDPFunctionDlg * pDlg=NULL;
1042 switch ( nId )
1044 case RID_SCDLG_DPDATAFIELD :
1045 pDlg = new ScDPFunctionDlg( pParent, rLabelVec, rLabelData, rFuncData );
1046 break;
1047 default:
1048 break;
1051 if ( pDlg )
1052 return new AbstractScDPFunctionDlg_Impl( pDlg );
1053 return 0;
1058 AbstractScDPSubtotalDlg * ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg ( Window* pParent,
1059 int nId,
1060 ScDPObject& rDPObj,
1061 const ScDPLabelData& rLabelData,
1062 const ScPivotFuncData& rFuncData,
1063 const ScDPNameVec& rDataFields,
1064 bool bEnableLayout )
1066 ScDPSubtotalDlg * pDlg=NULL;
1067 switch ( nId )
1069 case RID_SCDLG_PIVOTSUBT :
1070 pDlg = new ScDPSubtotalDlg( pParent, rDPObj, rLabelData, rFuncData, rDataFields, bEnableLayout );
1071 break;
1072 default:
1073 break;
1076 if ( pDlg )
1077 return new AbstractScDPSubtotalDlg_Impl( pDlg );
1078 return 0;
1082 AbstractScDPNumGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPNumGroupDlg(
1083 Window* pParent, int nId, const ScDPNumGroupInfo& rInfo )
1085 if( nId == RID_SCDLG_DPNUMGROUP )
1086 return new AbstractScDPNumGroupDlg_Impl( new ScDPNumGroupDlg( pParent, rInfo ) );
1087 return 0;
1090 AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg(
1091 Window* pParent, int nId,
1092 const ScDPNumGroupInfo& rInfo, sal_Int32 nDatePart, const Date& rNullDate )
1094 if( nId == RID_SCDLG_DPDATEGROUP )
1095 return new AbstractScDPDateGroupDlg_Impl( new ScDPDateGroupDlg( pParent, rInfo, nDatePart, rNullDate ) );
1096 return 0;
1100 AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg (
1101 Window* pParent, int nId, ScDPObject& rDPObj, sal_uInt16 nOrient )
1103 if( nId == RID_SCDLG_DPSHOWDETAIL )
1104 return new AbstractScDPShowDetailDlg_Impl( new ScDPShowDetailDlg( pParent, rDPObj, nOrient ) );
1105 return 0;
1110 AbstractScNewScenarioDlg * ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg ( Window* pParent, const String& rName,
1111 int nId,
1112 sal_Bool bEdit , sal_Bool bSheetProtected )
1114 ScNewScenarioDlg * pDlg=NULL;
1115 switch ( nId )
1117 case RID_SCDLG_NEWSCENARIO :
1118 pDlg = new ScNewScenarioDlg( pParent, rName, bEdit,bSheetProtected );
1119 break;
1120 default:
1121 break;
1124 if ( pDlg )
1125 return new AbstractScNewScenarioDlg_Impl( pDlg );
1126 return 0;
1131 AbstractScShowTabDlg * ScAbstractDialogFactory_Impl::CreateScShowTabDlg ( Window* pParent, int nId )
1133 ScShowTabDlg * pDlg=NULL;
1134 switch ( nId )
1136 case RID_SCDLG_SHOW_TAB :
1137 pDlg = new ScShowTabDlg( pParent);
1138 break;
1139 default:
1140 break;
1143 if ( pDlg )
1144 return new AbstractScShowTabDlg_Impl( pDlg );
1145 return 0;
1152 AbstractScStringInputDlg * ScAbstractDialogFactory_Impl::CreateScStringInputDlg ( Window* pParent,
1153 const String& rTitle,
1154 const String& rEditTitle,
1155 const String& rDefault,
1156 const OString& sHelpId, const OString& sEditHelpId,
1157 int nId )
1159 ScStringInputDlg * pDlg=NULL;
1160 switch ( nId )
1162 case RID_SCDLG_STRINPUT :
1163 pDlg = new ScStringInputDlg( pParent, rTitle, rEditTitle, rDefault, sHelpId, sEditHelpId );
1164 break;
1165 default:
1166 break;
1169 if ( pDlg )
1170 return new AbstractScStringInputDlg_Impl( pDlg );
1171 return 0;
1176 AbstractScTabBgColorDlg * ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg (
1177 Window* pParent,
1178 const String& rTitle,
1179 const String& rTabBgColorNoColorText,
1180 const Color& rDefaultColor,
1181 const OString& sHelpId ,
1182 int nId )
1184 ScTabBgColorDlg * pDlg=NULL;
1185 switch ( nId )
1187 case RID_SCDLG_TAB_BG_COLOR :
1188 pDlg = new ScTabBgColorDlg( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, sHelpId );
1189 break;
1190 default:
1191 break;
1194 if ( pDlg )
1195 return new AbstractScTabBgColorDlg_Impl( pDlg );
1196 return 0;
1201 AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg ( Window* pParent,
1202 int nId,
1203 sal_Bool bAscii,
1204 const ScImportOptions* pOptions,
1205 const String* pStrTitle,
1206 sal_Bool bMultiByte,
1207 sal_Bool bOnlyDbtoolsEncodings,
1208 sal_Bool bImport )
1210 ScImportOptionsDlg * pDlg=NULL;
1211 switch ( nId )
1213 case RID_SCDLG_IMPORTOPT :
1214 pDlg = new ScImportOptionsDlg( pParent, bAscii, pOptions,pStrTitle, bMultiByte,bOnlyDbtoolsEncodings, bImport );
1215 break;
1216 default:
1217 break;
1220 if ( pDlg )
1221 return new AbstractScImportOptionsDlg_Impl( pDlg );
1222 return 0;
1226 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScAttrDlg(SfxViewFrame* pFrame,
1227 Window* pParent, const SfxItemSet* pCellAttrs)
1229 SfxTabDialog* pDlg = new ScAttrDlg(pFrame, pParent, pCellAttrs);
1230 return new ScAbstractTabDialog_Impl(pDlg);
1233 #undef SfxTabDialog
1234 #undef ScAbstractTabDialog_Impl
1237 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewFrame* pFrame,
1238 Window* pParent,
1239 const SfxItemSet& rCoreSet,
1240 const OUString& rPageStyle,
1241 sal_uInt16 nResId )
1243 SfxTabDialog* pDlg = NULL;
1245 switch (nResId)
1247 case RID_SCDLG_HFED_HEADER:
1248 case RID_SCDLG_HFEDIT_HEADER:
1249 pDlg = new ScHFEditHeaderDlg(pFrame, pParent, rCoreSet, rPageStyle);
1250 break;
1251 case RID_SCDLG_HFED_FOOTER:
1252 case RID_SCDLG_HFEDIT_FOOTER:
1253 pDlg = new ScHFEditFooterDlg(pFrame, pParent, rCoreSet, rPageStyle);
1254 break;
1255 case RID_SCDLG_HFEDIT_LEFTHEADER:
1256 pDlg = new ScHFEditLeftHeaderDlg(pFrame, pParent, rCoreSet, rPageStyle);
1257 break;
1258 case RID_SCDLG_HFEDIT_RIGHTHEADER:
1259 pDlg = new ScHFEditRightHeaderDlg(pFrame, pParent, rCoreSet, rPageStyle);
1260 break;
1261 case RID_SCDLG_HFEDIT_LEFTFOOTER:
1262 pDlg = new ScHFEditLeftFooterDlg(pFrame, pParent, rCoreSet, rPageStyle);
1263 break;
1264 case RID_SCDLG_HFEDIT_RIGHTFOOTER:
1265 pDlg = new ScHFEditRightFooterDlg(pFrame, pParent, rCoreSet, rPageStyle);
1266 break;
1267 case RID_SCDLG_HFEDIT_SHDR:
1268 pDlg = new ScHFEditSharedHeaderDlg(pFrame, pParent, rCoreSet, rPageStyle);
1269 break;
1270 case RID_SCDLG_HFEDIT_SFTR:
1271 pDlg = new ScHFEditSharedFooterDlg(pFrame, pParent, rCoreSet, rPageStyle);
1272 break;
1273 case RID_SCDLG_HFEDIT_ALL:
1274 pDlg = new ScHFEditAllDlg(pFrame, pParent, rCoreSet, rPageStyle);
1275 break;
1276 default:
1277 case RID_SCDLG_HFEDIT:
1278 pDlg = new ScHFEditActiveDlg(pFrame, pParent, rCoreSet, rPageStyle);
1279 break;
1282 return pDlg ? new ScAbstractTabDialog_Impl( pDlg ) : NULL;
1287 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScStyleDlg( Window* pParent,
1288 SfxStyleSheetBase& rStyleBase,
1289 sal_uInt16 nRscId,
1290 int nId)
1292 SfxTabDialog* pDlg=NULL;
1293 switch ( nId )
1295 case RID_SCDLG_STYLES_PAGE :
1296 case RID_SCDLG_STYLES_PAR :
1297 pDlg = new ScStyleDlg( pParent, rStyleBase, nRscId );
1298 break;
1299 default:
1300 break;
1303 if ( pDlg )
1304 return new ScAbstractTabDialog_Impl( pDlg );
1305 return 0;
1310 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSubTotalDlg( Window* pParent,
1311 const SfxItemSet* pArgSet,
1312 int nId)
1314 SfxTabDialog* pDlg=NULL;
1315 switch ( nId )
1317 case RID_SCDLG_SUBTOTALS :
1318 pDlg = new ScSubTotalDlg( pParent, pArgSet );
1319 break;
1320 default:
1321 break;
1324 if ( pDlg )
1325 return new ScAbstractTabDialog_Impl( pDlg );
1326 return 0;
1331 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScCharDlg( Window* pParent, const SfxItemSet* pAttr,
1332 const SfxObjectShell* pDocShell, int nId )
1334 SfxTabDialog* pDlg=NULL;
1335 switch ( nId )
1337 case RID_SCDLG_CHAR :
1338 pDlg = new ScCharDlg( pParent, pAttr, pDocShell );
1339 break;
1340 default:
1341 break;
1344 if ( pDlg )
1345 return new ScAbstractTabDialog_Impl( pDlg );
1346 return 0;
1351 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ,
1352 int nId )
1354 SfxTabDialog* pDlg=NULL;
1355 switch ( nId )
1357 case RID_SCDLG_PARAGRAPH :
1358 pDlg = new ScParagraphDlg( pParent, pAttr );
1359 break;
1360 default:
1361 break;
1364 if ( pDlg )
1365 return new ScAbstractTabDialog_Impl( pDlg );
1366 return 0;
1371 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScValidationDlg( Window* pParent,
1372 const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh )
1374 SfxTabDialog* pDlg=NULL;
1375 switch ( nId )
1377 case TAB_DLG_VALIDATION :
1378 pDlg = new ScValidationDlg( pParent, pArgSet, pTabVwSh );
1379 break;
1380 default:
1381 break;
1384 if ( pDlg )
1385 return new ScAbstractTabDialog_Impl( pDlg );
1386 return 0;
1390 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window* pParent,
1391 const SfxItemSet* pArgSet,int nId )
1393 SfxTabDialog* pDlg=NULL;
1394 switch ( nId )
1396 case RID_SCDLG_SORT :
1397 pDlg = new ScSortDlg( pParent, pArgSet );
1398 break;
1399 default:
1400 break;
1403 if ( pDlg )
1404 return new ScAbstractTabDialog_Impl( pDlg );
1405 return 0;
1408 #undef SfxTabDialog
1409 #undef ScAbstractTabDialog_Impl
1412 //------------------ Factories for TabPages--------------------
1413 CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
1415 switch ( nId )
1417 case RID_SCPAGE_OPREDLINE :
1418 return ScRedlineOptionsTabPage::Create;
1419 //break;
1420 case RID_SCPAGE_CALC :
1421 return ScTpCalcOptions::Create;
1422 //break;
1423 case RID_SCPAGE_FORMULA:
1424 return ScTpFormulaOptions::Create;
1425 case RID_SCPAGE_COMPATIBILITY:
1426 return ScTpCompatOptions::Create;
1427 case RID_SCPAGE_DEFAULTS:
1428 return ScTpDefaultsOptions::Create;
1429 case RID_SCPAGE_PRINT :
1430 return ScTpPrintOptions::Create;
1431 //break;
1432 case RID_SCPAGE_STAT :
1433 return ScDocStatPage::Create;
1434 //break;
1435 case RID_SCPAGE_USERLISTS :
1436 return ScTpUserLists::Create;
1437 //break;
1438 case RID_SCPAGE_CONTENT :
1439 return ScTpContentOptions::Create;
1440 //break;
1441 case RID_SCPAGE_LAYOUT :
1442 return ScTpLayoutOptions::Create;
1443 //break;
1445 default:
1446 break;
1449 return 0;
1452 GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
1454 switch ( nId )
1456 case TP_VALIDATION_VALUES :
1457 return ScTPValidationValue::GetRanges;
1458 //break;
1459 default:
1460 break;
1463 return 0;
1466 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */