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 .
20 #ifndef _SC_ABSTDLG_HXX
21 #define _SC_ABSTDLG_HXX
23 #include <tools/solar.h>
24 #include <tools/string.hxx>
25 #include <sfx2/sfxdlg.hxx>
26 #include <vcl/syswin.hxx>
27 #include <com/sun/star/uno/Sequence.hxx>
28 #include <vcl/field.hxx>
32 #include "i18nlangtag/lang.h"
33 #include "asciiopt.hxx"
35 #include <tabvwsh.hxx>
39 class ScAutoFormatData
;
41 struct ScImportSourceDesc
;
44 class ScImportOptions
;
45 class SfxStyleSheetBase
;
47 struct ScPivotFuncData
;
48 struct ScDPNumGroupInfo
;
49 class ScSortWarningDlg
;
51 class ScConditionalFormat
;
52 class ScConditionalFormatList
;
54 namespace com
{ namespace sun
{ namespace star
{ namespace sheet
{
55 struct DataPilotFieldReference
;
58 class AbstractScImportAsciiDlg
: public VclAbstractDialog
//add for ScImportAsciiDlg
61 virtual void GetOptions( ScAsciiOptions
& rOpt
) = 0;
62 virtual void SaveParameters() = 0;
66 class AbstractScAutoFormatDlg
: public VclAbstractDialog
//add for ScAutoFormatDlg
69 virtual sal_uInt16
GetIndex() const = 0 ;
70 virtual String
GetCurrFormatName() = 0;
73 class AbstractScColRowLabelDlg
: public VclAbstractDialog
//add for ScColRowLabelDlg
76 virtual sal_Bool
IsCol() = 0;
77 virtual sal_Bool
IsRow() = 0;
80 class AbstractScCondFormatManagerDlg
: public VclAbstractDialog
83 virtual ScConditionalFormatList
* GetConditionalFormatList() = 0;
85 virtual bool CondFormatsChanged() = 0;
88 class AbstractScDataPilotDatabaseDlg
:public VclAbstractDialog
//add for ScDataPilotDatabaseDlg
91 virtual void GetValues( ScImportSourceDesc
& rDesc
) = 0;
94 class AbstractScDataPilotSourceTypeDlg
: public VclAbstractDialog
//add for ScDataPilotSourceTypeDlg
97 virtual bool IsDatabase() const = 0;
98 virtual bool IsExternal() const = 0;
99 virtual bool IsNamedRange() const = 0;
100 virtual OUString
GetSelectedNamedRange() const = 0;
101 virtual void AppendNamedRange(const OUString
& rName
) = 0;
104 class AbstractScDataPilotServiceDlg
: public VclAbstractDialog
//add for ScDataPilotServiceDlg
107 virtual String
GetServiceName() const = 0;
108 virtual String
GetParSource() const = 0 ;
109 virtual String
GetParName() const = 0 ;
110 virtual String
GetParUser() const = 0;
111 virtual String
GetParPass() const = 0;
114 class AbstractScDeleteCellDlg
: public VclAbstractDialog
//add for ScDeleteCellDlg
117 virtual DelCellCmd
GetDelCellCmd() const = 0;
121 class AbstractScDataFormDlg
: public VclAbstractDialog
//add for ScDeleteCellDlg
126 class AbstractScDeleteContentsDlg
: public VclAbstractDialog
//add for ScDeleteContentsDlg
129 virtual void DisableObjects() = 0 ;
130 virtual sal_uInt16
GetDelContentsCmdBits() const = 0;
133 class AbstractScFillSeriesDlg
: public VclAbstractDialog
//add for ScFillSeriesDlg
136 virtual FillDir
GetFillDir() const = 0;
137 virtual FillCmd
GetFillCmd() const = 0;
138 virtual FillDateCmd
GetFillDateCmd() const = 0;
139 virtual double GetStart() const = 0;
140 virtual double GetStep() const = 0;
141 virtual double GetMax() const = 0;
142 virtual String
GetStartStr() const = 0;
143 virtual void SetEdStartValEnabled(sal_Bool bFlag
=false) = 0;
146 class AbstractScGroupDlg
: public VclAbstractDialog
//add for ScGroupDlg
149 virtual sal_Bool
GetColsChecked() const = 0;
152 class AbstractScInsertCellDlg
: public VclAbstractDialog
//add for ScInsertCellDlg
155 virtual InsCellCmd
GetInsCellCmd() const = 0;
158 class AbstractScInsertContentsDlg
: public VclAbstractDialog
//add for ScInsertContentsDlg
161 virtual sal_uInt16
GetInsContentsCmdBits() const = 0;
162 virtual sal_uInt16
GetFormulaCmdBits() const = 0 ;
163 virtual sal_Bool
IsSkipEmptyCells() const = 0;
164 virtual sal_Bool
IsLink() const = 0;
165 virtual void SetFillMode( sal_Bool bSet
) = 0;
166 virtual void SetOtherDoc( sal_Bool bSet
) = 0;
167 virtual sal_Bool
IsTranspose() const = 0;
168 virtual void SetChangeTrack( sal_Bool bSet
) = 0;
169 virtual void SetCellShiftDisabled( int nDisable
) = 0;
170 virtual InsCellCmd
GetMoveMode() = 0;
173 class AbstractScInsertTableDlg
: public VclAbstractDialog
//add for ScInsertTableDlg
176 virtual sal_Bool
GetTablesFromFile() = 0;
177 virtual sal_Bool
GetTablesAsLink() = 0;
178 virtual const String
* GetFirstTable( sal_uInt16
* pN
= NULL
) = 0;
179 virtual ScDocShell
* GetDocShellTables() = 0;
180 virtual sal_Bool
IsTableBefore() = 0;
181 virtual sal_uInt16
GetTableCount() = 0;
182 virtual const String
* GetNextTable( sal_uInt16
* pN
= NULL
) = 0;
186 class AbstractScSelEntryDlg
: public VclAbstractDialog
//add for ScSelEntryDlg
189 virtual String
GetSelectEntry() const = 0;
192 class AbstractScLinkedAreaDlg
: public VclAbstractDialog2
//add for ScLinkedAreaDlg
195 virtual void InitFromOldLink( const String
& rFile
, const String
& rFilter
,
196 const String
& rOptions
, const String
& rSource
,
197 sal_uLong nRefresh
) = 0;
198 virtual String
GetURL() = 0;
199 virtual String
GetFilter() = 0; // may be empty
200 virtual String
GetOptions() = 0; // filter options
201 virtual String
GetSource() = 0; // separated by ";"
202 virtual sal_uLong
GetRefresh() = 0; // 0 if disabled
205 class AbstractScMetricInputDlg
: public VclAbstractDialog
//add for ScMetricInputDlg
208 virtual long GetInputValue( FieldUnit eUnit
= FUNIT_TWIP
) const = 0;
211 class AbstractScMoveTableDlg
: public VclAbstractDialog
//add for ScMoveTableDlg
214 virtual sal_uInt16
GetSelectedDocument () const = 0;
215 virtual sal_uInt16
GetSelectedTable () const = 0;
216 virtual bool GetCopyTable () const = 0;
217 virtual bool GetRenameTable () const = 0;
218 virtual void GetTabNameString( OUString
& rString
) const = 0;
219 virtual void SetForceCopyTable () = 0;
220 virtual void EnableCopyTable (sal_Bool bFlag
=true) = 0;
221 virtual void EnableRenameTable (sal_Bool bFlag
=true) = 0;
224 class AbstractScNameCreateDlg
: public VclAbstractDialog
// Manage Name Dialog
227 virtual sal_uInt16
GetFlags() const = 0;
230 class AbstractScNamePasteDlg
: public VclAbstractDialog
//add for ScNamePasteDlg
233 virtual std::vector
<OUString
> GetSelectedNames() const = 0;
234 virtual bool IsAllSelected() const = 0;
237 class AbstractScPivotFilterDlg
: public VclAbstractDialog
//add for ScPivotFilterDlg
240 virtual const ScQueryItem
& GetOutputItem() = 0;
243 class AbstractScDPFunctionDlg
: public VclAbstractDialog
//add for ScDPFunctionDlg
246 virtual sal_uInt16
GetFuncMask() const = 0;
247 virtual ::com::sun::star::sheet::DataPilotFieldReference
GetFieldRef() const = 0;
250 class AbstractScDPSubtotalDlg
: public VclAbstractDialog
//add for ScDPSubtotalDlg
253 virtual sal_uInt16
GetFuncMask() const = 0;
254 virtual void FillLabelData( ScDPLabelData
& rLabelData
) const = 0;
257 class AbstractScDPNumGroupDlg
: public VclAbstractDialog
260 virtual ScDPNumGroupInfo
GetGroupInfo() const = 0;
263 class AbstractScDPDateGroupDlg
: public VclAbstractDialog
266 virtual ScDPNumGroupInfo
GetGroupInfo() const = 0;
267 virtual sal_Int32
GetDatePart() const = 0;
270 class AbstractScDPShowDetailDlg
: public VclAbstractDialog
//add for ScDPShowDetailDlg
273 virtual String
GetDimensionName() const = 0;
276 class AbstractScNewScenarioDlg
: public VclAbstractDialog
//add for ScNewScenarioDlg
280 virtual void SetScenarioData( const OUString
& rName
, const OUString
& rComment
,
281 const Color
& rColor
, sal_uInt16 nFlags
) = 0;
283 virtual void GetScenarioData( OUString
& rName
, OUString
& rComment
,
284 Color
& rColor
, sal_uInt16
& rFlags
) const = 0;
287 class AbstractScShowTabDlg
: public VclAbstractDialog
//add for ScShowTabDlg
290 virtual void Insert( const String
& rString
, sal_Bool bSelected
) = 0;
291 virtual sal_uInt16
GetSelectEntryCount() const = 0;
292 virtual void SetDescription(const String
& rTitle
, const String
& rFixedText
, const OString
& nDlgHelpId
, const OString
& nLbHelpId
) = 0;
293 virtual String
GetSelectEntry(sal_uInt16 nPos
) const = 0;
294 virtual sal_uInt16
GetSelectEntryPos(sal_uInt16 nPos
) const = 0;
297 class AbstractScSortWarningDlg
: public VclAbstractDialog
//add for ScSortWarningDlg
301 class AbstractScStringInputDlg
: public VclAbstractDialog
//add for ScStringInputDlg
304 virtual void GetInputString( OUString
& rString
) const = 0;
307 class AbstractScTabBgColorDlg
: public VclAbstractDialog
//add for ScTabBgColorDlg
310 virtual void GetSelectedColor( Color
& rColor
) const = 0;
313 class AbstractScImportOptionsDlg
: public VclAbstractDialog
//add for ScImportOptionsDlg
316 virtual void GetImportOptions( ScImportOptions
& rOptions
) const = 0;
319 class AbstractScTextImportOptionsDlg
: public VclAbstractDialog
//add for ScLangChooserDlg
322 virtual LanguageType
GetLanguageType() const = 0;
323 virtual bool IsDateConversionSet() const = 0;
326 //-------Scabstract fractory ---------------------------
327 class ScAbstractDialogFactory
330 SC_DLLPUBLIC
static ScAbstractDialogFactory
* Create();
332 virtual AbstractScImportAsciiDlg
* CreateScImportAsciiDlg( Window
* pParent
, String aDatName
, //add for ScImportAsciiDlg
334 ScImportAsciiCall eCall
) = 0;
336 virtual AbstractScTextImportOptionsDlg
* CreateScTextImportOptionsDlg(Window
* pParent
) = 0;
338 virtual AbstractScAutoFormatDlg
* CreateScAutoFormatDlg( Window
* pParent
, //add for ScAutoFormatDlg
339 ScAutoFormat
* pAutoFormat
,
340 const ScAutoFormatData
* pSelFormatData
,
343 virtual AbstractScColRowLabelDlg
* CreateScColRowLabelDlg (Window
* pParent
, //add for ScColRowLabelDlg
345 sal_Bool bCol
= false,
346 sal_Bool bRow
= false) = 0;
348 virtual VclAbstractDialog
* CreateScColOrRowDlg( Window
* pParent
, //add for ScColOrRowDlg
349 const String
& rStrTitle
,
350 const String
& rStrLabel
,
352 sal_Bool bColDefault
= sal_True
) = 0;
354 virtual AbstractScSortWarningDlg
* CreateScSortWarningDlg(Window
* pParent
, const String
& rExtendText
, const String
& rCurrentText
) = 0; //add for ScSortWarningDlg
356 virtual AbstractScCondFormatManagerDlg
* CreateScCondFormatMgrDlg(Window
* pParent
, ScDocument
* pDoc
, const ScConditionalFormatList
* pFormatList
,
357 const ScAddress
& rPos
, int nId
) = 0;
359 virtual AbstractScDataPilotDatabaseDlg
* CreateScDataPilotDatabaseDlg (Window
* pParent
,int nId
) = 0; //add for ScDataPilotDatabaseDlg
361 virtual AbstractScDataPilotSourceTypeDlg
* CreateScDataPilotSourceTypeDlg(Window
* pParent
,
362 bool bEnableExternal
) = 0;
364 virtual AbstractScDataPilotServiceDlg
* CreateScDataPilotServiceDlg( Window
* pParent
, //add for ScDataPilotServiceDlg
365 const com::sun::star::uno::Sequence
<OUString
>& rServices
,
368 virtual AbstractScDeleteCellDlg
* CreateScDeleteCellDlg(Window
* pParent
, bool bDisallowCellMove
= false) = 0 ; //add for ScDeleteCellDlg
371 virtual AbstractScDataFormDlg
* CreateScDataFormDlg(Window
* pParent
,
372 ScTabViewShell
* pTabViewShell
) = 0;
374 virtual AbstractScDeleteContentsDlg
* CreateScDeleteContentsDlg(Window
* pParent
, //add for ScDeleteContentsDlg
375 sal_uInt16 nCheckDefaults
= 0) = 0;
376 virtual AbstractScFillSeriesDlg
* CreateScFillSeriesDlg( Window
* pParent
, //add for ScFillSeriesDlg
377 ScDocument
& rDocument
,
380 FillDateCmd eFillDateCmd
,
387 virtual AbstractScGroupDlg
* CreateAbstractScGroupDlg( Window
* pParent
, //add for ScGroupDlg
390 sal_Bool bUnGroup
= false,
391 sal_Bool bRows
= sal_True
) = 0;
393 virtual AbstractScInsertCellDlg
* CreateScInsertCellDlg( Window
* pParent
, //add for ScInsertCellDlg
395 sal_Bool bDisallowCellMove
= false ) = 0;
397 virtual AbstractScInsertContentsDlg
* CreateScInsertContentsDlg( Window
* pParent
, //add for ScInsertContentsDlg
399 sal_uInt16 nCheckDefaults
= 0,
400 const OUString
* pStrTitle
= NULL
) = 0;
402 virtual AbstractScInsertTableDlg
* CreateScInsertTableDlg(Window
* pParent
, ScViewData
& rViewData
,
403 SCTAB nTabCount
, bool bFromFile
) = 0;
405 virtual AbstractScSelEntryDlg
* CreateScSelEntryDlg ( Window
* pParent
, // add for ScSelEntryDlg
406 const std::vector
<String
> &rEntryList
) = 0;
407 virtual AbstractScLinkedAreaDlg
* CreateScLinkedAreaDlg(Window
* pParent
) = 0; //add for ScLinkedAreaDlg
409 virtual AbstractScMetricInputDlg
* CreateScMetricInputDlg ( Window
* pParent
, //add for ScMetricInputDlg
410 sal_uInt16 nResId
, // derivative for every dialog!
414 FieldUnit eFUnit
= FUNIT_MM
,
415 sal_uInt16 nDecimals
= 2,
416 long nMaximum
= 1000,
419 long nLast
= 100 ) = 0;
421 virtual AbstractScMoveTableDlg
* CreateScMoveTableDlg( Window
* pParent
, //add for ScMoveTableDlg
422 const String
& rDefault
,
425 virtual AbstractScNameCreateDlg
* CreateScNameCreateDlg(Window
* pParent
,
426 sal_uInt16 nFlags
) = 0;
428 virtual AbstractScNamePasteDlg
* CreateScNamePasteDlg ( Window
* pParent
, ScDocShell
* pShell
, bool bInsList
=true ) = 0; // add for ScNamePasteDlg
430 virtual AbstractScPivotFilterDlg
* CreateScPivotFilterDlg ( Window
* pParent
, //add for ScPivotFilterDlg
431 const SfxItemSet
& rArgSet
, sal_uInt16 nSourceTab
, int nId
) = 0;
433 virtual AbstractScDPFunctionDlg
* CreateScDPFunctionDlg( Window
* pParent
, int nId
,
434 const ScDPLabelDataVector
& rLabelVec
,
435 const ScDPLabelData
& rLabelData
,
436 const ScPivotFuncData
& rFuncData
) = 0;
438 virtual AbstractScDPSubtotalDlg
* CreateScDPSubtotalDlg( Window
* pParent
, int nId
,
440 const ScDPLabelData
& rLabelData
,
441 const ScPivotFuncData
& rFuncData
,
442 const ScDPNameVec
& rDataFields
,
443 bool bEnableLayout
) = 0;
445 virtual AbstractScDPNumGroupDlg
* CreateScDPNumGroupDlg( Window
* pParent
,
447 const ScDPNumGroupInfo
& rInfo
) = 0;
449 virtual AbstractScDPDateGroupDlg
* CreateScDPDateGroupDlg( Window
* pParent
,
451 const ScDPNumGroupInfo
& rInfo
,
453 const Date
& rNullDate
) = 0;
455 virtual AbstractScDPShowDetailDlg
* CreateScDPShowDetailDlg( Window
* pParent
, int nId
,
457 sal_uInt16 nOrient
) = 0;
459 virtual AbstractScNewScenarioDlg
* CreateScNewScenarioDlg ( Window
* pParent
, const String
& rName
, //add for ScNewScenarioDlg
461 sal_Bool bEdit
= false, sal_Bool bSheetProtected
= false ) = 0;
462 virtual AbstractScShowTabDlg
* CreateScShowTabDlg ( Window
* pParent
, int nId
) = 0; //add for ScShowTabDlg
464 virtual AbstractScStringInputDlg
* CreateScStringInputDlg ( Window
* pParent
, //add for ScStringInputDlg
465 const String
& rTitle
,
466 const String
& rEditTitle
,
467 const String
& rDefault
,
468 const OString
& sHelpId
, const OString
& sEditHelpId
,
471 virtual AbstractScTabBgColorDlg
* CreateScTabBgColorDlg ( Window
* pParent
, //add for ScTabBgColorDlg
472 const String
& rTitle
, //Dialog Title
473 const String
& rTabBgColorNoColorText
, //Label for no tab color
474 const Color
& rDefaultColor
, //Currently selected Color
478 virtual AbstractScImportOptionsDlg
* CreateScImportOptionsDlg ( Window
* pParent
, //add for ScImportOptionsDlg
480 sal_Bool bAscii
= sal_True
,
481 const ScImportOptions
* pOptions
= NULL
,
482 const String
* pStrTitle
= NULL
,
483 sal_Bool bMultiByte
= false,
484 sal_Bool bOnlyDbtoolsEncodings
= false,
485 sal_Bool bImport
= sal_True
) = 0;
487 virtual SfxAbstractTabDialog
* CreateScAttrDlg( SfxViewFrame
* pFrame
, //add for ScAttrDlg
489 const SfxItemSet
* pCellAttrs
) = 0;
491 virtual SfxAbstractTabDialog
* CreateScHFEditDlg( SfxViewFrame
* pFrame
, //add for ScHFEditDlg
493 const SfxItemSet
& rCoreSet
,
494 const OUString
& rPageStyle
,
495 sal_uInt16 nResId
= RID_SCDLG_HFEDIT
) = 0;
497 virtual SfxAbstractTabDialog
* CreateScStyleDlg( Window
* pParent
,//add for ScStyleDlg
498 SfxStyleSheetBase
& rStyleBase
,
502 virtual SfxAbstractTabDialog
* CreateScSubTotalDlg( Window
* pParent
, //add for ScSubTotalDlg
503 const SfxItemSet
* pArgSet
,
506 virtual SfxAbstractTabDialog
* CreateScCharDlg( Window
* pParent
, const SfxItemSet
* pAttr
,//add for ScCharDlg
507 const SfxObjectShell
* pDocShell
, int nId
) = 0;
509 virtual SfxAbstractTabDialog
* CreateScParagraphDlg( Window
* pParent
, const SfxItemSet
* pAttr
,//add for ScParagraphDlg
512 virtual SfxAbstractTabDialog
* CreateScValidationDlg( Window
* pParent
, //add for ScValidationDlg
513 const SfxItemSet
* pArgSet
,int nId
, ScTabViewShell
*pTabVwSh
) = 0;
514 virtual SfxAbstractTabDialog
* CreateScSortDlg( Window
* pParent
, //add for ScSortDlg
515 const SfxItemSet
* pArgSet
,int nId
) = 0;
518 virtual CreateTabPage
GetTabPageCreatorFunc( sal_uInt16 nId
) = 0;
519 virtual GetTabPageRanges
GetTabPageRangesFunc( sal_uInt16 nId
) = 0;
522 ~ScAbstractDialogFactory() {}
526 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */