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: sddlgfact.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 _SD_DLGFACT_HXX
31 #define _SD_DLGFACT_HXX
33 // include ---------------------------------------------------------------
34 #include "sdabstdlg.hxx"
35 #include <sfx2/basedlgs.hxx>
37 #define DECL_ABSTDLG_BASE(Class,DialogClass) \
40 Class( DialogClass* p) \
44 virtual short Execute() ;
46 #define IMPL_ABSTDLG_BASE(Class) \
51 short Class::Execute() \
53 return pDlg->Execute(); \
60 class OutlineBulletDlg
;
61 class HeaderFooterDialog
;
65 class VclAbstractDialog_Impl
: public VclAbstractDialog
67 DECL_ABSTDLG_BASE(VclAbstractDialog_Impl
,Dialog
)
72 class AbstractCopyDlg_Impl
: public AbstractCopyDlg
74 DECL_ABSTDLG_BASE(AbstractCopyDlg_Impl
,::sd::CopyDlg
)
75 virtual void GetAttr( SfxItemSet
& rOutAttrs
);
78 // add for SdCustomShowDlg
79 class SdCustomShowDlg
;
80 class AbstractSdCustomShowDlg_Impl
: public AbstractSdCustomShowDlg
82 DECL_ABSTDLG_BASE(AbstractSdCustomShowDlg_Impl
,SdCustomShowDlg
)
83 virtual BOOL
IsModified() const ;
84 virtual BOOL
IsCustomShow() const ;
87 //add for SdCharDlg begin
89 class AbstractTabDialog_Impl
: public SfxAbstractTabDialog
91 DECL_ABSTDLG_BASE( AbstractTabDialog_Impl
,SfxTabDialog
)
92 virtual void SetCurPageId( USHORT nId
);
93 virtual const SfxItemSet
* GetOutputItemSet() const;
94 virtual const USHORT
* GetInputRanges( const SfxItemPool
& pItem
);
95 virtual void SetInputSet( const SfxItemSet
* pInSet
);
97 virtual void SetText( const XubString
& rStr
);
98 virtual String
GetText() const;
100 //add for SdCharDlg end
103 //add for OutlineBulletDlg begin
105 class AbstractBulletDialog_Impl
: public SfxAbstractTabDialog
107 DECL_ABSTDLG_BASE( AbstractBulletDialog_Impl
,SfxTabDialog
)
108 virtual void SetCurPageId( USHORT nId
);
109 virtual const SfxItemSet
* GetOutputItemSet() const;
110 virtual const USHORT
* GetInputRanges( const SfxItemPool
& pItem
);
111 virtual void SetInputSet( const SfxItemSet
* pInSet
);
113 virtual void SetText( const XubString
& rStr
);
114 virtual String
GetText() const;
116 //add for OutlineBulletDlg end
118 class SdPresLayoutTemplateDlg
;
119 class SdPresLayoutTemplateDlg_Impl
: public SfxAbstractTabDialog
121 DECL_ABSTDLG_BASE( SdPresLayoutTemplateDlg_Impl
,SdPresLayoutTemplateDlg
)
122 virtual void SetCurPageId( USHORT nId
);
123 virtual const SfxItemSet
* GetOutputItemSet() const;
124 virtual const USHORT
* GetInputRanges( const SfxItemPool
& pItem
);
125 virtual void SetInputSet( const SfxItemSet
* pInSet
);
127 virtual void SetText( const XubString
& rStr
);
128 virtual String
GetText() const;
131 // add for AssistentDlg
133 class AbstractAssistentDlg_Impl
: public AbstractAssistentDlg
135 DECL_ABSTDLG_BASE(AbstractAssistentDlg_Impl
,AssistentDlg
)
136 virtual SfxObjectShellLock
GetDocument();
137 virtual OutputType
GetOutputMedium() const;
138 virtual BOOL
IsSummary() const;
139 virtual StartType
GetStartType() const;
140 virtual String
GetDocPath() const;
141 virtual BOOL
GetStartWithFlag() const;
142 virtual BOOL
IsDocEmpty() const;
143 virtual String
GetPassword();
146 // add for SdModifyFieldDlg
147 class SdModifyFieldDlg
;
148 class AbstractSdModifyFieldDlg_Impl
: public AbstractSdModifyFieldDlg
150 DECL_ABSTDLG_BASE(AbstractSdModifyFieldDlg_Impl
,SdModifyFieldDlg
)
151 virtual SvxFieldData
* GetField();
152 virtual SfxItemSet
GetItemSet();
155 // add for SdSnapLineDlg
157 class AbstractSdSnapLineDlg_Impl
: public AbstractSdSnapLineDlg
159 DECL_ABSTDLG_BASE(AbstractSdSnapLineDlg_Impl
,SdSnapLineDlg
)
160 virtual void GetAttr(SfxItemSet
& rOutAttrs
);
161 virtual void HideRadioGroup();
162 virtual void HideDeleteBtn();
163 virtual void SetInputFields(BOOL bEnableX
, BOOL bEnableY
);
165 virtual void SetText( const XubString
& rStr
);
168 // add for SdInsertLayerDlg
169 class SdInsertLayerDlg
;
170 class AbstractSdInsertLayerDlg_Impl
: public AbstractSdInsertLayerDlg
172 DECL_ABSTDLG_BASE(AbstractSdInsertLayerDlg_Impl
,SdInsertLayerDlg
)
173 virtual void GetAttr( SfxItemSet
& rOutAttrs
) ;
175 virtual void SetHelpId( ULONG nHelpId
) ;
178 // add for SdInsertPasteDlg
179 class SdInsertPasteDlg
;
180 class AbstractSdInsertPasteDlg_Impl
: public AbstractSdInsertPasteDlg
182 DECL_ABSTDLG_BASE(AbstractSdInsertPasteDlg_Impl
,SdInsertPasteDlg
)
183 virtual BOOL
IsInsertBefore() const;
186 // add for SdInsertPagesObjsDlg
187 class SdInsertPagesObjsDlg
;
188 class AbstractSdInsertPagesObjsDlg_Impl
: public AbstractSdInsertPagesObjsDlg
190 DECL_ABSTDLG_BASE(AbstractSdInsertPagesObjsDlg_Impl
,SdInsertPagesObjsDlg
)
191 virtual ::Window
* GetWindow(); //this method is added for return a Window type pointer
192 virtual List
* GetList( USHORT nType
);
193 virtual BOOL
IsLink();
194 virtual BOOL
IsRemoveUnnessesaryMasterPages() const;
198 class AbstractMorphDlg_Impl
: public AbstractMorphDlg
200 DECL_ABSTDLG_BASE(AbstractMorphDlg_Impl
,::sd::MorphDlg
)
201 virtual void SaveSettings() const;
202 virtual USHORT
GetFadeSteps() const;
203 virtual BOOL
IsAttributeFade() const ;
204 virtual BOOL
IsOrientationFade() const ;
207 // add for SdStartPresentationDlg
208 class SdStartPresentationDlg
;
209 class AbstractSdStartPresDlg_Impl
: public AbstractSdStartPresDlg
211 DECL_ABSTDLG_BASE(AbstractSdStartPresDlg_Impl
,SdStartPresentationDlg
)
212 virtual void GetAttr( SfxItemSet
& rOutAttrs
);
215 // add for SdPrintDlg
217 class AbstractSdPrintDlg_Impl
: public AbstractSdPrintDlg
219 DECL_ABSTDLG_BASE(AbstractSdPrintDlg_Impl
,SdPrintDlg
)
220 virtual USHORT
GetAttr();
223 // add for SdPresLayoutDlg
224 class SdPresLayoutDlg
;
225 class AbstractSdPresLayoutDlg_Impl
: public AbstractSdPresLayoutDlg
227 DECL_ABSTDLG_BASE(AbstractSdPresLayoutDlg_Impl
,SdPresLayoutDlg
)
228 virtual void GetAttr(SfxItemSet
& rOutAttrs
);
231 // add for SdActionDlg
232 class SfxSingleTabDialog
;
233 class AbstractSfxDialog_Impl
: public SfxAbstractDialog
235 DECL_ABSTDLG_BASE(AbstractSfxDialog_Impl
,SfxModalDialog
)
236 virtual const SfxItemSet
* GetOutputItemSet() const;
237 virtual void SetText( const XubString
& rStr
);
238 virtual String
GetText() const;
241 // add for SdVectorizeDlg
242 class SdVectorizeDlg
;
243 class AbstractSdVectorizeDlg_Impl
:public AbstractSdVectorizeDlg
245 DECL_ABSTDLG_BASE(AbstractSdVectorizeDlg_Impl
,SdVectorizeDlg
)
246 virtual const GDIMetaFile
& GetGDIMetaFile() const ;
249 // add for SdPublishingDlg
250 class SdPublishingDlg
;
251 class AbstractSdPublishingDlg_Impl
:public AbstractSdPublishingDlg
253 DECL_ABSTDLG_BASE(AbstractSdPublishingDlg_Impl
,SdPublishingDlg
)
254 virtual void GetParameterSequence( ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& rParams
);
257 // add for HeaderFooterDialog
258 class AbstractHeaderFooterDialog_Impl
:public AbstractHeaderFooterDialog
260 DECL_ABSTDLG_BASE(AbstractHeaderFooterDialog_Impl
,::sd::HeaderFooterDialog
)
261 virtual void ApplyToAll( TabPage
* pPage
);
262 virtual void Apply( TabPage
* pPage
);
263 virtual void Cancel( TabPage
* pPage
);
266 //------------------------------------------------------------------------
267 //AbstractDialogFactory_Impl implementations
268 class SdAbstractDialogFactory_Impl
: public SdAbstractDialogFactory
272 virtual VclAbstractDialog
* CreateBreakDlg(::Window
* pWindow
, ::sd::DrawView
* pDrView
, ::sd::DrawDocShell
* pShell
, ULONG nSumActionCount
, ULONG nObjCount
);
273 virtual AbstractCopyDlg
* CreateCopyDlg( ::Window
* pWindow
, const SfxItemSet
& rInAttrs
, XColorTable
* pColTab
, ::sd::View
* pView
);
274 virtual AbstractSdCustomShowDlg
* CreateSdCustomShowDlg( ::Window
* pWindow
, SdDrawDocument
& rDrawDoc
);
275 virtual SfxAbstractTabDialog
* CreateSdTabCharDialog( ::Window
* pParent
, const SfxItemSet
* pAttr
, SfxObjectShell
* pDocShell
);
276 virtual SfxAbstractTabDialog
* CreateSdTabPageDialog( ::Window
* pParent
, const SfxItemSet
* pAttr
, SfxObjectShell
* pDocShell
, BOOL bAreaPage
= TRUE
);
277 virtual AbstractAssistentDlg
* CreateAssistentDlg( ::Window
* pParent
, BOOL bAutoPilot
);
278 virtual AbstractSdModifyFieldDlg
* CreateSdModifyFieldDlg( ::Window
* pWindow
, const SvxFieldData
* pInField
, const SfxItemSet
& rSet
);
279 virtual AbstractSdSnapLineDlg
* CreateSdSnapLineDlg( ::Window
* pWindow
, const SfxItemSet
& rInAttrs
, ::sd::View
* pView
);
280 virtual AbstractSdInsertLayerDlg
* CreateSdInsertLayerDlg( ::Window
* pWindow
, const SfxItemSet
& rInAttrs
, bool bDeletable
, String aStr
);
281 virtual AbstractSdInsertPasteDlg
* CreateSdInsertPasteDlg( ::Window
* pWindow
);
282 virtual AbstractSdInsertPagesObjsDlg
* CreateSdInsertPagesObjsDlg( ::Window
* pParent
, const SdDrawDocument
* pDoc
, SfxMedium
* pSfxMedium
, const String
& rFileName
);
283 virtual AbstractMorphDlg
* CreateMorphDlg( ::Window
* pParent
, const SdrObject
* pObj1
, const SdrObject
* pObj2
);
284 virtual SfxAbstractTabDialog
* CreateSdOutlineBulletTabDlg ( ::Window
* pParent
, const SfxItemSet
* pAttr
, ::sd::View
* pView
= NULL
);
285 virtual SfxAbstractTabDialog
* CreateSdParagraphTabDlg ( ::Window
* pParent
, const SfxItemSet
* pAttr
);
286 virtual AbstractSdStartPresDlg
* CreateSdStartPresentationDlg( ::Window
* pWindow
, const SfxItemSet
& rInAttrs
, List
& rPageNames
, List
* pCSList
);
287 virtual AbstractSdPrintDlg
* CreateSdPrintDlg( ::Window
* pWindow
); //add for SdPrintDlg
288 virtual SfxAbstractTabDialog
* CreateSdPresLayoutTemplateDlg( SfxObjectShell
* pDocSh
, ::Window
* pParent
, SdResId DlgId
, SfxStyleSheetBase
& rStyleBase
, PresentationObjects ePO
, SfxStyleSheetBasePool
* pSSPool
);
289 virtual AbstractSdPresLayoutDlg
* CreateSdPresLayoutDlg( ::sd::DrawDocShell
* pDocShell
, ::sd::ViewShell
* pViewShell
, ::Window
* pWindow
, const SfxItemSet
& rInAttrs
);
290 virtual SfxAbstractTabDialog
* CreateSdTabTemplateDlg( ::Window
* pParent
, const SfxObjectShell
* pDocShell
, SfxStyleSheetBase
& rStyleBase
, SdrModel
* pModel
, SdrView
* pView
);
291 virtual SfxAbstractDialog
* CreatSdActionDialog( ::Window
* pParent
, const SfxItemSet
* pAttr
, ::sd::View
* pView
);
292 virtual AbstractSdVectorizeDlg
* CreateSdVectorizeDlg( ::Window
* pParent
, const Bitmap
& rBmp
, ::sd::DrawDocShell
* pDocShell
);
293 virtual AbstractSdPublishingDlg
* CreateSdPublishingDlg( ::Window
* pWindow
, DocumentType eDocType
);
295 virtual VclAbstractDialog
* CreateMasterLayoutDialog( ::Window
* pParent
,
296 SdDrawDocument
* pDoc
,
297 SdPage
* ); // add for MasterLayoutDialog
299 virtual AbstractHeaderFooterDialog
* CreateHeaderFooterDialog( ViewShell
* pViewShell
,
301 SdDrawDocument
* pDoc
,
302 SdPage
* pCurrentPage
); // add for HeaderFooterDialog
305 virtual CreateTabPage
GetSdOptionsContentsTabPageCreatorFunc();
306 virtual CreateTabPage
GetSdPrintOptionsTabPageCreatorFunc();
307 virtual CreateTabPage
GetSdOptionsMiscTabPageCreatorFunc();
308 virtual CreateTabPage
GetSdOptionsSnapTabPageCreatorFunc();