1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: swabstdlg.hxx,v $
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 _SW_ABSTDLG_HXX
31 #define _SW_ABSTDLG_HXX
33 // include ---------------------------------------------------------------
35 #include <tools/solar.h>
36 #include <tools/string.hxx>
37 #include <sfx2/sfxdlg.hxx>
38 #include <svx/svxdlg.hxx>
39 #include <vcl/syswin.hxx>
41 #include <globals.hrc>
43 #include <com/sun/star/uno/Reference.h>
44 #include <com/sun/star/uno/Sequence.h>
45 #include <com/sun/star/frame/XModel.hpp>
46 #include <com/sun/star/frame/XController.hpp>
47 #include <com/sun/star/text/XTextCursor.hpp>
48 #include <com/sun/star/container/XNameAccess.hpp>
49 #include <com/sun/star/awt/XControl.hpp>
50 #include <com/sun/star/container/XNamed.hpp>
51 #include "swunodef.hxx"
52 #include "itabenum.hxx"
61 class SfxStyleSheetBase
;
77 class SwTOXDescription
;
86 class SwChildWinWrapper
;
87 struct SfxChildWinInfo
;
90 #include <cnttab.hxx> //add for struct CurTOXType
92 namespace com
{namespace sun
{namespace star
{
97 class XColumnsSupplier
;
106 typedef void (*SwLabDlgMethod
) (::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& xModel
, const SwLabItem
& rItem
);
108 typedef String (*GlossaryGetCurrGroup
)();
109 typedef void (*GlossarySetActGroup
)(const String
& rNewGroup
);
111 class AbstractGlossaryDlg
: public VclAbstractDialog
//add for SwGlossaryDlg
114 virtual String
GetCurrGrpName() const = 0;
115 virtual String
GetCurrShortName() const = 0;
118 class AbstractFldInputDlg
: public VclAbstractDialog
//add for SwFldInputDlg
121 //from class SalFrame
122 virtual void SetWindowState( const ByteString
& rStr
) = 0;
123 virtual ByteString
GetWindowState( ULONG nMask
= WINDOWSTATE_MASK_ALL
) const = 0;
126 class AbstractInsFootNoteDlg
: public VclAbstractDialog
//add for SwInsFootNoteDlg
129 virtual String
GetFontName() = 0;
130 virtual BOOL
IsEndNote() = 0;
131 virtual String
GetStr() = 0;
133 virtual void SetHelpId( ULONG nHelpId
) = 0;
134 virtual void SetText( const XubString
& rStr
) = 0;
137 class AbstractInsertGrfRulerDlg
: public VclAbstractDialog
//add for SwInsertGrfRulerDlg
140 virtual String
GetGraphicName() = 0;
141 virtual BOOL
IsSimpleLine() = 0;
142 virtual BOOL
HasImages() const = 0;
145 class AbstractInsTableDlg
: public VclAbstractDialog
//add for SwInsTableDlg
148 virtual void GetValues( String
& rName
, USHORT
& rRow
, USHORT
& rCol
,
149 SwInsertTableOptions
& rInsTblFlags
, String
& rTableAutoFmtName
,
150 SwTableAutoFmt
*& prTAFmt
) = 0;
153 class AbstractJavaEditDialog
: public VclAbstractDialog
//add for SwJavaEditDialog
156 virtual String
GetText() = 0;
157 virtual String
GetType() = 0;
158 virtual BOOL
IsUrl() = 0;
159 virtual BOOL
IsNew() = 0;
160 virtual BOOL
IsUpdate() = 0;
163 class AbstractMailMergeDlg
: public VclAbstractDialog
//add for SwMailMergeDlg
166 virtual USHORT
GetMergeType() = 0;
167 virtual const ::rtl::OUString
& GetSaveFilter() const = 0;
168 virtual const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> GetSelection() const = 0;
169 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> GetResultSet() const = 0;
171 class AbstractMailMergeCreateFromDlg
: public VclAbstractDialog
//add for SwMailMergeCreateFromDlg
174 virtual BOOL
IsThisDocument() const = 0;
176 class AbstractMailMergeFieldConnectionsDlg
: public VclAbstractDialog
//add for SwMailMergeFieldConnectionsDlg
179 virtual BOOL
IsUseExistingConnections() const = 0;
182 class AbstractMultiTOXTabDialog
: public VclAbstractDialog
//add for SwMultiTOXTabDialog
185 virtual SwForm
* GetForm(CurTOXType eType
) = 0;
186 virtual CurTOXType
GetCurrentTOXType() const = 0;
187 virtual SwTOXDescription
& GetTOXDescription(CurTOXType eTOXTypes
) = 0;
189 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
192 class AbstractEditRegionDlg
: public VclAbstractDialog
//add for SwEditRegionDlg
195 virtual void SelectSection(const String
& rSectionName
) = 0;
197 class AbstractInsertSectionTabDialog
: public VclAbstractDialog
//add for SwInsertSectionTabDialog
200 virtual void SetSection(const SwSection
& rSect
) = 0;
203 class AbstractSwWordCountDialog
: public VclAbstractDialog
206 virtual void SetValues(const SwDocStat
& rCurrent
, const SwDocStat
& rDoc
) = 0;
209 class AbstractSwInsertAbstractDlg
: public VclAbstractDialog
// add for SwInsertAbstractDlg
212 virtual BYTE
GetLevel() const = 0;
213 virtual BYTE
GetPara() const = 0;
216 class AbstractSwAsciiFilterDlg
: public VclAbstractDialog
// add for SwAsciiFilterDlg
219 virtual void FillOptions( SwAsciiOptions
& rOptions
) = 0;
223 class AbstractSwBreakDlg
: public VclAbstractDialog
// add for SwBreakDlg
226 virtual String
GetTemplateName() = 0;
227 virtual USHORT
GetKind() = 0;
228 virtual USHORT
GetPageNumber() = 0;
232 class AbstractSplitTableDialog
: public VclAbstractDialog
// add for
235 virtual sal_uInt16
GetSplitMode() = 0;
238 class AbstractSwConvertTableDlg
: public VclAbstractDialog
// add for SwConvertTableDlg
241 virtual void GetValues( sal_Unicode
& rDelim
,
242 SwInsertTableOptions
& rInsTblFlags
,
243 SwTableAutoFmt
*& prTAFmt
) = 0;
246 class AbstractSwInsertDBColAutoPilot
: public VclAbstractDialog
// add for SwInsertDBColAutoPilot
250 virtual void DataToDoc( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& rSelection
,
251 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDataSource
> rxSource
,
252 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> xConnection
,
253 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
> xResultSet
) = 0;
256 class AbstractDropDownFieldDialog
: public VclAbstractDialog
//add for DropDownFieldDialog
259 virtual ByteString
GetWindowState( ULONG nMask
= WINDOWSTATE_MASK_ALL
) const = 0; //this method inherit from SystemWindow
260 virtual void SetWindowState( const ByteString
& rStr
) =0;//this method inherit from SystemWindow
263 class AbstarctSwLabDlg
: public SfxAbstractTabDialog
//add for SwLabDlg
266 virtual const String
& GetBusinessCardStr() const = 0;
267 virtual Printer
*GetPrt() =0;
270 class AbstarctSwSelGlossaryDlg
: public VclAbstractDialog
//add for SwSelGlossaryDlg
273 virtual void InsertGlos(const String
&rRegion
, const String
&rGlosName
) = 0; // inline
274 virtual USHORT
GetSelectedIdx() const = 0; // inline
275 virtual void SelectEntryPos(USHORT nIdx
) = 0; // inline
278 class AbstractSwSplitTableDlg
:public VclAbstractDialog
//add for SwSplitTableDlg
281 virtual BOOL
IsHorizontal() const = 0;
282 virtual BOOL
IsProportional() const = 0;
283 virtual long GetCount() const = 0;
286 class AbstractSwAutoFormatDlg
: public VclAbstractDialog
//add for SwAutoFormatDlg
289 virtual void FillAutoFmtOfIndex( SwTableAutoFmt
*& rToFill
) const = 0;
292 class AbstractSwFldDlg
: public SfxAbstractTabDialog
//add for SwFldDlg
295 virtual void Start( BOOL bShow
= TRUE
) = 0; //this method from sfxtabdialog
296 virtual void Initialize(SfxChildWinInfo
*pInfo
) = 0;
297 virtual void ReInitDlg() = 0;
298 virtual void ActivateDatabasePage() = 0;
299 virtual void ShowPage( USHORT nId
) = 0;// this method from SfxTabDialog
300 virtual Window
* GetWindow() = 0; //this method is added for return a Window type pointer
303 class AbstractSwRenameXNamedDlg
: public VclAbstractDialog
//add for SwRenameXNamedDlg
306 virtual void SetForbiddenChars( const String
& rSet
) = 0;
307 virtual void SetAlternativeAccess(
308 STAR_REFERENCE( container::XNameAccess
) & xSecond
,
309 STAR_REFERENCE( container::XNameAccess
) & xThird
) = 0;
312 class AbstractSwModalRedlineAcceptDlg
: public VclAbstractDialog
//add for SwModalRedlineAcceptDlg
315 virtual void AcceptAll( BOOL bAccept
) = 0;
318 class AbstractMarkFloatDlg
: public VclAbstractDialog
//add for SwIndexMarkFloatDlg & SwAuthMarkFloatDlg
321 virtual void ReInitDlg(SwWrtShell
& rWrtShell
) = 0;
322 virtual Window
* GetWindow() = 0; //this method is added for return a Window type pointer
325 #define RET_LOAD_DOC 100
326 #define RET_EDIT_DOC 101
327 #define RET_EDIT_RESULT_DOC 102
328 #define RET_TARGET_CREATED 103
329 #define RET_REMOVE_TARGET 104
332 class SwMailMergeConfigItem
;
334 class AbstractMailMergeWizard
: public VclAbstractDialog2
337 virtual void SetReloadDocument(const String
& rURL
) = 0;
338 virtual const String
& GetReloadDocument() const = 0;
339 virtual BOOL
ShowPage( USHORT nLevel
) = 0;
340 virtual sal_uInt16
GetRestartPage() const = 0;
344 //-------Swabstract fractory
345 class SwAbstractDialogFactory
348 static SwAbstractDialogFactory
* Create();
350 virtual SfxAbstractDialog
* CreateSfxDialog( Window
* pParent
, //add for SvxMeasureDialog & SvxConnectionDialog
351 const SfxItemSet
& rAttr
,
352 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& _rxFrame
,
355 virtual AbstractSwWordCountDialog
* CreateSwWordCountDialog( Window
* pWindow
) = 0;
356 virtual AbstractSwInsertAbstractDlg
* CreateSwInsertAbstractDlg ( Window
* pParent
, int nResId
) = 0; // add for SwInsertAbstractDlg
357 virtual AbstractSwAsciiFilterDlg
* CreateSwAsciiFilterDlg ( Window
* pParent
, SwDocShell
& rDocSh
,
358 SvStream
* pStream
, int nResId
) = 0;// add for SwAsciiFilterDlg
359 virtual VclAbstractDialog
* CreateSwInsertBookmarkDlg( Window
*pParent
, SwWrtShell
&rSh
, SfxRequest
& rReq
, int nResId
) = 0;// add for SwInsertBookmarkDlg
361 virtual AbstractSwBreakDlg
* CreateSwBreakDlg( Window
*pParent
, SwWrtShell
&rSh
,int nResId
) = 0; // add for SwBreakDlg
362 virtual VclAbstractDialog
* CreateSwChangeDBDlg( SwView
& rVw
, int nResId
) = 0; //add for SwChangeDBDlg
363 virtual SfxAbstractTabDialog
* CreateSwCharDlg( Window
* pParent
, SwView
& pVw
, const SfxItemSet
& rCoreSet
, int nResId
, // add for SwCharDlg
364 const String
* pFmtStr
= 0, BOOL bIsDrwTxtDlg
= FALSE
) = 0;
365 virtual AbstractSwConvertTableDlg
* CreateSwConvertTableDlg ( SwView
& rView
, int nResId
, bool bToTable
) = 0; //add for SwConvertTableDlg
366 virtual VclAbstractDialog
* CreateSwCaptionDialog ( Window
*pParent
, SwView
&rV
,int nResId
) = 0; //add for SwCaptionDialog
368 virtual AbstractSwInsertDBColAutoPilot
* CreateSwInsertDBColAutoPilot( SwView
& rView
, // add for SwInsertDBColAutoPilot
369 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDataSource
> rxSource
,
370 com::sun::star::uno::Reference
<com::sun::star::sdbcx::XColumnsSupplier
> xColSupp
,
371 const SwDBData
& rData
, int nResId
) = 0;
372 virtual SfxAbstractTabDialog
* CreateSwFootNoteOptionDlg( Window
*pParent
, SwWrtShell
&rSh
,int nResId
) = 0;//add for SwFootNoteOptionDlg
374 virtual AbstractDropDownFieldDialog
* CreateDropDownFieldDialog ( Window
*pParent
, SwWrtShell
&rSh
, //add for DropDownFieldDialog
375 SwField
* pField
,int nResId
, BOOL bNextButton
= FALSE
) = 0;
376 virtual SfxAbstractTabDialog
* CreateSwEnvDlg ( Window
* pParent
, const SfxItemSet
& rSet
, SwWrtShell
* pWrtSh
, Printer
* pPrt
, BOOL bInsert
,int nResId
) = 0; //add for SwEnvDlg
379 virtual AbstarctSwLabDlg
* CreateSwLabDlg ( Window
* pParent
, const SfxItemSet
& rSet
, //add for SwLabDlg
380 SwNewDBMgr
* pNewDBMgr
, BOOL bLabel
,int nResId
) = 0;
382 virtual SwLabDlgMethod
GetSwLabDlgStaticMethod () =0;//add for SwLabDlg
384 virtual SfxAbstractTabDialog
* CreateSwParaDlg ( Window
*pParent
, //add for SwParaDlg
386 const SfxItemSet
& rCoreSet
,
389 const String
*pCollName
= 0,
391 UINT16 nDefPage
= 0) = 0;
393 virtual AbstarctSwSelGlossaryDlg
* CreateSwSelGlossaryDlg ( Window
* pParent
, const String
&rShortName
, int nResId
) = 0; //add for SwSelGlossaryDlg
395 virtual VclAbstractDialog
* CreateVclAbstractDialog ( Window
* pParent
, SwWrtShell
&rSh
, int nResId
) = 0; //add for SwTableHeightDlg SwSortDlg
396 virtual AbstractSplitTableDialog
* CreateSplitTblDialog ( Window
* pParent
, SwWrtShell
&rSh
) = 0; //add for SwSplitTblDlg
398 virtual AbstractSwAutoFormatDlg
* CreateSwAutoFormatDlg( Window
* pParent
, SwWrtShell
* pShell
, //add for SwAutoFormatDlg
400 BOOL bSetAutoFmt
= TRUE
,
401 const SwTableAutoFmt
* pSelFmt
= 0 ) = 0;
402 virtual SfxAbstractDialog
* CreateSwBorderDlg ( Window
* pParent
, SfxItemSet
& rSet
, USHORT nType
, int nResId
) = 0;//add for SwBorderDlg
403 virtual SfxAbstractDialog
* CreateSwWrapDlg ( Window
* pParent
, SfxItemSet
& rSet
, SwWrtShell
* pSh
, BOOL bDrawMode
, int nResId
) = 0; //add for SwWrapDlg
405 virtual VclAbstractDialog
* CreateSwTableWidthDlg ( Window
*pParent
, SwTableFUNC
&rFnc
, int nResId
) = 0; //add for SwTableWidthDlg
406 virtual SfxAbstractTabDialog
* CreateSwTableTabDlg( Window
* pParent
, SfxItemPool
& Pool
,
407 const SfxItemSet
* pItemSet
, SwWrtShell
* pSh
,int nResId
) = 0; //add for SwTableTabDlg
409 virtual AbstractSwFldDlg
* CreateSwFldDlg ( SfxBindings
* pB
, SwChildWinWrapper
* pCW
, Window
*pParent
, int nResId
) = 0; //add for SwFldDlg
410 virtual SfxAbstractDialog
* CreateSwFldEditDlg ( SwView
& rVw
, int nResId
) = 0; //add for SwFldEditDlg
411 virtual AbstractSwRenameXNamedDlg
* CreateSwRenameXNamedDlg( Window
* pParent
, //add for SwRenameXNamedDlg
412 STAR_REFERENCE( container::XNamed
) & xNamed
,
413 STAR_REFERENCE( container::XNameAccess
) & xNameAccess
, int nResId
) = 0;
414 virtual AbstractSwModalRedlineAcceptDlg
* CreateSwModalRedlineAcceptDlg ( Window
*pParent
, int nResId
) = 0; //add for SwModalRedlineAcceptDlg
416 virtual VclAbstractDialog
* CreateSwVclDialog( int nResId
, Window
* pParent
, BOOL
& rWithPrev
) = 0; //add for SwMergeTblDlg
417 virtual SfxAbstractTabDialog
* CreateFrmTabDialog( int nResId
,
418 SfxViewFrame
*pFrame
, Window
*pParent
,
419 const SfxItemSet
& rCoreSet
,
421 USHORT nResType
= DLG_FRM_STD
,
424 const String
* pFmtStr
= 0) = 0; //add for SwFrmDlg
425 virtual SfxAbstractTabDialog
* CreateTemplateDialog( int nResId
,
427 SfxStyleSheetBase
& rBase
,
429 BOOL bColumn
= FALSE
,
430 SwWrtShell
* pActShell
= 0,
431 BOOL bNew
= FALSE
) = 0; //add for SwTemplateDlg
432 virtual AbstractGlossaryDlg
* CreateGlossaryDlg( int nResId
,
433 SfxViewFrame
* pViewFrame
,
434 SwGlossaryHdl
* pGlosHdl
,
435 SwWrtShell
*pWrtShell
) = 0; //add for SwGlossaryDlg
436 virtual AbstractFldInputDlg
* CreateFldInputDlg( int nResId
,
437 Window
*pParent
, SwWrtShell
&rSh
,
438 SwField
* pField
, BOOL bNextButton
= FALSE
) = 0; //add for SwFldInputDlg
439 virtual AbstractInsFootNoteDlg
* CreateInsFootNoteDlg( int nResId
,
440 Window
* pParent
, SwWrtShell
&rSh
, BOOL bEd
= FALSE
) = 0; //add for SwInsFootNoteDlg
441 virtual VclAbstractDialog
* CreateVclSwViewDialog( int nResId
,
442 SwView
& rView
, BOOL bCol
= FALSE
) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
443 virtual AbstractInsertGrfRulerDlg
* CreateInsertGrfRulerDlg( int nResId
,
444 Window
* pParent
) = 0; //add for SwInsertGrfRulerDlg
445 virtual AbstractInsTableDlg
* CreateInsTableDlg( int nResId
,
446 SwView
& rView
) = 0; //add for SwInsTableDlg
447 virtual AbstractJavaEditDialog
* CreateJavaEditDialog( int nResId
,
448 Window
* pParent
, SwWrtShell
* pWrtSh
) = 0; //add for SwJavaEditDialog
449 virtual AbstractMailMergeDlg
* CreateMailMergeDlg( int nResId
,
450 Window
* pParent
, SwWrtShell
& rSh
,
451 const String
& rSourceName
,
452 const String
& rTblName
,
453 sal_Int32 nCommandType
,
454 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>& xConnection
,
455 ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>* pSelection
= 0 ) = 0; //add for SwMailMergeDlg
456 virtual AbstractMailMergeCreateFromDlg
* CreateMailMergeCreateFromDlg( int nResId
,
457 Window
* pParent
) = 0; //add for SwMailMergeCreateFromDlg
458 virtual AbstractMailMergeFieldConnectionsDlg
* CreateMailMergeFieldConnectionsDlg( int nResId
,
459 Window
* pParent
) = 0; //add for SwMailMergeFieldConnectionsDlg
460 virtual VclAbstractDialog
* CreateMultiTOXMarkDlg( int nResId
,
461 Window
* pParent
, SwTOXMgr
&rTOXMgr
) = 0; //add for SwMultiTOXMarkDlg
462 virtual SfxAbstractTabDialog
* CreateSwTabDialog( int nResId
,
464 const SfxItemSet
* pSwItemSet
,
465 SwWrtShell
&) = 0; //add for SwSvxNumBulletTabDialog, SwOutlineTabDialog
466 virtual AbstractMultiTOXTabDialog
* CreateMultiTOXTabDialog( int nResId
,
467 Window
* pParent
, const SfxItemSet
& rSet
,
469 SwTOXBase
* pCurTOX
, USHORT nToxType
= USHRT_MAX
,
470 BOOL bGlobal
= FALSE
) = 0; //add for SwMultiTOXTabDialog
471 virtual AbstractEditRegionDlg
* CreateEditRegionDlg( int nResId
,
472 Window
* pParent
, SwWrtShell
& rWrtSh
) = 0; //add for SwEditRegionDlg
473 virtual AbstractInsertSectionTabDialog
* CreateInsertSectionTabDialog( int nResId
,
474 Window
* pParent
, const SfxItemSet
& rSet
, SwWrtShell
& rSh
) = 0; //add for SwInsertSectionTabDialog
475 virtual AbstractMarkFloatDlg
* CreateIndexMarkFloatDlg( int nResId
,
476 SfxBindings
* pBindings
,
477 SfxChildWindow
* pChild
,
479 SfxChildWinInfo
* pInfo
,
480 sal_Bool bNew
=sal_True
) = 0; //add for SwIndexMarkFloatDlg
481 virtual AbstractMarkFloatDlg
* CreateAuthMarkFloatDlg( int nResId
,
482 SfxBindings
* pBindings
,
483 SfxChildWindow
* pChild
,
485 SfxChildWinInfo
* pInfo
,
486 sal_Bool bNew
=sal_True
) = 0; //add for SwAuthMarkFloatDlg
487 virtual VclAbstractDialog
* CreateIndexMarkModalDlg( int nResId
,
488 Window
*pParent
, SwWrtShell
& rSh
, SwTOXMark
* pCurTOXMark
) = 0; //add for SwIndexMarkModalDlg
490 virtual AbstractMailMergeWizard
* CreateMailMergeWizard(SwView
& rView
, SwMailMergeConfigItem
& rConfigItem
) = 0;
492 //add for static func in SwGlossaryDlg
493 virtual GlossaryGetCurrGroup
GetGlossaryCurrGroupFunc( USHORT nId
) = 0;
494 virtual GlossarySetActGroup
SetGlossaryActGroupFunc( USHORT nId
) = 0;
497 virtual CreateTabPage
GetTabPageCreatorFunc( USHORT nId
) = 0;
498 virtual GetTabPageRanges
GetTabPageRangesFunc( USHORT nId
) = 0;