1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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"
26 #include "scuiasciiopt.hxx"
27 #include "scuiautofmt.hxx"
28 #include "corodlg.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"
65 #include "tpprint.hxx"
67 #include "tpusrlst.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"
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
);
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
);
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
,
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
,
670 ScAutoFormatDlg
* pDlg
=NULL
;
673 case RID_SCDLG_AUTOFORMAT
:
674 pDlg
= new ScAutoFormatDlg( pParent
, pAutoFormat
,pSelFormatData
, pDoc
);
681 return new AbstractScAutoFormatDlg_Impl( pDlg
);
688 AbstractScColRowLabelDlg
* ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window
* pParent
,
693 ScColRowLabelDlg
* pDlg
=NULL
;
696 case RID_SCDLG_CHARTCOLROW
:
697 pDlg
= new ScColRowLabelDlg( pParent
, bCol
,bRow
);
704 return new AbstractScColRowLabelDlg_Impl( pDlg
);
712 VclAbstractDialog
* ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window
* pParent
,
713 const String
& rStrTitle
,
714 const String
& rStrLabel
,
716 sal_Bool bColDefault
)
721 case RID_SCDLG_COLORROW
:
722 pDlg
= new ScColOrRowDlg( pParent
, rStrTitle
,rStrLabel
,bColDefault
);
729 return new ScVclAbstractDialog_Impl( pDlg
);
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
;
746 case RID_SCDLG_COND_FORMAT_MANAGER
:
747 pDlg
= new ScCondFormatManagerDlg( pParent
, pDoc
, pFormatList
, rPos
);
753 return new AbstractScCondFormatManagerDlg_Impl( pDlg
);
758 AbstractScDataPilotDatabaseDlg
* ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg (Window
* pParent
,
761 ScDataPilotDatabaseDlg
* pDlg
=NULL
;
764 case RID_SCDLG_DAPIDATA
:
765 pDlg
= new ScDataPilotDatabaseDlg( pParent
);
772 return new AbstractScDataPilotDatabaseDlg_Impl( pDlg
);
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
,
787 ScDataPilotServiceDlg
* pDlg
=NULL
;
790 case RID_SCDLG_DAPISERVICE
:
791 pDlg
= new ScDataPilotServiceDlg( pParent
, rServices
);
798 return new AbstractScDataPilotServiceDlg_Impl( pDlg
);
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
,
833 FillDateCmd eFillDateCmd
,
840 ScFillSeriesDlg
* pDlg
=NULL
;
843 case RID_SCDLG_FILLSERIES
:
844 pDlg
= new ScFillSeriesDlg( pParent
, rDocument
,eFillDir
, eFillCmd
,eFillDateCmd
, aStartStr
,fStep
,fMax
,nPossDir
);
851 return new AbstractScFillSeriesDlg_Impl( pDlg
);
858 AbstractScGroupDlg
* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Window
* pParent
,
864 ScGroupDlg
* pDlg
=NULL
;
867 case RID_SCDLG_GRP_KILL
:
868 case RID_SCDLG_GRP_MAKE
:
869 pDlg
= new ScGroupDlg( pParent
, nResId
,bUnGroup
, bRows
);
876 return new AbstractScGroupDlg_Impl( pDlg
);
884 AbstractScInsertCellDlg
* ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( Window
* pParent
,
886 sal_Bool bDisallowCellMove
)
888 ScInsertCellDlg
* pDlg
=NULL
;
891 case RID_SCDLG_INSCELL
:
892 pDlg
= new ScInsertCellDlg( pParent
, bDisallowCellMove
);
899 return new AbstractScInsertCellDlg_Impl( pDlg
);
906 AbstractScInsertContentsDlg
* ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window
* pParent
,
908 sal_uInt16 nCheckDefaults
,
909 const OUString
* pStrTitle
)
911 ScInsertContentsDlg
* pDlg
=NULL
;
914 case RID_SCDLG_INSCONT
:
915 pDlg
= new ScInsertContentsDlg( pParent
, nCheckDefaults
,pStrTitle
);
922 return new AbstractScInsertContentsDlg_Impl( pDlg
);
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!
954 sal_uInt16 nDecimals
,
960 ScMetricInputDlg
* pDlg
=NULL
;
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
);
975 return new AbstractScMetricInputDlg_Impl( pDlg
);
982 AbstractScMoveTableDlg
* ScAbstractDialogFactory_Impl::CreateScMoveTableDlg( Window
* pParent
,
983 const String
& rDefault
,
986 ScMoveTableDlg
* pDlg
=NULL
;
989 case RID_SCDLG_MOVETAB
:
990 pDlg
= new ScMoveTableDlg( pParent
, rDefault
);
997 return new AbstractScMoveTableDlg_Impl( pDlg
);
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
;
1020 case RID_SCDLG_PIVOTFILTER
:
1021 pDlg
= new ScPivotFilterDlg( pParent
, rArgSet
, nSourceTab
);
1028 return new AbstractScPivotFilterDlg_Impl( pDlg
);
1035 AbstractScDPFunctionDlg
* ScAbstractDialogFactory_Impl::CreateScDPFunctionDlg ( Window
* pParent
,
1037 const ScDPLabelDataVector
& rLabelVec
,
1038 const ScDPLabelData
& rLabelData
,
1039 const ScPivotFuncData
& rFuncData
)
1041 ScDPFunctionDlg
* pDlg
=NULL
;
1044 case RID_SCDLG_DPDATAFIELD
:
1045 pDlg
= new ScDPFunctionDlg( pParent
, rLabelVec
, rLabelData
, rFuncData
);
1052 return new AbstractScDPFunctionDlg_Impl( pDlg
);
1058 AbstractScDPSubtotalDlg
* ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg ( Window
* pParent
,
1061 const ScDPLabelData
& rLabelData
,
1062 const ScPivotFuncData
& rFuncData
,
1063 const ScDPNameVec
& rDataFields
,
1064 bool bEnableLayout
)
1066 ScDPSubtotalDlg
* pDlg
=NULL
;
1069 case RID_SCDLG_PIVOTSUBT
:
1070 pDlg
= new ScDPSubtotalDlg( pParent
, rDPObj
, rLabelData
, rFuncData
, rDataFields
, bEnableLayout
);
1077 return new AbstractScDPSubtotalDlg_Impl( pDlg
);
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
) );
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
) );
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
) );
1110 AbstractScNewScenarioDlg
* ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg ( Window
* pParent
, const String
& rName
,
1112 sal_Bool bEdit
, sal_Bool bSheetProtected
)
1114 ScNewScenarioDlg
* pDlg
=NULL
;
1117 case RID_SCDLG_NEWSCENARIO
:
1118 pDlg
= new ScNewScenarioDlg( pParent
, rName
, bEdit
,bSheetProtected
);
1125 return new AbstractScNewScenarioDlg_Impl( pDlg
);
1131 AbstractScShowTabDlg
* ScAbstractDialogFactory_Impl::CreateScShowTabDlg ( Window
* pParent
, int nId
)
1133 ScShowTabDlg
* pDlg
=NULL
;
1136 case RID_SCDLG_SHOW_TAB
:
1137 pDlg
= new ScShowTabDlg( pParent
);
1144 return new AbstractScShowTabDlg_Impl( pDlg
);
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
,
1159 ScStringInputDlg
* pDlg
=NULL
;
1162 case RID_SCDLG_STRINPUT
:
1163 pDlg
= new ScStringInputDlg( pParent
, rTitle
, rEditTitle
, rDefault
, sHelpId
, sEditHelpId
);
1170 return new AbstractScStringInputDlg_Impl( pDlg
);
1176 AbstractScTabBgColorDlg
* ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg (
1178 const String
& rTitle
,
1179 const String
& rTabBgColorNoColorText
,
1180 const Color
& rDefaultColor
,
1181 const OString
& sHelpId
,
1184 ScTabBgColorDlg
* pDlg
=NULL
;
1187 case RID_SCDLG_TAB_BG_COLOR
:
1188 pDlg
= new ScTabBgColorDlg( pParent
, rTitle
, rTabBgColorNoColorText
, rDefaultColor
, sHelpId
);
1195 return new AbstractScTabBgColorDlg_Impl( pDlg
);
1201 AbstractScImportOptionsDlg
* ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg ( Window
* pParent
,
1204 const ScImportOptions
* pOptions
,
1205 const String
* pStrTitle
,
1206 sal_Bool bMultiByte
,
1207 sal_Bool bOnlyDbtoolsEncodings
,
1210 ScImportOptionsDlg
* pDlg
=NULL
;
1213 case RID_SCDLG_IMPORTOPT
:
1214 pDlg
= new ScImportOptionsDlg( pParent
, bAscii
, pOptions
,pStrTitle
, bMultiByte
,bOnlyDbtoolsEncodings
, bImport
);
1221 return new AbstractScImportOptionsDlg_Impl( pDlg
);
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
);
1234 #undef ScAbstractTabDialog_Impl
1237 SfxAbstractTabDialog
* ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewFrame
* pFrame
,
1239 const SfxItemSet
& rCoreSet
,
1240 const OUString
& rPageStyle
,
1243 SfxTabDialog
* pDlg
= NULL
;
1247 case RID_SCDLG_HFED_HEADER
:
1248 case RID_SCDLG_HFEDIT_HEADER
:
1249 pDlg
= new ScHFEditHeaderDlg(pFrame
, pParent
, rCoreSet
, rPageStyle
);
1251 case RID_SCDLG_HFED_FOOTER
:
1252 case RID_SCDLG_HFEDIT_FOOTER
:
1253 pDlg
= new ScHFEditFooterDlg(pFrame
, pParent
, rCoreSet
, rPageStyle
);
1255 case RID_SCDLG_HFEDIT_LEFTHEADER
:
1256 pDlg
= new ScHFEditLeftHeaderDlg(pFrame
, pParent
, rCoreSet
, rPageStyle
);
1258 case RID_SCDLG_HFEDIT_RIGHTHEADER
:
1259 pDlg
= new ScHFEditRightHeaderDlg(pFrame
, pParent
, rCoreSet
, rPageStyle
);
1261 case RID_SCDLG_HFEDIT_LEFTFOOTER
:
1262 pDlg
= new ScHFEditLeftFooterDlg(pFrame
, pParent
, rCoreSet
, rPageStyle
);
1264 case RID_SCDLG_HFEDIT_RIGHTFOOTER
:
1265 pDlg
= new ScHFEditRightFooterDlg(pFrame
, pParent
, rCoreSet
, rPageStyle
);
1267 case RID_SCDLG_HFEDIT_SHDR
:
1268 pDlg
= new ScHFEditSharedHeaderDlg(pFrame
, pParent
, rCoreSet
, rPageStyle
);
1270 case RID_SCDLG_HFEDIT_SFTR
:
1271 pDlg
= new ScHFEditSharedFooterDlg(pFrame
, pParent
, rCoreSet
, rPageStyle
);
1273 case RID_SCDLG_HFEDIT_ALL
:
1274 pDlg
= new ScHFEditAllDlg(pFrame
, pParent
, rCoreSet
, rPageStyle
);
1277 case RID_SCDLG_HFEDIT
:
1278 pDlg
= new ScHFEditActiveDlg(pFrame
, pParent
, rCoreSet
, rPageStyle
);
1282 return pDlg
? new ScAbstractTabDialog_Impl( pDlg
) : NULL
;
1287 SfxAbstractTabDialog
* ScAbstractDialogFactory_Impl::CreateScStyleDlg( Window
* pParent
,
1288 SfxStyleSheetBase
& rStyleBase
,
1292 SfxTabDialog
* pDlg
=NULL
;
1295 case RID_SCDLG_STYLES_PAGE
:
1296 case RID_SCDLG_STYLES_PAR
:
1297 pDlg
= new ScStyleDlg( pParent
, rStyleBase
, nRscId
);
1304 return new ScAbstractTabDialog_Impl( pDlg
);
1310 SfxAbstractTabDialog
* ScAbstractDialogFactory_Impl::CreateScSubTotalDlg( Window
* pParent
,
1311 const SfxItemSet
* pArgSet
,
1314 SfxTabDialog
* pDlg
=NULL
;
1317 case RID_SCDLG_SUBTOTALS
:
1318 pDlg
= new ScSubTotalDlg( pParent
, pArgSet
);
1325 return new ScAbstractTabDialog_Impl( pDlg
);
1331 SfxAbstractTabDialog
* ScAbstractDialogFactory_Impl::CreateScCharDlg( Window
* pParent
, const SfxItemSet
* pAttr
,
1332 const SfxObjectShell
* pDocShell
, int nId
)
1334 SfxTabDialog
* pDlg
=NULL
;
1337 case RID_SCDLG_CHAR
:
1338 pDlg
= new ScCharDlg( pParent
, pAttr
, pDocShell
);
1345 return new ScAbstractTabDialog_Impl( pDlg
);
1351 SfxAbstractTabDialog
* ScAbstractDialogFactory_Impl::CreateScParagraphDlg( Window
* pParent
, const SfxItemSet
* pAttr
,
1354 SfxTabDialog
* pDlg
=NULL
;
1357 case RID_SCDLG_PARAGRAPH
:
1358 pDlg
= new ScParagraphDlg( pParent
, pAttr
);
1365 return new ScAbstractTabDialog_Impl( pDlg
);
1371 SfxAbstractTabDialog
* ScAbstractDialogFactory_Impl::CreateScValidationDlg( Window
* pParent
,
1372 const SfxItemSet
* pArgSet
,int nId
, ScTabViewShell
*pTabVwSh
)
1374 SfxTabDialog
* pDlg
=NULL
;
1377 case TAB_DLG_VALIDATION
:
1378 pDlg
= new ScValidationDlg( pParent
, pArgSet
, pTabVwSh
);
1385 return new ScAbstractTabDialog_Impl( pDlg
);
1390 SfxAbstractTabDialog
* ScAbstractDialogFactory_Impl::CreateScSortDlg( Window
* pParent
,
1391 const SfxItemSet
* pArgSet
,int nId
)
1393 SfxTabDialog
* pDlg
=NULL
;
1396 case RID_SCDLG_SORT
:
1397 pDlg
= new ScSortDlg( pParent
, pArgSet
);
1404 return new ScAbstractTabDialog_Impl( pDlg
);
1409 #undef ScAbstractTabDialog_Impl
1412 //------------------ Factories for TabPages--------------------
1413 CreateTabPage
ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId
)
1417 case RID_SCPAGE_OPREDLINE
:
1418 return ScRedlineOptionsTabPage::Create
;
1420 case RID_SCPAGE_CALC
:
1421 return ScTpCalcOptions::Create
;
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
;
1432 case RID_SCPAGE_STAT
:
1433 return ScDocStatPage::Create
;
1435 case RID_SCPAGE_USERLISTS
:
1436 return ScTpUserLists::Create
;
1438 case RID_SCPAGE_CONTENT
:
1439 return ScTpContentOptions::Create
;
1441 case RID_SCPAGE_LAYOUT
:
1442 return ScTpLayoutOptions::Create
;
1452 GetTabPageRanges
ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId
)
1456 case TP_VALIDATION_VALUES
:
1457 return ScTPValidationValue::GetRanges
;
1466 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */