xref: /aoo42x/main/sd/source/ui/dlg/sddlgfact.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _SD_DLGFACT_HXX
28 #define _SD_DLGFACT_HXX
29 
30 // include ---------------------------------------------------------------
31 #include "sdabstdlg.hxx"
32 #include <sfx2/basedlgs.hxx>
33 
34 #define DECL_ABSTDLG_BASE(Class,DialogClass)		\
35 	DialogClass* 		pDlg;                   	\
36 public:												\
37 					Class( DialogClass* p)			\
38 					 : pDlg(p)						\
39 					 {}                             \
40 	virtual			~Class();               		\
41 	virtual	short	Execute() ;
42 
43 #define IMPL_ABSTDLG_BASE(Class)					\
44 Class::~Class()                    					\
45 {                                                   \
46 	delete pDlg;                                 	\
47 }													\
48 short Class::Execute()                             \
49 {                                                   \
50 	return pDlg->Execute();                      	\
51 }
52 
53 namespace sd {
54 	class MorphDlg;
55 	class CopyDlg;
56 	class BreakDlg;
57 	class OutlineBulletDlg;
58         class HeaderFooterDialog;
59 }
60 // add for BreakDlg
61 class Dialog;
62 class VclAbstractDialog_Impl : public VclAbstractDialog
63 {
64 	DECL_ABSTDLG_BASE(VclAbstractDialog_Impl,Dialog)
65 };
66 
67 // add for CopyDlg
68 
69 class AbstractCopyDlg_Impl : public AbstractCopyDlg
70 {
71 	DECL_ABSTDLG_BASE(AbstractCopyDlg_Impl,::sd::CopyDlg)
72 	virtual void	GetAttr( SfxItemSet& rOutAttrs );
73 };
74 
75 // add for SdCustomShowDlg
76 class SdCustomShowDlg;
77 class AbstractSdCustomShowDlg_Impl : public AbstractSdCustomShowDlg
78 {
79 	DECL_ABSTDLG_BASE(AbstractSdCustomShowDlg_Impl,SdCustomShowDlg)
80 	virtual sal_Bool		IsModified() const ;
81 	virtual sal_Bool		IsCustomShow() const ;
82 };
83 
84 //add for SdCharDlg begin
85 class SfxTabDialog;
86 class AbstractTabDialog_Impl : public SfxAbstractTabDialog
87 {
88 	DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog )
89 	virtual void				SetCurPageId( sal_uInt16 nId );
90 	virtual const SfxItemSet* 	GetOutputItemSet() const;
91 	virtual const sal_uInt16*		GetInputRanges( const SfxItemPool& pItem );
92 	virtual void				SetInputSet( const SfxItemSet* pInSet );
93 		//From class Window.
94     virtual void		SetText( const XubString& rStr );
95     virtual String   	GetText() const;
96 };
97 //add for SdCharDlg end
98 
99 
100 //add for OutlineBulletDlg begin
101 class SfxTabDialog;
102 class AbstractBulletDialog_Impl : public SfxAbstractTabDialog
103 {
104 	DECL_ABSTDLG_BASE( AbstractBulletDialog_Impl,SfxTabDialog )
105 	virtual void				SetCurPageId( sal_uInt16 nId );
106 	virtual const SfxItemSet* 	GetOutputItemSet() const;
107 	virtual const sal_uInt16*		GetInputRanges( const SfxItemPool& pItem );
108 	virtual void				SetInputSet( const SfxItemSet* pInSet );
109 		//From class Window.
110     virtual void		SetText( const XubString& rStr );
111     virtual String   	GetText() const;
112 };
113 //add for OutlineBulletDlg end
114 
115 class SdPresLayoutTemplateDlg;
116 class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog
117 {
118 	DECL_ABSTDLG_BASE( SdPresLayoutTemplateDlg_Impl,SdPresLayoutTemplateDlg )
119 	virtual void				SetCurPageId( sal_uInt16 nId );
120 	virtual const SfxItemSet* 	GetOutputItemSet() const;
121 	virtual const sal_uInt16*		GetInputRanges( const SfxItemPool& pItem );
122 	virtual void				SetInputSet( const SfxItemSet* pInSet );
123 		//From class Window.
124     virtual void		SetText( const XubString& rStr );
125     virtual String   	GetText() const;
126 };
127 
128 // add for AssistentDlg
129 class AssistentDlg;
130 class AbstractAssistentDlg_Impl : public AbstractAssistentDlg
131 {
132 	DECL_ABSTDLG_BASE(AbstractAssistentDlg_Impl,AssistentDlg)
133 	virtual SfxObjectShellLock GetDocument();
134 	virtual OutputType GetOutputMedium() const;
135 	virtual sal_Bool IsSummary() const;
136 	virtual StartType GetStartType() const;
137 	virtual String GetDocPath() const;
138 	virtual sal_Bool GetStartWithFlag() const;
139 	virtual sal_Bool IsDocEmpty() const;
140 	virtual String GetPassword();
141 };
142 
143 // add for SdModifyFieldDlg
144 class SdModifyFieldDlg;
145 class AbstractSdModifyFieldDlg_Impl : public AbstractSdModifyFieldDlg
146 {
147 	DECL_ABSTDLG_BASE(AbstractSdModifyFieldDlg_Impl,SdModifyFieldDlg)
148 	virtual SvxFieldData*		GetField();
149 	virtual SfxItemSet			GetItemSet();
150 };
151 
152 // add for SdSnapLineDlg
153 class SdSnapLineDlg;
154 class AbstractSdSnapLineDlg_Impl : public AbstractSdSnapLineDlg
155 {
156 	DECL_ABSTDLG_BASE(AbstractSdSnapLineDlg_Impl,SdSnapLineDlg)
157 	virtual void GetAttr(SfxItemSet& rOutAttrs);
158 	virtual void HideRadioGroup();
159 	virtual void HideDeleteBtn();
160 	virtual void SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY);
161 	//from class Window
162 	virtual void    SetText( const XubString& rStr );
163 };
164 
165 // add for SdInsertLayerDlg
166 class SdInsertLayerDlg;
167 class AbstractSdInsertLayerDlg_Impl : public AbstractSdInsertLayerDlg
168 {
169 	DECL_ABSTDLG_BASE(AbstractSdInsertLayerDlg_Impl,SdInsertLayerDlg)
170 	virtual void	GetAttr( SfxItemSet& rOutAttrs ) ;
171 	//from class Window
172 	virtual void    SetHelpId( const rtl::OString& rHelpId ) ;
173 };
174 
175 // add for SdInsertPasteDlg
176 class SdInsertPasteDlg;
177 class AbstractSdInsertPasteDlg_Impl : public AbstractSdInsertPasteDlg
178 {
179 	DECL_ABSTDLG_BASE(AbstractSdInsertPasteDlg_Impl,SdInsertPasteDlg)
180 	virtual sal_Bool			IsInsertBefore() const;
181 };
182 
183 // add for SdInsertPagesObjsDlg
184 class SdInsertPagesObjsDlg;
185 class AbstractSdInsertPagesObjsDlg_Impl : public AbstractSdInsertPagesObjsDlg
186 {
187 	DECL_ABSTDLG_BASE(AbstractSdInsertPagesObjsDlg_Impl,SdInsertPagesObjsDlg)
188 	virtual ::Window *	GetWindow(); //this method is added for return a Window type pointer
189 	virtual List*   	GetList( sal_uInt16 nType );
190 	virtual sal_Bool		IsLink();
191 	virtual sal_Bool 		IsRemoveUnnessesaryMasterPages() const;
192 };
193 
194 // add for MorphDlg
195 class AbstractMorphDlg_Impl : public AbstractMorphDlg
196 {
197 	DECL_ABSTDLG_BASE(AbstractMorphDlg_Impl,::sd::MorphDlg)
198 	virtual void			SaveSettings() const;
199 	virtual sal_uInt16			GetFadeSteps() const;
200 	virtual sal_Bool			IsAttributeFade() const ;
201 	virtual sal_Bool			IsOrientationFade() const ;
202 };
203 
204 // add for SdStartPresentationDlg
205 class SdStartPresentationDlg;
206 class AbstractSdStartPresDlg_Impl : public AbstractSdStartPresDlg
207 {
208 	DECL_ABSTDLG_BASE(AbstractSdStartPresDlg_Impl,SdStartPresentationDlg)
209 	virtual void	GetAttr( SfxItemSet& rOutAttrs );
210 };
211 
212 // add for SdPresLayoutDlg
213 class SdPresLayoutDlg;
214 class AbstractSdPresLayoutDlg_Impl : public AbstractSdPresLayoutDlg
215 {
216 	DECL_ABSTDLG_BASE(AbstractSdPresLayoutDlg_Impl,SdPresLayoutDlg)
217 	virtual void	GetAttr(SfxItemSet& rOutAttrs);
218 };
219 
220 // add for SdActionDlg
221 class SfxSingleTabDialog;
222 class AbstractSfxDialog_Impl : public SfxAbstractDialog
223 {
224 	DECL_ABSTDLG_BASE(AbstractSfxDialog_Impl,SfxModalDialog)
225 	virtual const SfxItemSet* 	GetOutputItemSet() const;
226 	virtual void		SetText( const XubString& rStr );
227     virtual String   	GetText() const;
228 };
229 
230 // add for SdVectorizeDlg
231 class SdVectorizeDlg;
232 class AbstractSdVectorizeDlg_Impl :public AbstractSdVectorizeDlg
233 {
234 	DECL_ABSTDLG_BASE(AbstractSdVectorizeDlg_Impl,SdVectorizeDlg)
235 	virtual const GDIMetaFile&	GetGDIMetaFile() const ;
236 };
237 
238 // add for SdPublishingDlg
239 class SdPublishingDlg;
240 class AbstractSdPublishingDlg_Impl :public AbstractSdPublishingDlg
241 {
242 	DECL_ABSTDLG_BASE(AbstractSdPublishingDlg_Impl,SdPublishingDlg)
243 	virtual void GetParameterSequence( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rParams );
244 };
245 
246 // add for HeaderFooterDialog
247 class AbstractHeaderFooterDialog_Impl :public AbstractHeaderFooterDialog
248 {
249   DECL_ABSTDLG_BASE(AbstractHeaderFooterDialog_Impl,::sd::HeaderFooterDialog)
250   virtual void ApplyToAll( TabPage* pPage );
251   virtual void Apply( TabPage* pPage );
252   virtual void Cancel( TabPage* pPage );
253 };
254 
255 //------------------------------------------------------------------------
256 //AbstractDialogFactory_Impl implementations
257 class SdAbstractDialogFactory_Impl : public SdAbstractDialogFactory
258 {
259 
260 public:
261 	virtual VclAbstractDialog* 			CreateBreakDlg(::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount );
262 	virtual AbstractCopyDlg*			CreateCopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, XColorTable* pColTab, ::sd::View* pView );
263 	virtual AbstractSdCustomShowDlg*	CreateSdCustomShowDlg( ::Window* pWindow, SdDrawDocument& rDrawDoc );
264 	virtual SfxAbstractTabDialog*		CreateSdTabCharDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell );
265 	virtual SfxAbstractTabDialog*		CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, sal_Bool bAreaPage = sal_True );
266 	virtual AbstractAssistentDlg*		CreateAssistentDlg( ::Window* pParent, sal_Bool bAutoPilot);
267 	virtual AbstractSdModifyFieldDlg*	CreateSdModifyFieldDlg( ::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet );
268 	virtual AbstractSdSnapLineDlg*		CreateSdSnapLineDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView);
269 	virtual AbstractSdInsertLayerDlg*	CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable,	String aStr );
270 	virtual AbstractSdInsertPasteDlg*	CreateSdInsertPasteDlg( ::Window* pWindow );
271 	virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( ::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const String& rFileName );
272 	virtual AbstractMorphDlg*			CreateMorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2);
273 	virtual SfxAbstractTabDialog*		CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL );
274 	virtual SfxAbstractTabDialog*		CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr );
275 	virtual AbstractSdStartPresDlg*		CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, List& rPageNames, List* pCSList );
276 	virtual SfxAbstractTabDialog*		CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool );
277 	virtual AbstractSdPresLayoutDlg*	CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs);
278 	virtual SfxAbstractTabDialog*		CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView );
279 	virtual SfxAbstractDialog*			CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView );
280 	virtual AbstractSdVectorizeDlg*		CreateSdVectorizeDlg( ::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell );
281 	virtual AbstractSdPublishingDlg*	CreateSdPublishingDlg( ::Window* pWindow, DocumentType eDocType);
282 
283   	virtual VclAbstractDialog*          CreateMasterLayoutDialog( ::Window* pParent,
284 																  SdDrawDocument* pDoc,
285 																  SdPage* ); // add for MasterLayoutDialog
286 
287 	virtual AbstractHeaderFooterDialog* CreateHeaderFooterDialog( ViewShell* pViewShell,
288 																  ::Window* pParent,
289 																  SdDrawDocument* pDoc,
290 																  SdPage* pCurrentPage ); // add for HeaderFooterDialog
291 
292 	// For TabPage
293 	virtual CreateTabPage				GetSdOptionsContentsTabPageCreatorFunc();
294 	virtual CreateTabPage				GetSdPrintOptionsTabPageCreatorFunc();
295 	virtual CreateTabPage				GetSdOptionsMiscTabPageCreatorFunc();
296 	virtual CreateTabPage				GetSdOptionsSnapTabPageCreatorFunc();
297 };
298 
299 #endif
300 
301