update dev300-m58
[ooovba.git] / sc / inc / scabstdlg.hxx
blob97f651321b363dc236e931d74c85cd89a3491a2e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: scabstdlg.hxx,v $
10 * $Revision: 1.11 $
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>
41 #include "sc.hrc"
42 #include "global.hxx"
43 #include "pivot.hxx"
44 #include "i18npool/lang.h"
46 #include <tabvwsh.hxx>
48 class ScAsciiOptions;
49 class ScAutoFormat;
50 class ScAutoFormatData;
51 class ScDocument;
52 struct ScImportSourceDesc;
53 class ScViewData;
54 class ScRangeName;
55 class ScQueryItem;
56 class ScImportOptions;
57 class SfxStyleSheetBase;
58 class ScDPObject;
59 struct ScDPFuncData;
60 struct ScDPNumGroupInfo;
62 namespace com { namespace sun { namespace star { namespace sheet {
63 struct DataPilotFieldReference;
64 } } } }
66 class AbstractScImportAsciiDlg : public VclAbstractDialog //add for ScImportAsciiDlg
68 public:
69 virtual void GetOptions( ScAsciiOptions& rOpt ) = 0;
70 virtual void SetTextToColumnsMode() = 0;
74 class AbstractScAutoFormatDlg : public VclAbstractDialog //add for ScAutoFormatDlg
76 public:
77 virtual USHORT GetIndex() const = 0 ;
78 virtual String GetCurrFormatName() = 0;
81 class AbstractScColRowLabelDlg : public VclAbstractDialog //add for ScColRowLabelDlg
83 public:
84 virtual BOOL IsCol() = 0;
85 virtual BOOL IsRow() = 0;
88 class AbstractScDataPilotDatabaseDlg :public VclAbstractDialog //add for ScDataPilotDatabaseDlg
90 public:
91 virtual void GetValues( ScImportSourceDesc& rDesc ) = 0;
94 class AbstractScDataPilotSourceTypeDlg : public VclAbstractDialog //add for ScDataPilotSourceTypeDlg
96 public:
97 virtual BOOL IsDatabase() const = 0;
98 virtual BOOL IsExternal() const = 0;
101 class AbstractScDataPilotServiceDlg : public VclAbstractDialog //add for ScDataPilotServiceDlg
103 public:
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
113 public:
114 virtual DelCellCmd GetDelCellCmd() const = 0;
117 //for dataform
118 class AbstractScDataFormDlg : public VclAbstractDialog //add for ScDeleteCellDlg
123 class AbstractScDeleteContentsDlg: public VclAbstractDialog //add for ScDeleteContentsDlg
125 public:
126 virtual void DisableObjects() = 0 ;
127 virtual USHORT GetDelContentsCmdBits() const = 0;
130 class AbstractScFillSeriesDlg: public VclAbstractDialog //add for ScFillSeriesDlg
132 public:
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
145 public:
146 virtual BOOL GetColsChecked() const = 0;
149 class AbstractScInsertCellDlg : public VclAbstractDialog //add for ScInsertCellDlg
151 public:
152 virtual InsCellCmd GetInsCellCmd() const = 0;
155 class AbstractScInsertContentsDlg : public VclAbstractDialog //add for ScInsertContentsDlg
157 public:
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
172 public:
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
185 public:
186 virtual String GetSelectEntry() const = 0;
189 class AbstractScLinkedAreaDlg : public VclAbstractDialog2 //add for ScLinkedAreaDlg
191 public:
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
204 public:
205 virtual long GetInputValue( FieldUnit eUnit = FUNIT_TWIP ) const = 0;
208 class AbstractScMoveTableDlg : public VclAbstractDialog //add for ScMoveTableDlg
210 public:
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
220 public:
221 virtual USHORT GetFlags() const = 0;
224 class AbstractScNamePasteDlg : public VclAbstractDialog //add for ScNamePasteDlg
226 public:
227 virtual String GetSelectedName() const = 0;
230 class AbstractScPivotFilterDlg : public VclAbstractDialog //add for ScPivotFilterDlg
232 public:
233 virtual const ScQueryItem& GetOutputItem() = 0;
236 class AbstractScDPFunctionDlg : public VclAbstractDialog //add for ScDPFunctionDlg
238 public:
239 virtual USHORT GetFuncMask() const = 0;
240 virtual ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const = 0;
243 class AbstractScDPSubtotalDlg : public VclAbstractDialog //add for ScDPSubtotalDlg
245 public:
246 virtual USHORT GetFuncMask() const = 0;
247 virtual void FillLabelData( ScDPLabelData& rLabelData ) const = 0;
250 class AbstractScDPNumGroupDlg : public VclAbstractDialog
252 public:
253 virtual ScDPNumGroupInfo GetGroupInfo() const = 0;
256 class AbstractScDPDateGroupDlg : public VclAbstractDialog
258 public:
259 virtual ScDPNumGroupInfo GetGroupInfo() const = 0;
260 virtual sal_Int32 GetDatePart() const = 0;
263 class AbstractScDPShowDetailDlg : public VclAbstractDialog //add for ScDPShowDetailDlg
265 public:
266 virtual String GetDimensionName() const = 0;
269 class AbstractScNewScenarioDlg : public VclAbstractDialog //add for ScNewScenarioDlg
271 public:
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
282 public:
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
292 public:
293 virtual void GetInputString( String& rString ) const = 0;
296 class AbstractScTabBgColorDlg : public VclAbstractDialog //add for ScTabBgColorDlg
298 public:
299 virtual void GetSelectedColor( Color& rColor ) const = 0;
302 class AbstractScImportOptionsDlg : public VclAbstractDialog //add for ScImportOptionsDlg
304 public:
305 virtual void GetImportOptions( ScImportOptions& rOptions ) const = 0;
308 class AbstractScTextImportOptionsDlg : public VclAbstractDialog //add for ScLangChooserDlg
310 public:
311 virtual LanguageType GetLanguageType() const = 0;
312 virtual bool IsDateConversionSet() const = 0;
315 //-------Scabstract fractory ---------------------------
316 class ScAbstractDialogFactory
318 public:
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,
330 ScDocument* pDoc,
331 int nId) = 0;
332 virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, //add for ScColRowLabelDlg
333 int nId,
334 BOOL bCol = FALSE,
335 BOOL bRow = FALSE) = 0;
337 virtual VclAbstractDialog * CreateScColOrRowDlg( Window* pParent, //add for ScColOrRowDlg
338 const String& rStrTitle,
339 const String& rStrLabel,
340 int nId,
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,
349 int nId ) = 0;
351 virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId, BOOL bDisallowCellMove = FALSE ) = 0 ; //add for ScDeleteCellDlg
353 //for dataform
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,
360 FillDir eFillDir,
361 FillCmd eFillCmd,
362 FillDateCmd eFillDateCmd,
363 String aStartStr,
364 double fStep,
365 double fMax,
366 USHORT nPossDir,
367 int nId) = 0;
369 virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent, //add for ScGroupDlg
370 USHORT nResId,
371 int nId,
372 BOOL bUnGroup = FALSE,
373 BOOL bRows = TRUE ) = 0;
375 virtual AbstractScInsertCellDlg * CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg
376 int nId,
377 BOOL bDisallowCellMove = FALSE ) = 0;
379 virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg
380 int nId,
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
388 USHORT nResId,
389 const String& aTitle,
390 const String& aLbTitle,
391 List& aEntryList,
392 int nId ) = 0;
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!
397 long nCurrent,
398 long nDefault,
399 int nId ,
400 FieldUnit eFUnit = FUNIT_MM,
401 USHORT nDecimals = 2,
402 long nMaximum = 1000,
403 long nMinimum = 0,
404 long nFirst = 1,
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,
423 ScDPObject& rDPObj,
424 const ScDPLabelData& rLabelData,
425 const ScDPFuncData& rFuncData,
426 const ScDPNameVec& rDataFields,
427 bool bEnableLayout ) = 0;
429 virtual AbstractScDPNumGroupDlg * CreateScDPNumGroupDlg( Window* pParent,
430 int nId,
431 const ScDPNumGroupInfo& rInfo ) = 0;
433 virtual AbstractScDPDateGroupDlg * CreateScDPDateGroupDlg( Window* pParent,
434 int nId,
435 const ScDPNumGroupInfo& rInfo,
436 sal_Int32 nDatePart,
437 const Date& rNullDate ) = 0;
439 virtual AbstractScDPShowDetailDlg * CreateScDPShowDetailDlg( Window* pParent, int nId,
440 ScDPObject& rDPObj,
441 USHORT nOrient ) = 0;
443 virtual AbstractScNewScenarioDlg * CreateScNewScenarioDlg ( Window* pParent, const String& rName, //add for ScNewScenarioDlg
444 int nId,
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,
452 ULONG nHelpId ,
453 int nId ) = 0;
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
459 ULONG nHelpId ,
460 int nId ) = 0;
462 virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( Window* pParent, //add for ScImportOptionsDlg
463 int nId,
464 BOOL bAscii = TRUE,
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
472 Window* pParent,
473 const SfxItemSet* pCellAttrs,
474 int nId) = 0;
476 virtual SfxAbstractTabDialog * CreateScHFEditDlg( SfxViewFrame* pFrame, //add for ScHFEditDlg
477 Window* pParent,
478 const SfxItemSet& rCoreSet,
479 const String& rPageStyle,
480 int nId,
481 USHORT nResId = RID_SCDLG_HFEDIT ) = 0;
483 virtual SfxAbstractTabDialog * CreateScStyleDlg( Window* pParent,//add for ScStyleDlg
484 SfxStyleSheetBase& rStyleBase,
485 USHORT nRscId,
486 int nId) = 0;
488 virtual SfxAbstractTabDialog * CreateScSubTotalDlg( Window* pParent, //add for ScSubTotalDlg
489 const SfxItemSet* pArgSet,
490 int nId) = 0;
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
496 int nId ) = 0;
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;
502 // for tabpage
503 virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0;
504 virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0;
506 #endif