1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: scabstdlg.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SC_ABSTDLG_HXX
31 #define _SC_ABSTDLG_HXX
33 // include ---------------------------------------------------------------
35 #include <tools/solar.h>
36 #include <tools/string.hxx>
37 #include <sfx2/sfxdlg.hxx>
38 #include <vcl/syswin.hxx>
39 #include <com/sun/star/uno/Sequence.hxx>
40 #include <vcl/field.hxx>
44 #include "i18npool/lang.h"
46 #include <tabvwsh.hxx>
50 class ScAutoFormatData
;
52 struct ScImportSourceDesc
;
56 class ScImportOptions
;
57 class SfxStyleSheetBase
;
60 struct ScDPNumGroupInfo
;
62 namespace com
{ namespace sun
{ namespace star
{ namespace sheet
{
63 struct DataPilotFieldReference
;
66 class AbstractScImportAsciiDlg
: public VclAbstractDialog
//add for ScImportAsciiDlg
69 virtual void GetOptions( ScAsciiOptions
& rOpt
) = 0;
70 virtual void SetTextToColumnsMode() = 0;
74 class AbstractScAutoFormatDlg
: public VclAbstractDialog
//add for ScAutoFormatDlg
77 virtual USHORT
GetIndex() const = 0 ;
78 virtual String
GetCurrFormatName() = 0;
81 class AbstractScColRowLabelDlg
: public VclAbstractDialog
//add for ScColRowLabelDlg
84 virtual BOOL
IsCol() = 0;
85 virtual BOOL
IsRow() = 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;
101 class AbstractScDataPilotServiceDlg
: public VclAbstractDialog
//add for ScDataPilotServiceDlg
104 virtual String
GetServiceName() const = 0;
105 virtual String
GetParSource() const = 0 ;
106 virtual String
GetParName() const = 0 ;
107 virtual String
GetParUser() const = 0;
108 virtual String
GetParPass() const = 0;
111 class AbstractScDeleteCellDlg
: public VclAbstractDialog
//add for ScDeleteCellDlg
114 virtual DelCellCmd
GetDelCellCmd() const = 0;
118 class AbstractScDataFormDlg
: public VclAbstractDialog
//add for ScDeleteCellDlg
123 class AbstractScDeleteContentsDlg
: public VclAbstractDialog
//add for ScDeleteContentsDlg
126 virtual void DisableObjects() = 0 ;
127 virtual USHORT
GetDelContentsCmdBits() const = 0;
130 class AbstractScFillSeriesDlg
: public VclAbstractDialog
//add for ScFillSeriesDlg
133 virtual FillDir
GetFillDir() const = 0;
134 virtual FillCmd
GetFillCmd() const = 0;
135 virtual FillDateCmd
GetFillDateCmd() const = 0;
136 virtual double GetStart() const = 0;
137 virtual double GetStep() const = 0;
138 virtual double GetMax() const = 0;
139 virtual String
GetStartStr() const = 0;
140 virtual void SetEdStartValEnabled(BOOL bFlag
=FALSE
) = 0;
143 class AbstractScGroupDlg
: public VclAbstractDialog
//add for ScGroupDlg
146 virtual BOOL
GetColsChecked() const = 0;
149 class AbstractScInsertCellDlg
: public VclAbstractDialog
//add for ScInsertCellDlg
152 virtual InsCellCmd
GetInsCellCmd() const = 0;
155 class AbstractScInsertContentsDlg
: public VclAbstractDialog
//add for ScInsertContentsDlg
158 virtual USHORT
GetInsContentsCmdBits() const = 0;
159 virtual USHORT
GetFormulaCmdBits() const = 0 ;
160 virtual BOOL
IsSkipEmptyCells() const = 0;
161 virtual BOOL
IsLink() const = 0;
162 virtual void SetFillMode( BOOL bSet
) = 0;
163 virtual void SetOtherDoc( BOOL bSet
) = 0;
164 virtual BOOL
IsTranspose() const = 0;
165 virtual void SetChangeTrack( BOOL bSet
) = 0;
166 virtual void SetCellShiftDisabled( int nDisable
) = 0;
167 virtual InsCellCmd
GetMoveMode() = 0;
170 class AbstractScInsertTableDlg
: public VclAbstractDialog
//add for ScInsertTableDlg
173 virtual BOOL
GetTablesFromFile() = 0;
174 virtual BOOL
GetTablesAsLink() = 0;
175 virtual const String
* GetFirstTable( USHORT
* pN
= NULL
) = 0;
176 virtual ScDocShell
* GetDocShellTables() = 0;
177 virtual BOOL
IsTableBefore() = 0;
178 virtual USHORT
GetTableCount() = 0;
179 virtual const String
* GetNextTable( USHORT
* pN
= NULL
) = 0;
183 class AbstractScSelEntryDlg
: public VclAbstractDialog
//add for ScSelEntryDlg
186 virtual String
GetSelectEntry() const = 0;
189 class AbstractScLinkedAreaDlg
: public VclAbstractDialog2
//add for ScLinkedAreaDlg
192 virtual void InitFromOldLink( const String
& rFile
, const String
& rFilter
,
193 const String
& rOptions
, const String
& rSource
,
194 ULONG nRefresh
) = 0;
195 virtual String
GetURL() = 0;
196 virtual String
GetFilter() = 0; // may be empty
197 virtual String
GetOptions() = 0; // filter options
198 virtual String
GetSource() = 0; // separated by ";"
199 virtual ULONG
GetRefresh() = 0; // 0 if disabled
202 class AbstractScMetricInputDlg
: public VclAbstractDialog
//add for ScMetricInputDlg
205 virtual long GetInputValue( FieldUnit eUnit
= FUNIT_TWIP
) const = 0;
208 class AbstractScMoveTableDlg
: public VclAbstractDialog
//add for ScMoveTableDlg
211 virtual USHORT
GetSelectedDocument () const = 0;
212 virtual USHORT
GetSelectedTable () const = 0;
213 virtual BOOL
GetCopyTable () const = 0;
214 virtual void SetCopyTable (BOOL bFlag
=TRUE
) = 0;
215 virtual void EnableCopyTable (BOOL bFlag
=TRUE
) = 0;
218 class AbstractScNameCreateDlg
: public VclAbstractDialog
//add for ScNameCreateDlg
221 virtual USHORT
GetFlags() const = 0;
224 class AbstractScNamePasteDlg
: public VclAbstractDialog
//add for ScNamePasteDlg
227 virtual String
GetSelectedName() const = 0;
230 class AbstractScPivotFilterDlg
: public VclAbstractDialog
//add for ScPivotFilterDlg
233 virtual const ScQueryItem
& GetOutputItem() = 0;
236 class AbstractScDPFunctionDlg
: public VclAbstractDialog
//add for ScDPFunctionDlg
239 virtual USHORT
GetFuncMask() const = 0;
240 virtual ::com::sun::star::sheet::DataPilotFieldReference
GetFieldRef() const = 0;
243 class AbstractScDPSubtotalDlg
: public VclAbstractDialog
//add for ScDPSubtotalDlg
246 virtual USHORT
GetFuncMask() const = 0;
247 virtual void FillLabelData( ScDPLabelData
& rLabelData
) const = 0;
250 class AbstractScDPNumGroupDlg
: public VclAbstractDialog
253 virtual ScDPNumGroupInfo
GetGroupInfo() const = 0;
256 class AbstractScDPDateGroupDlg
: public VclAbstractDialog
259 virtual ScDPNumGroupInfo
GetGroupInfo() const = 0;
260 virtual sal_Int32
GetDatePart() const = 0;
263 class AbstractScDPShowDetailDlg
: public VclAbstractDialog
//add for ScDPShowDetailDlg
266 virtual String
GetDimensionName() const = 0;
269 class AbstractScNewScenarioDlg
: public VclAbstractDialog
//add for ScNewScenarioDlg
273 virtual void SetScenarioData( const String
& rName
, const String
& rComment
,
274 const Color
& rColor
, USHORT nFlags
) = 0;
276 virtual void GetScenarioData( String
& rName
, String
& rComment
,
277 Color
& rColor
, USHORT
& rFlags
) const = 0;
280 class AbstractScShowTabDlg
: public VclAbstractDialog
//add for ScShowTabDlg
283 virtual void Insert( const String
& rString
, BOOL bSelected
) = 0;
284 virtual USHORT
GetSelectEntryCount() const = 0;
285 virtual void SetDescription(const String
& rTitle
, const String
& rFixedText
,ULONG nDlgHelpId
, ULONG nLbHelpId
) = 0;
286 virtual String
GetSelectEntry(USHORT nPos
) const = 0;
287 virtual USHORT
GetSelectEntryPos(USHORT nPos
) const = 0;
290 class AbstractScStringInputDlg
: public VclAbstractDialog
//add for ScStringInputDlg
293 virtual void GetInputString( String
& rString
) const = 0;
296 class AbstractScTabBgColorDlg
: public VclAbstractDialog
//add for ScTabBgColorDlg
299 virtual void GetSelectedColor( Color
& rColor
) const = 0;
302 class AbstractScImportOptionsDlg
: public VclAbstractDialog
//add for ScImportOptionsDlg
305 virtual void GetImportOptions( ScImportOptions
& rOptions
) const = 0;
308 class AbstractScTextImportOptionsDlg
: public VclAbstractDialog
//add for ScLangChooserDlg
311 virtual LanguageType
GetLanguageType() const = 0;
312 virtual bool IsDateConversionSet() const = 0;
315 //-------Scabstract fractory ---------------------------
316 class ScAbstractDialogFactory
319 SC_DLLPUBLIC
static ScAbstractDialogFactory
* Create();
321 virtual AbstractScImportAsciiDlg
* CreateScImportAsciiDlg( Window
* pParent
, String aDatName
, //add for ScImportAsciiDlg
322 SvStream
* pInStream
, int nId
,
323 sal_Unicode cSep
= '\t') = 0;
325 virtual AbstractScTextImportOptionsDlg
* CreateScTextImportOptionsDlg( Window
* pParent
, int nId
) = 0;
327 virtual AbstractScAutoFormatDlg
* CreateScAutoFormatDlg( Window
* pParent
, //add for ScAutoFormatDlg
328 ScAutoFormat
* pAutoFormat
,
329 const ScAutoFormatData
* pSelFormatData
,
332 virtual AbstractScColRowLabelDlg
* CreateScColRowLabelDlg (Window
* pParent
, //add for ScColRowLabelDlg
335 BOOL bRow
= FALSE
) = 0;
337 virtual VclAbstractDialog
* CreateScColOrRowDlg( Window
* pParent
, //add for ScColOrRowDlg
338 const String
& rStrTitle
,
339 const String
& rStrLabel
,
341 BOOL bColDefault
= TRUE
) = 0;
342 virtual VclAbstractDialog
* CreateScSortWarningDlg ( Window
* pParent
, const String
& rExtendText
, const String
& rCurrentText
, int nId
) = 0; //add for ScSortWarningDlg
343 virtual AbstractScDataPilotDatabaseDlg
* CreateScDataPilotDatabaseDlg (Window
* pParent
,int nId
) = 0; //add for ScDataPilotDatabaseDlg
345 virtual AbstractScDataPilotSourceTypeDlg
* CreateScDataPilotSourceTypeDlg ( Window
* pParent
, BOOL bEnableExternal
, int nId
) = 0; //add for ScDataPilotSourceTypeDlg
347 virtual AbstractScDataPilotServiceDlg
* CreateScDataPilotServiceDlg( Window
* pParent
, //add for ScDataPilotServiceDlg
348 const com::sun::star::uno::Sequence
<rtl::OUString
>& rServices
,
351 virtual AbstractScDeleteCellDlg
* CreateScDeleteCellDlg( Window
* pParent
, int nId
, BOOL bDisallowCellMove
= FALSE
) = 0 ; //add for ScDeleteCellDlg
354 virtual AbstractScDataFormDlg
* CreateScDataFormDlg( Window
* pParent
, int nId
, ScTabViewShell
* pTabViewShell
) = 0 ; //add for ScDataFormDlg
356 virtual AbstractScDeleteContentsDlg
* CreateScDeleteContentsDlg(Window
* pParent
,int nId
, //add for ScDeleteContentsDlg
357 USHORT nCheckDefaults
= 0 ) = 0;
358 virtual AbstractScFillSeriesDlg
* CreateScFillSeriesDlg( Window
* pParent
, //add for ScFillSeriesDlg
359 ScDocument
& rDocument
,
362 FillDateCmd eFillDateCmd
,
369 virtual AbstractScGroupDlg
* CreateAbstractScGroupDlg( Window
* pParent
, //add for ScGroupDlg
372 BOOL bUnGroup
= FALSE
,
373 BOOL bRows
= TRUE
) = 0;
375 virtual AbstractScInsertCellDlg
* CreateScInsertCellDlg( Window
* pParent
, //add for ScInsertCellDlg
377 BOOL bDisallowCellMove
= FALSE
) = 0;
379 virtual AbstractScInsertContentsDlg
* CreateScInsertContentsDlg( Window
* pParent
, //add for ScInsertContentsDlg
381 USHORT nCheckDefaults
= 0,
382 const String
* pStrTitle
= NULL
) = 0;
384 virtual AbstractScInsertTableDlg
* CreateScInsertTableDlg ( Window
* pParent
, ScViewData
& rViewData
, //add for ScInsertTableDlg
385 SCTAB nTabCount
, bool bFromFile
, int nId
) = 0;
387 virtual AbstractScSelEntryDlg
* CreateScSelEntryDlg ( Window
* pParent
, // add for ScSelEntryDlg
389 const String
& aTitle
,
390 const String
& aLbTitle
,
393 virtual AbstractScLinkedAreaDlg
* CreateScLinkedAreaDlg ( Window
* pParent
, int nId
) = 0; //add for ScLinkedAreaDlg
395 virtual AbstractScMetricInputDlg
* CreateScMetricInputDlg ( Window
* pParent
, //add for ScMetricInputDlg
396 USHORT nResId
, // Ableitung fuer jeden Dialog!
400 FieldUnit eFUnit
= FUNIT_MM
,
401 USHORT nDecimals
= 2,
402 long nMaximum
= 1000,
405 long nLast
= 100 ) = 0;
407 virtual AbstractScMoveTableDlg
* CreateScMoveTableDlg( Window
* pParent
, int nId
) = 0; //add for ScMoveTableDlg
409 virtual AbstractScNameCreateDlg
* CreateScNameCreateDlg ( Window
* pParent
, USHORT nFlags
, int nId
) = 0; //add for ScNameCreateDlg
411 virtual AbstractScNamePasteDlg
* CreateScNamePasteDlg ( Window
* pParent
, const ScRangeName
* pList
, //add for ScNamePasteDlg
412 int nId
, BOOL bInsList
=TRUE
) = 0;
414 virtual AbstractScPivotFilterDlg
* CreateScPivotFilterDlg ( Window
* pParent
, //add for ScPivotFilterDlg
415 const SfxItemSet
& rArgSet
, USHORT nSourceTab
, int nId
) = 0;
417 virtual AbstractScDPFunctionDlg
* CreateScDPFunctionDlg( Window
* pParent
, int nId
,
418 const ScDPLabelDataVec
& rLabelVec
,
419 const ScDPLabelData
& rLabelData
,
420 const ScDPFuncData
& rFuncData
) = 0;
422 virtual AbstractScDPSubtotalDlg
* CreateScDPSubtotalDlg( Window
* pParent
, int nId
,
424 const ScDPLabelData
& rLabelData
,
425 const ScDPFuncData
& rFuncData
,
426 const ScDPNameVec
& rDataFields
,
427 bool bEnableLayout
) = 0;
429 virtual AbstractScDPNumGroupDlg
* CreateScDPNumGroupDlg( Window
* pParent
,
431 const ScDPNumGroupInfo
& rInfo
) = 0;
433 virtual AbstractScDPDateGroupDlg
* CreateScDPDateGroupDlg( Window
* pParent
,
435 const ScDPNumGroupInfo
& rInfo
,
437 const Date
& rNullDate
) = 0;
439 virtual AbstractScDPShowDetailDlg
* CreateScDPShowDetailDlg( Window
* pParent
, int nId
,
441 USHORT nOrient
) = 0;
443 virtual AbstractScNewScenarioDlg
* CreateScNewScenarioDlg ( Window
* pParent
, const String
& rName
, //add for ScNewScenarioDlg
445 BOOL bEdit
= FALSE
, BOOL bSheetProtected
= FALSE
) = 0;
446 virtual AbstractScShowTabDlg
* CreateScShowTabDlg ( Window
* pParent
, int nId
) = 0; //add for ScShowTabDlg
448 virtual AbstractScStringInputDlg
* CreateScStringInputDlg ( Window
* pParent
, //add for ScStringInputDlg
449 const String
& rTitle
,
450 const String
& rEditTitle
,
451 const String
& rDefault
,
455 virtual AbstractScTabBgColorDlg
* CreateScTabBgColorDlg ( Window
* pParent
, //add for ScTabBgColorDlg
456 const String
& rTitle
, //Dialog Title
457 const String
& rTabBgColorNoColorText
, //Label for no tab color
458 const Color
& rDefaultColor
, //Currently selected Color
462 virtual AbstractScImportOptionsDlg
* CreateScImportOptionsDlg ( Window
* pParent
, //add for ScImportOptionsDlg
465 const ScImportOptions
* pOptions
= NULL
,
466 const String
* pStrTitle
= NULL
,
467 BOOL bMultiByte
= FALSE
,
468 BOOL bOnlyDbtoolsEncodings
= FALSE
,
469 BOOL bImport
= TRUE
) = 0;
471 virtual SfxAbstractTabDialog
* CreateScAttrDlg( SfxViewFrame
* pFrame
, //add for ScAttrDlg
473 const SfxItemSet
* pCellAttrs
,
476 virtual SfxAbstractTabDialog
* CreateScHFEditDlg( SfxViewFrame
* pFrame
, //add for ScHFEditDlg
478 const SfxItemSet
& rCoreSet
,
479 const String
& rPageStyle
,
481 USHORT nResId
= RID_SCDLG_HFEDIT
) = 0;
483 virtual SfxAbstractTabDialog
* CreateScStyleDlg( Window
* pParent
,//add for ScStyleDlg
484 SfxStyleSheetBase
& rStyleBase
,
488 virtual SfxAbstractTabDialog
* CreateScSubTotalDlg( Window
* pParent
, //add for ScSubTotalDlg
489 const SfxItemSet
* pArgSet
,
492 virtual SfxAbstractTabDialog
* CreateScCharDlg( Window
* pParent
, const SfxItemSet
* pAttr
,//add for ScCharDlg
493 const SfxObjectShell
* pDocShell
, int nId
) = 0;
495 virtual SfxAbstractTabDialog
* CreateScParagraphDlg( Window
* pParent
, const SfxItemSet
* pAttr
,//add for ScParagraphDlg
498 virtual SfxAbstractTabDialog
* CreateScValidationDlg( Window
* pParent
, //add for ScValidationDlg
499 const SfxItemSet
* pArgSet
,int nId
) = 0;
500 virtual SfxAbstractTabDialog
* CreateScSortDlg( Window
* pParent
, //add for ScSortDlg
501 const SfxItemSet
* pArgSet
,int nId
) = 0;
503 virtual CreateTabPage
GetTabPageCreatorFunc( USHORT nId
) = 0;
504 virtual GetTabPageRanges
GetTabPageRangesFunc( USHORT nId
) = 0;