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 INCLUDED_SC_INC_SCABSTDLG_HXX
21 #define INCLUDED_SC_INC_SCABSTDLG_HXX
23 #include <tools/solar.h>
24 #include <sfx2/sfxdlg.hxx>
25 #include <vcl/syswin.hxx>
26 #include <com/sun/star/uno/Sequence.hxx>
27 #include <vcl/field.hxx>
31 #include <i18nlangtag/lang.h>
32 #include "asciiopt.hxx"
34 #include <tabvwsh.hxx>
38 class ScAutoFormatData
;
40 struct ScImportSourceDesc
;
43 class ScImportOptions
;
44 class SfxStyleSheetBase
;
46 struct ScPivotFuncData
;
47 struct ScDPNumGroupInfo
;
48 class ScSortWarningDlg
;
50 class ScConditionalFormat
;
51 class ScConditionalFormatList
;
53 namespace com
{ namespace sun
{ namespace star
{ namespace sheet
{
54 struct DataPilotFieldReference
;
57 class AbstractScImportAsciiDlg
: public VclAbstractDialog
60 virtual void GetOptions( ScAsciiOptions
& rOpt
) = 0;
61 virtual void SaveParameters() = 0;
64 class AbstractScAutoFormatDlg
: public VclAbstractDialog
67 virtual sal_uInt16
GetIndex() const = 0 ;
68 virtual OUString
GetCurrFormatName() = 0;
71 class AbstractScColRowLabelDlg
: public VclAbstractDialog
74 virtual bool IsCol() = 0;
75 virtual bool IsRow() = 0;
78 class AbstractScCondFormatManagerDlg
: public VclAbstractDialog
81 virtual ScConditionalFormatList
* GetConditionalFormatList() = 0;
83 virtual bool CondFormatsChanged() = 0;
86 class AbstractScDataPilotDatabaseDlg
:public VclAbstractDialog
89 virtual void GetValues( ScImportSourceDesc
& rDesc
) = 0;
92 class AbstractScDataPilotSourceTypeDlg
: public VclAbstractDialog
95 virtual bool IsDatabase() const = 0;
96 virtual bool IsExternal() const = 0;
97 virtual bool IsNamedRange() const = 0;
98 virtual OUString
GetSelectedNamedRange() const = 0;
99 virtual void AppendNamedRange(const OUString
& rName
) = 0;
102 class AbstractScDataPilotServiceDlg
: public VclAbstractDialog
105 virtual OUString
GetServiceName() const = 0;
106 virtual OUString
GetParSource() const = 0 ;
107 virtual OUString
GetParName() const = 0 ;
108 virtual OUString
GetParUser() const = 0;
109 virtual OUString
GetParPass() const = 0;
112 class AbstractScDeleteCellDlg
: public VclAbstractDialog
115 virtual DelCellCmd
GetDelCellCmd() const = 0;
119 class AbstractScDataFormDlg
: public VclAbstractDialog
124 class AbstractScDeleteContentsDlg
: public VclAbstractDialog
127 virtual void DisableObjects() = 0 ;
128 virtual sal_uInt16
GetDelContentsCmdBits() const = 0;
131 class AbstractScFillSeriesDlg
: public VclAbstractDialog
134 virtual FillDir
GetFillDir() const = 0;
135 virtual FillCmd
GetFillCmd() const = 0;
136 virtual FillDateCmd
GetFillDateCmd() const = 0;
137 virtual double GetStart() const = 0;
138 virtual double GetStep() const = 0;
139 virtual double GetMax() const = 0;
140 virtual OUString
GetStartStr() const = 0;
141 virtual void SetEdStartValEnabled(bool bFlag
=false) = 0;
144 class AbstractScGroupDlg
: public VclAbstractDialog
147 virtual bool GetColsChecked() const = 0;
150 class AbstractScInsertCellDlg
: public VclAbstractDialog
153 virtual InsCellCmd
GetInsCellCmd() const = 0;
156 class AbstractScInsertContentsDlg
: public VclAbstractDialog
159 virtual sal_uInt16
GetInsContentsCmdBits() const = 0;
160 virtual sal_uInt16
GetFormulaCmdBits() const = 0 ;
161 virtual bool IsSkipEmptyCells() const = 0;
162 virtual bool IsLink() const = 0;
163 virtual void SetFillMode( bool bSet
) = 0;
164 virtual void SetOtherDoc( bool bSet
) = 0;
165 virtual bool IsTranspose() const = 0;
166 virtual void SetChangeTrack( bool bSet
) = 0;
167 virtual void SetCellShiftDisabled( int nDisable
) = 0;
168 virtual InsCellCmd
GetMoveMode() = 0;
171 class AbstractScInsertTableDlg
: public VclAbstractDialog
174 virtual bool GetTablesFromFile() = 0;
175 virtual bool GetTablesAsLink() = 0;
176 virtual const OUString
* GetFirstTable( sal_uInt16
* pN
= NULL
) = 0;
177 virtual ScDocShell
* GetDocShellTables() = 0;
178 virtual bool IsTableBefore() = 0;
179 virtual sal_uInt16
GetTableCount() = 0;
180 virtual const OUString
* GetNextTable( sal_uInt16
* pN
= NULL
) = 0;
184 class AbstractScSelEntryDlg
: public VclAbstractDialog
187 virtual OUString
GetSelectEntry() const = 0;
190 class AbstractScLinkedAreaDlg
: public VclAbstractDialog2
193 virtual void InitFromOldLink( const OUString
& rFile
, const OUString
& rFilter
,
194 const OUString
& rOptions
, const OUString
& rSource
,
195 sal_uLong nRefresh
) = 0;
196 virtual OUString
GetURL() = 0;
197 virtual OUString
GetFilter() = 0; // may be empty
198 virtual OUString
GetOptions() = 0; // filter options
199 virtual OUString
GetSource() = 0; // separated by ";"
200 virtual sal_uLong
GetRefresh() = 0; // 0 if disabled
203 class AbstractScMetricInputDlg
: public VclAbstractDialog
206 virtual long GetInputValue( FieldUnit eUnit
= FUNIT_TWIP
) const = 0;
209 class AbstractScMoveTableDlg
: public VclAbstractDialog
212 virtual sal_uInt16
GetSelectedDocument () const = 0;
213 virtual sal_uInt16
GetSelectedTable () const = 0;
214 virtual bool GetCopyTable () const = 0;
215 virtual bool GetRenameTable () const = 0;
216 virtual void GetTabNameString( OUString
& rString
) const = 0;
217 virtual void SetForceCopyTable () = 0;
218 virtual void EnableCopyTable (bool bFlag
=true) = 0;
219 virtual void EnableRenameTable (bool bFlag
=true) = 0;
222 class AbstractScNameCreateDlg
: public VclAbstractDialog
// Manage Name Dialog
225 virtual sal_uInt16
GetFlags() const = 0;
228 class AbstractScNamePasteDlg
: public VclAbstractDialog
231 virtual std::vector
<OUString
> GetSelectedNames() const = 0;
232 virtual bool IsAllSelected() const = 0;
235 class AbstractScPivotFilterDlg
: public VclAbstractDialog
238 virtual const ScQueryItem
& GetOutputItem() = 0;
241 class AbstractScDPFunctionDlg
: public VclAbstractDialog
244 virtual sal_uInt16
GetFuncMask() const = 0;
245 virtual ::com::sun::star::sheet::DataPilotFieldReference
GetFieldRef() const = 0;
248 class AbstractScDPSubtotalDlg
: public VclAbstractDialog
251 virtual sal_uInt16
GetFuncMask() const = 0;
252 virtual void FillLabelData( ScDPLabelData
& rLabelData
) const = 0;
255 class AbstractScDPNumGroupDlg
: public VclAbstractDialog
258 virtual ScDPNumGroupInfo
GetGroupInfo() const = 0;
261 class AbstractScDPDateGroupDlg
: public VclAbstractDialog
264 virtual ScDPNumGroupInfo
GetGroupInfo() const = 0;
265 virtual sal_Int32
GetDatePart() const = 0;
268 class AbstractScDPShowDetailDlg
: public VclAbstractDialog
271 virtual OUString
GetDimensionName() const = 0;
274 class AbstractScNewScenarioDlg
: public VclAbstractDialog
278 virtual void SetScenarioData( const OUString
& rName
, const OUString
& rComment
,
279 const Color
& rColor
, sal_uInt16 nFlags
) = 0;
281 virtual void GetScenarioData( OUString
& rName
, OUString
& rComment
,
282 Color
& rColor
, sal_uInt16
& rFlags
) const = 0;
285 class AbstractScShowTabDlg
: public VclAbstractDialog
288 virtual void Insert( const OUString
& rString
, bool bSelected
) = 0;
289 virtual sal_Int32
GetSelectEntryCount() const = 0;
290 virtual void SetDescription(const OUString
& rTitle
, const OUString
& rFixedText
, const OString
& nDlgHelpId
, const OString
& nLbHelpId
) = 0;
291 virtual OUString
GetSelectEntry(sal_Int32 nPos
) const = 0;
292 virtual sal_Int32
GetSelectEntryPos(sal_Int32 nPos
) const = 0;
295 class AbstractScSortWarningDlg
: public VclAbstractDialog
299 class AbstractScStringInputDlg
: public VclAbstractDialog
302 virtual OUString
GetInputString() const = 0;
305 class AbstractScTabBgColorDlg
: public VclAbstractDialog
308 virtual void GetSelectedColor( Color
& rColor
) const = 0;
311 class AbstractScImportOptionsDlg
: public VclAbstractDialog
314 virtual void GetImportOptions( ScImportOptions
& rOptions
) const = 0;
317 class AbstractScTextImportOptionsDlg
: public VclAbstractDialog
320 virtual LanguageType
GetLanguageType() const = 0;
321 virtual bool IsDateConversionSet() const = 0;
324 class ScAbstractDialogFactory
327 SC_DLLPUBLIC
static ScAbstractDialogFactory
* Create();
329 virtual AbstractScImportAsciiDlg
* CreateScImportAsciiDlg( Window
* pParent
, const OUString
& aDatName
,
331 ScImportAsciiCall eCall
) = 0;
333 virtual AbstractScTextImportOptionsDlg
* CreateScTextImportOptionsDlg(Window
* pParent
) = 0;
335 virtual AbstractScAutoFormatDlg
* CreateScAutoFormatDlg(Window
* pParent
,
336 ScAutoFormat
* pAutoFormat
,
337 const ScAutoFormatData
* pSelFormatData
,
338 ScViewData
*pViewData
) = 0;
339 virtual AbstractScColRowLabelDlg
* CreateScColRowLabelDlg (Window
* pParent
,
341 bool bRow
= false) = 0;
343 virtual AbstractScSortWarningDlg
* CreateScSortWarningDlg(Window
* pParent
, const OUString
& rExtendText
, const OUString
& rCurrentText
) = 0;
345 virtual AbstractScCondFormatManagerDlg
* CreateScCondFormatMgrDlg(Window
* pParent
, ScDocument
* pDoc
, const ScConditionalFormatList
* pFormatList
,
346 const ScAddress
& rPos
, int nId
) = 0;
348 virtual AbstractScDataPilotDatabaseDlg
* CreateScDataPilotDatabaseDlg(Window
* pParent
) = 0;
350 virtual AbstractScDataPilotSourceTypeDlg
* CreateScDataPilotSourceTypeDlg(Window
* pParent
,
351 bool bEnableExternal
) = 0;
353 virtual AbstractScDataPilotServiceDlg
* CreateScDataPilotServiceDlg( Window
* pParent
,
354 const com::sun::star::uno::Sequence
<OUString
>& rServices
,
357 virtual AbstractScDeleteCellDlg
* CreateScDeleteCellDlg(Window
* pParent
, bool bDisallowCellMove
= false) = 0 ;
360 virtual AbstractScDataFormDlg
* CreateScDataFormDlg(Window
* pParent
,
361 ScTabViewShell
* pTabViewShell
) = 0;
363 virtual AbstractScDeleteContentsDlg
* CreateScDeleteContentsDlg(Window
* pParent
,
364 sal_uInt16 nCheckDefaults
= 0) = 0;
365 virtual AbstractScFillSeriesDlg
* CreateScFillSeriesDlg( Window
* pParent
,
366 ScDocument
& rDocument
,
369 FillDateCmd eFillDateCmd
,
370 const OUString
& aStartStr
,
373 sal_uInt16 nPossDir
) = 0;
375 virtual AbstractScGroupDlg
* CreateAbstractScGroupDlg( Window
* pParent
,
376 bool bUnGroup
= false,
377 bool bRows
= true ) = 0;
379 virtual AbstractScInsertCellDlg
* CreateScInsertCellDlg( Window
* pParent
,
381 bool bDisallowCellMove
= false ) = 0;
383 virtual AbstractScInsertContentsDlg
* CreateScInsertContentsDlg( Window
* pParent
,
384 sal_uInt16 nCheckDefaults
= 0,
385 const OUString
* pStrTitle
= NULL
) = 0;
387 virtual AbstractScInsertTableDlg
* CreateScInsertTableDlg(Window
* pParent
, ScViewData
& rViewData
,
388 SCTAB nTabCount
, bool bFromFile
) = 0;
390 virtual AbstractScSelEntryDlg
* CreateScSelEntryDlg ( Window
* pParent
,
391 const std::vector
<OUString
> &rEntryList
) = 0;
392 virtual AbstractScLinkedAreaDlg
* CreateScLinkedAreaDlg(Window
* pParent
) = 0;
394 virtual AbstractScMetricInputDlg
* CreateScMetricInputDlg ( Window
* pParent
,
395 const OString
& sDialogName
,
398 FieldUnit eFUnit
= FUNIT_MM
,
399 sal_uInt16 nDecimals
= 2,
400 long nMaximum
= 1000,
403 long nLast
= 100 ) = 0;
405 virtual AbstractScMoveTableDlg
* CreateScMoveTableDlg(Window
* pParent
,
406 const OUString
& rDefault
) = 0;
408 virtual AbstractScNameCreateDlg
* CreateScNameCreateDlg(Window
* pParent
,
409 sal_uInt16 nFlags
) = 0;
411 virtual AbstractScNamePasteDlg
* CreateScNamePasteDlg ( Window
* pParent
, ScDocShell
* pShell
, bool bInsList
=true ) = 0;
413 virtual AbstractScPivotFilterDlg
* CreateScPivotFilterDlg(Window
* pParent
,
414 const SfxItemSet
& rArgSet
, sal_uInt16 nSourceTab
) = 0;
416 virtual AbstractScDPFunctionDlg
* CreateScDPFunctionDlg( Window
* pParent
,
417 const ScDPLabelDataVector
& rLabelVec
,
418 const ScDPLabelData
& rLabelData
,
419 const ScPivotFuncData
& rFuncData
) = 0;
421 virtual AbstractScDPSubtotalDlg
* CreateScDPSubtotalDlg( Window
* pParent
,
423 const ScDPLabelData
& rLabelData
,
424 const ScPivotFuncData
& rFuncData
,
425 const ScDPNameVec
& rDataFields
,
426 bool bEnableLayout
) = 0;
428 virtual AbstractScDPNumGroupDlg
* CreateScDPNumGroupDlg( Window
* pParent
,
430 const ScDPNumGroupInfo
& rInfo
) = 0;
432 virtual AbstractScDPDateGroupDlg
* CreateScDPDateGroupDlg( Window
* pParent
,
434 const ScDPNumGroupInfo
& rInfo
,
436 const Date
& rNullDate
) = 0;
438 virtual AbstractScDPShowDetailDlg
* CreateScDPShowDetailDlg( Window
* pParent
, int nId
,
440 sal_uInt16 nOrient
) = 0;
442 virtual AbstractScNewScenarioDlg
* CreateScNewScenarioDlg ( Window
* pParent
, const OUString
& rName
,
443 bool bEdit
= false, bool bSheetProtected
= false ) = 0;
444 virtual AbstractScShowTabDlg
* CreateScShowTabDlg(Window
* pParent
) = 0;
446 virtual AbstractScStringInputDlg
* CreateScStringInputDlg ( Window
* pParent
,
447 const OUString
& rTitle
,
448 const OUString
& rEditTitle
,
449 const OUString
& rDefault
,
450 const OString
& sHelpId
, const OString
& sEditHelpId
) = 0;
452 virtual AbstractScTabBgColorDlg
* CreateScTabBgColorDlg ( Window
* pParent
,
453 const OUString
& rTitle
, //Dialog Title
454 const OUString
& rTabBgColorNoColorText
, //Label for no tab color
455 const Color
& rDefaultColor
, //Currently selected Color
456 const OString
& ) = 0;
458 virtual AbstractScImportOptionsDlg
* CreateScImportOptionsDlg ( Window
* pParent
,
460 const ScImportOptions
* pOptions
= NULL
,
461 const OUString
* pStrTitle
= NULL
,
462 bool bMultiByte
= false,
463 bool bOnlyDbtoolsEncodings
= false,
464 bool bImport
= true ) = 0;
466 virtual SfxAbstractTabDialog
* CreateScAttrDlg( SfxViewFrame
* pFrame
,
468 const SfxItemSet
* pCellAttrs
) = 0;
470 virtual SfxAbstractTabDialog
* CreateScHFEditDlg( SfxViewFrame
* pFrame
,
472 const SfxItemSet
& rCoreSet
,
473 const OUString
& rPageStyle
,
474 sal_uInt16 nResId
= RID_SCDLG_HFEDIT
) = 0;
476 virtual SfxAbstractTabDialog
* CreateScStyleDlg( Window
* pParent
,
477 SfxStyleSheetBase
& rStyleBase
,
481 virtual SfxAbstractTabDialog
* CreateScSubTotalDlg( Window
* pParent
,
482 const SfxItemSet
* pArgSet
) = 0;
484 virtual SfxAbstractTabDialog
* CreateScCharDlg(Window
* pParent
,
485 const SfxItemSet
* pAttr
, const SfxObjectShell
* pDocShell
) = 0;
487 virtual SfxAbstractTabDialog
* CreateScParagraphDlg(Window
* pParent
,
488 const SfxItemSet
* pAttr
) = 0;
490 virtual SfxAbstractTabDialog
* CreateScValidationDlg(Window
* pParent
,
491 const SfxItemSet
* pArgSet
, ScTabViewShell
*pTabVwSh
) = 0;
492 virtual SfxAbstractTabDialog
* CreateScSortDlg(Window
* pParent
, const SfxItemSet
* pArgSet
) = 0;
495 virtual CreateTabPage
GetTabPageCreatorFunc( sal_uInt16 nId
) = 0;
496 virtual GetTabPageRanges
GetTabPageRangesFunc() = 0;
499 ~ScAbstractDialogFactory() {}
503 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */