fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / ui / attrdlg / scdlgfact.cxx
blob5b9fb73097f9f62790439ec1bef4ebcd6068947d
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 .
20 #undef SC_DLLIMPLEMENTATION
22 #include "scdlgfact.hxx"
24 #include "sc.hrc"
25 #include "scuiasciiopt.hxx"
26 #include "scuiautofmt.hxx"
27 #include "corodlg.hxx"
28 #include "crdlg.hxx"
29 #include "dapidata.hxx"
30 #include "dapitype.hxx"
31 #include "delcldlg.hxx"
32 #include "delcodlg.hxx"
33 #include "filldlg.hxx"
34 #include "groupdlg.hxx"
35 #include "inscldlg.hxx"
36 #include "inscodlg.hxx"
37 #include "instbdlg.hxx"
38 #include "lbseldlg.hxx"
39 #include "linkarea.hxx"
40 #include "mtrindlg.hxx"
41 #include "mvtabdlg.hxx"
42 #include "namecrea.hxx"
43 #include "namepast.hxx"
44 #include "namedefdlg.hxx"
45 #include "pfiltdlg.hxx"
46 #include "pvfundlg.hxx"
47 #include "dpgroupdlg.hxx"
48 #include "scendlg.hxx"
49 #include "shtabdlg.hxx"
50 #include "strindlg.hxx"
51 #include "tabbgcolordlg.hxx"
52 #include "scuiimoptdlg.hxx"
53 #include "attrdlg.hxx"
54 #include "hfedtdlg.hxx"
55 #include "styledlg.hxx"
56 #include "subtdlg.hxx"
57 #include "textdlgs.hxx"
58 #include "validate.hxx"
59 #include "sortdlg.hxx"
60 #include "textimportoptions.hxx"
61 #include "opredlin.hxx"
62 #include "tpcalc.hxx"
63 #include "tpprint.hxx"
64 #include "tpstat.hxx"
65 #include "tpusrlst.hxx"
66 #include "tpview.hxx"
67 #include "tpformula.hxx"
68 #include "datafdlg.hxx"
69 #include "tpcompatibility.hxx"
70 #include "tpdefaults.hxx"
71 #include "colorformat.hxx"
72 #include "condformatdlg.hxx"
73 #include "condformatmgr.hxx"
74 #include "xmlsourcedlg.hxx"
75 #include "editutil.hxx"
77 IMPL_ABSTDLG_BASE(ScVclAbstractDialog_Impl);
78 IMPL_ABSTDLG_BASE(AbstractScImportAsciiDlg_Impl);
79 IMPL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl);
80 IMPL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl);
81 IMPL_ABSTDLG_BASE(AbstractScCondFormatManagerDlg_Impl);
82 IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl);
83 IMPL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl);
84 IMPL_ABSTDLG_BASE(AbstractScDataPilotServiceDlg_Impl);
85 IMPL_ABSTDLG_BASE(AbstractScDeleteCellDlg_Impl);
86 //for dataform
87 IMPL_ABSTDLG_BASE(AbstractScDataFormDlg_Impl);
88 IMPL_ABSTDLG_BASE(AbstractScDeleteContentsDlg_Impl);
89 IMPL_ABSTDLG_BASE(AbstractScFillSeriesDlg_Impl);
90 IMPL_ABSTDLG_BASE(AbstractScGroupDlg_Impl);
91 IMPL_ABSTDLG_BASE(AbstractScInsertCellDlg_Impl);
92 IMPL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl);
93 IMPL_ABSTDLG_BASE(AbstractScInsertTableDlg_Impl);
94 IMPL_ABSTDLG_BASE(AbstractScSelEntryDlg_Impl);
95 IMPL_ABSTDLG2_BASE(AbstractScLinkedAreaDlg_Impl);
96 IMPL_ABSTDLG_BASE(AbstractScMetricInputDlg_Impl);
97 IMPL_ABSTDLG_BASE(AbstractScMoveTableDlg_Impl);
98 IMPL_ABSTDLG_BASE(AbstractScNameCreateDlg_Impl);
99 IMPL_ABSTDLG_BASE(AbstractScNamePasteDlg_Impl);
100 IMPL_ABSTDLG_BASE(AbstractScPivotFilterDlg_Impl);
101 IMPL_ABSTDLG_BASE(AbstractScDPFunctionDlg_Impl);
102 IMPL_ABSTDLG_BASE(AbstractScDPSubtotalDlg_Impl);
103 IMPL_ABSTDLG_BASE(AbstractScDPNumGroupDlg_Impl);
104 IMPL_ABSTDLG_BASE(AbstractScDPDateGroupDlg_Impl);
105 IMPL_ABSTDLG_BASE(AbstractScDPShowDetailDlg_Impl);
106 IMPL_ABSTDLG_BASE(AbstractScNewScenarioDlg_Impl);
107 IMPL_ABSTDLG_BASE(AbstractScShowTabDlg_Impl);
108 IMPL_ABSTDLG_BASE(AbstractScSortWarningDlg_Impl);
109 IMPL_ABSTDLG_BASE(AbstractScStringInputDlg_Impl);
110 IMPL_ABSTDLG_BASE(AbstractScTabBgColorDlg_Impl);
111 IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl);
112 IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl);
113 IMPL_ABSTDLG_BASE(ScAbstractTabDialog_Impl);
115 void ScAbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
117 pDlg->SetCurPageId( nId );
120 void ScAbstractTabDialog_Impl::SetCurPageId( const OString& rName )
122 pDlg->SetCurPageId( rName );
125 const SfxItemSet* ScAbstractTabDialog_Impl::GetOutputItemSet() const
127 return pDlg->GetOutputItemSet();
130 const sal_uInt16* ScAbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
132 return pDlg->GetInputRanges( pItem );
135 void ScAbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
137 pDlg->SetInputSet( pInSet );
140 //From class Window.
141 void ScAbstractTabDialog_Impl::SetText( const OUString& rStr )
143 pDlg->SetText( rStr );
145 OUString ScAbstractTabDialog_Impl::GetText() const
147 return pDlg->GetText();
150 void AbstractScImportAsciiDlg_Impl::GetOptions( ScAsciiOptions& rOpt )
152 pDlg->GetOptions( rOpt );
155 void AbstractScImportAsciiDlg_Impl::SaveParameters()
157 pDlg->SaveParameters();
160 sal_uInt16 AbstractScAutoFormatDlg_Impl::GetIndex() const
162 return pDlg->GetIndex();
165 OUString AbstractScAutoFormatDlg_Impl::GetCurrFormatName()
167 return pDlg->GetCurrFormatName();
170 bool AbstractScColRowLabelDlg_Impl::IsCol()
172 return pDlg->IsCol();
175 bool AbstractScColRowLabelDlg_Impl::IsRow()
177 return pDlg->IsRow();
180 void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc )
182 pDlg->GetValues(rDesc);
185 bool AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const
187 return pDlg->IsDatabase();
190 bool AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const
192 return pDlg->IsExternal();
195 bool AbstractScDataPilotSourceTypeDlg_Impl::IsNamedRange() const
197 return pDlg->IsNamedRange();
200 OUString AbstractScDataPilotSourceTypeDlg_Impl::GetSelectedNamedRange() const
202 return pDlg->GetSelectedNamedRange();
205 void AbstractScDataPilotSourceTypeDlg_Impl::AppendNamedRange(const OUString& rName)
207 pDlg->AppendNamedRange(rName);
210 OUString AbstractScDataPilotServiceDlg_Impl::GetServiceName() const
212 return pDlg->GetServiceName();
215 OUString AbstractScDataPilotServiceDlg_Impl::GetParSource() const
217 return pDlg->GetParSource();
220 OUString AbstractScDataPilotServiceDlg_Impl::GetParName() const
222 return pDlg->GetParName();
225 OUString AbstractScDataPilotServiceDlg_Impl::GetParUser() const
227 return pDlg->GetParUser();
230 OUString AbstractScDataPilotServiceDlg_Impl::GetParPass() const
232 return pDlg->GetParPass();
235 DelCellCmd AbstractScDeleteCellDlg_Impl::GetDelCellCmd() const
237 return pDlg->GetDelCellCmd();
240 void AbstractScDeleteContentsDlg_Impl::DisableObjects()
242 pDlg->DisableObjects();
245 InsertDeleteFlags AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
247 return pDlg->GetDelContentsCmdBits();
250 FillDir AbstractScFillSeriesDlg_Impl::GetFillDir() const
252 return pDlg->GetFillDir();
255 FillCmd AbstractScFillSeriesDlg_Impl::GetFillCmd() const
257 return pDlg->GetFillCmd();
260 FillDateCmd AbstractScFillSeriesDlg_Impl::GetFillDateCmd() const
262 return pDlg->GetFillDateCmd();
265 double AbstractScFillSeriesDlg_Impl::GetStart() const
267 return pDlg->GetStart();
270 double AbstractScFillSeriesDlg_Impl::GetStep() const
272 return pDlg->GetStep();
275 double AbstractScFillSeriesDlg_Impl::GetMax() const
277 return pDlg->GetMax();
280 OUString AbstractScFillSeriesDlg_Impl::GetStartStr() const
282 return pDlg->GetStartStr();
285 void AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(bool bFlag)
287 pDlg->SetEdStartValEnabled(bFlag);
290 bool AbstractScGroupDlg_Impl::GetColsChecked() const
292 return pDlg->GetColsChecked();
295 InsCellCmd AbstractScInsertCellDlg_Impl::GetInsCellCmd() const
297 return pDlg->GetInsCellCmd();
300 InsertDeleteFlags AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
302 return pDlg->GetInsContentsCmdBits();
305 sal_uInt16 AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const
307 return pDlg->GetFormulaCmdBits();
310 bool AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const
312 return pDlg->IsSkipEmptyCells();
315 bool AbstractScInsertContentsDlg_Impl::IsLink() const
317 return pDlg->IsLink();
320 void AbstractScInsertContentsDlg_Impl::SetFillMode( bool bSet )
322 pDlg->SetFillMode( bSet );
325 void AbstractScInsertContentsDlg_Impl::SetOtherDoc( bool bSet )
327 pDlg->SetOtherDoc( bSet );
330 bool AbstractScInsertContentsDlg_Impl::IsTranspose() const
332 return pDlg->IsTranspose();
335 void AbstractScInsertContentsDlg_Impl::SetChangeTrack( bool bSet )
337 pDlg->SetChangeTrack( bSet );
340 void AbstractScInsertContentsDlg_Impl::SetCellShiftDisabled( int nDisable )
342 pDlg->SetCellShiftDisabled( nDisable );
345 InsCellCmd AbstractScInsertContentsDlg_Impl::GetMoveMode()
347 return pDlg->GetMoveMode();
350 bool AbstractScInsertTableDlg_Impl::GetTablesFromFile()
352 return pDlg->GetTablesFromFile();
355 bool AbstractScInsertTableDlg_Impl::GetTablesAsLink()
357 return pDlg->GetTablesAsLink();
360 const OUString* AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN )
362 return pDlg->GetFirstTable( pN );
365 ScDocShell* AbstractScInsertTableDlg_Impl::GetDocShellTables()
367 return pDlg->GetDocShellTables();
370 bool AbstractScInsertTableDlg_Impl::IsTableBefore()
372 return pDlg->IsTableBefore();
375 sal_uInt16 AbstractScInsertTableDlg_Impl::GetTableCount()
377 return pDlg->GetTableCount();
380 const OUString* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN )
382 return pDlg->GetNextTable( pN );
385 OUString AbstractScSelEntryDlg_Impl::GetSelectEntry() const
387 return pDlg->GetSelectEntry();
390 void AbstractScLinkedAreaDlg_Impl::InitFromOldLink( const OUString& rFile, const OUString& rFilter,
391 const OUString& rOptions, const OUString& rSource,
392 sal_uLong nRefresh )
394 pDlg->InitFromOldLink( rFile, rFilter, rOptions, rSource, nRefresh);
397 OUString AbstractScLinkedAreaDlg_Impl::GetURL()
399 return pDlg->GetURL();
402 OUString AbstractScLinkedAreaDlg_Impl::GetFilter()
404 return pDlg->GetFilter();
407 OUString AbstractScLinkedAreaDlg_Impl::GetOptions()
409 return pDlg->GetOptions();
412 OUString AbstractScLinkedAreaDlg_Impl::GetSource()
414 return pDlg->GetSource();
417 sal_uLong AbstractScLinkedAreaDlg_Impl::GetRefresh()
419 return pDlg->GetRefresh();
422 ScConditionalFormatList* AbstractScCondFormatManagerDlg_Impl::GetConditionalFormatList()
424 return pDlg->GetConditionalFormatList();
427 bool AbstractScCondFormatManagerDlg_Impl::CondFormatsChanged()
429 return pDlg->CondFormatsChanged();
432 ScConditionalFormat* AbstractScCondFormatManagerDlg_Impl::GetCondFormatSelected()
434 return pDlg->GetCondFormatSelected();
437 long AbstractScMetricInputDlg_Impl::GetInputValue( FieldUnit eUnit ) const
440 return pDlg->GetInputValue( eUnit );
443 sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedDocument() const
445 return pDlg->GetSelectedDocument();
448 sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedTable() const
450 return pDlg->GetSelectedTable();
453 bool AbstractScMoveTableDlg_Impl::GetCopyTable() const
455 return pDlg->GetCopyTable();
458 bool AbstractScMoveTableDlg_Impl::GetRenameTable() const
460 return pDlg->GetRenameTable();
463 void AbstractScMoveTableDlg_Impl::GetTabNameString( OUString& rString ) const
465 pDlg->GetTabNameString( rString );
468 void AbstractScMoveTableDlg_Impl::SetForceCopyTable()
470 return pDlg->SetForceCopyTable();
473 void AbstractScMoveTableDlg_Impl::EnableCopyTable(bool bFlag)
475 return pDlg->EnableCopyTable( bFlag);
478 void AbstractScMoveTableDlg_Impl::EnableRenameTable(bool bFlag)
480 return pDlg->EnableRenameTable( bFlag);
483 sal_uInt16 AbstractScNameCreateDlg_Impl::GetFlags() const
485 return pDlg->GetFlags();
488 std::vector<OUString> AbstractScNamePasteDlg_Impl::GetSelectedNames() const
490 return pDlg->GetSelectedNames();
493 bool AbstractScNamePasteDlg_Impl::IsAllSelected() const
495 return false;
498 const ScQueryItem& AbstractScPivotFilterDlg_Impl::GetOutputItem()
500 return pDlg->GetOutputItem();
503 sal_uInt16 AbstractScDPFunctionDlg_Impl::GetFuncMask() const
505 return pDlg->GetFuncMask();
508 ::com::sun::star::sheet::DataPilotFieldReference AbstractScDPFunctionDlg_Impl::GetFieldRef() const
510 return pDlg->GetFieldRef();
513 sal_uInt16 AbstractScDPSubtotalDlg_Impl::GetFuncMask() const
515 return pDlg->GetFuncMask();
518 void AbstractScDPSubtotalDlg_Impl::FillLabelData( ScDPLabelData& rLabelData ) const
520 pDlg->FillLabelData( rLabelData );
523 ScDPNumGroupInfo AbstractScDPNumGroupDlg_Impl::GetGroupInfo() const
525 return pDlg->GetGroupInfo();
528 ScDPNumGroupInfo AbstractScDPDateGroupDlg_Impl::GetGroupInfo() const
530 return pDlg->GetGroupInfo();
533 sal_Int32 AbstractScDPDateGroupDlg_Impl::GetDatePart() const
535 return pDlg->GetDatePart();
538 OUString AbstractScDPShowDetailDlg_Impl::GetDimensionName() const
540 return pDlg->GetDimensionName();
543 void AbstractScNewScenarioDlg_Impl::SetScenarioData(
544 const OUString& rName, const OUString& rComment, const Color& rColor, sal_uInt16 nFlags )
546 pDlg->SetScenarioData(rName, rComment, rColor, nFlags);
549 void AbstractScNewScenarioDlg_Impl::GetScenarioData(
550 OUString& rName, OUString& rComment, Color& rColor, sal_uInt16& rFlags ) const
552 pDlg->GetScenarioData(rName, rComment, rColor, rFlags);
555 void AbstractScShowTabDlg_Impl::Insert( const OUString& rString, bool bSelected )
557 pDlg->Insert( rString, bSelected);
560 sal_Int32 AbstractScShowTabDlg_Impl::GetSelectEntryCount() const
562 return pDlg->GetSelectEntryCount();
565 void AbstractScShowTabDlg_Impl::SetDescription(
566 const OUString& rTitle, const OUString& rFixedText,
567 const OString& sDlgHelpId, const OString& sLbHelpId )
569 pDlg->SetDescription( rTitle, rFixedText, sDlgHelpId, sLbHelpId );
572 sal_Int32 AbstractScShowTabDlg_Impl::GetSelectEntryPos(sal_Int32 nPos) const
574 return pDlg->GetSelectEntryPos( nPos);
577 OUString AbstractScShowTabDlg_Impl::GetSelectEntry(sal_Int32 nPos) const
579 return pDlg->GetSelectEntry(nPos);
582 OUString AbstractScStringInputDlg_Impl::GetInputString() const
584 return pDlg->GetInputString();
587 void AbstractScTabBgColorDlg_Impl::GetSelectedColor( Color& rColor ) const
589 pDlg->GetSelectedColor( rColor );
592 void AbstractScImportOptionsDlg_Impl::GetImportOptions( ScImportOptions& rOptions ) const
594 pDlg->GetImportOptions(rOptions);
597 LanguageType AbstractScTextImportOptionsDlg_Impl::GetLanguageType() const
599 return pDlg->getLanguageType();
602 bool AbstractScTextImportOptionsDlg_Impl::IsDateConversionSet() const
604 return pDlg->isDateConversionSet();
607 // =========================Factories for createdialog ===================
608 AbstractScImportAsciiDlg * ScAbstractDialogFactory_Impl::CreateScImportAsciiDlg ( vcl::Window* pParent, const OUString& aDatName,
609 SvStream* pInStream, ScImportAsciiCall eCall )
611 VclPtr<ScImportAsciiDlg> pDlg = VclPtr<ScImportAsciiDlg>::Create( pParent, aDatName,pInStream, eCall );
612 return new AbstractScImportAsciiDlg_Impl( pDlg );
615 AbstractScTextImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScTextImportOptionsDlg(vcl::Window* pParent)
617 VclPtr<ScTextImportOptionsDlg> pDlg = VclPtr<ScTextImportOptionsDlg>::Create(pParent);
618 return new AbstractScTextImportOptionsDlg_Impl(pDlg);
621 AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg(vcl::Window* pParent,
622 ScAutoFormat* pAutoFormat,
623 const ScAutoFormatData* pSelFormatData,
624 ScViewData *pViewData)
626 VclPtr<ScAutoFormatDlg> pDlg = VclPtr<ScAutoFormatDlg>::Create(pParent, pAutoFormat, pSelFormatData, pViewData);
627 return new AbstractScAutoFormatDlg_Impl(pDlg);
630 AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(vcl::Window* pParent,
631 bool bCol ,
632 bool bRow)
634 VclPtr<ScColRowLabelDlg> pDlg = VclPtr<ScColRowLabelDlg>::Create( pParent, bCol,bRow );
635 return new AbstractScColRowLabelDlg_Impl( pDlg );
638 AbstractScSortWarningDlg* ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( vcl::Window* pParent, const OUString& rExtendText, const OUString& rCurrentText )
640 VclPtr<ScSortWarningDlg> pDlg = VclPtr<ScSortWarningDlg>::Create(pParent, rExtendText, rCurrentText );
641 return new AbstractScSortWarningDlg_Impl( pDlg );
644 AbstractScCondFormatManagerDlg* ScAbstractDialogFactory_Impl::CreateScCondFormatMgrDlg(vcl::Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList,
645 const ScAddress& rPos, int nId )
647 VclPtr<ScCondFormatManagerDlg> pDlg;
648 switch( nId )
650 case RID_SCDLG_COND_FORMAT_MANAGER:
651 pDlg = VclPtr<ScCondFormatManagerDlg>::Create( pParent, pDoc, pFormatList, rPos );
652 break;
653 default:
654 break;
656 if(pDlg)
657 return new AbstractScCondFormatManagerDlg_Impl( pDlg );
659 return NULL;
662 AbstractScDataPilotDatabaseDlg * ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg(vcl::Window* pParent)
664 VclPtr<ScDataPilotDatabaseDlg> pDlg = VclPtr<ScDataPilotDatabaseDlg>::Create( pParent );
665 return new AbstractScDataPilotDatabaseDlg_Impl( pDlg );
668 AbstractScDataPilotSourceTypeDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg(
669 vcl::Window* pParent, bool bEnableExternal)
671 VclPtr<ScDataPilotSourceTypeDlg> pDlg = VclPtr<ScDataPilotSourceTypeDlg>::Create(pParent, bEnableExternal);
672 return new AbstractScDataPilotSourceTypeDlg_Impl(pDlg);
675 AbstractScDataPilotServiceDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg( vcl::Window* pParent,
676 const com::sun::star::uno::Sequence<OUString>& rServices,
677 int nId )
679 VclPtr<ScDataPilotServiceDlg> pDlg;
680 switch ( nId )
682 case RID_SCDLG_DAPISERVICE :
683 pDlg = VclPtr<ScDataPilotServiceDlg>::Create( pParent, rServices );
684 break;
685 default:
686 break;
689 if ( pDlg )
690 return new AbstractScDataPilotServiceDlg_Impl( pDlg );
691 return 0;
694 AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(vcl::Window* pParent,
695 bool bDisallowCellMove)
697 VclPtr<ScDeleteCellDlg> pDlg = VclPtr<ScDeleteCellDlg>::Create(pParent, bDisallowCellMove);
698 return new AbstractScDeleteCellDlg_Impl( pDlg );
701 AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg(vcl::Window* pParent,
702 ScTabViewShell* pTabViewShell)
704 VclPtr<ScDataFormDlg> pDlg = VclPtr<ScDataFormDlg>::Create(pParent, pTabViewShell);
705 return new AbstractScDataFormDlg_Impl(pDlg);
708 AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(vcl::Window* pParent,
709 InsertDeleteFlags nCheckDefaults)
711 VclPtr<ScDeleteContentsDlg> pDlg = VclPtr<ScDeleteContentsDlg>::Create(pParent, nCheckDefaults);
712 return new AbstractScDeleteContentsDlg_Impl( pDlg );
715 AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( vcl::Window* pParent,
716 ScDocument& rDocument,
717 FillDir eFillDir,
718 FillCmd eFillCmd,
719 FillDateCmd eFillDateCmd,
720 const OUString& aStartStr,
721 double fStep,
722 double fMax,
723 sal_uInt16 nPossDir)
725 VclPtr<ScFillSeriesDlg> pDlg = VclPtr<ScFillSeriesDlg>::Create( pParent, rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nPossDir);
726 return new AbstractScFillSeriesDlg_Impl( pDlg );
729 AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( vcl::Window* pParent,
730 bool bUnGroup,
731 bool bRows )
733 VclPtr<ScGroupDlg> pDlg = VclPtr<ScGroupDlg>::Create( pParent, bUnGroup, bRows);
734 return new AbstractScGroupDlg_Impl( pDlg );
737 AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( vcl::Window* pParent,
738 int nId,
739 bool bDisallowCellMove )
741 VclPtr<ScInsertCellDlg> pDlg;
742 switch ( nId )
744 case RID_SCDLG_INSCELL :
745 pDlg = VclPtr<ScInsertCellDlg>::Create( pParent, bDisallowCellMove);
746 break;
747 default:
748 break;
751 if ( pDlg )
752 return new AbstractScInsertCellDlg_Impl( pDlg );
753 return 0;
756 AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( vcl::Window* pParent,
757 InsertDeleteFlags nCheckDefaults,
758 const OUString* pStrTitle )
760 VclPtr<ScInsertContentsDlg> pDlg = VclPtr<ScInsertContentsDlg>::Create(pParent, nCheckDefaults, pStrTitle);
761 return new AbstractScInsertContentsDlg_Impl( pDlg );
764 AbstractScInsertTableDlg * ScAbstractDialogFactory_Impl::CreateScInsertTableDlg(vcl::Window* pParent, ScViewData& rViewData,
765 SCTAB nTabCount, bool bFromFile)
767 VclPtr<ScInsertTableDlg> pDlg = VclPtr<ScInsertTableDlg>::Create( pParent, rViewData,nTabCount, bFromFile );
768 return new AbstractScInsertTableDlg_Impl( pDlg );
771 AbstractScSelEntryDlg * ScAbstractDialogFactory_Impl::CreateScSelEntryDlg ( vcl::Window* pParent,
772 const std::vector<OUString> &rEntryList )
774 VclPtr<ScSelEntryDlg> pDlg = VclPtr<ScSelEntryDlg>::Create( pParent, rEntryList );
775 return new AbstractScSelEntryDlg_Impl( pDlg );
778 AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg(vcl::Window* pParent)
780 VclPtr<ScLinkedAreaDlg> pDlg = VclPtr<ScLinkedAreaDlg>::Create( pParent );
781 return new AbstractScLinkedAreaDlg_Impl( pDlg );
784 AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg ( vcl::Window* pParent,
785 const OString& sDialogName,
786 long nCurrent,
787 long nDefault,
788 FieldUnit eFUnit,
789 sal_uInt16 nDecimals,
790 long nMaximum ,
791 long nMinimum,
792 long nFirst,
793 long nLast )
795 VclPtr<ScMetricInputDlg> pDlg = VclPtr<ScMetricInputDlg>::Create(pParent, sDialogName, nCurrent ,nDefault, eFUnit,
796 nDecimals, nMaximum , nMinimum , nFirst, nLast);
797 return new AbstractScMetricInputDlg_Impl( pDlg );
800 AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(vcl::Window* pParent,
801 const OUString& rDefault)
803 VclPtr<ScMoveTableDlg> pDlg = VclPtr<ScMoveTableDlg>::Create( pParent, rDefault );
804 return new AbstractScMoveTableDlg_Impl( pDlg );
807 AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(vcl::Window * pParent, sal_uInt16 nFlags)
809 VclPtr<ScNameCreateDlg> pDlg = VclPtr<ScNameCreateDlg>::Create( pParent, nFlags );
810 return new AbstractScNameCreateDlg_Impl( pDlg );
813 AbstractScNamePasteDlg * ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( vcl::Window * pParent, ScDocShell* pShell, bool bInsList )
815 VclPtr<ScNamePasteDlg> pDlg = VclPtr<ScNamePasteDlg>::Create( pParent, pShell, bInsList );
816 return new AbstractScNamePasteDlg_Impl( pDlg );
819 AbstractScPivotFilterDlg * ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg(vcl::Window* pParent,
820 const SfxItemSet& rArgSet, sal_uInt16 nSourceTab)
822 VclPtr<ScPivotFilterDlg> pDlg = VclPtr<ScPivotFilterDlg>::Create(pParent, rArgSet, nSourceTab);
823 return new AbstractScPivotFilterDlg_Impl(pDlg);
826 AbstractScDPFunctionDlg * ScAbstractDialogFactory_Impl::CreateScDPFunctionDlg ( vcl::Window* pParent,
827 const ScDPLabelDataVector& rLabelVec,
828 const ScDPLabelData& rLabelData,
829 const ScPivotFuncData& rFuncData )
831 VclPtr<ScDPFunctionDlg> pDlg = VclPtr<ScDPFunctionDlg>::Create( pParent, rLabelVec, rLabelData, rFuncData );
832 return new AbstractScDPFunctionDlg_Impl( pDlg );
835 AbstractScDPSubtotalDlg * ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg ( vcl::Window* pParent,
836 ScDPObject& rDPObj,
837 const ScDPLabelData& rLabelData,
838 const ScPivotFuncData& rFuncData,
839 const ScDPNameVec& rDataFields,
840 bool bEnableLayout )
842 VclPtr<ScDPSubtotalDlg> pDlg = VclPtr<ScDPSubtotalDlg>::Create( pParent, rDPObj, rLabelData, rFuncData, rDataFields, bEnableLayout );
843 return new AbstractScDPSubtotalDlg_Impl( pDlg );
846 AbstractScDPNumGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPNumGroupDlg(
847 vcl::Window* pParent, int nId, const ScDPNumGroupInfo& rInfo )
849 if( nId == RID_SCDLG_DPNUMGROUP )
850 return new AbstractScDPNumGroupDlg_Impl( VclPtr<ScDPNumGroupDlg>::Create( pParent, rInfo ) );
851 return 0;
854 AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg(
855 vcl::Window* pParent, int nId,
856 const ScDPNumGroupInfo& rInfo, sal_Int32 nDatePart, const Date& rNullDate )
858 if( nId == RID_SCDLG_DPDATEGROUP )
859 return new AbstractScDPDateGroupDlg_Impl( VclPtr<ScDPDateGroupDlg>::Create( pParent, rInfo, nDatePart, rNullDate ) );
860 return 0;
863 AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg (
864 vcl::Window* pParent, int nId, ScDPObject& rDPObj, sal_uInt16 nOrient )
866 if( nId == RID_SCDLG_DPSHOWDETAIL )
867 return new AbstractScDPShowDetailDlg_Impl( VclPtr<ScDPShowDetailDlg>::Create( pParent, rDPObj, nOrient ) );
868 return 0;
871 AbstractScNewScenarioDlg * ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg(vcl::Window* pParent, const OUString& rName,
872 bool bEdit, bool bSheetProtected)
874 VclPtr<ScNewScenarioDlg> pDlg = VclPtr<ScNewScenarioDlg>::Create(pParent, rName, bEdit, bSheetProtected);
875 return new AbstractScNewScenarioDlg_Impl( pDlg );
878 AbstractScShowTabDlg * ScAbstractDialogFactory_Impl::CreateScShowTabDlg(vcl::Window* pParent)
880 VclPtr<ScShowTabDlg> pDlg = VclPtr<ScShowTabDlg>::Create( pParent);
881 return new AbstractScShowTabDlg_Impl( pDlg );
884 AbstractScStringInputDlg * ScAbstractDialogFactory_Impl::CreateScStringInputDlg ( vcl::Window* pParent,
885 const OUString& rTitle,
886 const OUString& rEditTitle,
887 const OUString& rDefault,
888 const OString& sHelpId, const OString& sEditHelpId )
890 VclPtr<ScStringInputDlg> pDlg = VclPtr<ScStringInputDlg>::Create( pParent, rTitle, rEditTitle, rDefault, sHelpId, sEditHelpId );
891 return new AbstractScStringInputDlg_Impl( pDlg );
894 AbstractScTabBgColorDlg * ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg(
895 vcl::Window* pParent,
896 const OUString& rTitle,
897 const OUString& rTabBgColorNoColorText,
898 const Color& rDefaultColor,
899 const OString& sHelpId)
901 VclPtr<ScTabBgColorDlg> pDlg = VclPtr<ScTabBgColorDlg>::Create( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, sHelpId );
902 return new AbstractScTabBgColorDlg_Impl( pDlg );
905 AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg ( vcl::Window* pParent,
906 bool bAscii,
907 const ScImportOptions* pOptions,
908 const OUString* pStrTitle,
909 bool bMultiByte,
910 bool bOnlyDbtoolsEncodings,
911 bool bImport )
913 VclPtr<ScImportOptionsDlg> pDlg = VclPtr<ScImportOptionsDlg>::Create( pParent, bAscii, pOptions,pStrTitle, bMultiByte,bOnlyDbtoolsEncodings, bImport );
914 return new AbstractScImportOptionsDlg_Impl( pDlg );
917 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScAttrDlg(SfxViewFrame* pFrame,
918 vcl::Window* pParent, const SfxItemSet* pCellAttrs)
920 VclPtr<SfxTabDialog> pDlg = VclPtr<ScAttrDlg>::Create(pFrame, pParent, pCellAttrs);
921 return new ScAbstractTabDialog_Impl(pDlg);
924 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewFrame* pFrame,
925 vcl::Window* pParent,
926 const SfxItemSet& rCoreSet,
927 const OUString& rPageStyle,
928 sal_uInt16 nResId )
930 VclPtr<SfxTabDialog> pDlg;
932 switch (nResId)
934 case RID_SCDLG_HFED_HEADER:
935 case RID_SCDLG_HFEDIT_HEADER:
936 pDlg = VclPtr<ScHFEditHeaderDlg>::Create(pFrame, pParent, rCoreSet, rPageStyle);
937 break;
938 case RID_SCDLG_HFED_FOOTER:
939 case RID_SCDLG_HFEDIT_FOOTER:
940 pDlg = VclPtr<ScHFEditFooterDlg>::Create(pFrame, pParent, rCoreSet, rPageStyle);
941 break;
942 case RID_SCDLG_HFEDIT_LEFTHEADER:
943 pDlg = VclPtr<ScHFEditLeftHeaderDlg>::Create(pFrame, pParent, rCoreSet, rPageStyle);
944 break;
945 case RID_SCDLG_HFEDIT_RIGHTHEADER:
946 pDlg = VclPtr<ScHFEditRightHeaderDlg>::Create(pFrame, pParent, rCoreSet, rPageStyle);
947 break;
948 case RID_SCDLG_HFEDIT_LEFTFOOTER:
949 pDlg = VclPtr<ScHFEditLeftFooterDlg>::Create(pFrame, pParent, rCoreSet, rPageStyle);
950 break;
951 case RID_SCDLG_HFEDIT_RIGHTFOOTER:
952 pDlg = VclPtr<ScHFEditRightFooterDlg>::Create(pFrame, pParent, rCoreSet, rPageStyle);
953 break;
954 case RID_SCDLG_HFEDIT_SHDR:
955 pDlg = VclPtr<ScHFEditSharedHeaderDlg>::Create(pFrame, pParent, rCoreSet, rPageStyle);
956 break;
957 case RID_SCDLG_HFEDIT_SFTR:
958 pDlg = VclPtr<ScHFEditSharedFooterDlg>::Create(pFrame, pParent, rCoreSet, rPageStyle);
959 break;
960 case RID_SCDLG_HFEDIT_ALL:
961 pDlg = VclPtr<ScHFEditAllDlg>::Create(pFrame, pParent, rCoreSet, rPageStyle);
962 break;
963 default:
964 case RID_SCDLG_HFEDIT:
965 pDlg = VclPtr<ScHFEditActiveDlg>::Create(pFrame, pParent, rCoreSet, rPageStyle);
966 break;
969 return pDlg ? new ScAbstractTabDialog_Impl( pDlg ) : NULL;
972 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScStyleDlg( vcl::Window* pParent,
973 SfxStyleSheetBase& rStyleBase,
974 sal_uInt16 nRscId,
975 int nId)
977 VclPtr<SfxTabDialog> pDlg;
978 switch ( nId )
980 case RID_SCDLG_STYLES_PAGE :
981 case RID_SCDLG_STYLES_PAR :
982 pDlg = VclPtr<ScStyleDlg>::Create( pParent, rStyleBase, nRscId );
983 break;
984 default:
985 break;
988 if ( pDlg )
989 return new ScAbstractTabDialog_Impl( pDlg );
990 return 0;
993 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSubTotalDlg(vcl::Window* pParent, const SfxItemSet* pArgSet)
995 VclPtr<SfxTabDialog> pDlg = VclPtr<ScSubTotalDlg>::Create( pParent, pArgSet );
996 return new ScAbstractTabDialog_Impl( pDlg );
999 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScCharDlg(
1000 vcl::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell)
1002 VclPtr<SfxTabDialog> pDlg = VclPtr<ScCharDlg>::Create(pParent, pAttr, pDocShell);
1003 return new ScAbstractTabDialog_Impl(pDlg);
1006 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScParagraphDlg(
1007 vcl::Window* pParent, const SfxItemSet* pAttr)
1009 VclPtr<SfxTabDialog> pDlg = VclPtr<ScParagraphDlg>::Create(pParent, pAttr);
1010 return new ScAbstractTabDialog_Impl(pDlg);
1013 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScValidationDlg(vcl::Window* pParent,
1014 const SfxItemSet* pArgSet, ScTabViewShell *pTabVwSh)
1016 VclPtr<SfxTabDialog> pDlg = VclPtr<ScValidationDlg>::Create(pParent, pArgSet, pTabVwSh);
1017 return new ScAbstractTabDialog_Impl(pDlg);
1020 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg(vcl::Window* pParent, const SfxItemSet* pArgSet)
1022 VclPtr<SfxTabDialog> pDlg = VclPtr<ScSortDlg>::Create( pParent, pArgSet );
1023 return new ScAbstractTabDialog_Impl( pDlg );
1026 //------------------ Factories for TabPages--------------------
1027 CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
1029 switch ( nId )
1031 case RID_SCPAGE_OPREDLINE :
1032 return ScRedlineOptionsTabPage::Create;
1033 case RID_SCPAGE_CALC :
1034 return ScTpCalcOptions::Create;
1035 case RID_SCPAGE_FORMULA:
1036 return ScTpFormulaOptions::Create;
1037 case RID_SCPAGE_COMPATIBILITY:
1038 return ScTpCompatOptions::Create;
1039 case RID_SCPAGE_DEFAULTS:
1040 return ScTpDefaultsOptions::Create;
1041 case RID_SCPAGE_PRINT :
1042 return ScTpPrintOptions::Create;
1043 case RID_SCPAGE_STAT :
1044 return ScDocStatPage::Create;
1045 case RID_SCPAGE_USERLISTS :
1046 return ScTpUserLists::Create;
1047 case RID_SCPAGE_CONTENT :
1048 return ScTpContentOptions::Create;
1049 case RID_SCPAGE_LAYOUT :
1050 return ScTpLayoutOptions::Create;
1051 default:
1052 break;
1055 return 0;
1058 GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc()
1060 return ScTPValidationValue::GetRanges;
1063 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */