1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef _SW_ABSTDLG_HXX
20 #define _SW_ABSTDLG_HXX
23 #include <tools/solar.h>
24 #include <tools/string.hxx>
25 #include <sfx2/sfxdlg.hxx>
26 #include <svx/svxdlg.hxx>
27 #include <vcl/syswin.hxx>
28 #include <globals.hrc>
29 #include <com/sun/star/uno/Reference.h>
30 #include <com/sun/star/uno/Sequence.h>
31 #include <com/sun/star/frame/XModel.hpp>
32 #include <com/sun/star/frame/XController.hpp>
33 #include <com/sun/star/text/XTextCursor.hpp>
34 #include <com/sun/star/container/XNameAccess.hpp>
35 #include <com/sun/star/awt/XControl.hpp>
36 #include <com/sun/star/container/XNamed.hpp>
37 #include "itabenum.hxx"
46 class SfxStyleSheetBase
;
62 class SwTOXDescription
;
71 class SwChildWinWrapper
;
72 struct SfxChildWinInfo
;
75 #include <cnttab.hxx> //add for struct CurTOXType
77 namespace com
{namespace sun
{namespace star
{
82 class XColumnsSupplier
;
91 typedef void (*SwLabDlgMethod
) (::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& xModel
, const SwLabItem
& rItem
);
93 typedef String (*GlossaryGetCurrGroup
)();
94 typedef void (*GlossarySetActGroup
)(const String
& rNewGroup
);
96 class AbstractGlossaryDlg
: public VclAbstractDialog
//add for SwGlossaryDlg
99 virtual String
GetCurrGrpName() const = 0;
100 virtual String
GetCurrShortName() const = 0;
103 class AbstractFldInputDlg
: public VclAbstractDialog
//add for SwFldInputDlg
106 //from class SalFrame
107 virtual void SetWindowState( const OString
& rStr
) = 0;
108 virtual OString
GetWindowState( sal_uLong nMask
= WINDOWSTATE_MASK_ALL
) const = 0;
111 class AbstractInsFootNoteDlg
: public VclAbstractDialog
//add for SwInsFootNoteDlg
114 virtual String
GetFontName() = 0;
115 virtual sal_Bool
IsEndNote() = 0;
116 virtual String
GetStr() = 0;
118 virtual void SetHelpId( const OString
& sHelpId
) = 0;
119 virtual void SetText( const OUString
& rStr
) = 0;
122 class AbstractInsTableDlg
: public VclAbstractDialog
//add for SwInsTableDlg
125 virtual void GetValues( String
& rName
, sal_uInt16
& rRow
, sal_uInt16
& rCol
,
126 SwInsertTableOptions
& rInsTblFlags
, String
& rTableAutoFmtName
,
127 SwTableAutoFmt
*& prTAFmt
) = 0;
130 class AbstractJavaEditDialog
: public VclAbstractDialog
//add for SwJavaEditDialog
133 virtual OUString
GetText() = 0;
134 virtual String
GetType() = 0;
135 virtual sal_Bool
IsUrl() = 0;
136 virtual sal_Bool
IsNew() = 0;
137 virtual bool IsUpdate() = 0;
140 class AbstractMailMergeDlg
: public VclAbstractDialog
//add for SwMailMergeDlg
143 virtual sal_uInt16
GetMergeType() = 0;
144 virtual const OUString
& GetSaveFilter() const = 0;
145 virtual const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> GetSelection() const = 0;
146 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> GetResultSet() const = 0;
147 virtual bool IsSaveIndividualDocs() const = 0;
148 virtual bool IsGenerateFromDataBase() const = 0;
149 virtual String
GetColumnName() const = 0;
150 virtual String
GetPath() const = 0;
153 class AbstractMailMergeCreateFromDlg
: public VclAbstractDialog
//add for SwMailMergeCreateFromDlg
156 virtual sal_Bool
IsThisDocument() const = 0;
158 class AbstractMailMergeFieldConnectionsDlg
: public VclAbstractDialog
//add for SwMailMergeFieldConnectionsDlg
161 virtual sal_Bool
IsUseExistingConnections() const = 0;
164 class AbstractMultiTOXTabDialog
: public VclAbstractDialog
//add for SwMultiTOXTabDialog
167 virtual SwForm
* GetForm(CurTOXType eType
) = 0;
168 virtual CurTOXType
GetCurrentTOXType() const = 0;
169 virtual SwTOXDescription
& GetTOXDescription(CurTOXType eTOXTypes
) = 0;
171 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
174 class AbstractEditRegionDlg
: public VclAbstractDialog
//add for SwEditRegionDlg
177 virtual void SelectSection(const String
& rSectionName
) = 0;
179 class AbstractInsertSectionTabDialog
: public VclAbstractDialog
//add for SwInsertSectionTabDialog
182 virtual void SetSectionData(SwSectionData
const& rSect
) = 0;
185 class AbstractSwWordCountFloatDlg
: public VclAbstractDialog
188 virtual void UpdateCounts() = 0;
189 virtual void SetCounts(const SwDocStat
&rCurrCnt
, const SwDocStat
&rDocStat
) = 0;
190 virtual Window
* GetWindow() = 0; //this method is added for return a Window type pointer
193 class AbstractSwInsertAbstractDlg
: public VclAbstractDialog
// add for SwInsertAbstractDlg
196 virtual sal_uInt8
GetLevel() const = 0;
197 virtual sal_uInt8
GetPara() const = 0;
200 class AbstractSwAsciiFilterDlg
: public VclAbstractDialog
// add for SwAsciiFilterDlg
203 virtual void FillOptions( SwAsciiOptions
& rOptions
) = 0;
207 class AbstractSwBreakDlg
: public VclAbstractDialog
// add for SwBreakDlg
210 virtual String
GetTemplateName() = 0;
211 virtual sal_uInt16
GetKind() = 0;
212 virtual sal_uInt16
GetPageNumber() = 0;
216 class AbstractSplitTableDialog
: public VclAbstractDialog
// add for
219 virtual sal_uInt16
GetSplitMode() = 0;
222 class AbstractSwConvertTableDlg
: public VclAbstractDialog
// add for SwConvertTableDlg
225 virtual void GetValues( sal_Unicode
& rDelim
,
226 SwInsertTableOptions
& rInsTblFlags
,
227 SwTableAutoFmt
const*& prTAFmt
) = 0;
230 class AbstractSwInsertDBColAutoPilot
: public VclAbstractDialog
// add for SwInsertDBColAutoPilot
234 virtual void DataToDoc( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& rSelection
,
235 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDataSource
> rxSource
,
236 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> xConnection
,
237 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> xResultSet
) = 0;
240 class AbstractDropDownFieldDialog
: public VclAbstractDialog
//add for DropDownFieldDialog
243 virtual OString
GetWindowState( sal_uLong nMask
= WINDOWSTATE_MASK_ALL
) const = 0; //this method inherit from SystemWindow
244 virtual void SetWindowState( const OString
& rStr
) =0;//this method inherit from SystemWindow
247 class AbstractSwLabDlg
: public SfxAbstractTabDialog
//add for SwLabDlg
250 virtual const String
& GetBusinessCardStr() const = 0;
251 virtual Printer
*GetPrt() =0;
254 class AbstractSwSelGlossaryDlg
: public VclAbstractDialog
//add for SwSelGlossaryDlg
257 virtual void InsertGlos(const String
&rRegion
, const String
&rGlosName
) = 0; // inline
258 virtual sal_uInt16
GetSelectedIdx() const = 0; // inline
259 virtual void SelectEntryPos(sal_uInt16 nIdx
) = 0; // inline
262 class AbstractSwAutoFormatDlg
: public VclAbstractDialog
//add for SwAutoFormatDlg
265 virtual void FillAutoFmtOfIndex( SwTableAutoFmt
*& rToFill
) const = 0;
268 class AbstractSwFldDlg
: public SfxAbstractTabDialog
//add for SwFldDlg
271 virtual void Start( sal_Bool bShow
= sal_True
) = 0; //this method from sfxtabdialog
272 virtual void Initialize(SfxChildWinInfo
*pInfo
) = 0;
273 virtual void ReInitDlg() = 0;
274 virtual void ActivateDatabasePage() = 0;
275 virtual void ShowPage( sal_uInt16 nId
) = 0;// this method from SfxTabDialog
276 virtual Window
* GetWindow() = 0; //this method is added for return a Window type pointer
279 class AbstractSwRenameXNamedDlg
: public VclAbstractDialog
//add for SwRenameXNamedDlg
282 virtual void SetForbiddenChars( const String
& rSet
) = 0;
283 virtual void SetAlternativeAccess(
284 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> & xSecond
,
285 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> & xThird
) = 0;
288 class AbstractSwModalRedlineAcceptDlg
: public VclAbstractDialog
//add for SwModalRedlineAcceptDlg
291 virtual void AcceptAll( sal_Bool bAccept
) = 0;
294 class AbstractMarkFloatDlg
: public VclAbstractDialog
//add for SwIndexMarkFloatDlg & SwAuthMarkFloatDlg
297 virtual void ReInitDlg(SwWrtShell
& rWrtShell
) = 0;
298 virtual Window
* GetWindow() = 0; //this method is added for return a Window type pointer
301 #define RET_LOAD_DOC 100
302 #define RET_EDIT_DOC 101
303 #define RET_EDIT_RESULT_DOC 102
304 #define RET_TARGET_CREATED 103
305 #define RET_REMOVE_TARGET 104
306 #define RET_APPLY_TEMPLATE 105
309 class SwMailMergeConfigItem
;
311 class AbstractMailMergeWizard
: public VclAbstractDialog2
314 virtual void SetReloadDocument(const String
& rURL
) = 0;
315 virtual const String
& GetReloadDocument() const = 0;
316 virtual sal_Bool
ShowPage( sal_uInt16 nLevel
) = 0;
317 virtual sal_uInt16
GetRestartPage() const = 0;
321 // Swabstract fractory
322 class SwAbstractDialogFactory
325 static SwAbstractDialogFactory
* Create();
327 virtual SfxAbstractDialog
* CreateSfxDialog( Window
* pParent
, //add for SvxMeasureDialog & SvxConnectionDialog
328 const SfxItemSet
& rAttr
,
329 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& _rxFrame
,
332 virtual AbstractSwWordCountFloatDlg
* CreateSwWordCountDialog(SfxBindings
* pBindings
,
333 SfxChildWindow
* pChild
, Window
*pParent
, SfxChildWinInfo
* pInfo
) = 0;
335 virtual AbstractSwInsertAbstractDlg
* CreateSwInsertAbstractDlg(Window
* pParent
) = 0; // add for SwInsertAbstractDlg
336 virtual AbstractSwAsciiFilterDlg
* CreateSwAsciiFilterDlg ( Window
* pParent
, SwDocShell
& rDocSh
,
337 SvStream
* pStream
) = 0;// add for SwAsciiFilterDlg
338 virtual VclAbstractDialog
* CreateSwInsertBookmarkDlg( Window
*pParent
, SwWrtShell
&rSh
, SfxRequest
& rReq
, int nResId
) = 0;// add for SwInsertBookmarkDlg
340 virtual AbstractSwBreakDlg
* CreateSwBreakDlg(Window
*pParent
, SwWrtShell
&rSh
) = 0; // add for SwBreakDlg
341 virtual VclAbstractDialog
* CreateSwChangeDBDlg(SwView
& rVw
) = 0; //add for SwChangeDBDlg
342 virtual SfxAbstractTabDialog
* CreateSwCharDlg(Window
* pParent
, SwView
& pVw
, const SfxItemSet
& rCoreSet
,
343 const String
* pFmtStr
= 0, sal_Bool bIsDrwTxtDlg
= sal_False
) = 0; // add for SwCharDlg
344 virtual AbstractSwConvertTableDlg
* CreateSwConvertTableDlg(SwView
& rView
, bool bToTable
) = 0; //add for SwConvertTableDlg
345 virtual VclAbstractDialog
* CreateSwCaptionDialog ( Window
*pParent
, SwView
&rV
,int nResId
) = 0; //add for SwCaptionDialog
347 virtual AbstractSwInsertDBColAutoPilot
* CreateSwInsertDBColAutoPilot( SwView
& rView
, // add for SwInsertDBColAutoPilot
348 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDataSource
> rxSource
,
349 com::sun::star::uno::Reference
<com::sun::star::sdbcx::XColumnsSupplier
> xColSupp
,
350 const SwDBData
& rData
, int nResId
) = 0;
351 virtual SfxAbstractTabDialog
* CreateSwFootNoteOptionDlg( Window
*pParent
, SwWrtShell
&rSh
,int nResId
) = 0;//add for SwFootNoteOptionDlg
353 //add for DropDownFieldDialog
354 virtual AbstractDropDownFieldDialog
* CreateDropDownFieldDialog(Window
*pParent
, SwWrtShell
&rSh
,
355 SwField
* pField
, sal_Bool bNextButton
= sal_False
) = 0;
356 virtual SfxAbstractTabDialog
* CreateSwEnvDlg ( Window
* pParent
, const SfxItemSet
& rSet
, SwWrtShell
* pWrtSh
, Printer
* pPrt
, sal_Bool bInsert
,int nResId
) = 0; //add for SwEnvDlg
359 virtual AbstractSwLabDlg
* CreateSwLabDlg ( Window
* pParent
, const SfxItemSet
& rSet
, //add for SwLabDlg
360 SwNewDBMgr
* pNewDBMgr
, sal_Bool bLabel
,int nResId
) = 0;
362 virtual SwLabDlgMethod
GetSwLabDlgStaticMethod () =0;//add for SwLabDlg
364 virtual SfxAbstractTabDialog
* CreateSwParaDlg ( Window
*pParent
, //add for SwParaDlg
366 const SfxItemSet
& rCoreSet
,
367 sal_uInt8 nDialogMode
,
369 const String
*pCollName
= 0,
370 sal_Bool bDraw
= sal_False
,
371 sal_uInt16 nDefPage
= 0) = 0;
373 virtual AbstractSwSelGlossaryDlg
* CreateSwSelGlossaryDlg ( Window
* pParent
, const String
&rShortName
, int nResId
) = 0; //add for SwSelGlossaryDlg
375 virtual VclAbstractDialog
* CreateVclAbstractDialog ( Window
* pParent
, SwWrtShell
&rSh
, int nResId
) = 0; //add for SwTableHeightDlg SwSortDlg
376 virtual AbstractSplitTableDialog
* CreateSplitTblDialog ( Window
* pParent
, SwWrtShell
&rSh
) = 0; //add for SwSplitTblDlg
378 virtual AbstractSwAutoFormatDlg
* CreateSwAutoFormatDlg( Window
* pParent
, SwWrtShell
* pShell
, //add for SwAutoFormatDlg
379 sal_Bool bSetAutoFmt
= sal_True
,
380 const SwTableAutoFmt
* pSelFmt
= 0 ) = 0;
381 virtual SfxAbstractDialog
* CreateSwBorderDlg ( Window
* pParent
, SfxItemSet
& rSet
, sal_uInt16 nType
, int nResId
) = 0;//add for SwBorderDlg
382 virtual SfxAbstractDialog
* CreateSwWrapDlg ( Window
* pParent
, SfxItemSet
& rSet
, SwWrtShell
* pSh
, sal_Bool bDrawMode
, int nResId
) = 0; //add for SwWrapDlg
384 virtual VclAbstractDialog
* CreateSwTableWidthDlg(Window
*pParent
, SwTableFUNC
&rFnc
) = 0; //add for SwTableWidthDlg
385 virtual SfxAbstractTabDialog
* CreateSwTableTabDlg(Window
* pParent
, SfxItemPool
& Pool
,
386 const SfxItemSet
* pItemSet
, SwWrtShell
* pSh
) = 0; //add for SwTableTabDlg
388 virtual AbstractSwFldDlg
* CreateSwFldDlg ( SfxBindings
* pB
, SwChildWinWrapper
* pCW
, Window
*pParent
, int nResId
) = 0; //add for SwFldDlg
389 virtual SfxAbstractDialog
* CreateSwFldEditDlg ( SwView
& rVw
, int nResId
) = 0; //add for SwFldEditDlg
390 virtual AbstractSwRenameXNamedDlg
* CreateSwRenameXNamedDlg(Window
* pParent
, //add for SwRenameXNamedDlg
391 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNamed
> & xNamed
,
392 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> & xNameAccess
) = 0;
393 virtual AbstractSwModalRedlineAcceptDlg
* CreateSwModalRedlineAcceptDlg(Window
*pParent
) = 0;
395 virtual VclAbstractDialog
* CreateTblMergeDialog( Window
* pParent
, sal_Bool
& rWithPrev
) = 0; //add for SwMergeTblDlg
396 virtual SfxAbstractTabDialog
* CreateFrmTabDialog( int nResId
,
397 SfxViewFrame
*pFrame
, Window
*pParent
,
398 const SfxItemSet
& rCoreSet
,
399 sal_Bool bNewFrm
= sal_True
,
400 sal_uInt16 nResType
= DLG_FRM_STD
,
401 sal_Bool bFmt
= sal_False
,
402 sal_uInt16 nDefPage
= 0,
403 const String
* pFmtStr
= 0) = 0; //add for SwFrmDlg
405 // Identifies optional Slot by which the creation of the Template (Style) dialog is triggered.
406 // Currently used, if nRegion == SFX_STYLE_FAMILY_PAGE in order to activate certain dialog pane
407 virtual SfxAbstractApplyTabDialog
* CreateTemplateDialog(
409 SfxStyleSheetBase
& rBase
,
411 const sal_uInt16 nSlot
= 0,
412 SwWrtShell
* pActShell
= 0,
413 sal_Bool bNew
= sal_False
) = 0; //add for SwTemplateDlg
414 virtual AbstractGlossaryDlg
* CreateGlossaryDlg(SfxViewFrame
* pViewFrame
,
415 SwGlossaryHdl
* pGlosHdl
,
416 SwWrtShell
*pWrtShell
) = 0; //add for SwGlossaryDlg
417 virtual AbstractFldInputDlg
* CreateFldInputDlg(Window
*pParent
,
418 SwWrtShell
&rSh
, SwField
* pField
, bool bNextButton
= false) = 0; //add for SwFldInputDlg
419 virtual AbstractInsFootNoteDlg
* CreateInsFootNoteDlg(Window
* pParent
,
420 SwWrtShell
&rSh
, sal_Bool bEd
= sal_False
) = 0; //add for SwInsFootNoteDlg
421 virtual VclAbstractDialog
* CreateTitlePageDlg ( Window
* pParent
) = 0;
422 virtual VclAbstractDialog
* CreateVclSwViewDialog(SwView
& rView
) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
423 virtual AbstractInsTableDlg
* CreateInsTableDlg(SwView
& rView
) = 0; //add for SwInsTableDlg
424 virtual AbstractJavaEditDialog
* CreateJavaEditDialog(Window
* pParent
,
425 SwWrtShell
* pWrtSh
) = 0; //add for SwJavaEditDialog
426 virtual AbstractMailMergeDlg
* CreateMailMergeDlg( int nResId
,
427 Window
* pParent
, SwWrtShell
& rSh
,
428 const String
& rSourceName
,
429 const String
& rTblName
,
430 sal_Int32 nCommandType
,
431 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>& xConnection
,
432 ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>* pSelection
= 0 ) = 0; //add for SwMailMergeDlg
433 virtual AbstractMailMergeCreateFromDlg
* CreateMailMergeCreateFromDlg( int nResId
,
434 Window
* pParent
) = 0; //add for SwMailMergeCreateFromDlg
435 virtual AbstractMailMergeFieldConnectionsDlg
* CreateMailMergeFieldConnectionsDlg( int nResId
,
436 Window
* pParent
) = 0; //add for SwMailMergeFieldConnectionsDlg
437 virtual VclAbstractDialog
* CreateMultiTOXMarkDlg( int nResId
,
438 Window
* pParent
, SwTOXMgr
&rTOXMgr
) = 0; //add for SwMultiTOXMarkDlg
439 virtual SfxAbstractTabDialog
* CreateSwTabDialog( int nResId
,
441 const SfxItemSet
* pSwItemSet
,
442 SwWrtShell
&) = 0; //add for SwSvxNumBulletTabDialog, SwOutlineTabDialog
443 virtual AbstractMultiTOXTabDialog
* CreateMultiTOXTabDialog( int nResId
,
444 Window
* pParent
, const SfxItemSet
& rSet
,
446 SwTOXBase
* pCurTOX
, sal_uInt16 nToxType
= USHRT_MAX
,
447 sal_Bool bGlobal
= sal_False
) = 0; //add for SwMultiTOXTabDialog
448 virtual AbstractEditRegionDlg
* CreateEditRegionDlg(Window
* pParent
, SwWrtShell
& rWrtSh
) = 0; //add for SwEditRegionDlg
449 virtual AbstractInsertSectionTabDialog
* CreateInsertSectionTabDialog( int nResId
,
450 Window
* pParent
, const SfxItemSet
& rSet
, SwWrtShell
& rSh
) = 0; //add for SwInsertSectionTabDialog
451 virtual AbstractMarkFloatDlg
* CreateIndexMarkFloatDlg(
452 SfxBindings
* pBindings
,
453 SfxChildWindow
* pChild
,
455 SfxChildWinInfo
* pInfo
,
456 sal_Bool bNew
=sal_True
) = 0; //add for SwIndexMarkFloatDlg
457 virtual AbstractMarkFloatDlg
* CreateAuthMarkFloatDlg(
458 SfxBindings
* pBindings
,
459 SfxChildWindow
* pChild
,
461 SfxChildWinInfo
* pInfo
,
462 sal_Bool bNew
=sal_True
) = 0; //add for SwAuthMarkFloatDlg
463 virtual VclAbstractDialog
* CreateIndexMarkModalDlg(
464 Window
*pParent
, SwWrtShell
& rSh
, SwTOXMark
* pCurTOXMark
) = 0; //add for SwIndexMarkModalDlg
466 virtual AbstractMailMergeWizard
* CreateMailMergeWizard(SwView
& rView
, SwMailMergeConfigItem
& rConfigItem
) = 0;
468 //add for static func in SwGlossaryDlg
469 virtual GlossaryGetCurrGroup
GetGlossaryCurrGroupFunc() = 0;
470 virtual GlossarySetActGroup
SetGlossaryActGroupFunc() = 0;
473 virtual CreateTabPage
GetTabPageCreatorFunc( sal_uInt16 nId
) = 0;
474 virtual GetTabPageRanges
GetTabPageRangesFunc( sal_uInt16 nId
) = 0;
477 ~SwAbstractDialogFactory() {}
481 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */