Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / scabstdlg.hxx
blobcdd08eb4cef7bbde087493293e80bdda2874d078
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 #ifndef _SC_ABSTDLG_HXX
21 #define _SC_ABSTDLG_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>
28 #include "sc.hrc"
29 #include "global.hxx"
30 #include "pivot.hxx"
31 #include "i18nlangtag/lang.h"
32 #include "asciiopt.hxx"
34 #include <tabvwsh.hxx>
36 class ScAsciiOptions;
37 class ScAutoFormat;
38 class ScAutoFormatData;
39 class ScDocument;
40 struct ScImportSourceDesc;
41 class ScViewData;
42 class ScQueryItem;
43 class ScImportOptions;
44 class SfxStyleSheetBase;
45 class ScDPObject;
46 struct ScPivotFuncData;
47 struct ScDPNumGroupInfo;
48 class ScSortWarningDlg;
49 class ScTabViewShell;
50 class ScConditionalFormat;
51 class ScConditionalFormatList;
53 namespace com { namespace sun { namespace star { namespace sheet {
54 struct DataPilotFieldReference;
55 } } } }
57 class AbstractScImportAsciiDlg : public VclAbstractDialog
59 public:
60 virtual void GetOptions( ScAsciiOptions& rOpt ) = 0;
61 virtual void SaveParameters() = 0;
64 class AbstractScAutoFormatDlg : public VclAbstractDialog
66 public:
67 virtual sal_uInt16 GetIndex() const = 0 ;
68 virtual OUString GetCurrFormatName() = 0;
71 class AbstractScColRowLabelDlg : public VclAbstractDialog
73 public:
74 virtual sal_Bool IsCol() = 0;
75 virtual sal_Bool IsRow() = 0;
78 class AbstractScCondFormatManagerDlg : public VclAbstractDialog
80 public:
81 virtual ScConditionalFormatList* GetConditionalFormatList() = 0;
83 virtual bool CondFormatsChanged() = 0;
86 class AbstractScDataPilotDatabaseDlg :public VclAbstractDialog
88 public:
89 virtual void GetValues( ScImportSourceDesc& rDesc ) = 0;
92 class AbstractScDataPilotSourceTypeDlg : public VclAbstractDialog
94 public:
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
104 public:
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
114 public:
115 virtual DelCellCmd GetDelCellCmd() const = 0;
118 //for dataform
119 class AbstractScDataFormDlg : public VclAbstractDialog
124 class AbstractScDeleteContentsDlg: public VclAbstractDialog
126 public:
127 virtual void DisableObjects() = 0 ;
128 virtual sal_uInt16 GetDelContentsCmdBits() const = 0;
131 class AbstractScFillSeriesDlg: public VclAbstractDialog
133 public:
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(sal_Bool bFlag=false) = 0;
144 class AbstractScGroupDlg : public VclAbstractDialog
146 public:
147 virtual sal_Bool GetColsChecked() const = 0;
150 class AbstractScInsertCellDlg : public VclAbstractDialog
152 public:
153 virtual InsCellCmd GetInsCellCmd() const = 0;
156 class AbstractScInsertContentsDlg : public VclAbstractDialog
158 public:
159 virtual sal_uInt16 GetInsContentsCmdBits() const = 0;
160 virtual sal_uInt16 GetFormulaCmdBits() const = 0 ;
161 virtual sal_Bool IsSkipEmptyCells() const = 0;
162 virtual sal_Bool IsLink() const = 0;
163 virtual void SetFillMode( sal_Bool bSet ) = 0;
164 virtual void SetOtherDoc( sal_Bool bSet ) = 0;
165 virtual sal_Bool IsTranspose() const = 0;
166 virtual void SetChangeTrack( sal_Bool bSet ) = 0;
167 virtual void SetCellShiftDisabled( int nDisable ) = 0;
168 virtual InsCellCmd GetMoveMode() = 0;
171 class AbstractScInsertTableDlg : public VclAbstractDialog
173 public:
174 virtual sal_Bool GetTablesFromFile() = 0;
175 virtual sal_Bool GetTablesAsLink() = 0;
176 virtual const OUString* GetFirstTable( sal_uInt16* pN = NULL ) = 0;
177 virtual ScDocShell* GetDocShellTables() = 0;
178 virtual sal_Bool IsTableBefore() = 0;
179 virtual sal_uInt16 GetTableCount() = 0;
180 virtual const OUString* GetNextTable( sal_uInt16* pN = NULL ) = 0;
184 class AbstractScSelEntryDlg : public VclAbstractDialog
186 public:
187 virtual OUString GetSelectEntry() const = 0;
190 class AbstractScLinkedAreaDlg : public VclAbstractDialog2
192 public:
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
205 public:
206 virtual long GetInputValue( FieldUnit eUnit = FUNIT_TWIP ) const = 0;
209 class AbstractScMoveTableDlg : public VclAbstractDialog
211 public:
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 (sal_Bool bFlag=true) = 0;
219 virtual void EnableRenameTable (sal_Bool bFlag=true) = 0;
222 class AbstractScNameCreateDlg : public VclAbstractDialog // Manage Name Dialog
224 public:
225 virtual sal_uInt16 GetFlags() const = 0;
228 class AbstractScNamePasteDlg : public VclAbstractDialog
230 public:
231 virtual std::vector<OUString> GetSelectedNames() const = 0;
232 virtual bool IsAllSelected() const = 0;
235 class AbstractScPivotFilterDlg : public VclAbstractDialog
237 public:
238 virtual const ScQueryItem& GetOutputItem() = 0;
241 class AbstractScDPFunctionDlg : public VclAbstractDialog
243 public:
244 virtual sal_uInt16 GetFuncMask() const = 0;
245 virtual ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const = 0;
248 class AbstractScDPSubtotalDlg : public VclAbstractDialog
250 public:
251 virtual sal_uInt16 GetFuncMask() const = 0;
252 virtual void FillLabelData( ScDPLabelData& rLabelData ) const = 0;
255 class AbstractScDPNumGroupDlg : public VclAbstractDialog
257 public:
258 virtual ScDPNumGroupInfo GetGroupInfo() const = 0;
261 class AbstractScDPDateGroupDlg : public VclAbstractDialog
263 public:
264 virtual ScDPNumGroupInfo GetGroupInfo() const = 0;
265 virtual sal_Int32 GetDatePart() const = 0;
268 class AbstractScDPShowDetailDlg : public VclAbstractDialog
270 public:
271 virtual OUString GetDimensionName() const = 0;
274 class AbstractScNewScenarioDlg : public VclAbstractDialog
276 public:
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
287 public:
288 virtual void Insert( const OUString& rString, sal_Bool bSelected ) = 0;
289 virtual sal_uInt16 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_uInt16 nPos) const = 0;
292 virtual sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const = 0;
295 class AbstractScSortWarningDlg : public VclAbstractDialog
299 class AbstractScStringInputDlg : public VclAbstractDialog
301 public:
302 virtual OUString GetInputString() const = 0;
305 class AbstractScTabBgColorDlg : public VclAbstractDialog
307 public:
308 virtual void GetSelectedColor( Color& rColor ) const = 0;
311 class AbstractScImportOptionsDlg : public VclAbstractDialog
313 public:
314 virtual void GetImportOptions( ScImportOptions& rOptions ) const = 0;
317 class AbstractScTextImportOptionsDlg : public VclAbstractDialog
319 public:
320 virtual LanguageType GetLanguageType() const = 0;
321 virtual bool IsDateConversionSet() const = 0;
324 class ScAbstractDialogFactory
326 public:
327 SC_DLLPUBLIC static ScAbstractDialogFactory* Create();
329 virtual AbstractScImportAsciiDlg * CreateScImportAsciiDlg( Window* pParent, OUString aDatName,
330 SvStream* pInStream,
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 ScDocument* pDoc,
339 int nId) = 0;
340 virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent,
341 int nId,
342 sal_Bool bCol = false,
343 sal_Bool bRow = false) = 0;
345 virtual VclAbstractDialog * CreateScColOrRowDlg( Window* pParent,
346 const OUString& rStrTitle,
347 const OUString& rStrLabel,
348 int nId,
349 sal_Bool bColDefault = sal_True ) = 0;
351 virtual AbstractScSortWarningDlg * CreateScSortWarningDlg(Window* pParent, const OUString& rExtendText, const OUString& rCurrentText ) = 0;
353 virtual AbstractScCondFormatManagerDlg* CreateScCondFormatMgrDlg(Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList,
354 const ScAddress& rPos, int nId ) = 0;
356 virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg (Window* pParent ,int nId ) = 0;
358 virtual AbstractScDataPilotSourceTypeDlg * CreateScDataPilotSourceTypeDlg(Window* pParent,
359 bool bEnableExternal) = 0;
361 virtual AbstractScDataPilotServiceDlg * CreateScDataPilotServiceDlg( Window* pParent,
362 const com::sun::star::uno::Sequence<OUString>& rServices,
363 int nId ) = 0;
365 virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg(Window* pParent, bool bDisallowCellMove = false) = 0 ;
367 //for dataform
368 virtual AbstractScDataFormDlg * CreateScDataFormDlg(Window* pParent,
369 ScTabViewShell* pTabViewShell) = 0;
371 virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,
372 sal_uInt16 nCheckDefaults = 0) = 0;
373 virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent,
374 ScDocument& rDocument,
375 FillDir eFillDir,
376 FillCmd eFillCmd,
377 FillDateCmd eFillDateCmd,
378 OUString aStartStr,
379 double fStep,
380 double fMax,
381 sal_uInt16 nPossDir) = 0;
383 virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent,
384 bool bUnGroup = false,
385 bool bRows = true ) = 0;
387 virtual AbstractScInsertCellDlg * CreateScInsertCellDlg( Window* pParent,
388 int nId,
389 sal_Bool bDisallowCellMove = false ) = 0;
391 virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent,
392 int nId,
393 sal_uInt16 nCheckDefaults = 0,
394 const OUString* pStrTitle = NULL ) = 0;
396 virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
397 SCTAB nTabCount, bool bFromFile) = 0;
399 virtual AbstractScSelEntryDlg * CreateScSelEntryDlg ( Window* pParent,
400 const std::vector<OUString> &rEntryList ) = 0;
401 virtual AbstractScLinkedAreaDlg * CreateScLinkedAreaDlg(Window* pParent) = 0;
403 virtual AbstractScMetricInputDlg * CreateScMetricInputDlg ( Window* pParent,
404 sal_uInt16 nResId, // derivative for every dialog!
405 long nCurrent,
406 long nDefault,
407 int nId ,
408 FieldUnit eFUnit = FUNIT_MM,
409 sal_uInt16 nDecimals = 2,
410 long nMaximum = 1000,
411 long nMinimum = 0,
412 long nFirst = 1,
413 long nLast = 100 ) = 0;
415 virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(Window * pParent,
416 const OUString& rDefault) = 0;
418 virtual AbstractScNameCreateDlg * CreateScNameCreateDlg(Window * pParent,
419 sal_uInt16 nFlags) = 0;
421 virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, ScDocShell* pShell, bool bInsList=true ) = 0;
423 virtual AbstractScPivotFilterDlg * CreateScPivotFilterDlg ( Window* pParent,
424 const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId ) = 0;
426 virtual AbstractScDPFunctionDlg * CreateScDPFunctionDlg( Window* pParent, int nId,
427 const ScDPLabelDataVector& rLabelVec,
428 const ScDPLabelData& rLabelData,
429 const ScPivotFuncData& rFuncData ) = 0;
431 virtual AbstractScDPSubtotalDlg * CreateScDPSubtotalDlg( Window* pParent, int nId,
432 ScDPObject& rDPObj,
433 const ScDPLabelData& rLabelData,
434 const ScPivotFuncData& rFuncData,
435 const ScDPNameVec& rDataFields,
436 bool bEnableLayout ) = 0;
438 virtual AbstractScDPNumGroupDlg * CreateScDPNumGroupDlg( Window* pParent,
439 int nId,
440 const ScDPNumGroupInfo& rInfo ) = 0;
442 virtual AbstractScDPDateGroupDlg * CreateScDPDateGroupDlg( Window* pParent,
443 int nId,
444 const ScDPNumGroupInfo& rInfo,
445 sal_Int32 nDatePart,
446 const Date& rNullDate ) = 0;
448 virtual AbstractScDPShowDetailDlg * CreateScDPShowDetailDlg( Window* pParent, int nId,
449 ScDPObject& rDPObj,
450 sal_uInt16 nOrient ) = 0;
452 virtual AbstractScNewScenarioDlg * CreateScNewScenarioDlg ( Window* pParent, const OUString& rName,
453 int nId,
454 sal_Bool bEdit = false, sal_Bool bSheetProtected = false ) = 0;
455 virtual AbstractScShowTabDlg * CreateScShowTabDlg ( Window* pParent, int nId ) = 0;
457 virtual AbstractScStringInputDlg * CreateScStringInputDlg ( Window* pParent,
458 const OUString& rTitle,
459 const OUString& rEditTitle,
460 const OUString& rDefault,
461 const OString& sHelpId, const OString& sEditHelpId ) = 0;
463 virtual AbstractScTabBgColorDlg * CreateScTabBgColorDlg ( Window* pParent,
464 const OUString& rTitle, //Dialog Title
465 const OUString& rTabBgColorNoColorText, //Label for no tab color
466 const Color& rDefaultColor, //Currently selected Color
467 const OString& ,
468 int nId ) = 0;
470 virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( Window* pParent,
471 int nId,
472 sal_Bool bAscii = sal_True,
473 const ScImportOptions* pOptions = NULL,
474 const OUString* pStrTitle = NULL,
475 sal_Bool bMultiByte = false,
476 sal_Bool bOnlyDbtoolsEncodings = false,
477 sal_Bool bImport = sal_True ) = 0;
479 virtual SfxAbstractTabDialog * CreateScAttrDlg( SfxViewFrame* pFrame,
480 Window* pParent,
481 const SfxItemSet* pCellAttrs ) = 0;
483 virtual SfxAbstractTabDialog * CreateScHFEditDlg( SfxViewFrame* pFrame,
484 Window* pParent,
485 const SfxItemSet& rCoreSet,
486 const OUString& rPageStyle,
487 sal_uInt16 nResId = RID_SCDLG_HFEDIT ) = 0;
489 virtual SfxAbstractTabDialog * CreateScStyleDlg( Window* pParent,
490 SfxStyleSheetBase& rStyleBase,
491 sal_uInt16 nRscId,
492 int nId) = 0;
494 virtual SfxAbstractTabDialog * CreateScSubTotalDlg( Window* pParent,
495 const SfxItemSet* pArgSet,
496 int nId) = 0;
498 virtual SfxAbstractTabDialog * CreateScCharDlg( Window* pParent, const SfxItemSet* pAttr,
499 const SfxObjectShell* pDocShell, int nId ) = 0;
501 virtual SfxAbstractTabDialog * CreateScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ,
502 int nId ) = 0;
504 virtual SfxAbstractTabDialog * CreateScValidationDlg( Window* pParent,
505 const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh ) = 0;
506 virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent,
507 const SfxItemSet* pArgSet,int nId ) = 0;
509 // for tabpage
510 virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
511 virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
513 protected:
514 ~ScAbstractDialogFactory() {}
516 #endif
518 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */