nss: upgrade to release 3.73
[LibreOffice.git] / sc / inc / scabstdlg.hxx
blob7feb1eaafbac2f9ea0bc0d0bc32042ee4ed86daa
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 INCLUDED_SC_INC_SCABSTDLG_HXX
21 #define INCLUDED_SC_INC_SCABSTDLG_HXX
23 #include <tools/solar.h>
24 #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
25 #include <sfx2/tabdlg.hxx>
26 #include <tools/fldunit.hxx>
27 #include <vcl/abstdlg.hxx>
28 #include "global.hxx"
29 #include "pivot.hxx"
30 #include <i18nlangtag/lang.h>
31 #include <asciiopt.hxx>
33 class ScAutoFormat;
34 class ScAutoFormatData;
35 class ScDocument;
36 struct ScImportSourceDesc;
37 class ScViewData;
38 class ScQueryItem;
39 class ScImportOptions;
40 class SfxStyleSheetBase;
41 class SfxAbstractTabDialog;
42 class ScDPObject;
43 struct ScDPNumGroupInfo;
44 class ScTabViewShell;
45 class ScConditionalFormat;
46 class ScConditionalFormatList;
47 class Date;
48 enum class CreateNameFlags;
49 enum class CellShiftDisabledFlags;
51 namespace com::sun::star::sheet { struct DataPilotFieldReference; }
53 class ScAsyncTabController
55 public:
56 virtual ~ScAsyncTabController() = default;
57 virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) = 0;
58 virtual const SfxItemSet* GetOutputItemSet() const = 0;
59 virtual void SetCurPageId( const OString &rName ) = 0;
62 class AbstractScImportAsciiDlg : public VclAbstractDialog
64 protected:
65 virtual ~AbstractScImportAsciiDlg() override = default;
66 public:
67 virtual void GetOptions( ScAsciiOptions& rOpt ) = 0;
68 virtual void SaveParameters() = 0;
71 class AbstractScAutoFormatDlg : public VclAbstractDialog
73 protected:
74 virtual ~AbstractScAutoFormatDlg() override = default;
75 public:
76 virtual sal_uInt16 GetIndex() const = 0 ;
77 virtual OUString GetCurrFormatName() = 0;
80 class AbstractScColRowLabelDlg : public VclAbstractDialog
82 protected:
83 virtual ~AbstractScColRowLabelDlg() override = default;
84 public:
85 virtual bool IsCol() = 0;
86 virtual bool IsRow() = 0;
89 class AbstractScCondFormatManagerDlg : public VclAbstractDialog
91 protected:
92 virtual ~AbstractScCondFormatManagerDlg() override = default;
93 public:
94 virtual std::unique_ptr<ScConditionalFormatList> GetConditionalFormatList() = 0;
96 virtual bool CondFormatsChanged() const = 0;
98 virtual void SetModified() = 0;
100 virtual ScConditionalFormat* GetCondFormatSelected() = 0;
103 class AbstractScDataPilotDatabaseDlg :public VclAbstractDialog
105 protected:
106 virtual ~AbstractScDataPilotDatabaseDlg() override = default;
107 public:
108 virtual void GetValues( ScImportSourceDesc& rDesc ) = 0;
111 class AbstractScDataPilotSourceTypeDlg : public VclAbstractDialog
113 protected:
114 virtual ~AbstractScDataPilotSourceTypeDlg() override = default;
115 public:
116 virtual bool IsDatabase() const = 0;
117 virtual bool IsExternal() const = 0;
118 virtual bool IsNamedRange() const = 0;
119 virtual OUString GetSelectedNamedRange() const = 0;
120 virtual void AppendNamedRange(const OUString& rName) = 0;
123 class AbstractScDataPilotServiceDlg : public VclAbstractDialog
125 protected:
126 virtual ~AbstractScDataPilotServiceDlg() override = default;
127 public:
128 virtual OUString GetServiceName() const = 0;
129 virtual OUString GetParSource() const = 0 ;
130 virtual OUString GetParName() const = 0 ;
131 virtual OUString GetParUser() const = 0;
132 virtual OUString GetParPass() const = 0;
135 class AbstractScDeleteCellDlg : public VclAbstractDialog
137 protected:
138 virtual ~AbstractScDeleteCellDlg() override = default;
139 public:
140 virtual DelCellCmd GetDelCellCmd() const = 0;
143 //for dataform
144 class AbstractScDataFormDlg : public VclAbstractDialog
146 protected:
147 virtual ~AbstractScDataFormDlg() override = default;
150 class AbstractScDeleteContentsDlg: public VclAbstractDialog
152 protected:
153 virtual ~AbstractScDeleteContentsDlg() override = default;
154 public:
155 virtual void DisableObjects() = 0 ;
156 virtual InsertDeleteFlags GetDelContentsCmdBits() const = 0;
159 class AbstractScFillSeriesDlg: public VclAbstractDialog
161 protected:
162 virtual ~AbstractScFillSeriesDlg() override = default;
163 public:
164 virtual FillDir GetFillDir() const = 0;
165 virtual FillCmd GetFillCmd() const = 0;
166 virtual FillDateCmd GetFillDateCmd() const = 0;
167 virtual double GetStart() const = 0;
168 virtual double GetStep() const = 0;
169 virtual double GetMax() const = 0;
170 virtual OUString GetStartStr() const = 0;
171 virtual void SetEdStartValEnabled(bool bFlag) = 0;
174 class AbstractScGroupDlg : public VclAbstractDialog
176 protected:
177 virtual ~AbstractScGroupDlg() override = default;
178 public:
179 virtual bool GetColsChecked() const = 0;
182 class AbstractScInsertCellDlg : public VclAbstractDialog
184 protected:
185 virtual ~AbstractScInsertCellDlg() override = default;
186 public:
187 virtual InsCellCmd GetInsCellCmd() const = 0;
190 class AbstractScInsertContentsDlg : public VclAbstractDialog
192 protected:
193 virtual ~AbstractScInsertContentsDlg() override = default;
194 public:
195 virtual InsertDeleteFlags GetInsContentsCmdBits() const = 0;
196 virtual ScPasteFunc GetFormulaCmdBits() const = 0 ;
197 virtual bool IsSkipEmptyCells() const = 0;
198 virtual bool IsLink() const = 0;
199 virtual void SetFillMode( bool bSet ) = 0;
200 virtual void SetOtherDoc( bool bSet ) = 0;
201 virtual bool IsTranspose() const = 0;
202 virtual void SetChangeTrack( bool bSet ) = 0;
203 virtual void SetCellShiftDisabled( CellShiftDisabledFlags nDisable ) = 0;
204 virtual InsCellCmd GetMoveMode() = 0;
207 class AbstractScInsertTableDlg : public VclAbstractDialog
209 protected:
210 virtual ~AbstractScInsertTableDlg() override = default;
211 public:
212 virtual bool GetTablesFromFile() = 0;
213 virtual bool GetTablesAsLink() = 0;
214 virtual const OUString* GetFirstTable( sal_uInt16* pN = nullptr ) = 0;
215 virtual ScDocShell* GetDocShellTables() = 0;
216 virtual bool IsTableBefore() = 0;
217 virtual sal_uInt16 GetTableCount() = 0;
218 virtual const OUString* GetNextTable( sal_uInt16* pN ) = 0;
222 class AbstractScSelEntryDlg : public VclAbstractDialog
224 protected:
225 virtual ~AbstractScSelEntryDlg() override = default;
226 public:
227 virtual OUString GetSelectedEntry() const = 0;
230 class AbstractScLinkedAreaDlg : public VclAbstractDialog
232 protected:
233 virtual ~AbstractScLinkedAreaDlg() override = default;
234 public:
235 virtual void InitFromOldLink( const OUString& rFile, const OUString& rFilter,
236 const OUString& rOptions, const OUString& rSource,
237 sal_uLong nRefresh ) = 0;
238 virtual OUString GetURL() = 0;
239 virtual OUString GetFilter() = 0; // may be empty
240 virtual OUString GetOptions() = 0; // filter options
241 virtual OUString GetSource() = 0; // separated by ";"
242 virtual sal_uLong GetRefresh() = 0; // 0 if disabled
245 class AbstractScMetricInputDlg : public VclAbstractDialog
247 protected:
248 virtual ~AbstractScMetricInputDlg() override = default;
249 public:
250 virtual int GetInputValue() const = 0;
253 class AbstractScMoveTableDlg : public VclAbstractDialog
255 protected:
256 virtual ~AbstractScMoveTableDlg() override = default;
257 public:
258 virtual sal_uInt16 GetSelectedDocument () const = 0;
259 virtual sal_uInt16 GetSelectedTable () const = 0;
260 virtual bool GetCopyTable () const = 0;
261 virtual bool GetRenameTable () const = 0;
262 virtual void GetTabNameString( OUString& rString ) const = 0;
263 virtual void SetForceCopyTable () = 0;
264 virtual void EnableRenameTable (bool bFlag) = 0;
267 class AbstractScNameCreateDlg : public VclAbstractDialog // Manage Name Dialog
269 protected:
270 virtual ~AbstractScNameCreateDlg() override = default;
271 public:
272 virtual CreateNameFlags GetFlags() const = 0;
275 class AbstractScNamePasteDlg : public VclAbstractDialog
277 protected:
278 virtual ~AbstractScNamePasteDlg() override = default;
279 public:
280 virtual std::vector<OUString> GetSelectedNames() const = 0;
283 class AbstractScPivotFilterDlg : public VclAbstractDialog
285 protected:
286 virtual ~AbstractScPivotFilterDlg() override = default;
287 public:
288 virtual const ScQueryItem& GetOutputItem() = 0;
291 class AbstractScDPFunctionDlg : public VclAbstractDialog
293 protected:
294 virtual ~AbstractScDPFunctionDlg() override = default;
295 public:
296 virtual PivotFunc GetFuncMask() const = 0;
297 virtual css::sheet::DataPilotFieldReference GetFieldRef() const = 0;
300 class AbstractScDPSubtotalDlg : public VclAbstractDialog
302 protected:
303 virtual ~AbstractScDPSubtotalDlg() override = default;
304 public:
305 virtual PivotFunc GetFuncMask() const = 0;
306 virtual void FillLabelData( ScDPLabelData& rLabelData ) const = 0;
309 class AbstractScDPNumGroupDlg : public VclAbstractDialog
311 protected:
312 virtual ~AbstractScDPNumGroupDlg() override = default;
313 public:
314 virtual ScDPNumGroupInfo GetGroupInfo() const = 0;
317 class AbstractScDPDateGroupDlg : public VclAbstractDialog
319 protected:
320 virtual ~AbstractScDPDateGroupDlg() override = default;
321 public:
322 virtual ScDPNumGroupInfo GetGroupInfo() const = 0;
323 virtual sal_Int32 GetDatePart() const = 0;
326 class AbstractScDPShowDetailDlg : public VclAbstractDialog
328 protected:
329 virtual ~AbstractScDPShowDetailDlg() override = default;
330 public:
331 virtual OUString GetDimensionName() const = 0;
334 class AbstractScNewScenarioDlg : public VclAbstractDialog
336 protected:
337 virtual ~AbstractScNewScenarioDlg() override = default;
338 public:
340 virtual void SetScenarioData( const OUString& rName, const OUString& rComment,
341 const Color& rColor, ScScenarioFlags nFlags ) = 0;
343 virtual void GetScenarioData( OUString& rName, OUString& rComment,
344 Color& rColor, ScScenarioFlags& rFlags ) const = 0;
347 class AbstractScShowTabDlg : public VclAbstractDialog
349 protected:
350 virtual ~AbstractScShowTabDlg() override = default;
351 public:
352 virtual void Insert( const OUString& rString, bool bSelected ) = 0;
353 virtual void SetDescription(const OUString& rTitle, const OUString& rFixedText, const OString& nDlgHelpId, const OString& nLbHelpId ) = 0;
354 virtual std::vector<sal_Int32> GetSelectedRows() const = 0;
355 virtual OUString GetEntry(sal_Int32 nPos) const = 0;
358 class AbstractScSortWarningDlg : public VclAbstractDialog
360 protected:
361 virtual ~AbstractScSortWarningDlg() override = default;
364 class AbstractScStringInputDlg : public VclAbstractDialog
366 protected:
367 virtual ~AbstractScStringInputDlg() override = default;
368 public:
369 virtual OUString GetInputString() const = 0;
372 class AbstractScTabBgColorDlg : public VclAbstractDialog
374 protected:
375 virtual ~AbstractScTabBgColorDlg() override = default;
376 public:
377 virtual void GetSelectedColor( Color& rColor ) const = 0;
380 class AbstractScImportOptionsDlg : public VclAbstractDialog
382 protected:
383 virtual ~AbstractScImportOptionsDlg() override = default;
384 public:
385 virtual void GetImportOptions( ScImportOptions& rOptions ) const = 0;
386 virtual void SaveImportOptions() const = 0;
389 class AbstractScTextImportOptionsDlg : public VclAbstractDialog
391 protected:
392 virtual ~AbstractScTextImportOptionsDlg() override = default;
393 public:
394 virtual LanguageType GetLanguageType() const = 0;
395 virtual bool IsDateConversionSet() const = 0;
398 class ScAbstractDialogFactory
400 public:
401 SC_DLLPUBLIC static ScAbstractDialogFactory* Create();
403 virtual VclPtr<AbstractScImportAsciiDlg> CreateScImportAsciiDlg(weld::Window* pParent,
404 const OUString& aDatName,
405 SvStream* pInStream,
406 ScImportAsciiCall eCall) = 0;
408 virtual VclPtr<AbstractScTextImportOptionsDlg> CreateScTextImportOptionsDlg(weld::Window* pParent) = 0;
410 virtual VclPtr<AbstractScAutoFormatDlg> CreateScAutoFormatDlg(weld::Window* pParent,
411 ScAutoFormat* pAutoFormat,
412 const ScAutoFormatData* pSelFormatData,
413 ScViewData *pViewData) = 0;
414 virtual VclPtr<AbstractScColRowLabelDlg> CreateScColRowLabelDlg (weld::Window* pParent,
415 bool bCol,
416 bool bRow) = 0;
418 virtual VclPtr<AbstractScSortWarningDlg> CreateScSortWarningDlg(weld::Window* pParent, const OUString& rExtendText, const OUString& rCurrentText ) = 0;
420 virtual VclPtr<AbstractScCondFormatManagerDlg> CreateScCondFormatMgrDlg(weld::Window* pParent, ScDocument& rDoc, const ScConditionalFormatList* pFormatList ) = 0;
422 virtual VclPtr<AbstractScDataPilotDatabaseDlg> CreateScDataPilotDatabaseDlg(weld::Window* pParent) = 0;
424 virtual VclPtr<AbstractScDataPilotSourceTypeDlg> CreateScDataPilotSourceTypeDlg(weld::Window* pParent,
425 bool bEnableExternal) = 0;
427 virtual VclPtr<AbstractScDataPilotServiceDlg> CreateScDataPilotServiceDlg(weld::Window* pParent,
428 const std::vector<OUString>& rServices) = 0;
430 virtual VclPtr<AbstractScDeleteCellDlg> CreateScDeleteCellDlg(weld::Window* pParent, bool bDisallowCellMove) = 0 ;
432 //for dataform
433 virtual VclPtr<AbstractScDataFormDlg> CreateScDataFormDlg(weld::Window* pParent, ScTabViewShell* pTabViewShell) = 0;
435 virtual VclPtr<AbstractScDeleteContentsDlg> CreateScDeleteContentsDlg(weld::Window* pParent) = 0;
436 virtual VclPtr<AbstractScFillSeriesDlg> CreateScFillSeriesDlg(weld::Window* pParent,
437 ScDocument& rDocument,
438 FillDir eFillDir,
439 FillCmd eFillCmd,
440 FillDateCmd eFillDateCmd,
441 const OUString& aStartStr,
442 double fStep,
443 double fMax,
444 SCSIZE nSelectHeight,
445 SCSIZE nSelectWidth,
446 sal_uInt16 nPossDir) = 0;
448 virtual VclPtr<AbstractScGroupDlg> CreateAbstractScGroupDlg(weld::Window* pParent, bool bUnGroup = false) = 0;
450 virtual VclPtr<AbstractScInsertCellDlg> CreateScInsertCellDlg(weld::Window* pParent,
451 bool bDisallowCellMove) = 0;
453 virtual VclPtr<AbstractScInsertContentsDlg> CreateScInsertContentsDlg(weld::Window* pParent,
454 const OUString* pStrTitle = nullptr) = 0;
456 virtual VclPtr<AbstractScInsertTableDlg> CreateScInsertTableDlg(weld::Window* pParent, ScViewData& rViewData,
457 SCTAB nTabCount, bool bFromFile) = 0;
459 virtual VclPtr<AbstractScSelEntryDlg > CreateScSelEntryDlg(weld::Window* pParent, const std::vector<OUString> &rEntryList) = 0;
460 virtual VclPtr<AbstractScLinkedAreaDlg> CreateScLinkedAreaDlg(weld::Window* pParent) = 0;
462 virtual VclPtr<AbstractScMetricInputDlg> CreateScMetricInputDlg(weld::Window* pParent,
463 const OString& sDialogName,
464 tools::Long nCurrent,
465 tools::Long nDefault,
466 FieldUnit eFUnit,
467 sal_uInt16 nDecimals,
468 tools::Long nMaximum,
469 tools::Long nMinimum = 0 ) = 0;
471 virtual VclPtr<AbstractScMoveTableDlg> CreateScMoveTableDlg(weld::Window * pParent,
472 const OUString& rDefault) = 0;
474 virtual VclPtr<AbstractScNameCreateDlg> CreateScNameCreateDlg(weld::Window * pParent,
475 CreateNameFlags nFlags) = 0;
477 virtual VclPtr<AbstractScNamePasteDlg> CreateScNamePasteDlg(weld::Window * pParent, ScDocShell* pShell) = 0;
479 virtual VclPtr<AbstractScPivotFilterDlg> CreateScPivotFilterDlg(weld::Window* pParent,
480 const SfxItemSet& rArgSet,
481 sal_uInt16 nSourceTab) = 0;
483 virtual VclPtr<AbstractScDPFunctionDlg> CreateScDPFunctionDlg(weld::Widget* pParent,
484 const ScDPLabelDataVector& rLabelVec,
485 const ScDPLabelData& rLabelData,
486 const ScPivotFuncData& rFuncData ) = 0;
488 virtual VclPtr<AbstractScDPSubtotalDlg> CreateScDPSubtotalDlg(weld::Widget* pParent,
489 ScDPObject& rDPObj,
490 const ScDPLabelData& rLabelData,
491 const ScPivotFuncData& rFuncData,
492 const ScDPNameVec& rDataFields) = 0;
494 virtual VclPtr<AbstractScDPNumGroupDlg> CreateScDPNumGroupDlg(weld::Window* pParent,
495 const ScDPNumGroupInfo& rInfo) = 0;
497 virtual VclPtr<AbstractScDPDateGroupDlg> CreateScDPDateGroupDlg(weld::Window* pParent,
498 const ScDPNumGroupInfo& rInfo,
499 sal_Int32 nDatePart,
500 const Date& rNullDate ) = 0;
502 virtual VclPtr<AbstractScDPShowDetailDlg> CreateScDPShowDetailDlg(weld::Window* pParent,
503 ScDPObject& rDPObj,
504 css::sheet::DataPilotFieldOrientation nOrient ) = 0;
506 virtual VclPtr<AbstractScNewScenarioDlg> CreateScNewScenarioDlg(weld::Window* pParent, const OUString& rName,
507 bool bEdit, bool bSheetProtected) = 0;
508 virtual VclPtr<AbstractScShowTabDlg> CreateScShowTabDlg(weld::Window* pParent) = 0;
510 virtual VclPtr<AbstractScStringInputDlg> CreateScStringInputDlg(weld::Window* pParent,
511 const OUString& rTitle,
512 const OUString& rEditTitle,
513 const OUString& rDefault,
514 const OString& rHelpId,
515 const OString& rEditHelpId) = 0;
517 virtual VclPtr<AbstractScTabBgColorDlg> CreateScTabBgColorDlg(weld::Window* pParent,
518 const OUString& rTitle, //Dialog Title
519 const OUString& rTabBgColorNoColorText, //Label for no tab color
520 const Color& rDefaultColor) = 0; //Currently selected Color
522 virtual VclPtr<AbstractScImportOptionsDlg> CreateScImportOptionsDlg(weld::Window* pParent, bool bAscii,
523 const ScImportOptions* pOptions,
524 const OUString* pStrTitle,
525 bool bOnlyDbtoolsEncodings,
526 bool bImport = true ) = 0;
528 virtual VclPtr<SfxAbstractTabDialog> CreateScAttrDlg(weld::Window* pParent,
529 const SfxItemSet* pCellAttrs) = 0;
531 virtual VclPtr<SfxAbstractTabDialog> CreateScHFEditDlg(weld::Window* pParent,
532 const SfxItemSet& rCoreSet,
533 const OUString& rPageStyle,
534 sal_uInt16 nResId ) = 0;
536 virtual VclPtr<SfxAbstractTabDialog> CreateScStyleDlg(weld::Window* pParent,
537 SfxStyleSheetBase& rStyleBase,
538 bool bPage /*true : page, false: para*/) = 0;
540 virtual VclPtr<SfxAbstractTabDialog> CreateScSubTotalDlg(weld::Window* pParent,
541 const SfxItemSet* pArgSet) = 0;
543 virtual VclPtr<SfxAbstractTabDialog> CreateScCharDlg(weld::Window* pParent,
544 const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, bool bDrawText) = 0;
546 virtual VclPtr<SfxAbstractTabDialog> CreateScParagraphDlg(weld::Window* pParent,
547 const SfxItemSet* pAttr) = 0;
549 virtual std::shared_ptr<ScAsyncTabController> CreateScSortDlg(weld::Window* pParent, const SfxItemSet* pArgSet) = 0;
551 // for tabpage
552 virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
554 protected:
555 ~ScAbstractDialogFactory() {}
557 #endif
559 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */