Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / sc / inc / scabstdlg.hxx
blob19ab66d4010cbcac2542e4a0bd011aaa337b26b9
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 <tools/string.hxx>
25 #include <sfx2/sfxdlg.hxx>
26 #include <vcl/syswin.hxx>
27 #include <com/sun/star/uno/Sequence.hxx>
28 #include <vcl/field.hxx>
29 #include "sc.hrc"
30 #include "global.hxx"
31 #include "pivot.hxx"
32 #include "i18npool/lang.h"
33 #include "asciiopt.hxx"
35 #include <tabvwsh.hxx>
37 class ScAsciiOptions;
38 class ScAutoFormat;
39 class ScAutoFormatData;
40 class ScDocument;
41 struct ScImportSourceDesc;
42 class ScViewData;
43 class ScQueryItem;
44 class ScImportOptions;
45 class SfxStyleSheetBase;
46 class ScDPObject;
47 struct ScPivotFuncData;
48 struct ScDPNumGroupInfo;
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 //add for ScImportAsciiDlg
59 public:
60 virtual void GetOptions( ScAsciiOptions& rOpt ) = 0;
61 virtual void SaveParameters() = 0;
65 class AbstractScAutoFormatDlg : public VclAbstractDialog //add for ScAutoFormatDlg
67 public:
68 virtual sal_uInt16 GetIndex() const = 0 ;
69 virtual String GetCurrFormatName() = 0;
72 class AbstractScColRowLabelDlg : public VclAbstractDialog //add for ScColRowLabelDlg
74 public:
75 virtual sal_Bool IsCol() = 0;
76 virtual sal_Bool IsRow() = 0;
79 class AbstractScCondFormatManagerDlg : public VclAbstractDialog
81 public:
82 virtual ScConditionalFormatList* GetConditionalFormatList() = 0;
84 virtual bool CondFormatsChanged() = 0;
87 class AbstractScDataPilotDatabaseDlg :public VclAbstractDialog //add for ScDataPilotDatabaseDlg
89 public:
90 virtual void GetValues( ScImportSourceDesc& rDesc ) = 0;
93 class AbstractScDataPilotSourceTypeDlg : public VclAbstractDialog //add for ScDataPilotSourceTypeDlg
95 public:
96 virtual bool IsDatabase() const = 0;
97 virtual bool IsExternal() const = 0;
98 virtual bool IsNamedRange() const = 0;
99 virtual rtl::OUString GetSelectedNamedRange() const = 0;
100 virtual void AppendNamedRange(const ::rtl::OUString& rName) = 0;
103 class AbstractScDataPilotServiceDlg : public VclAbstractDialog //add for ScDataPilotServiceDlg
105 public:
106 virtual String GetServiceName() const = 0;
107 virtual String GetParSource() const = 0 ;
108 virtual String GetParName() const = 0 ;
109 virtual String GetParUser() const = 0;
110 virtual String GetParPass() const = 0;
113 class AbstractScDeleteCellDlg : public VclAbstractDialog //add for ScDeleteCellDlg
115 public:
116 virtual DelCellCmd GetDelCellCmd() const = 0;
119 //for dataform
120 class AbstractScDataFormDlg : public VclAbstractDialog //add for ScDeleteCellDlg
125 class AbstractScDeleteContentsDlg: public VclAbstractDialog //add for ScDeleteContentsDlg
127 public:
128 virtual void DisableObjects() = 0 ;
129 virtual sal_uInt16 GetDelContentsCmdBits() const = 0;
132 class AbstractScFillSeriesDlg: public VclAbstractDialog //add for ScFillSeriesDlg
134 public:
135 virtual FillDir GetFillDir() const = 0;
136 virtual FillCmd GetFillCmd() const = 0;
137 virtual FillDateCmd GetFillDateCmd() const = 0;
138 virtual double GetStart() const = 0;
139 virtual double GetStep() const = 0;
140 virtual double GetMax() const = 0;
141 virtual String GetStartStr() const = 0;
142 virtual void SetEdStartValEnabled(sal_Bool bFlag=false) = 0;
145 class AbstractScGroupDlg : public VclAbstractDialog //add for ScGroupDlg
147 public:
148 virtual sal_Bool GetColsChecked() const = 0;
151 class AbstractScInsertCellDlg : public VclAbstractDialog //add for ScInsertCellDlg
153 public:
154 virtual InsCellCmd GetInsCellCmd() const = 0;
157 class AbstractScInsertContentsDlg : public VclAbstractDialog //add for ScInsertContentsDlg
159 public:
160 virtual sal_uInt16 GetInsContentsCmdBits() const = 0;
161 virtual sal_uInt16 GetFormulaCmdBits() const = 0 ;
162 virtual sal_Bool IsSkipEmptyCells() const = 0;
163 virtual sal_Bool IsLink() const = 0;
164 virtual void SetFillMode( sal_Bool bSet ) = 0;
165 virtual void SetOtherDoc( sal_Bool bSet ) = 0;
166 virtual sal_Bool IsTranspose() const = 0;
167 virtual void SetChangeTrack( sal_Bool bSet ) = 0;
168 virtual void SetCellShiftDisabled( int nDisable ) = 0;
169 virtual InsCellCmd GetMoveMode() = 0;
172 class AbstractScInsertTableDlg : public VclAbstractDialog //add for ScInsertTableDlg
174 public:
175 virtual sal_Bool GetTablesFromFile() = 0;
176 virtual sal_Bool GetTablesAsLink() = 0;
177 virtual const String* GetFirstTable( sal_uInt16* pN = NULL ) = 0;
178 virtual ScDocShell* GetDocShellTables() = 0;
179 virtual sal_Bool IsTableBefore() = 0;
180 virtual sal_uInt16 GetTableCount() = 0;
181 virtual const String* GetNextTable( sal_uInt16* pN = NULL ) = 0;
185 class AbstractScSelEntryDlg : public VclAbstractDialog //add for ScSelEntryDlg
187 public:
188 virtual String GetSelectEntry() const = 0;
191 class AbstractScLinkedAreaDlg : public VclAbstractDialog2 //add for ScLinkedAreaDlg
193 public:
194 virtual void InitFromOldLink( const String& rFile, const String& rFilter,
195 const String& rOptions, const String& rSource,
196 sal_uLong nRefresh ) = 0;
197 virtual String GetURL() = 0;
198 virtual String GetFilter() = 0; // may be empty
199 virtual String GetOptions() = 0; // filter options
200 virtual String GetSource() = 0; // separated by ";"
201 virtual sal_uLong GetRefresh() = 0; // 0 if disabled
204 class AbstractScMetricInputDlg : public VclAbstractDialog //add for ScMetricInputDlg
206 public:
207 virtual long GetInputValue( FieldUnit eUnit = FUNIT_TWIP ) const = 0;
210 class AbstractScMoveTableDlg : public VclAbstractDialog //add for ScMoveTableDlg
212 public:
213 virtual sal_uInt16 GetSelectedDocument () const = 0;
214 virtual sal_uInt16 GetSelectedTable () const = 0;
215 virtual bool GetCopyTable () const = 0;
216 virtual bool GetRenameTable () const = 0;
217 virtual void GetTabNameString( rtl::OUString& rString ) const = 0;
218 virtual void SetForceCopyTable () = 0;
219 virtual void EnableCopyTable (sal_Bool bFlag=true) = 0;
220 virtual void EnableRenameTable (sal_Bool bFlag=true) = 0;
223 class AbstractScNameCreateDlg : public VclAbstractDialog // Manage Name Dialog
225 public:
226 virtual sal_uInt16 GetFlags() const = 0;
229 class AbstractScNamePasteDlg : public VclAbstractDialog //add for ScNamePasteDlg
231 public:
232 virtual std::vector<rtl::OUString> GetSelectedNames() const = 0;
233 virtual bool IsAllSelected() const = 0;
236 class AbstractScPivotFilterDlg : public VclAbstractDialog //add for ScPivotFilterDlg
238 public:
239 virtual const ScQueryItem& GetOutputItem() = 0;
242 class AbstractScDPFunctionDlg : public VclAbstractDialog //add for ScDPFunctionDlg
244 public:
245 virtual sal_uInt16 GetFuncMask() const = 0;
246 virtual ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const = 0;
249 class AbstractScDPSubtotalDlg : public VclAbstractDialog //add for ScDPSubtotalDlg
251 public:
252 virtual sal_uInt16 GetFuncMask() const = 0;
253 virtual void FillLabelData( ScDPLabelData& rLabelData ) const = 0;
256 class AbstractScDPNumGroupDlg : public VclAbstractDialog
258 public:
259 virtual ScDPNumGroupInfo GetGroupInfo() const = 0;
262 class AbstractScDPDateGroupDlg : public VclAbstractDialog
264 public:
265 virtual ScDPNumGroupInfo GetGroupInfo() const = 0;
266 virtual sal_Int32 GetDatePart() const = 0;
269 class AbstractScDPShowDetailDlg : public VclAbstractDialog //add for ScDPShowDetailDlg
271 public:
272 virtual String GetDimensionName() const = 0;
275 class AbstractScNewScenarioDlg : public VclAbstractDialog //add for ScNewScenarioDlg
277 public:
279 virtual void SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment,
280 const Color& rColor, sal_uInt16 nFlags ) = 0;
282 virtual void GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment,
283 Color& rColor, sal_uInt16& rFlags ) const = 0;
286 class AbstractScShowTabDlg : public VclAbstractDialog //add for ScShowTabDlg
288 public:
289 virtual void Insert( const String& rString, sal_Bool bSelected ) = 0;
290 virtual sal_uInt16 GetSelectEntryCount() const = 0;
291 virtual void SetDescription(const String& rTitle, const String& rFixedText, const rtl::OString& nDlgHelpId, const rtl::OString& nLbHelpId ) = 0;
292 virtual String GetSelectEntry(sal_uInt16 nPos) const = 0;
293 virtual sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const = 0;
296 class AbstractScStringInputDlg : public VclAbstractDialog //add for ScStringInputDlg
298 public:
299 virtual void GetInputString( rtl::OUString& rString ) const = 0;
302 class AbstractScTabBgColorDlg : public VclAbstractDialog //add for ScTabBgColorDlg
304 public:
305 virtual void GetSelectedColor( Color& rColor ) const = 0;
308 class AbstractScImportOptionsDlg : public VclAbstractDialog //add for ScImportOptionsDlg
310 public:
311 virtual void GetImportOptions( ScImportOptions& rOptions ) const = 0;
314 class AbstractScTextImportOptionsDlg : public VclAbstractDialog //add for ScLangChooserDlg
316 public:
317 virtual LanguageType GetLanguageType() const = 0;
318 virtual bool IsDateConversionSet() const = 0;
321 //-------Scabstract fractory ---------------------------
322 class ScAbstractDialogFactory
324 public:
325 SC_DLLPUBLIC static ScAbstractDialogFactory* Create();
327 virtual AbstractScImportAsciiDlg * CreateScImportAsciiDlg( Window* pParent, String aDatName, //add for ScImportAsciiDlg
328 SvStream* pInStream, int nId,
329 ScImportAsciiCall eCall) = 0;
331 virtual AbstractScTextImportOptionsDlg * CreateScTextImportOptionsDlg(Window* pParent) = 0;
333 virtual AbstractScAutoFormatDlg * CreateScAutoFormatDlg( Window* pParent, //add for ScAutoFormatDlg
334 ScAutoFormat* pAutoFormat,
335 const ScAutoFormatData* pSelFormatData,
336 ScDocument* pDoc,
337 int nId) = 0;
338 virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, //add for ScColRowLabelDlg
339 int nId,
340 sal_Bool bCol = false,
341 sal_Bool bRow = false) = 0;
343 virtual VclAbstractDialog * CreateScColOrRowDlg( Window* pParent, //add for ScColOrRowDlg
344 const String& rStrTitle,
345 const String& rStrLabel,
346 int nId,
347 sal_Bool bColDefault = sal_True ) = 0;
348 virtual VclAbstractDialog * CreateScSortWarningDlg ( Window* pParent, const String& rExtendText, const String& rCurrentText, int nId ) = 0; //add for ScSortWarningDlg
350 virtual AbstractScCondFormatManagerDlg* CreateScCondFormatMgrDlg(Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList,
351 const ScAddress& rPos, int nId ) = 0;
353 virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg (Window* pParent ,int nId ) = 0; //add for ScDataPilotDatabaseDlg
355 virtual AbstractScDataPilotSourceTypeDlg * CreateScDataPilotSourceTypeDlg ( Window* pParent, sal_Bool bEnableExternal, int nId ) = 0; //add for ScDataPilotSourceTypeDlg
357 virtual AbstractScDataPilotServiceDlg * CreateScDataPilotServiceDlg( Window* pParent, //add for ScDataPilotServiceDlg
358 const com::sun::star::uno::Sequence<rtl::OUString>& rServices,
359 int nId ) = 0;
361 virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId, sal_Bool bDisallowCellMove = false ) = 0 ; //add for ScDeleteCellDlg
363 //for dataform
364 virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell ) = 0 ; //add for ScDataFormDlg
366 virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
367 sal_uInt16 nCheckDefaults = 0 ) = 0;
368 virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg
369 ScDocument& rDocument,
370 FillDir eFillDir,
371 FillCmd eFillCmd,
372 FillDateCmd eFillDateCmd,
373 String aStartStr,
374 double fStep,
375 double fMax,
376 sal_uInt16 nPossDir,
377 int nId) = 0;
379 virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent, //add for ScGroupDlg
380 sal_uInt16 nResId,
381 int nId,
382 sal_Bool bUnGroup = false,
383 sal_Bool bRows = sal_True ) = 0;
385 virtual AbstractScInsertCellDlg * CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg
386 int nId,
387 sal_Bool bDisallowCellMove = false ) = 0;
389 virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg
390 int nId,
391 sal_uInt16 nCheckDefaults = 0,
392 const String* pStrTitle = NULL ) = 0;
394 virtual AbstractScInsertTableDlg * CreateScInsertTableDlg ( Window* pParent, ScViewData& rViewData, //add for ScInsertTableDlg
395 SCTAB nTabCount, bool bFromFile, int nId) = 0;
397 virtual AbstractScSelEntryDlg * CreateScSelEntryDlg ( Window* pParent, // add for ScSelEntryDlg
398 sal_uInt16 nResId,
399 const String& aTitle,
400 const String& aLbTitle,
401 const std::vector<String> &rEntryList,
402 int nId ) = 0;
403 virtual AbstractScLinkedAreaDlg * CreateScLinkedAreaDlg ( Window* pParent, int nId) = 0; //add for ScLinkedAreaDlg
405 virtual AbstractScMetricInputDlg * CreateScMetricInputDlg ( Window* pParent, //add for ScMetricInputDlg
406 sal_uInt16 nResId, // derivative for every dialog!
407 long nCurrent,
408 long nDefault,
409 int nId ,
410 FieldUnit eFUnit = FUNIT_MM,
411 sal_uInt16 nDecimals = 2,
412 long nMaximum = 1000,
413 long nMinimum = 0,
414 long nFirst = 1,
415 long nLast = 100 ) = 0;
417 virtual AbstractScMoveTableDlg * CreateScMoveTableDlg( Window* pParent, //add for ScMoveTableDlg
418 const String& rDefault,
419 int nId ) = 0;
421 virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ) = 0; //add for ScNameCreateDlg
423 virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, ScDocShell* pShell, int nId , bool bInsList=true ) = 0; // add for ScNamePasteDlg
425 virtual AbstractScPivotFilterDlg * CreateScPivotFilterDlg ( Window* pParent, //add for ScPivotFilterDlg
426 const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId ) = 0;
428 virtual AbstractScDPFunctionDlg * CreateScDPFunctionDlg( Window* pParent, int nId,
429 const ScDPLabelDataVector& rLabelVec,
430 const ScDPLabelData& rLabelData,
431 const ScPivotFuncData& rFuncData ) = 0;
433 virtual AbstractScDPSubtotalDlg * CreateScDPSubtotalDlg( Window* pParent, int nId,
434 ScDPObject& rDPObj,
435 const ScDPLabelData& rLabelData,
436 const ScPivotFuncData& rFuncData,
437 const ScDPNameVec& rDataFields,
438 bool bEnableLayout ) = 0;
440 virtual AbstractScDPNumGroupDlg * CreateScDPNumGroupDlg( Window* pParent,
441 int nId,
442 const ScDPNumGroupInfo& rInfo ) = 0;
444 virtual AbstractScDPDateGroupDlg * CreateScDPDateGroupDlg( Window* pParent,
445 int nId,
446 const ScDPNumGroupInfo& rInfo,
447 sal_Int32 nDatePart,
448 const Date& rNullDate ) = 0;
450 virtual AbstractScDPShowDetailDlg * CreateScDPShowDetailDlg( Window* pParent, int nId,
451 ScDPObject& rDPObj,
452 sal_uInt16 nOrient ) = 0;
454 virtual AbstractScNewScenarioDlg * CreateScNewScenarioDlg ( Window* pParent, const String& rName, //add for ScNewScenarioDlg
455 int nId,
456 sal_Bool bEdit = false, sal_Bool bSheetProtected = false ) = 0;
457 virtual AbstractScShowTabDlg * CreateScShowTabDlg ( Window* pParent, int nId ) = 0; //add for ScShowTabDlg
459 virtual AbstractScStringInputDlg * CreateScStringInputDlg ( Window* pParent, //add for ScStringInputDlg
460 const String& rTitle,
461 const String& rEditTitle,
462 const String& rDefault,
463 const rtl::OString& sHelpId, const rtl::OString& sEditHelpId,
464 int nId ) = 0;
466 virtual AbstractScTabBgColorDlg * CreateScTabBgColorDlg ( Window* pParent, //add for ScTabBgColorDlg
467 const String& rTitle, //Dialog Title
468 const String& rTabBgColorNoColorText, //Label for no tab color
469 const Color& rDefaultColor, //Currently selected Color
470 const rtl::OString& ,
471 int nId ) = 0;
473 virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( Window* pParent, //add for ScImportOptionsDlg
474 int nId,
475 sal_Bool bAscii = sal_True,
476 const ScImportOptions* pOptions = NULL,
477 const String* pStrTitle = NULL,
478 sal_Bool bMultiByte = false,
479 sal_Bool bOnlyDbtoolsEncodings = false,
480 sal_Bool bImport = sal_True ) = 0;
482 virtual SfxAbstractTabDialog * CreateScAttrDlg( SfxViewFrame* pFrame, //add for ScAttrDlg
483 Window* pParent,
484 const SfxItemSet* pCellAttrs,
485 int nId) = 0;
487 virtual SfxAbstractTabDialog * CreateScHFEditDlg( SfxViewFrame* pFrame, //add for ScHFEditDlg
488 Window* pParent,
489 const SfxItemSet& rCoreSet,
490 const String& rPageStyle,
491 int nId,
492 sal_uInt16 nResId = RID_SCDLG_HFEDIT ) = 0;
494 virtual SfxAbstractTabDialog * CreateScStyleDlg( Window* pParent,//add for ScStyleDlg
495 SfxStyleSheetBase& rStyleBase,
496 sal_uInt16 nRscId,
497 int nId) = 0;
499 virtual SfxAbstractTabDialog * CreateScSubTotalDlg( Window* pParent, //add for ScSubTotalDlg
500 const SfxItemSet* pArgSet,
501 int nId) = 0;
503 virtual SfxAbstractTabDialog * CreateScCharDlg( Window* pParent, const SfxItemSet* pAttr,//add for ScCharDlg
504 const SfxObjectShell* pDocShell, int nId ) = 0;
506 virtual SfxAbstractTabDialog * CreateScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ,//add for ScParagraphDlg
507 int nId ) = 0;
509 virtual SfxAbstractTabDialog * CreateScValidationDlg( Window* pParent, //add for ScValidationDlg
510 const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh ) = 0;
511 virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent, //add for ScSortDlg
512 const SfxItemSet* pArgSet,int nId ) = 0;
514 // for tabpage
515 virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
516 virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
518 protected:
519 ~ScAbstractDialogFactory() {}
521 #endif
523 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */